From 6daa792eab1488d013fefc5eb7e4d01f40f38687 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 7 Feb 2010 20:03:20 +0100 Subject: change defaults for CONFIG/BUILD/INSTALL styles All packages need an update, so here is a very huge commit. Most of the 460 source packages use automatic style for configuration, building and installing. Make these styles default to "auto". If you have a package, which does not conform to this, just use manual style and add a do-$task make target. I added a new style named AUTOTOOL style, which is needed for some broken packages, which needs to be updated via autoconf or automake. I renamed CONFIGURE_STYLE to CONFIG_STYLE. Updates for some packages, which have newer upstream versions. Renaming of all package/*/extra directories. Use the directory src/ to provide overwrites of source files or to add the code, when no upstream package is available or used. src directory will be automatically used. --- package/.template/Makefile | 20 +- package/6tunnel/Makefile | 15 +- package/6tunnel/patches/patch-Makefile_in | 27 + package/6tunnel/patches/patch-Makefile_in.orig | 18 + package/Config.in | 10 +- package/adkinstall/Makefile | 1 + package/aiccu/Makefile | 4 +- package/aiccu/extra/common/dn_skipname.c | 51 - package/aiccu/src/common/dn_skipname.c | 51 + package/aircrack-ng/Makefile | 31 +- package/alsa-lib/Makefile | 10 +- package/alsa-utils/Makefile | 3 - package/apr-util/Makefile | 5 +- package/apr/Makefile | 21 +- package/arpd/Makefile | 4 +- package/arpwatch/Makefile | 8 +- package/asterisk/Makefile | 8 +- package/asterisk/patches/patch-Makefile | 13 + package/atftp/Makefile | 10 +- package/atk/Makefile | 4 - package/aufs2-util/Makefile | 3 +- package/autoconf/Makefile | 4 - package/automake/Makefile | 10 +- package/autossh/Makefile | 6 +- package/autossh/patches/patch-Makefile_in | 36 + package/avahi/Makefile | 3 - package/axtls/Makefile | 12 +- package/base-files/Makefile | 4 +- package/base-files/extra/etc/banner | 1 - package/base-files/extra/etc/functions.sh | 79 - package/base-files/extra/etc/group | 2 - package/base-files/extra/etc/hosts | 2 - package/base-files/extra/etc/init.d/boot | 27 - package/base-files/extra/etc/init.d/done | 4 - package/base-files/extra/etc/init.d/rcK | 21 - package/base-files/extra/etc/init.d/rcS | 10 - package/base-files/extra/etc/inittab | 4 - package/base-files/extra/etc/ipkg.conf | 3 - package/base-files/extra/etc/mdev.conf | 11 - package/base-files/extra/etc/modules | 1 - .../extra/etc/network/if-post-down.d/01-bridge | 26 - .../extra/etc/network/if-post-down.d/02-vlan | 10 - .../extra/etc/network/if-pre-up.d/01-atm | 41 - .../extra/etc/network/if-pre-up.d/02-vlan | 36 - .../extra/etc/network/if-pre-up.d/03-bridge | 29 - .../base-files/extra/etc/network/if-up.d/01-bridge | 4 - package/base-files/extra/etc/network/interfaces | 2 - package/base-files/extra/etc/passwd | 2 - package/base-files/extra/etc/profile | 12 - package/base-files/extra/etc/protocols | 45 - package/base-files/extra/etc/rc.conf | 3 - package/base-files/extra/etc/shadow | 3 - package/base-files/extra/etc/sysctl.conf | 17 - package/base-files/extra/init | 22 - package/base-files/extra/lib/mdev/init | 21 - package/base-files/extra/sbin/update | 75 - .../extra/usr/share/udhcpc/default.script | 38 - package/base-files/src/etc/banner | 1 + package/base-files/src/etc/functions.sh | 79 + package/base-files/src/etc/group | 2 + package/base-files/src/etc/hosts | 2 + package/base-files/src/etc/init.d/boot | 27 + package/base-files/src/etc/init.d/done | 4 + package/base-files/src/etc/init.d/rcK | 21 + package/base-files/src/etc/init.d/rcS | 10 + package/base-files/src/etc/inittab | 4 + package/base-files/src/etc/ipkg.conf | 3 + package/base-files/src/etc/mdev.conf | 11 + package/base-files/src/etc/modules | 1 + .../src/etc/network/if-post-down.d/01-bridge | 26 + .../src/etc/network/if-post-down.d/02-vlan | 10 + .../base-files/src/etc/network/if-pre-up.d/01-atm | 41 + .../base-files/src/etc/network/if-pre-up.d/02-vlan | 36 + .../src/etc/network/if-pre-up.d/03-bridge | 29 + .../base-files/src/etc/network/if-up.d/01-bridge | 4 + package/base-files/src/etc/network/interfaces | 2 + package/base-files/src/etc/passwd | 2 + package/base-files/src/etc/profile | 12 + package/base-files/src/etc/protocols | 45 + package/base-files/src/etc/rc.conf | 3 + package/base-files/src/etc/shadow | 3 + package/base-files/src/etc/sysctl.conf | 17 + package/base-files/src/init | 22 + package/base-files/src/lib/mdev/init | 21 + package/base-files/src/sbin/update | 75 + .../base-files/src/usr/share/udhcpc/default.script | 38 + package/bash/Makefile | 3 - package/bc/Makefile | 4 - package/bigreqsproto/Makefile | 5 - package/bind/Makefile | 5 - package/binutils/Makefile | 3 - package/bison/Makefile | 4 - package/bitlbee/Makefile | 36 +- package/bitlbee/patches/patch-Makefile | 22 - package/bitlbee/patches/patch-configure | 1 - package/bitlbee/patches/patch-lib_Makefile | 24 - package/bitlbee/patches/patch-protocols_Makefile | 24 - .../patches/patch-protocols_jabber_Makefile | 22 - .../bitlbee/patches/patch-protocols_msn_Makefile | 24 - .../bitlbee/patches/patch-protocols_oscar_Makefile | 22 - .../bitlbee/patches/patch-protocols_yahoo_Makefile | 22 - package/bluez-firmware/Makefile | 5 +- package/bluez/Makefile | 3 - package/bogofilter/Makefile | 7 +- package/bridge-utils/Makefile | 7 +- package/busybox/Makefile | 4 + package/busybox/config/findutils/Config.in | 1 + package/busybox/config/networking/Config.in | 1 + package/busybox/files/busybox.postinst | 2 +- package/bwm/Makefile | 4 + package/bzip2/Makefile | 4 +- package/ca-certificates/Makefile | 4 +- .../ca-certificates/extra/update-ca-certificates | 80 - package/ca-certificates/src/update-ca-certificates | 80 + package/cairo/Makefile | 3 - package/cbtt/Makefile | 15 +- package/cfgfs/Makefile | 7 +- package/cgilib/Makefile | 4 - package/cgilib/extra/m4/libtool.m4 | 7370 ------------ package/cgilib/extra/m4/ltoptions.m4 | 368 - package/cgilib/extra/m4/ltsugar.m4 | 123 - package/cgilib/extra/m4/ltversion.m4 | 23 - package/cgilib/extra/m4/lt~obsolete.m4 | 92 - package/cgilib/src/m4/libtool.m4 | 7370 ++++++++++++ package/cgilib/src/m4/ltoptions.m4 | 368 + package/cgilib/src/m4/ltsugar.m4 | 123 + package/cgilib/src/m4/ltversion.m4 | 23 + package/cgilib/src/m4/lt~obsolete.m4 | 92 + package/chillispot/Makefile | 6 +- package/collectd/Makefile | 22 +- package/collectd/files/collectd.conf | 847 ++ package/comgt/Makefile | 6 +- package/compositeproto/Makefile | 5 - package/cpio/Makefile | 4 - package/cpufrequtils/Makefile | 6 +- package/cpufrequtils/patches/patch-Makefile | 4 +- package/cryptinit/Makefile | 6 +- package/cryptsetup/Makefile | 29 +- package/cryptsetup/patches/patch-configure_in | 31 + package/cryptsetup/patches/patch-lib_setup_c | 17 - package/ctorrent/Makefile | 10 - package/cups/Makefile | 14 +- package/curl/Makefile | 22 +- package/cutter/Makefile | 7 +- package/cxxtools/Makefile | 18 +- package/cyrus-sasl/Makefile | 11 +- package/damageproto/Makefile | 5 - package/dansguardian/Makefile | 9 +- package/davfs2/Makefile | 3 - package/dbus/Makefile | 7 +- package/deco/Makefile | 5 +- package/dhcp-forwarder/Makefile | 6 +- package/dhcp/Makefile | 3 - package/dialog/Makefile | 3 - package/diffutils/Makefile | 3 - package/digitemp/Makefile | 4 +- package/dnsmasq/Makefile | 3 +- package/dosfstools/Makefile | 10 +- package/dovecot/Makefile | 17 +- package/dovecot/patches/patch-configure | 41 - .../patch-src_lib-sql_sql-drivers-register_c | 13 - .../patches/patch-src_plugins_quota_Makefile_in | 70 - package/dropbear/Makefile | 13 +- package/dsniff/Makefile | 6 +- package/e2fsprogs/Makefile | 4 +- package/ebtables/Makefile | 3 +- package/eglibc/Makefile | 4 + package/elinks/Makefile | 10 +- package/elinks/patches/patch-Makefile_lib | 17 - package/esound/Makefile | 8 +- package/ether-wake/Makefile | 9 +- package/ether-wake/extra/ether-wake.c | 386 - package/ether-wake/src/ether-wake.c | 386 + package/ethtool/Makefile | 4 - package/evieext/Makefile | 5 - package/evilwm/Makefile | 4 +- package/exmap/Makefile | 4 +- package/expat/Makefile | 5 +- package/ez-ipupdate/Makefile | 3 +- package/faad2/Makefile | 5 +- package/fakeidentd/Makefile | 7 +- package/fbset/Makefile | 1 + package/fetchmail/Makefile | 8 +- package/ffmpeg/Makefile | 52 +- package/file/Makefile | 4 - package/findutils/Makefile | 12 +- package/fixesproto/Makefile | 5 - package/flac/Makefile | 3 - package/flex/Makefile | 4 - package/font-adobe-100dpi/Makefile | 4 - package/font-adobe-75dpi/Makefile | 4 - package/font-bh-100dpi/Makefile | 4 - package/font-bh-75dpi/Makefile | 4 - package/font-bh-lucidatypewriter-100dpi/Makefile | 4 - package/font-bh-lucidatypewriter-75dpi/Makefile | 4 - package/font-bh-ttf/Makefile | 4 - package/font-bh-type1/Makefile | 4 - package/font-bitstream-100dpi/Makefile | 4 - package/font-bitstream-75dpi/Makefile | 4 - package/font-bitstream-type1/Makefile | 4 - package/font-misc-misc/Makefile | 4 - package/font-util/Makefile | 4 - package/font-xfree86-type1/Makefile | 4 - package/fontcacheproto/Makefile | 5 - package/fontconfig/Makefile | 3 - package/fontsproto/Makefile | 5 - package/fping/Makefile | 11 +- package/fprobe-ulog/Makefile | 3 - package/fprobe/Makefile | 5 +- package/freeradius-client/Makefile | 3 - package/freeradius-server/Makefile | 57 +- .../files/freeradius-server.conffiles | 2 + .../files/freeradius-server.postinst | 6 + .../freeradius-server/files/freeradius.conffiles | 2 - .../freeradius-server/files/freeradius.postinst | 6 - .../patches/patch-share_dictionary | 440 - .../patches/patch-src_main_event_c | 10 +- .../patches/patch-src_main_modules_c | 11 + .../patches/patch-src_modules_rlm_eap_Makefile_in | 4 +- package/freetype/Makefile | 6 +- package/frickin/Makefile | 3 +- package/frickin/patches/patch-Makefile | 9 + package/frickin/patches/patch-src_Makefile | 9 + package/frickin/patches/patch-src_main_c | 20 + package/fuse/Makefile | 3 - package/gatling/Makefile | 4 +- package/gawk/Makefile | 3 - package/gcc/Makefile | 3 - package/gdb/Makefile | 3 - package/gdbm/Makefile | 7 +- package/gdbserver/Makefile | 4 - package/gettext/Makefile | 4 +- package/git/Makefile | 5 +- package/gkrellmd/Makefile | 5 +- package/glib/Makefile | 12 +- package/glibc/Makefile | 4 + package/gmediaserver/Makefile | 8 +- package/gmp/Makefile | 6 +- package/gnupg/Makefile | 11 +- package/gnutls/Makefile | 3 - package/gperf/Makefile | 4 - package/gpm/Makefile | 3 - package/gpsd/Makefile | 3 - package/grub-bin/Makefile | 2 + package/grub/Makefile | 3 - package/gsm/Makefile | 6 +- package/gtk+/Makefile | 10 +- package/haserl/Makefile | 3 - package/hdparm/Makefile | 5 +- package/hdparm/patches/patch-Makefile | 19 + package/heimdal/Makefile | 6 +- package/heyu/Makefile | 8 +- package/hostapd/Makefile | 3 +- package/htpdate/Makefile | 11 +- package/htpdate/patches/patch-Makefile | 33 +- package/htpdate/patches/patch-htpdate_c | 20 +- package/httping/Makefile | 15 +- package/httping/patches/patch-Makefile | 14 - package/httping/patches/patch-io_c | 12 - package/httping/patches/patch-str_c | 16 - package/httping/patches/patch-str_h | 12 - package/httptunnel/Makefile | 4 - package/icecast/Makefile | 11 +- package/icecast/patches/patch-m4_xiph_curl_m4 | 1 - package/id3lib/Makefile | 9 +- package/iftop/Makefile | 6 +- package/igmpproxy/Makefile | 9 +- package/inputproto/Makefile | 5 - package/ipcad/Makefile | 6 +- package/iperf/Makefile | 8 +- package/iproute2/Makefile | 6 +- package/ipsec-tools/Makefile | 8 +- package/ipset/Makefile | 4 +- package/iptables-snmp/Makefile | 3 - package/iptables/Makefile | 9 +- package/iptraf/Makefile | 6 +- package/irssi/Makefile | 10 +- package/iw/Makefile | 4 +- package/jamvm/Makefile | 7 +- package/jpeg/Makefile | 4 - package/kbproto/Makefile | 5 - package/kismet/Makefile | 4 +- package/knock/Makefile | 5 +- package/krb5/Makefile | 3 - package/l2tpns/Makefile | 3 +- package/lame/Makefile | 8 +- package/less/Makefile | 9 +- package/libICE/Makefile | 4 - package/libSM/Makefile | 4 - package/libX11/Makefile | 5 +- package/libXau/Makefile | 4 - package/libXaw/Makefile | 3 - package/libXdmcp/Makefile | 4 - package/libXext/Makefile | 3 - package/libXfont/Makefile | 3 - package/libXmu/Makefile | 6 +- package/libXpm/Makefile | 3 - package/libXrender/Makefile | 3 - package/libXt/Makefile | 5 +- package/libXt/patches/patch-util_Makefile_in | 30 +- package/libXv/Makefile | 3 - package/libXxf86dga/Makefile | 5 +- package/libao/Makefile | 5 +- package/libart/Makefile | 6 +- package/libaudiofile/Makefile | 5 +- package/libc/Makefile | 4 + package/libcli/Makefile | 5 +- package/libdaemon/Makefile | 3 - package/libdb/Makefile | 66 +- package/libdnet/Makefile | 8 +- package/libelf/Makefile | 7 +- package/libevent/Makefile | 8 +- package/libffi/Makefile | 8 +- package/libfontenc/Makefile | 7 +- package/libgcrypt/Makefile | 3 - package/libgd/Makefile | 6 +- package/libgpg-error/Makefile | 4 - package/libgssglue/Makefile | 6 +- package/libiconv/Makefile | 4 +- package/libid3tag/Makefile | 5 +- package/liblzo/Makefile | 5 +- package/libmad/Makefile | 3 - package/libmms/Makefile | 4 - package/libnet/Makefile | 5 +- package/libnetfilter_queue/Makefile | 6 +- package/libnfnetlink/Makefile | 4 - package/libnfsidmap/Makefile | 4 - package/libnids/Makefile | 7 +- package/libnl/Makefile | 6 +- package/libogg/Makefile | 6 +- package/libol/Makefile | 7 +- package/libosip2/Makefile | 9 +- package/libowfat/Makefile | 4 +- package/libp11/Makefile | 8 +- package/libpcap/Makefile | 8 +- package/libpciaccess/Makefile | 9 +- package/libpng/Makefile | 8 +- package/libpri/Makefile | 6 +- package/libpthread/Makefile | 6 +- package/librpcsecgss/Makefile | 4 - package/libshout/Makefile | 7 +- package/libsigc++/Makefile | 20 +- package/libstdcxx/Makefile | 4 + package/libtasn1/Makefile | 4 - package/libthread_db/Makefile | 4 + package/libtiff/Makefile | 3 - package/libtirpc/Makefile | 5 - package/libtool/Makefile | 4 - package/libtorrent/Makefile | 19 +- package/libupnp/Makefile | 8 +- package/libusb-compat/Makefile | 6 +- package/libusb/Makefile | 5 +- package/libvirt/Makefile | 3 - package/libvorbis/Makefile | 5 +- package/libvorbisidec/Makefile | 11 +- package/libxkbfile/Makefile | 4 - package/libxml2/Makefile | 8 +- package/libxslt/Makefile | 7 +- package/lighttpd/Makefile | 3 - package/links/Makefile | 3 - package/linux-atm/Makefile | 4 - .../linux-atm/patches/patch-src_qgen_Makefile_in | 20 +- package/logrotate/Makefile | 22 +- package/logrotate/patches/patch-Makefile | 41 +- package/logrotate/patches/patch-config_c | 59 - package/logrotate/patches/patch-logrotate_8 | 28 - package/logrotate/patches/patch-logrotate_c | 429 - package/logrotate/patches/patch-logrotate_h | 19 - package/lrzsz/Makefile | 5 +- package/lua/Makefile | 4 + package/lvm/Makefile | 3 - package/lynx/Makefile | 7 +- package/m4/Makefile | 3 - package/macchanger/Makefile | 4 - package/madplay/Makefile | 3 - package/make/Makefile | 4 - package/maradns/Makefile | 17 +- package/maradns/patches/cross-compile-fix.patch | 6 +- package/maradns/patches/patch-Makefile | 94 + package/maradns/patches/patch-build_Makefile_linux | 32 + package/maradns/patches/patch-configure | 19 + package/maradns/patches/patch-dns_Makefile | 11 + package/maradns/patches/patch-qual_Makefile | 12 + .../maradns/patches/patch-rng_rng-32bit-tables_h | 655 ++ package/maradns/patches/patch-server_Makefile | 28 + package/maradns/patches/patch-tcp_Makefile | 24 + package/mc/Makefile | 37 +- package/mc/patches/patch-Makefile_in | 11 + package/mc/patches/patch-lib_mc_ext_in | 92 - package/mc/patches/patch-lib_mc_lib | 378 - package/mc/patches/patch-lib_mc_menu | 17 - package/mc/patches/patch-src_key_c | 13 - package/mc/patches/patch-src_main_c | 13 - package/mc/patches/patch-vfs_extfs_iso9660_in | 31 - package/mdadm/Makefile | 10 +- package/mdadm/patches/patch-Makefile | 17 +- package/mdadm/patches/patch-platform-intel_c | 8 +- package/mgetty/Makefile | 4 + package/miau/Makefile | 4 +- package/miax/Makefile | 4 +- package/microperl/Makefile | 4 +- package/mini_httpd/Makefile | 30 +- package/mini_sendmail/Makefile | 7 +- package/miredo/Makefile | 13 +- package/mksh/Makefile | 4 + package/moc/Makefile | 8 +- package/moc/patches/patch-configure | 20 + package/monit/Makefile | 14 +- package/motion/Makefile | 7 +- package/mpd/Makefile | 55 +- package/mpfr/Makefile | 6 +- package/mplayer/Makefile | 11 +- package/mrd6/Makefile | 10 +- package/mt-daapd/Makefile | 20 +- package/mtd/Makefile | 8 +- package/mtr/Makefile | 5 +- package/mutt/Makefile | 11 +- package/mysql/Makefile | 4 +- package/nand/Makefile | 2 +- package/nano/Makefile | 10 +- package/ncurses/Makefile | 11 +- package/ndisc/Makefile | 6 +- package/ndisc/extra/rdnssd/strverscmp.c | 131 - package/ndisc/src/rdnssd/strverscmp.c | 131 + package/neon/Makefile | 7 +- package/net-snmp/Makefile | 5 +- package/netperf/Makefile | 3 - package/netstat-nat/Makefile | 7 +- package/nfs-utils/Makefile | 6 - package/nmap/Makefile | 3 - package/nmap/extra/sctp.h | 109 - package/nmap/src/sctp.h | 109 + package/nspr/Makefile | 3 - .../patch-mozilla_nsprpub_config_Makefile_in | 11 + package/nss/Makefile | 12 +- package/ntfs-3g/Makefile | 3 - package/ntpclient/Makefile | 6 +- package/nut/Makefile | 3 - package/obexftp/Makefile | 8 +- package/olsrd/Makefile | 4 + package/opencdk/Makefile | 3 - package/openct/Makefile | 5 - package/openldap/Makefile | 58 +- package/openntpd/Makefile | 4 +- package/openntpd/extra/openbsd-compat/port-linux.c | 107 - package/openntpd/src/openbsd-compat/port-linux.c | 107 + package/openobex/Makefile | 6 +- package/opensc/Makefile | 10 +- package/opensips/Makefile | 9 +- package/opensips/files/opensips.cfg | 16 +- package/openssh/Makefile | 3 - package/openssl-pkcs11/Makefile | 5 +- package/openssl/Makefile | 14 +- package/openswan/Makefile | 7 +- package/openvpn/Makefile | 33 +- package/oprofile/Makefile | 5 +- package/osiris/Makefile | 5 +- package/owfs/Makefile | 9 +- package/p910nd/Makefile | 4 +- package/p910nd/files/p910nd.init | 2 +- package/palantir/Makefile | 6 +- package/pango/Makefile | 4 - package/parprouted/Makefile | 4 +- package/parted/Makefile | 4 - package/patch/Makefile | 6 +- package/pciutils/Makefile | 7 +- package/pcre/Makefile | 3 - package/pdnsd/Makefile | 4 - package/perl/Makefile | 3 +- package/php/Makefile | 7 +- package/picocom/Makefile | 4 +- package/pipacs/Makefile | 9 +- package/pixman/Makefile | 4 - package/pmacct/Makefile | 12 +- package/popt/Makefile | 9 +- package/portmap/Makefile | 15 +- package/portsentry/Makefile | 4 +- package/postgresql/Makefile | 6 +- package/ppp/Makefile | 8 +- package/pptp/Makefile | 4 +- package/pptpd/Makefile | 3 - package/privoxy/Makefile | 3 - package/privoxy/extra/config.h.in | 664 -- package/privoxy/extra/configure | 11272 ------------------- package/privoxy/src/config.h.in | 664 ++ package/privoxy/src/configure | 11272 +++++++++++++++++++ package/procmail/Makefile | 4 + package/procmail/extra/Makefile.new | 19 - package/procmail/src/Makefile.new | 19 + package/procps/Makefile | 5 +- package/proftpd/Makefile | 4 +- package/ptunnel/Makefile | 5 +- package/python/Makefile | 4 - package/quagga/Makefile | 3 - package/raddump/Makefile | 5 +- package/radvd/Makefile | 3 - package/randrproto/Makefile | 5 - package/rarpd/Makefile | 3 - package/rdate/Makefile | 7 +- package/rdate/patches/patch-GNUmakefile | 12 + package/readline/Makefile | 5 +- package/reaim/Makefile | 3 +- package/renderproto/Makefile | 5 - package/resourceproto/Makefile | 5 - package/rng-tools/Makefile | 4 - package/rp-pppoe/Makefile | 24 +- package/rpcbind/Makefile | 3 - package/rpcbind/patches/patch-config_h_in | 12 + package/rpcbind/patches/patch-src_rpcbind_c | 14 + package/rpcbind/patches/patch-src_security_c | 41 + package/rpm/Makefile | 3 - package/rrdcollect/Makefile | 14 +- package/rrdtool/Makefile | 5 +- package/rrs/Makefile | 14 +- package/rsync/Makefile | 6 +- package/rtorrent/Makefile | 13 +- package/ruby/Makefile | 10 +- package/rxvt-unicode/Makefile | 3 - package/samba/Makefile | 12 +- package/sane-backends/Makefile | 3 - package/sangam-atm/Makefile | 5 +- package/scanlogd/Makefile | 9 +- package/screen/Makefile | 6 +- package/scrnsaverproto/Makefile | 5 - package/scsi-spin/Makefile | 8 +- package/scsi-spin/files/scsi-spin.c | 420 - package/scsi-spin/src/scsi-spin.c | 420 + package/sdl-image/Makefile | 3 - package/sdl/Makefile | 3 - package/ser2net/Makefile | 3 - package/serdisplib/Makefile | 6 +- package/setpwc/Makefile | 7 +- package/setserial/Makefile | 3 +- package/shat/Makefile | 4 + package/shorewall-common/Makefile | 45 +- package/shorewall-shell/Makefile | 20 +- package/siproxd/Makefile | 9 +- package/sipsak/Makefile | 5 +- package/sispmctl/Makefile | 4 - package/snort/Makefile | 18 +- package/socat/Makefile | 5 +- package/speex/Makefile | 5 +- package/sqlite/Makefile | 5 +- package/sqlite/extra/sqlite3.h | 5772 ---------- package/sqlite/src/sqlite3.h | 5772 ++++++++++ package/squid/Makefile | 12 +- package/srelay/Makefile | 4 +- package/ssltunnel/Makefile | 16 +- package/ssmtp/Makefile | 4 +- package/strace/Makefile | 5 +- package/stress/Makefile | 3 - package/subversion/Makefile | 18 +- package/swconfig/Makefile | 13 +- package/syslog-ng/Makefile | 14 +- package/sysstat/Makefile | 3 +- package/tar/Makefile | 3 - package/tcl/Makefile | 3 - package/tcp_wrappers/Makefile | 10 +- package/tcpdump/Makefile | 6 +- package/tinc/Makefile | 9 +- package/tinyproxy/Makefile | 19 +- package/tmsnc/Makefile | 3 - package/tntnet/Makefile | 13 +- package/tor/Makefile | 9 +- package/tptest/Makefile | 4 + package/traceroute/Makefile | 4 +- package/trafshow/Makefile | 19 +- package/trafshow/patches/patch-Makefile_in | 24 + package/trafshow/patches/patch-session_c | 11 + package/tslib/Makefile | 4 +- package/ttcp/Makefile | 8 +- package/ttcp/src/ttcp.c | 2374 ++++ package/ttcp/ttcp.c | 2374 ---- package/uclibc++/Makefile | 4 +- package/uclibc/Makefile | 5 + package/udev/Makefile | 9 +- package/udp-broadcast-relay/Makefile | 10 +- package/ulogd/Makefile | 6 +- package/updatedd/Makefile | 3 - package/usbutils/Makefile | 6 +- package/ussp-push/Makefile | 5 +- package/ustl/Makefile | 4 +- package/util-linux-ng/Makefile | 3 - package/valgrind/Makefile | 3 - package/vgp/Makefile | 3 - package/videoproto/Makefile | 5 - package/vilistextum/Makefile | 7 +- package/vim/Makefile | 3 - package/vnc-reflector/Makefile | 6 +- package/vnstat/Makefile | 4 +- package/vpnc/Makefile | 12 +- package/vpnc/patches/patch-Makefile | 65 +- package/vpnc/patches/patch-config_c | 7 +- package/vrrpd/Makefile | 4 +- package/vsftpd/Makefile | 4 +- package/vtun/Makefile | 8 +- package/watchdog/Makefile | 4 - package/watchdog/patches/patch-src_mntent_c | 11 + package/watchdog/patches/patch-src_umount_c | 11 + package/wccpd/Makefile | 3 - package/wdfs/Makefile | 4 - package/weechat/Makefile | 20 +- package/wget/Makefile | 4 - package/wifidog/Makefile | 6 +- package/wireless-firmware/Makefile | 4 +- package/wol/Makefile | 3 - package/wondershaper/Makefile | 7 +- package/wpa_supplicant/Makefile | 19 +- package/wput/Makefile | 7 +- package/wput/patches/patch-Makefile | 21 + package/wput/patches/patch-Makefile_in | 12 + package/wput/patches/patch-Makefile_in.orig | 13 + package/wput/patches/patch-config_status | 160 + package/wput/patches/patch-po_Makefile | 50 + package/wput/patches/patch-po_Makefile_in | 50 + package/wput/patches/patch-src_Makefile | 19 + package/wput/patches/patch-src_config_h | 27 + package/xauth/Makefile | 4 - package/xcmiscproto/Makefile | 5 - package/xextproto/Makefile | 5 - package/xf86-input-evtouch/Makefile | 6 +- package/xf86-input-keyboard/Makefile | 5 - package/xf86-input-mouse/Makefile | 4 - package/xf86-video-cirrus/Makefile | 4 - package/xf86-video-geode/Makefile | 6 +- package/xf86dga/Makefile | 5 - package/xf86dgaproto/Makefile | 5 - package/xfsprogs/Makefile | 4 +- package/xinetd/Makefile | 3 - package/xkbcomp/Makefile | 4 - package/xkeyboard-config/Makefile | 7 +- package/xlsfonts/Makefile | 4 - package/xorg-server/Makefile | 18 +- package/xproto/Makefile | 4 - package/xtrans/Makefile | 5 +- package/xz/Makefile | 4 - package/zlib/Makefile | 4 +- package/zsh/Makefile | 10 +- 638 files changed, 33739 insertions(+), 34058 deletions(-) create mode 100644 package/6tunnel/patches/patch-Makefile_in create mode 100644 package/6tunnel/patches/patch-Makefile_in.orig delete mode 100644 package/aiccu/extra/common/dn_skipname.c create mode 100644 package/aiccu/src/common/dn_skipname.c create mode 100644 package/asterisk/patches/patch-Makefile create mode 100644 package/autossh/patches/patch-Makefile_in delete mode 100644 package/base-files/extra/etc/banner delete mode 100644 package/base-files/extra/etc/functions.sh delete mode 100644 package/base-files/extra/etc/group delete mode 100644 package/base-files/extra/etc/hosts delete mode 100644 package/base-files/extra/etc/init.d/boot delete mode 100644 package/base-files/extra/etc/init.d/done delete mode 100755 package/base-files/extra/etc/init.d/rcK delete mode 100755 package/base-files/extra/etc/init.d/rcS delete mode 100644 package/base-files/extra/etc/inittab delete mode 100644 package/base-files/extra/etc/ipkg.conf delete mode 100644 package/base-files/extra/etc/mdev.conf delete mode 100644 package/base-files/extra/etc/modules delete mode 100755 package/base-files/extra/etc/network/if-post-down.d/01-bridge delete mode 100755 package/base-files/extra/etc/network/if-post-down.d/02-vlan delete mode 100755 package/base-files/extra/etc/network/if-pre-up.d/01-atm delete mode 100755 package/base-files/extra/etc/network/if-pre-up.d/02-vlan delete mode 100755 package/base-files/extra/etc/network/if-pre-up.d/03-bridge delete mode 100755 package/base-files/extra/etc/network/if-up.d/01-bridge delete mode 100644 package/base-files/extra/etc/network/interfaces delete mode 100644 package/base-files/extra/etc/passwd delete mode 100644 package/base-files/extra/etc/profile delete mode 100644 package/base-files/extra/etc/protocols delete mode 100644 package/base-files/extra/etc/rc.conf delete mode 100644 package/base-files/extra/etc/shadow delete mode 100644 package/base-files/extra/etc/sysctl.conf delete mode 100755 package/base-files/extra/init delete mode 100644 package/base-files/extra/lib/mdev/init delete mode 100755 package/base-files/extra/sbin/update delete mode 100755 package/base-files/extra/usr/share/udhcpc/default.script create mode 100644 package/base-files/src/etc/banner create mode 100644 package/base-files/src/etc/functions.sh create mode 100644 package/base-files/src/etc/group create mode 100644 package/base-files/src/etc/hosts create mode 100644 package/base-files/src/etc/init.d/boot create mode 100644 package/base-files/src/etc/init.d/done create mode 100755 package/base-files/src/etc/init.d/rcK create mode 100755 package/base-files/src/etc/init.d/rcS create mode 100644 package/base-files/src/etc/inittab create mode 100644 package/base-files/src/etc/ipkg.conf create mode 100644 package/base-files/src/etc/mdev.conf create mode 100644 package/base-files/src/etc/modules create mode 100755 package/base-files/src/etc/network/if-post-down.d/01-bridge create mode 100755 package/base-files/src/etc/network/if-post-down.d/02-vlan create mode 100755 package/base-files/src/etc/network/if-pre-up.d/01-atm create mode 100755 package/base-files/src/etc/network/if-pre-up.d/02-vlan create mode 100755 package/base-files/src/etc/network/if-pre-up.d/03-bridge create mode 100755 package/base-files/src/etc/network/if-up.d/01-bridge create mode 100644 package/base-files/src/etc/network/interfaces create mode 100644 package/base-files/src/etc/passwd create mode 100644 package/base-files/src/etc/profile create mode 100644 package/base-files/src/etc/protocols create mode 100644 package/base-files/src/etc/rc.conf create mode 100644 package/base-files/src/etc/shadow create mode 100644 package/base-files/src/etc/sysctl.conf create mode 100755 package/base-files/src/init create mode 100644 package/base-files/src/lib/mdev/init create mode 100755 package/base-files/src/sbin/update create mode 100755 package/base-files/src/usr/share/udhcpc/default.script delete mode 100644 package/bitlbee/patches/patch-Makefile delete mode 100644 package/bitlbee/patches/patch-lib_Makefile delete mode 100644 package/bitlbee/patches/patch-protocols_Makefile delete mode 100644 package/bitlbee/patches/patch-protocols_jabber_Makefile delete mode 100644 package/bitlbee/patches/patch-protocols_msn_Makefile delete mode 100644 package/bitlbee/patches/patch-protocols_oscar_Makefile delete mode 100644 package/bitlbee/patches/patch-protocols_yahoo_Makefile delete mode 100644 package/ca-certificates/extra/update-ca-certificates create mode 100644 package/ca-certificates/src/update-ca-certificates delete mode 100644 package/cgilib/extra/m4/libtool.m4 delete mode 100644 package/cgilib/extra/m4/ltoptions.m4 delete mode 100644 package/cgilib/extra/m4/ltsugar.m4 delete mode 100644 package/cgilib/extra/m4/ltversion.m4 delete mode 100644 package/cgilib/extra/m4/lt~obsolete.m4 create mode 100644 package/cgilib/src/m4/libtool.m4 create mode 100644 package/cgilib/src/m4/ltoptions.m4 create mode 100644 package/cgilib/src/m4/ltsugar.m4 create mode 100644 package/cgilib/src/m4/ltversion.m4 create mode 100644 package/cgilib/src/m4/lt~obsolete.m4 create mode 100644 package/collectd/files/collectd.conf create mode 100644 package/cryptsetup/patches/patch-configure_in delete mode 100644 package/cryptsetup/patches/patch-lib_setup_c delete mode 100644 package/dovecot/patches/patch-configure delete mode 100644 package/dovecot/patches/patch-src_lib-sql_sql-drivers-register_c delete mode 100644 package/dovecot/patches/patch-src_plugins_quota_Makefile_in delete mode 100644 package/elinks/patches/patch-Makefile_lib delete mode 100644 package/ether-wake/extra/ether-wake.c create mode 100644 package/ether-wake/src/ether-wake.c create mode 100644 package/freeradius-server/files/freeradius-server.conffiles create mode 100644 package/freeradius-server/files/freeradius-server.postinst delete mode 100644 package/freeradius-server/files/freeradius.conffiles delete mode 100644 package/freeradius-server/files/freeradius.postinst delete mode 100644 package/freeradius-server/patches/patch-share_dictionary create mode 100644 package/freeradius-server/patches/patch-src_main_modules_c create mode 100644 package/frickin/patches/patch-Makefile create mode 100644 package/frickin/patches/patch-src_Makefile create mode 100644 package/frickin/patches/patch-src_main_c create mode 100644 package/hdparm/patches/patch-Makefile delete mode 100644 package/httping/patches/patch-Makefile delete mode 100644 package/httping/patches/patch-io_c delete mode 100644 package/httping/patches/patch-str_c delete mode 100644 package/httping/patches/patch-str_h delete mode 100644 package/logrotate/patches/patch-config_c delete mode 100644 package/logrotate/patches/patch-logrotate_8 delete mode 100644 package/logrotate/patches/patch-logrotate_c delete mode 100644 package/logrotate/patches/patch-logrotate_h create mode 100644 package/maradns/patches/patch-Makefile create mode 100644 package/maradns/patches/patch-build_Makefile_linux create mode 100644 package/maradns/patches/patch-configure create mode 100644 package/maradns/patches/patch-dns_Makefile create mode 100644 package/maradns/patches/patch-qual_Makefile create mode 100644 package/maradns/patches/patch-rng_rng-32bit-tables_h create mode 100644 package/maradns/patches/patch-server_Makefile create mode 100644 package/maradns/patches/patch-tcp_Makefile create mode 100644 package/mc/patches/patch-Makefile_in delete mode 100644 package/mc/patches/patch-lib_mc_ext_in delete mode 100644 package/mc/patches/patch-lib_mc_lib delete mode 100644 package/mc/patches/patch-lib_mc_menu delete mode 100644 package/mc/patches/patch-src_key_c delete mode 100644 package/mc/patches/patch-src_main_c delete mode 100644 package/mc/patches/patch-vfs_extfs_iso9660_in create mode 100644 package/moc/patches/patch-configure delete mode 100644 package/ndisc/extra/rdnssd/strverscmp.c create mode 100644 package/ndisc/src/rdnssd/strverscmp.c delete mode 100644 package/nmap/extra/sctp.h create mode 100644 package/nmap/src/sctp.h create mode 100644 package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in delete mode 100644 package/openntpd/extra/openbsd-compat/port-linux.c create mode 100644 package/openntpd/src/openbsd-compat/port-linux.c delete mode 100644 package/privoxy/extra/config.h.in delete mode 100644 package/privoxy/extra/configure create mode 100644 package/privoxy/src/config.h.in create mode 100644 package/privoxy/src/configure delete mode 100644 package/procmail/extra/Makefile.new create mode 100644 package/procmail/src/Makefile.new create mode 100644 package/rdate/patches/patch-GNUmakefile create mode 100644 package/rpcbind/patches/patch-config_h_in create mode 100644 package/rpcbind/patches/patch-src_rpcbind_c create mode 100644 package/rpcbind/patches/patch-src_security_c delete mode 100644 package/scsi-spin/files/scsi-spin.c create mode 100644 package/scsi-spin/src/scsi-spin.c delete mode 100644 package/sqlite/extra/sqlite3.h create mode 100644 package/sqlite/src/sqlite3.h create mode 100644 package/trafshow/patches/patch-Makefile_in create mode 100644 package/trafshow/patches/patch-session_c create mode 100644 package/ttcp/src/ttcp.c delete mode 100644 package/ttcp/ttcp.c create mode 100644 package/watchdog/patches/patch-src_mntent_c create mode 100644 package/watchdog/patches/patch-src_umount_c create mode 100644 package/wput/patches/patch-Makefile create mode 100644 package/wput/patches/patch-Makefile_in create mode 100644 package/wput/patches/patch-Makefile_in.orig create mode 100644 package/wput/patches/patch-config_status create mode 100644 package/wput/patches/patch-po_Makefile create mode 100644 package/wput/patches/patch-po_Makefile_in create mode 100644 package/wput/patches/patch-src_Makefile create mode 100644 package/wput/patches/patch-src_config_h (limited to 'package') diff --git a/package/.template/Makefile b/package/.template/Makefile index 32c24923c..977e4aede 100644 --- a/package/.template/Makefile +++ b/package/.template/Makefile @@ -6,12 +6,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:= @PKG@ PKG_VERSION:= @VER@ PKG_RELEASE:= 1 -PKG_MD5SUM:= @add md5sum of package here@ -PKG_DESCR:= @add short description@ -PKG_SECTION:= @add section@ -PKG_DEPENDS:= @add dependendant package names@ -PKG_URL:= @add project url@ -PKG_SITES:= @add download url without package name@ +PKG_MD5SUM:= add md5sum of package here +PKG_DESCR:= add short description +PKG_SECTION:= add section +PKG_DEPENDS:= add dependendant package names +PKG_BUILDDEP+= add packages which need to be compiled +PKG_URL:= add project url +PKG_SITES:= add download url without package name # if downloaded package is not ending with .tar.gz use following #DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 @@ -20,13 +21,13 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,@UPKG@,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +#CONFIG_STYLE:= manual # use following to add ./configure options #CONFIGURE_ARGS+= --disable-foo # overwrite any configure variables #CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +#BUILD_STYLE:= manual +#INSTALL_STYLE:= manual # please install all files and directories to the package dir post-install: @@ -34,4 +35,5 @@ post-install: $(INSTALL_BIN) $(WRKINST)/usr/bin/@PKG@ \ $(IDIR_@UPKG@)/usr/bin +# please remove ALL above comments, before commiting include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/6tunnel/Makefile b/package/6tunnel/Makefile index a621af7b8..edce0ecaa 100644 --- a/package/6tunnel/Makefile +++ b/package/6tunnel/Makefile @@ -4,25 +4,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:= 6tunnel -PKG_VERSION:= 0.11rc1 +PKG_VERSION:= 0.11rc2 PKG_RELEASE:= 1 -PKG_MD5SUM:= b325fa9d238e32195fbb3fc3646b0d28 +PKG_MD5SUM:= 74e02d4f0704b3083a01feda66033449 PKG_DESCR:= IPv4/IPv6 tunnel proxy PKG_SECTION:= net PKG_DEPENDS:= kmod-ipv6 +PKG_URL:= http://toxygen.net/6tunnel/ PKG_SITES:= http://toxygen.net/6tunnel/ -WRKDIST= ${WRKDIR}/$(PKG_NAME)-0.11 - include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,6TUNNEL,6tunnel,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,6TUNNEL,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -CONFIGURE_ENV+= ac_cv_path_STRIP=$(STRIP) \ - ac_cv_func_vsnprintf=yes -ALL_TARGET= default -BUILD_STYLE= auto +AUTOTOOL_STYLE:= autoconf post-install: $(INSTALL_DIR) $(IDIR_6TUNNEL)/usr/sbin diff --git a/package/6tunnel/patches/patch-Makefile_in b/package/6tunnel/patches/patch-Makefile_in new file mode 100644 index 000000000..0a26cdeef --- /dev/null +++ b/package/6tunnel/patches/patch-Makefile_in @@ -0,0 +1,27 @@ +--- 6tunnel-0.11rc2.orig/Makefile.in 2002-11-24 02:18:47.000000000 +0100 ++++ 6tunnel-0.11rc2/Makefile.in 2010-02-05 14:22:35.462572327 +0100 +@@ -10,19 +10,18 @@ INSTALL = @INSTALL@ + STRIP = @STRIP@ + VERSION = @VERSION@ + +-default: 6tunnel ++all: 6tunnel + + 6tunnel: 6tunnel.c + + .PHONY: install + + install: +- $(STRIP) 6tunnel +- $(INSTALL) -d $(bindir) +- $(INSTALL) 6tunnel $(bindir) ++ $(INSTALL) -d $(DESTDIR)$(bindir) ++ $(INSTALL) 6tunnel $(DESTDIR)$(bindir) + +- $(INSTALL) -d $(mandir)/man1 +- $(INSTALL) 6tunnel.1 $(mandir)/man1 ++ $(INSTALL) -d $(DESTDIR)$(mandir)/man1 ++ $(INSTALL) 6tunnel.1 $(DESTDIR)$(mandir)/man1 + + .PHONY: clean + diff --git a/package/6tunnel/patches/patch-Makefile_in.orig b/package/6tunnel/patches/patch-Makefile_in.orig new file mode 100644 index 000000000..d5663cc00 --- /dev/null +++ b/package/6tunnel/patches/patch-Makefile_in.orig @@ -0,0 +1,18 @@ +--- 6tunnel-0.11rc2.orig/Makefile.in 2002-11-24 02:18:47.000000000 +0100 ++++ 6tunnel-0.11rc2/Makefile.in 2010-02-05 14:21:39.992115665 +0100 +@@ -10,14 +10,13 @@ INSTALL = @INSTALL@ + STRIP = @STRIP@ + VERSION = @VERSION@ + +-default: 6tunnel ++all: 6tunnel + + 6tunnel: 6tunnel.c + + .PHONY: install + + install: +- $(STRIP) 6tunnel + $(INSTALL) -d $(bindir) + $(INSTALL) 6tunnel $(bindir) + diff --git a/package/Config.in b/package/Config.in index 346672c77..21c2d2e33 100644 --- a/package/Config.in +++ b/package/Config.in @@ -165,7 +165,7 @@ source "package/sispmctl/Config.in" source "package/stress/Config.in" source "package/sysstat/Config.in" source "package/swconfig/Config.in" -#source "package/udev/Config.in" +source "package/udev/Config.in" source "package/watchdog/Config.in" endmenu @@ -189,7 +189,7 @@ source "package/sipsak/Config.in" source "package/tcpdump/Config.in" source "package/tptest/Config.in" source "package/traceroute/Config.in" -#source "package/trafshow/Config.in" +source "package/trafshow/Config.in" source "package/ttcp/Config.in" endmenu @@ -354,6 +354,7 @@ source "package/libnfsidmap/Config.in" source "package/libnfnetlink/Config.in" source "package/libnfnetlink/Config.in.lib" source "package/libnids/Config.in" +source "package/libnids/Config.in.lib" source "package/libnl/Config.in" source "package/libnl/Config.in.lib" source "package/libogg/Config.in" @@ -384,14 +385,18 @@ source "package/postgresql/Config.in.lib" source "package/libpthread/Config.in" source "package/libpthread/Config.in.lib" source "package/libthread_db/Config.in" +source "package/libthread_db/Config.in.lib" source "package/readline/Config.in" source "package/readline/Config.in.lib" +source "package/cyrus-sasl/Config.in" source "package/cyrus-sasl/Config.in.lib" source "package/sdl/Config.in" source "package/sdl/Config.in.lib" source "package/sdl-image/Config.in" source "package/sdl-image/Config.in.lib" +source "package/net-snmp/Config.in.lib" source "package/speex/Config.in" +source "package/speex/Config.in.lib" source "package/openssl/Config.in.lib" source "package/sqlite/Config.in.lib" source "package/librpcsecgss/Config.in" @@ -411,6 +416,7 @@ source "package/libtirpc/Config.in.lib" source "package/libtorrent/Config.in" source "package/libtorrent/Config.in.lib" source "package/libupnp/Config.in" +source "package/libupnp/Config.in.lib" source "package/libusb/Config.in" source "package/libusb/Config.in.lib" source "package/libusb-compat/Config.in" diff --git a/package/adkinstall/Makefile b/package/adkinstall/Makefile index d250a1e70..f8ada2ebe 100644 --- a/package/adkinstall/Makefile +++ b/package/adkinstall/Makefile @@ -19,6 +19,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ADKINSTALL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual diff --git a/package/aiccu/Makefile b/package/aiccu/Makefile index 590786ee1..50b2f005b 100644 --- a/package/aiccu/Makefile +++ b/package/aiccu/Makefile @@ -20,10 +20,12 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,AICCU,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + TCFLAGS+= -D_REENTRANT -D_GNU_SOURCE -DAICCU_CONSOLE \ -D_LINUX -DHAS_IFHEAD -DAICCU_TYPE=\"linux\" TLDFLAGS+= -lpthread -lresolv -BUILD_STYLE:= auto MAKE_FLAGS+= CC='${TARGET_CC}' CFLAGS='${TCFLAGS}' LDFLAGS='${TLDFLAGS}' do-install: diff --git a/package/aiccu/extra/common/dn_skipname.c b/package/aiccu/extra/common/dn_skipname.c deleted file mode 100644 index f2219f335..000000000 --- a/package/aiccu/extra/common/dn_skipname.c +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include - -/* Ripped from glibc 2.4 sources. */ - -/* - * ns_name_skip(ptrptr, eom) - * Advance *ptrptr to skip over the compressed name it points at. - * return: - * 0 on success, -1 (with errno set) on failure. - */ -int ns_name_skip(const u_char **ptrptr, const u_char *eom) -{ - const u_char *cp; - u_int n; - - cp = *ptrptr; - while (cp < eom && (n = *cp++) != 0) - { - /* Check for indirection. */ - switch (n & NS_CMPRSFLGS) { - case 0: /* normal case, n == len */ - cp += n; - continue; - case NS_CMPRSFLGS: /* indirection */ - cp++; - break; - default: /* illegal type */ - errno = EMSGSIZE; - return (-1); - } - break; - } - if (cp > eom) - { - errno = EMSGSIZE; - return (-1); - } - *ptrptr = cp; - return (0); -} - -int dn_skipname(const u_char *ptr, const u_char *eom) -{ - const u_char *saveptr = ptr; - - if(ns_name_skip(&ptr, eom) == -1) - return (-1); - return (ptr - saveptr); -} - diff --git a/package/aiccu/src/common/dn_skipname.c b/package/aiccu/src/common/dn_skipname.c new file mode 100644 index 000000000..f2219f335 --- /dev/null +++ b/package/aiccu/src/common/dn_skipname.c @@ -0,0 +1,51 @@ +#include +#include + +/* Ripped from glibc 2.4 sources. */ + +/* + * ns_name_skip(ptrptr, eom) + * Advance *ptrptr to skip over the compressed name it points at. + * return: + * 0 on success, -1 (with errno set) on failure. + */ +int ns_name_skip(const u_char **ptrptr, const u_char *eom) +{ + const u_char *cp; + u_int n; + + cp = *ptrptr; + while (cp < eom && (n = *cp++) != 0) + { + /* Check for indirection. */ + switch (n & NS_CMPRSFLGS) { + case 0: /* normal case, n == len */ + cp += n; + continue; + case NS_CMPRSFLGS: /* indirection */ + cp++; + break; + default: /* illegal type */ + errno = EMSGSIZE; + return (-1); + } + break; + } + if (cp > eom) + { + errno = EMSGSIZE; + return (-1); + } + *ptrptr = cp; + return (0); +} + +int dn_skipname(const u_char *ptr, const u_char *eom) +{ + const u_char *saveptr = ptr; + + if(ns_name_skip(&ptr, eom) == -1) + return (-1); + return (ptr - saveptr); +} + diff --git a/package/aircrack-ng/Makefile b/package/aircrack-ng/Makefile index c03c57915..ff8e99cff 100644 --- a/package/aircrack-ng/Makefile +++ b/package/aircrack-ng/Makefile @@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:= aircrack-ng PKG_VERSION:= 1.0 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl libpcap PKG_MD5SUM:= dafbfaf944ca9d523fde4bae86f0c067 PKG_DESCR:= set of tools for auditing wireless networks PKG_SECTION:= net PKG_DEPENDS:= libpthread libopenssl libpcap +PKG_BUILDDEP+= openssl libpcap PKG_URL:= http://www.aircrack-ng.org PKG_SITES:= http://download.aircrack-ng.org/ @@ -18,21 +18,26 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,AIRCRACK_NG,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto -XAKE_FLAGS+= CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -Wall" \ - CROSS="$(TARGET_CROSS)" OSNAME="Linux" \ - prefix="/usr" +CONFIG_STYLE:= manual + +XAKE_FLAGS+= CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall" \ + OSNAME="Linux" prefix="/usr" post-install: $(INSTALL_DIR) $(IDIR_AIRCRACK_NG)/usr/bin $(INSTALL_DIR) $(IDIR_AIRCRACK_NG)/usr/sbin - $(INSTALL_BIN) $(WRKINST)/usr/bin/aircrack-ng $(IDIR_AIRCRACK_NG)/usr/bin/ - $(INSTALL_BIN) $(WRKINST)/usr/bin/airdecap-ng $(IDIR_AIRCRACK_NG)/usr/bin/ - $(INSTALL_BIN) $(WRKINST)/usr/bin/packetforge-ng $(IDIR_AIRCRACK_NG)/usr/bin/ - $(INSTALL_BIN) $(WRKINST)/usr/sbin/aireplay-ng $(IDIR_AIRCRACK_NG)/usr/sbin/ - $(INSTALL_BIN) $(WRKINST)/usr/sbin/airodump-ng $(IDIR_AIRCRACK_NG)/usr/sbin/ - $(INSTALL_BIN) $(WRKINST)/usr/sbin/airtun-ng $(IDIR_AIRCRACK_NG)/usr/sbin/ + $(INSTALL_BIN) $(WRKINST)/usr/bin/aircrack-ng \ + $(IDIR_AIRCRACK_NG)/usr/bin/ + $(INSTALL_BIN) $(WRKINST)/usr/bin/airdecap-ng \ + $(IDIR_AIRCRACK_NG)/usr/bin/ + $(INSTALL_BIN) $(WRKINST)/usr/bin/packetforge-ng \ + $(IDIR_AIRCRACK_NG)/usr/bin/ + $(INSTALL_BIN) $(WRKINST)/usr/sbin/aireplay-ng \ + $(IDIR_AIRCRACK_NG)/usr/sbin/ + $(INSTALL_BIN) $(WRKINST)/usr/sbin/airodump-ng \ + $(IDIR_AIRCRACK_NG)/usr/sbin/ + $(INSTALL_BIN) $(WRKINST)/usr/sbin/airtun-ng \ + $(IDIR_AIRCRACK_NG)/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/alsa-lib/Makefile b/package/alsa-lib/Makefile index 219564ab3..64387c3d8 100644 --- a/package/alsa-lib/Makefile +++ b/package/alsa-lib/Makefile @@ -9,9 +9,8 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= b28a12348905fb6915bc41f0edb2ecce PKG_DESCR:= ALSA sound library PKG_SECTION:= libs -PKG_URL:= http://www.alsa-project.org -PKG_SITES:= ftp://ftp.task.gda.pl/pub/linux/misc/alsa/lib/ \ - ftp://ftp.alsa-project.org/pub/lib/ +PKG_URL:= http://www.alsa-project.org/ +PKG_SITES:= ftp://ftp.alsa-project.org/pub/lib/ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 @@ -19,14 +18,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ALSA_LIB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-python -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_ALSA_LIB}/usr/lib ${IDIR_ALSA_LIB}/usr/share/alsa - ${CP} ${WRKINST}/usr/lib/libasound.so.* ${IDIR_ALSA_LIB}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libasound.so* ${IDIR_ALSA_LIB}/usr/lib/ ${CP} ${WRKINST}/usr/share/alsa/* ${IDIR_ALSA_LIB}/usr/share/alsa/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/alsa-utils/Makefile b/package/alsa-utils/Makefile index 8da03270a..602444248 100644 --- a/package/alsa-utils/Makefile +++ b/package/alsa-utils/Makefile @@ -21,10 +21,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ALSA_UTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-alsamixer -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_ALSA_UTILS}/usr/bin diff --git a/package/apr-util/Makefile b/package/apr-util/Makefile index 6b4142600..307853fab 100644 --- a/package/apr-util/Makefile +++ b/package/apr-util/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= apr-util PKG_VERSION:= 0.9.15 PKG_RELEASE:= 1 -PKG_BUILDDEP+= expat apr PKG_MD5SUM:= dc772ae295f49ddb8ee8e69a9716c53b PKG_DESCR:= Apache Portable Runtime utility library PKG_SECTION:= libs PKG_DEPENDS:= libexpat apr +PKG_BUILDDEP+= expat apr PKG_URL:= http://apr.apache.org PKG_SITES:= http://apache.mirror.clusters.cc/apr/ @@ -18,12 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,APR_UTIL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-berkeley-db CONFIGURE_ARGS+= --with-apr=${STAGING_DIR}/usr CONFIGURE_ARGS+= --with-expat=${STAGING_DIR}/usr -BUILD_STYLE:= auto -INSTALL_STYLE:= auto XAKE_FLAGS+= apr_builddir=${STAGING_DIR}/usr/share/build \ apr_builders=${STAGING_DIR}/usr/share/build diff --git a/package/apr/Makefile b/package/apr/Makefile index 53048e334..486a96842 100644 --- a/package/apr/Makefile +++ b/package/apr/Makefile @@ -6,12 +6,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= apr PKG_VERSION:= 0.9.17 PKG_RELEASE:= 1 -ifeq ($(ADK_PACKAGE_APR_THREADING),y) -PKG_BUILDDEP+= libpthread -endif PKG_MD5SUM:= ca1e22d98081a03a33c2a0b8684eb192 PKG_DESCR:= Apache Portable Runtime library PKG_SECTION:= libs +ifeq ($(ADK_PACKAGE_APR_THREADING),y) +PKG_DEPENDS:= libpthread +PKG_BUILDDEP+= libpthread +endif PKG_URL:= http://apr.apache.org PKG_SITES:= http://gd.tuwien.ac.at/infosys/servers/http/apache/dist/${PKG_NAME}/ @@ -21,13 +22,8 @@ PKGFD_FULL= Enable threading support include ${TOPDIR}/mk/package.mk -ifeq (${ADK_PACKAGE_APR_THREADING},y) -PKG_DEPENDS:= libpthread -endif - $(eval $(call PKG_template,APR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu # uClibc setpgrp does not take arguments CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes CONFIGURE_ENV+= ac_cv_sizeof_size_t=4 @@ -43,16 +39,15 @@ else CONFIGURE_ARGS+= --disable-threads endif -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_APR}/usr/lib ${CP} ${WRKINST}/usr/lib/libapr-0.so* ${IDIR_APR}/usr/lib/ ${INSTALL_DIR} ${STAGING_DIR}/usr/share/build ${CP} ${WRKINST}/usr/share/build/* ${STAGING_DIR}/usr/share/build/ # we need to patch paths to get apr-util compiling - $(SED) "s,\(^installbuilddir=\"\)\(.*\),\1${STAGING_DIR}\2," ${WRKINST}/usr/bin/apr-config - $(SED) "s,\(^datadir=\"\)\(.*\),\1${STAGING_DIR}\2," ${WRKINST}/usr/bin/apr-config + $(SED) "s,\(^installbuilddir=\"\)\(.*\),\1${STAGING_DIR}\2," \ + ${WRKINST}/usr/bin/apr-config + $(SED) "s,\(^datadir=\"\)\(.*\),\1${STAGING_DIR}\2," \ + ${WRKINST}/usr/bin/apr-config include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/arpd/Makefile b/package/arpd/Makefile index 2dc9cfed8..3d0f31f07 100644 --- a/package/arpd/Makefile +++ b/package/arpd/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= arpd PKG_VERSION:= 0.2 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap libdnet libevent PKG_MD5SUM:= e2911fa9de1b92ef50deda1489ae944d PKG_DESCR:= Generates ARP responses for IP address ranges PKG_SECTION:= net PKG_DEPENDS:= libpcap libdnet libevent +PKG_BUILDDEP+= libpcap libdnet libevent PKG_URL:= http://niels.xtdnet.nl/honeyd/ PKG_SITES:= http://niels.xtdnet.nl/honeyd/ @@ -20,11 +20,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ARPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-libdnet=${STAGING_DIR}/usr \ --with-libevent=${STAGING_DIR}/usr \ --with-libpcap=${STAGING_DIR}/usr -BUILD_STYLE= auto MAKE_FLAGS+= CCOPT="${TARGET_CFLAGS}" \ INCLS="-I. -I${STAGING_DIR}/usr/include" \ LIBS="-L${STAGING_DIR}/usr/lib -lpcap -ldnet -levent" diff --git a/package/arpwatch/Makefile b/package/arpwatch/Makefile index 7f181cb31..bdad7803c 100644 --- a/package/arpwatch/Makefile +++ b/package/arpwatch/Makefile @@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:= arpwatch PKG_VERSION:= 2.1a15 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap PKG_MD5SUM:= cebfeb99c4a7c2a6cee2564770415fe7 -PKG_DESCR:= Ethernet monitor program for keeping track of ethernet/ip address pairings +PKG_DESCR:= Ethernet monitor program PKG_SECTION:= net PKG_DEPENDS:= libpcap +PKG_BUILDDEP+= libpcap PKG_URL:= http://www-nrg.ee.lbl.gov PKG_SITES:= ftp://ftp.ee.lbl.gov/ @@ -18,8 +18,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,ARPWATCH,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto +INSTALL_STYLE:= manual + MAKE_FLAGS+= ARPDIR=/etc/arpwatch \ CCOPT="$(TARGET_CFLAGS)" \ INCLS="-I. -I$(STAGING_DIR)/usr/include" \ diff --git a/package/asterisk/Makefile b/package/asterisk/Makefile index 86d311c83..7f042b7f4 100644 --- a/package/asterisk/Makefile +++ b/package/asterisk/Makefile @@ -114,14 +114,13 @@ else CONFIGURE_ARGS+= --without-postgres endif +INSTALL_STYLE:= manual + TLDFLAGS+= -lm -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto MAKE_ENV= ASTCFLAGS="${TCPPFLAGS} -DHAVE_STRTOQ" \ ASTLDFLAGS="${TLDFLAGS}" MAKE_FLAGS+= DESTDIR="$(WRKINST)" \ OPTIMIZE="${TARGET_OPTIMIZATION}" \ - CXX="${TARGET_CC}" \ STRIP="${TARGET_CROSS}strip" \ NOISY_BUILD=1 ALL_TARGET:= all install samples @@ -129,6 +128,9 @@ ALL_TARGET:= all install samples pre-configure: cd "$(WRKBUILD)/menuselect"; ./configure +pre-build: + $(MAKE) -C $(WRKBUILD)/menuselect + post-build: cd ${WRKBUILD}/sounds ; \ tar xzf asterisk-core-sounds-en-gsm-1.4.17.tar.gz ; \ diff --git a/package/asterisk/patches/patch-Makefile b/package/asterisk/patches/patch-Makefile new file mode 100644 index 000000000..1ba02c900 --- /dev/null +++ b/package/asterisk/patches/patch-Makefile @@ -0,0 +1,13 @@ +--- asterisk-1.6.2.1.orig/Makefile 2009-12-10 22:04:20.000000000 +0100 ++++ asterisk-1.6.2.1/Makefile 2010-02-05 21:05:41.313084404 +0100 +@@ -366,8 +366,8 @@ makeopts: configure + @exit 1 + + menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) +- menuselect/menuselect --check-deps $@ +- menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) ++ ./menuselect/menuselect --check-deps $@ ++ ./menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) + + $(MOD_SUBDIRS_EMBED_LDSCRIPT): + +@echo "EMBED_LDSCRIPTS+="`$(SILENTMAKE) -C $(@:-embed-ldscript=) SUBDIR=$(@:-embed-ldscript=) __embed_ldscript` >> makeopts.embed_rules diff --git a/package/atftp/Makefile b/package/atftp/Makefile index 7cea94e68..81939a111 100644 --- a/package/atftp/Makefile +++ b/package/atftp/Makefile @@ -6,24 +6,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:= atftp PKG_VERSION:= 0.7 PKG_RELEASE:= 2 -PKG_BUILDDEP+= readline ncurses PKG_MD5SUM:= 3b27365772d918050b2251d98a9c7c82 PKG_DESCR:= TFTP client PKG_SECTION:= net PKG_DEPENDS:= libreadline libncurses +PKG_BUILDDEP+= readline ncurses PKG_URL:= http://freshmeat.net/projects/atftp PKG_SITES:= ftp://ftp.mamalinux.com/pub/atftp/ -PKG_DESCR_1:= TFTP server + +PKG_DESCR_TFTP_SERVER:= TFTP server include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,ATFTP,atftp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -$(eval $(call PKG_template,ATFTPD,atftpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION})) +$(eval $(call PKG_template,ATFTPD,atftpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_TFTP_SERVER},${PKG_SECTION})) MAKE_FLAGS+= CFLAGS="${TCFLAGS} -Wall -D_REENTRANT -fno-inline" -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: # atftp client diff --git a/package/atk/Makefile b/package/atk/Makefile index 0980de0cc..2b3437450 100644 --- a/package/atk/Makefile +++ b/package/atk/Makefile @@ -21,10 +21,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ATK,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_ATK}/usr/lib ${CP} ${WRKINST}/usr/lib/libatk-*.so* ${IDIR_ATK}/usr/lib diff --git a/package/aufs2-util/Makefile b/package/aufs2-util/Makefile index e0c69b166..53aa3bab4 100644 --- a/package/aufs2-util/Makefile +++ b/package/aufs2-util/Makefile @@ -17,9 +17,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,AUFS_UTIL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual MAKE_FLAGS+= KDIR=${LINUX_DIR} -BUILD_STYLE:= auto -INSTALL_STYLE:= auto do-extract: mkdir -p ${WRKBUILD} diff --git a/package/autoconf/Makefile b/package/autoconf/Makefile index b03662330..07f525241 100644 --- a/package/autoconf/Makefile +++ b/package/autoconf/Makefile @@ -17,10 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,AUTOCONF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_AUTOCONF}/usr/bin ${CP} ${WRKINST}/usr/bin/auto* ${IDIR_AUTOCONF}/usr/bin diff --git a/package/automake/Makefile b/package/automake/Makefile index 3f5bd4b85..4256f0d97 100644 --- a/package/automake/Makefile +++ b/package/automake/Makefile @@ -5,10 +5,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= automake PKG_VERSION:= 1.10 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 452163c32d061c53a7acc0e8c1b689ba PKG_DESCR:= GNU automake PKG_SECTION:= utils +PKG_DEPENDS:= microperl PKG_URL:= http://www.gnu.org/software/automake/ PKG_SITES:= ${MASTER_SITE_GNU:=${PKG_NAME}/} PKG_OPTS:= noscripts @@ -17,13 +18,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,AUTOMAKE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_AUTOMAKE}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/automake ${IDIR_AUTOMAKE}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/aclocal ${IDIR_AUTOMAKE}/usr/bin + ${INSTALL_DIR} ${IDIR_AUTOMAKE}/usr/share/automake-${PKG_VERSION}/ + ${CP} ${WRKINST}/usr/share/automake-${PKG_VERSION}/Automake \ + ${IDIR_AUTOMAKE}/usr/share/automake-${PKG_VERSION}/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/autossh/Makefile b/package/autossh/Makefile index b5e184463..d1bb28b24 100644 --- a/package/autossh/Makefile +++ b/package/autossh/Makefile @@ -19,11 +19,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,AUTOSSH,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -CONFIGURE_ARGS+= ac_cv_lib_nsl_gethostbyname=no -BUILD_STYLE:= auto - -do-install: +post-install: $(INSTALL_DIR) $(IDIR_AUTOSSH)/usr/bin $(INSTALL_BIN) $(WRKBUILD)/autossh $(IDIR_AUTOSSH)/usr/bin/ diff --git a/package/autossh/patches/patch-Makefile_in b/package/autossh/patches/patch-Makefile_in new file mode 100644 index 000000000..098c3fee1 --- /dev/null +++ b/package/autossh/patches/patch-Makefile_in @@ -0,0 +1,36 @@ +--- autossh-1.4b.orig/Makefile.in 2008-04-11 22:47:46.000000000 +0200 ++++ autossh-1.4b/Makefile.in 2010-02-05 17:49:30.511836749 +0100 +@@ -45,18 +45,18 @@ distclean: allclean + - /bin/rm -f Makefile + + install: $(TARGET) +- mkdir -p -m 755 $(bindir) +- mkdir -p -m 755 $(prefix)/share/doc/autossh +- mkdir -p -m 755 $(datadir)/examples/autossh +- mkdir -p -m 755 $(mandir)/man1 +- cp $(TARGET) $(bindir) +- cp CHANGES README $(datadir)/doc/autossh +- cp autossh.host $(datadir)/examples/autossh +- cp rscreen $(datadir)/examples/autossh +- cp autossh.1 $(mandir)/man1 +- chmod 755 $(bindir)/$(TARGET) +- chmod 644 $(datadir)/doc/autossh/CHANGES +- chmod 644 $(datadir)/doc/autossh/README +- chmod 644 $(datadir)/examples/autossh/autossh.host +- chmod 644 $(datadir)/examples/autossh/rscreen +- chmod 644 $(mandir)/man1/autossh.1 ++ mkdir -p -m 755 $(DESTDIR)$(bindir) ++ mkdir -p -m 755 $(DESTDIR)$(prefix)/share/doc/autossh ++ mkdir -p -m 755 $(DESTDIR)$(datadir)/examples/autossh ++ mkdir -p -m 755 $(DESTDIR)$(mandir)/man1 ++ cp $(TARGET) $(DESTDIR)$(bindir) ++ cp CHANGES README $(DESTDIR)$(datadir)/doc/autossh ++ cp autossh.host $(DESTDIR)$(datadir)/examples/autossh ++ cp rscreen $(DESTDIR)$(datadir)/examples/autossh ++ cp autossh.1 $(DESTDIR)$(mandir)/man1 ++ chmod 755 $(DESTDIR)$(bindir)/$(TARGET) ++ chmod 644 $(DESTDIR)$(datadir)/doc/autossh/CHANGES ++ chmod 644 $(DESTDIR)$(datadir)/doc/autossh/README ++ chmod 644 $(DESTDIR)$(datadir)/examples/autossh/autossh.host ++ chmod 644 $(DESTDIR)$(datadir)/examples/autossh/rscreen ++ chmod 644 $(DESTDIR)$(mandir)/man1/autossh.1 diff --git a/package/avahi/Makefile b/package/avahi/Makefile index 231a97367..ec3cd6fa1 100644 --- a/package/avahi/Makefile +++ b/package/avahi/Makefile @@ -25,7 +25,6 @@ $(eval $(call PKG_template,AVAHI_DNSCONFD,avahi-dnsconfd,${PKG_VERSION}-${PKG_RE $(eval $(call PKG_template,LIBAVAHI,libavahi,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR_LIB},libs)) TLDFLAGS+= -lintl -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --enable-glib \ --disable-qt3 \ --disable-qt4 \ @@ -51,8 +50,6 @@ CONFIGURE_ARGS+= --enable-glib \ --with-distro=none \ --with-avahi-user=avahi \ --with-avahi-group=avahi -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: # avahi daemon diff --git a/package/axtls/Makefile b/package/axtls/Makefile index 9b01f12ba..38261392f 100644 --- a/package/axtls/Makefile +++ b/package/axtls/Makefile @@ -13,8 +13,8 @@ PKG_DEPENDS:= libaxtls PKG_URL:= http://axtls.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=axtls/} -PKG_DESCR_1:= small tls library -PKG_SECTION_1:= libs +PKG_DESCR_LIB:= small tls library +PKG_SECTION_LIB:= libs DISTFILES:= axTLS-${PKG_VERSION}.tar.gz WRKDIST= ${WRKDIR}/axTLS @@ -22,9 +22,11 @@ WRKDIST= ${WRKDIR}/axTLS include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,AXHTTPD,axhttpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -$(eval $(call PKG_template,LIBAXTLS,libaxtls,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR_1},${PKG_SECTION_1})) +$(eval $(call PKG_template,LIBAXTLS,libaxtls,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR_LIB},${PKG_SECTION_LIB})) + +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual -BUILD_STYLE= auto XAKE_FLAGS+= STRIP='' \ CC='${TARGET_CC}' \ OPT_CFLAGS='${TARGET_CFLAGS} -fPIC' \ @@ -37,7 +39,7 @@ do-configure: do-install: # axtls library ${INSTALL_DIR} ${IDIR_LIBAXTLS}/usr/lib - $(CP) $(WRKBUILD)/_stage/libaxtls.so.* $(IDIR_LIBAXTLS)/usr/lib/ + $(CP) $(WRKBUILD)/_stage/libaxtls.so* $(IDIR_LIBAXTLS)/usr/lib/ # awhttpd server ${INSTALL_DIR} ${IDIR_AXHTTPD}/www ${INSTALL_DIR} ${IDIR_AXHTTPD}/usr/sbin diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 92949ea13..e771a5084 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -18,11 +18,13 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,BASE_FILES,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) PKGDFLT_BASE_FILES= y if !ADK_TOOLCHAIN_ONLY + +CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual do-install: - $(CP) ./extra/* $(IDIR_BASE_FILES) + $(CP) ./src/* $(IDIR_BASE_FILES) $(CP) $(TOPDIR)/target/$(ADK_TARGET)/files/* $(IDIR_BASE_FILES) ifeq (${ADK_TARGET_ROOTFS_NFSROOT},y) @-rm $(IDIR_BASE_FILES)/etc/network/interfaces diff --git a/package/base-files/extra/etc/banner b/package/base-files/extra/etc/banner deleted file mode 100644 index 49dbb9685..000000000 --- a/package/base-files/extra/etc/banner +++ /dev/null @@ -1 +0,0 @@ - Linux created with OpenADK diff --git a/package/base-files/extra/etc/functions.sh b/package/base-files/extra/etc/functions.sh deleted file mode 100644 index 5d76f4843..000000000 --- a/package/base-files/extra/etc/functions.sh +++ /dev/null @@ -1,79 +0,0 @@ -# newline -N=" -" - -append() { - local var="$1" - local value="$2" - local sep="${3:- }" - - eval "export -- \"$var=\${$var:+\${$var}\${value:+\$sep}}\$value\"" -} - -load_modules() { - (sed "s,^[^#][^[:space:]]*,insmod /lib/modules/$(uname -r)/&.ko," $* | sh 2>&- || :) -} - -user_exists() { - grep -q "^$1:" $IPKG_INSTROOT/etc/passwd 2>&- -} - -group_exists() { - grep -q "^$1:" $IPKG_INSTROOT/etc/group 2>&- -} - -service_exists() { - grep -q "^$1[[:space:]]*$2" $IPKG_INSTROOT/etc/services 2>&- -} - -rcconf_exists() { - grep -q "^#*$1=" $IPKG_INSTROOT/etc/rc.conf 2>&- -} - -add_user() { - user_exists $1 || { - echo "adding user $1 to /etc/passwd" - echo "$1:x:$2:${3:-$2}:$1:${4:-/tmp}:${5:-/bin/false}" \ - >>$IPKG_INSTROOT/etc/passwd - } -} - -add_group() { - group_exists $1 || { - echo "adding group $1 to /etc/group" - echo "$1:x:$2:$3" >>$IPKG_INSTROOT/etc/group - } -} - -add_service() { - service_exists $1 $2 || { - echo "adding service $1 to /etc/services" - printf '%s\t%s\n' "$1" "$2" >>$IPKG_INSTROOT/etc/services - } -} - -add_rcconf() { - rcconf_exists ${2-$1} || { - echo "adding service ${2-$1} to /etc/rc.conf" - printf '%s="%s"\t\t# %s\n' "${2:-$1}" "${3:-NO}" "$1" \ - >>$IPKG_INSTROOT/etc/rc.conf - } -} - -get_next_uid() { - uid=1 - while grep "^[^:]*:[^:]*:$uid:" $IPKG_INSTROOT/etc/passwd \ - >/dev/null 2>&1; do - uid=$(($uid+1)) - done - echo $uid -} - -get_next_gid() { - gid=1 - while grep "^[^:]*:[^:]*:$gid:" $IPKG_INSTROOT/etc/group \ - >/dev/null 2>&1; do - gid=$(($gid+1)) - done - echo $gid -} diff --git a/package/base-files/extra/etc/group b/package/base-files/extra/etc/group deleted file mode 100644 index c4e77f316..000000000 --- a/package/base-files/extra/etc/group +++ /dev/null @@ -1,2 +0,0 @@ -root:x:0: -nogroup:x:65534: diff --git a/package/base-files/extra/etc/hosts b/package/base-files/extra/etc/hosts deleted file mode 100644 index 87d837fc7..000000000 --- a/package/base-files/extra/etc/hosts +++ /dev/null @@ -1,2 +0,0 @@ -::1 localhost -127.0.0.1 localhost diff --git a/package/base-files/extra/etc/init.d/boot b/package/base-files/extra/etc/init.d/boot deleted file mode 100644 index f71e46240..000000000 --- a/package/base-files/extra/etc/init.d/boot +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -#INIT 10 -[[ $1 = autostart ]] || exit 0 - -. /etc/functions.sh - -mkdir -p /var/log -mkdir -p /var/run -touch /var/log/lastlog -touch /var/log/wtmp -ln -s /var/tmp /tmp - -echo 0 > /proc/sys/kernel/printk - -HOSTNAME= -[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname) -HOSTNAME=${HOSTNAME%%.*} -echo ${HOSTNAME:=linux} >/proc/sys/kernel/hostname - -chown 0:0 /tmp; chmod 1777 /tmp - -load_modules /etc/modules -for f in /etc/modules.d/*; do - [[ -e $f ]] && load_modules /etc/modules.d/* - break -done -exit 0 diff --git a/package/base-files/extra/etc/init.d/done b/package/base-files/extra/etc/init.d/done deleted file mode 100644 index e5b655bb6..000000000 --- a/package/base-files/extra/etc/init.d/done +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -#INIT 98 -[[ $1 = autostart ]] && sysctl -p >&- -exit 0 diff --git a/package/base-files/extra/etc/init.d/rcK b/package/base-files/extra/etc/init.d/rcK deleted file mode 100755 index e94d1a296..000000000 --- a/package/base-files/extra/etc/init.d/rcK +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -export PATH=/bin:/sbin:/usr/bin:/usr/sbin -busybox reboot -d 60 -f & # just in case… -{ - [[ -f /proc/diag/led/power ]] && echo f >/proc/diag/led/power - test -e /etc/rc.shutdown && (/bin/sh /etc/rc.shutdown) 2>&1 - grep '^#INIT ' /etc/init.d/* | \ - sort -rnk2 | \ - while read line; do - shebang=$(sed -n '1s/^#![ ]*//p' ${line%%:*}) - case $shebang in - *[\ \ ]*) shebang=\'$(echo X"$shebang" | sed \ - -e 's/^X//' -e "s/'/'\\\\''/g" \ - -e 's/^\([^ ][^ ]*\)[ ]*$/\1/' \ - -e 's/^\([^ ][^ ]*\)[ ][ ]*\(..*\)$/\1 \2/' \ - -e 's/^\([^ ][^ ]*\) /\1'\'' '\''/')\' ;; - esac - ${shebang:-/bin/sh} ${line%%:*} autostop 2>&1 - done - [[ -f /proc/diag/led/power ]] && echo 0 >/proc/diag/led/power -} | logger -s -p 6 -t '' diff --git a/package/base-files/extra/etc/init.d/rcS b/package/base-files/extra/etc/init.d/rcS deleted file mode 100755 index fd56feebf..000000000 --- a/package/base-files/extra/etc/init.d/rcS +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -export PATH=/bin:/sbin:/usr/bin:/usr/sbin -{ - grep '^#INIT ' /etc/init.d/* | \ - sort -nk2 | \ - while read line; do - /bin/sh ${line%%:*} autostart 2>&1 - done - test -e /etc/init.d/boot.local && (/bin/sh /etc/init.d/boot.local) 2>&1 -} | logger -s -p 6 -t '' & diff --git a/package/base-files/extra/etc/inittab b/package/base-files/extra/etc/inittab deleted file mode 100644 index 960ea77d8..000000000 --- a/package/base-files/extra/etc/inittab +++ /dev/null @@ -1,4 +0,0 @@ -::sysinit:/etc/init.d/rcS -::shutdown:/etc/init.d/rcK -ttyS0::respawn:/sbin/getty -i -L ttyS0 115200 vt100 - diff --git a/package/base-files/extra/etc/ipkg.conf b/package/base-files/extra/etc/ipkg.conf deleted file mode 100644 index 6c9242620..000000000 --- a/package/base-files/extra/etc/ipkg.conf +++ /dev/null @@ -1,3 +0,0 @@ -src openadk http://www.openadk.org/packages/@TARGET@ -dest root / -dest ram /tmp diff --git a/package/base-files/extra/etc/mdev.conf b/package/base-files/extra/etc/mdev.conf deleted file mode 100644 index 99c910d0b..000000000 --- a/package/base-files/extra/etc/mdev.conf +++ /dev/null @@ -1,11 +0,0 @@ -tun 0:0 660 >net/tun -null 0:0 777 -zero 0:0 666 -console 0:0 0600 -kmem 0:0 000 -mem 0:0 0640 -port 0:0 0640 -ptmx 0:0 666 -tty 0:0 0666 -ttyS* 0:0 640 -.* 0:0 644 @/lib/mdev/init diff --git a/package/base-files/extra/etc/modules b/package/base-files/extra/etc/modules deleted file mode 100644 index 014f40f2b..000000000 --- a/package/base-files/extra/etc/modules +++ /dev/null @@ -1 +0,0 @@ -# add modules to load on startup here diff --git a/package/base-files/extra/etc/network/if-post-down.d/01-bridge b/package/base-files/extra/etc/network/if-post-down.d/01-bridge deleted file mode 100755 index 47f3c976b..000000000 --- a/package/base-files/extra/etc/network/if-post-down.d/01-bridge +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -if [ ! -x /usr/sbin/brctl ] -then - exit 0 -fi - -case "$IF_BRIDGE_PORTS" in - "") - exit 0 - ;; - none) - INTERFACES="" - ;; - *) - INTERFACES="$IF_BRIDGE_PORTS" - ;; -esac - -for IF in $INTERFACES; do - ip link set down dev $IF && brctl delif $IFACE $IF -done - -ip link set down dev $IFACE || exit 1 -brctl delbr $IFACE -exit 0 diff --git a/package/base-files/extra/etc/network/if-post-down.d/02-vlan b/package/base-files/extra/etc/network/if-post-down.d/02-vlan deleted file mode 100755 index e448a7641..000000000 --- a/package/base-files/extra/etc/network/if-post-down.d/02-vlan +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -[ -x /sbin/vconfig ] || exit 0 - -[ -e /proc/net/vlan/$IFACE ] && ( - ip link set down dev $IFACE - vconfig rem $IFACE -) - -exit 0 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/01-atm b/package/base-files/extra/etc/network/if-pre-up.d/01-atm deleted file mode 100755 index 5c168c001..000000000 --- a/package/base-files/extra/etc/network/if-pre-up.d/01-atm +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -[ -x /usr/sbin/br2684ctl ] || exit 0 - -[ "${IFACE%%[0-9]*}" = "nas" ] || exit 0 - -[ "$IF_ATM_ENCAPS" ] || encap=0 -[ "$IF_ATM_PAYLOAD" ] || payload=1 -[ "$IF_ATM_VPI" ] || IF_ATM_VPI=1 -[ "$IF_ATM_VCI" ] || IF_ATM_VCI=32 - -[ "$IF_ATM_PAYLOAD" ] && case "$IF_ATM_PAYLOAD" in -bridged) - payload=1 - ;; -routed) - payload=0 - ;; -*) - echo "Wrong payload, use either bridged or routed" - exit 1 - ;; -esac - -[ "$IF_ATM_ENCAPS" ] && case "$IF_ATM_ENCAPS" in -llc) - encap=0 - ;; -vc) - encap=1 - ;; -*) - echo "Wrong Encapsulation use either llc or vc" - exit 1 - ;; -esac - -br2684ctl -b -c ${IFACE##*[a-z]} -e $encap -p $payload -a $IF_ATM_VPI.$IF_ATM_VCI -ifconfig nas${IFACE##*[a-z]} up - -exit 0 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/02-vlan b/package/base-files/extra/etc/network/if-pre-up.d/02-vlan deleted file mode 100755 index 35b7fca59..000000000 --- a/package/base-files/extra/etc/network/if-pre-up.d/02-vlan +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -[ -x /sbin/vconfig ] || exit 0 -[ -d /proc/net/vlan ] || exit 0 - -case "$IFACE" in - vlan*) - vconfig set_name_type VLAN_PLUS_VID_NO_PAD - VLANID=`echo $IFACE|sed "s/vlan*//"` - ;; - eth*.*) - vconfig set_name_type DEV_PLUS_VID_NO_PAD - VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.*//g"` - IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"` - ;; - *) - exit 0 - ;; -esac - -if [ "$IF_VLAN_RAW_DEVICE" != "" ]; then - if ! grep -q "$IF_VLAN_RAW_DEVICE" /proc/net/dev - then - echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE" - exit 1 - fi - ip link set up dev $IF_VLAN_RAW_DEVICE - vconfig add $IF_VLAN_RAW_DEVICE $VLANID - if [ "$IF_MAC_ADDRESS" != "" ] - then - ip link set $IF_VLAN_RAW_DEVICE.$VLANID address $IF_MAC_ADDRESS - fi - ip link set up dev $IF_VLAN_RAW_DEVICE.$VLANID -fi - -exit 0 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/03-bridge b/package/base-files/extra/etc/network/if-pre-up.d/03-bridge deleted file mode 100755 index 41ddb2b58..000000000 --- a/package/base-files/extra/etc/network/if-pre-up.d/03-bridge +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -[ -x /usr/sbin/brctl ] || exit 0 - -case "$IF_BRIDGE_PORTS" in - "") - exit 0 - ;; - none) - INTERFACES="" - ;; - *) - INTERFACES="$IF_BRIDGE_PORTS" - ;; -esac - -brctl addbr $IFACE || exit 1 - -for IF in $INTERFACES; do - if ! grep -q $IF /proc/net/dev; then - echo "Error: interface '$IF' does not exist!" - brctl delbr $IFACE - exit 1 - fi - brctl addif $IFACE $IF - ip link set up dev $IF -done - -exit 0 diff --git a/package/base-files/extra/etc/network/if-up.d/01-bridge b/package/base-files/extra/etc/network/if-up.d/01-bridge deleted file mode 100755 index e5962f12f..000000000 --- a/package/base-files/extra/etc/network/if-up.d/01-bridge +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -[ "${IFACE%%[0-9]*}" = "br" ] && ip link set up dev $IFACE -exit 0 diff --git a/package/base-files/extra/etc/network/interfaces b/package/base-files/extra/etc/network/interfaces deleted file mode 100644 index f1bd92ed2..000000000 --- a/package/base-files/extra/etc/network/interfaces +++ /dev/null @@ -1,2 +0,0 @@ -auto lo -iface lo inet loopback diff --git a/package/base-files/extra/etc/passwd b/package/base-files/extra/etc/passwd deleted file mode 100644 index 32531eb92..000000000 --- a/package/base-files/extra/etc/passwd +++ /dev/null @@ -1,2 +0,0 @@ -root:x:0:0:root:/root:/bin/sh -nobody:*:65534:65534:nobody:/var:/bin/false diff --git a/package/base-files/extra/etc/profile b/package/base-files/extra/etc/profile deleted file mode 100644 index 1b8f4a6a6..000000000 --- a/package/base-files/extra/etc/profile +++ /dev/null @@ -1,12 +0,0 @@ -export PATH=/bin:/sbin:/usr/bin:/usr/sbin -export TERM=vt220 -if [[ $(id -u) = 0 ]]; then - export PS1='# ' -else - export PS1='$ ' - export HOME=/tmp -fi -cat /etc/banner 2>&- -[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi -[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } -[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 "$@"; } diff --git a/package/base-files/extra/etc/protocols b/package/base-files/extra/etc/protocols deleted file mode 100644 index dfe58ed22..000000000 --- a/package/base-files/extra/etc/protocols +++ /dev/null @@ -1,45 +0,0 @@ -ip 0 IP -icmp 1 ICMP -igmp 2 IGMP -ggp 3 GGP -ipencap 4 IP-ENCAP -st 5 ST -tcp 6 TCP -egp 8 EGP -igp 9 IGP -pup 12 PUP -udp 17 UDP -hmp 20 HMP -xns-idp 22 XNS-IDP -rdp 27 RDP -iso-tp4 29 ISO-TP4 -xtp 36 XTP -ddp 37 DDP -idpr-cmtp 38 IDPR-CMTP -ipv6 41 IPv6 -ipv6-route 43 IPv6-Route -ipv6-frag 44 IPv6-Frag -idrp 45 IDRP -rsvp 46 RSVP -gre 47 GRE -esp 50 IPSEC-ESP -ah 51 IPSEC-AH -skip 57 SKIP -ipv6-icmp 58 IPv6-ICMP -ipv6-nonxt 59 IPv6-NoNxt -ipv6-opts 60 IPv6-Opts -rspf 73 RSPF CPHB -vmtp 81 VMTP -eigrp 88 EIGRP -ospf 89 OSPFIGP -ax.25 93 AX.25 -ipip 94 IPIP -etherip 97 ETHERIP -encap 98 ENCAP -pim 103 PIM -ipcomp 108 IPCOMP -vrrp 112 VRRP -l2tp 115 L2TP -isis 124 ISIS -sctp 132 SCTP -fc 133 FC diff --git a/package/base-files/extra/etc/rc.conf b/package/base-files/extra/etc/rc.conf deleted file mode 100644 index 024007589..000000000 --- a/package/base-files/extra/etc/rc.conf +++ /dev/null @@ -1,3 +0,0 @@ -# set variables service=YES|NO (YES to enable, NO to disable) -# set variables service_flags="X" (NO to disable the service) -# note: for flags, X can be empty diff --git a/package/base-files/extra/etc/shadow b/package/base-files/extra/etc/shadow deleted file mode 100644 index 3683d71ea..000000000 --- a/package/base-files/extra/etc/shadow +++ /dev/null @@ -1,3 +0,0 @@ -root:$1$8sJkb6fV$46vEIu5ntmbUuljmr55zY/:14191:0::::: -admin:$1$8sJkb6fV$46vEIu5ntmbUuljmr55zY/:14191:0::::: -nobody:*:9797:0::::: diff --git a/package/base-files/extra/etc/sysctl.conf b/package/base-files/extra/etc/sysctl.conf deleted file mode 100644 index 73260cf9d..000000000 --- a/package/base-files/extra/etc/sysctl.conf +++ /dev/null @@ -1,17 +0,0 @@ -# Disables the magic-sysrq key -#kernel.sysrq = 0 -# When the kernel panics, automatically reboot in 3 seconds -#kernel.panic = 3 -# Enable packet forwarding -#net.ipv4.ip_forward = 1 -# Disables IP dynaddr -#net.ipv4.ip_dynaddr = 0 -# Disable ECN -#net.ipv4.tcp_ecn = 0 -# Enables source route verification -net.ipv4.conf.default.rp_filter = 1 -# Enable reverse path -net.ipv4.conf.all.rp_filter = 1 -# Enable SYN cookies -#net.ipv4.tcp_syncookies = 1 - diff --git a/package/base-files/extra/init b/package/base-files/extra/init deleted file mode 100755 index 618547693..000000000 --- a/package/base-files/extra/init +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -echo "System initialization ..." -export PATH=/bin:/sbin:/usr/bin:/usr/sbin -mount -nt proc proc /proc -mount -o nosuid,nodev,noexec -t sysfs sysfs /sys -[ ! -f /etc/notmpfs ] && { - size=$(awk '/MemTotal:/ { if ($2 > 16000) { print 4096 } else { print 2048 }}' /proc/meminfo) - mount none /tmp -t tmpfs -o size=${size}k - mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 -} -mount -o nosuid,size=128k,mode=0755 -t tmpfs mdev /dev -mkdir /dev/pts /dev/shm -mount -o nosuid,noexec -t devpts devpts /dev/pts -exec 0<>/dev/console >&0 2>&0 -echo >/dev/mdev.seq -echo "/sbin/mdev" >/proc/sys/kernel/hotplug -mdev -s -mount -o remount,rw / -cat /etc/.rnd >/dev/urandom 2>&1 -[ -f /etc/fstab ] && mount -a -[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;} -exec /sbin/init diff --git a/package/base-files/extra/lib/mdev/init b/package/base-files/extra/lib/mdev/init deleted file mode 100644 index d2ae13e9c..000000000 --- a/package/base-files/extra/lib/mdev/init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -if [ "$ACTION" == "add" ];then - if [ "$DEVPATH" == "/bus/usb" ];then - mount -t usbfs usbfs /proc/bus/usb - fi -fi -if [ "$SUBSYSTEM" == "firmware" ];then - logger "Firmware load for $FIRMWARE requested" - if [ "$ACTION" == "add" ];then - if [ -e "/lib/firmware/$FIRMWARE" ];then - logger "Firmware loading ..." - echo 1 > /sys$DEVPATH/loading - cat "/lib/firmware/$FIRMWARE" > /sys$DEVPATH/data - echo 0 > /sys$DEVPATH/loading - logger "finished." - else - logger "Firmware file $FIRMWARE not found" - echo -1 > /sys$DEVPATH/loading - fi - fi -fi diff --git a/package/base-files/extra/sbin/update b/package/base-files/extra/sbin/update deleted file mode 100755 index d41e23a0f..000000000 --- a/package/base-files/extra/sbin/update +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh - -who=$(id -u) -if [ $who -ne 0 ]; then - echo 'Exit. System update must be run as root.' - exit 1 -fi - -if [ -x /sbin/mtd ];then - updatecmd="mtd -r write - linux" -else - updatecmd="gunzip -c | tar -xf -" -fi - -check_exit() { - if [ $? -ne 0 ];then - echo "Update failed." - exit 1 - fi -} - -prepare() { - cd / - umount -f /etc - mount -o remount,rw / -} - -extract_from_file() { - prepare - cat $1 | eval $updatecmd - check_exit -} - -extract_from_ssh() { - prepare - ssh $1 "cat $2" | eval $updatecmd - check_exit -} - -extract_from_http() { - prepare - wget -O - $1 | eval $updatecmd - check_exit -} - -case $1 in - file://*|/*) - url=$(echo $1|sed -e "s#file://##") - echo "Updating system from $1" - extract_from_file $url - ;; - ssh://*) - host=$(echo $1|sed -e "s#ssh://\(.*\):.*#\1#") - file=$(echo $1|sed -e "s#ssh://.*:\(.*\)#\1#") - echo "Updating system from $1" - extract_from_ssh $host $file - ;; - http://*|ftp://*) - echo "Updating system from $1" - extract_from_http $1 - ;; - *) - echo "No or wrong uri given. exit." - echo "Use one of the following uri:" - echo "http://myserver/myupdate.tar.gz" - echo "ssh://myuser@myserver:/my/path/myupdate.tar.gz" - echo "file:///mypath/myupdate.tar.gz" - exit 1 - ;; -esac - -sync -mount -o bind /etc /tmp/.cfgfs/root - -echo "Update sucessful. You should reboot now." diff --git a/package/base-files/extra/usr/share/udhcpc/default.script b/package/base-files/extra/usr/share/udhcpc/default.script deleted file mode 100755 index 02e4a7a3c..000000000 --- a/package/base-files/extra/usr/share/udhcpc/default.script +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -if [[ -z $1 ]]; then - echo "Error: should be run by udhcpc" - exit 1 -fi - -RESOLV_CONF=/tmp/resolv.conf - -case $1 in -(deconfig) - ip addr flush $interface - ;; -(renew|bound) - ip addr add $ip/${mask:-24} brd + dev $interface - - if [[ -n $router ]]; then - echo "deleting routers" - while ip route del default >&- 2>&-; do :; done - - for i in $router; do - echo "adding router $i" - ip route add to default via $i - done - fi - - echo -n >$RESOLV_CONF - ${domain:+echo search $domain} >>$RESOLV_CONF - for i in $dns; do - echo "adding dns $i" - echo "nameserver $i" >>$RESOLV_CONF - done - - # user rules - [ -f /etc/udhcpc.user ] && . /etc/udhcpc.user -;; -esac - -exit $? diff --git a/package/base-files/src/etc/banner b/package/base-files/src/etc/banner new file mode 100644 index 000000000..49dbb9685 --- /dev/null +++ b/package/base-files/src/etc/banner @@ -0,0 +1 @@ + Linux created with OpenADK diff --git a/package/base-files/src/etc/functions.sh b/package/base-files/src/etc/functions.sh new file mode 100644 index 000000000..5d76f4843 --- /dev/null +++ b/package/base-files/src/etc/functions.sh @@ -0,0 +1,79 @@ +# newline +N=" +" + +append() { + local var="$1" + local value="$2" + local sep="${3:- }" + + eval "export -- \"$var=\${$var:+\${$var}\${value:+\$sep}}\$value\"" +} + +load_modules() { + (sed "s,^[^#][^[:space:]]*,insmod /lib/modules/$(uname -r)/&.ko," $* | sh 2>&- || :) +} + +user_exists() { + grep -q "^$1:" $IPKG_INSTROOT/etc/passwd 2>&- +} + +group_exists() { + grep -q "^$1:" $IPKG_INSTROOT/etc/group 2>&- +} + +service_exists() { + grep -q "^$1[[:space:]]*$2" $IPKG_INSTROOT/etc/services 2>&- +} + +rcconf_exists() { + grep -q "^#*$1=" $IPKG_INSTROOT/etc/rc.conf 2>&- +} + +add_user() { + user_exists $1 || { + echo "adding user $1 to /etc/passwd" + echo "$1:x:$2:${3:-$2}:$1:${4:-/tmp}:${5:-/bin/false}" \ + >>$IPKG_INSTROOT/etc/passwd + } +} + +add_group() { + group_exists $1 || { + echo "adding group $1 to /etc/group" + echo "$1:x:$2:$3" >>$IPKG_INSTROOT/etc/group + } +} + +add_service() { + service_exists $1 $2 || { + echo "adding service $1 to /etc/services" + printf '%s\t%s\n' "$1" "$2" >>$IPKG_INSTROOT/etc/services + } +} + +add_rcconf() { + rcconf_exists ${2-$1} || { + echo "adding service ${2-$1} to /etc/rc.conf" + printf '%s="%s"\t\t# %s\n' "${2:-$1}" "${3:-NO}" "$1" \ + >>$IPKG_INSTROOT/etc/rc.conf + } +} + +get_next_uid() { + uid=1 + while grep "^[^:]*:[^:]*:$uid:" $IPKG_INSTROOT/etc/passwd \ + >/dev/null 2>&1; do + uid=$(($uid+1)) + done + echo $uid +} + +get_next_gid() { + gid=1 + while grep "^[^:]*:[^:]*:$gid:" $IPKG_INSTROOT/etc/group \ + >/dev/null 2>&1; do + gid=$(($gid+1)) + done + echo $gid +} diff --git a/package/base-files/src/etc/group b/package/base-files/src/etc/group new file mode 100644 index 000000000..c4e77f316 --- /dev/null +++ b/package/base-files/src/etc/group @@ -0,0 +1,2 @@ +root:x:0: +nogroup:x:65534: diff --git a/package/base-files/src/etc/hosts b/package/base-files/src/etc/hosts new file mode 100644 index 000000000..87d837fc7 --- /dev/null +++ b/package/base-files/src/etc/hosts @@ -0,0 +1,2 @@ +::1 localhost +127.0.0.1 localhost diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot new file mode 100644 index 000000000..f71e46240 --- /dev/null +++ b/package/base-files/src/etc/init.d/boot @@ -0,0 +1,27 @@ +#!/bin/sh +#INIT 10 +[[ $1 = autostart ]] || exit 0 + +. /etc/functions.sh + +mkdir -p /var/log +mkdir -p /var/run +touch /var/log/lastlog +touch /var/log/wtmp +ln -s /var/tmp /tmp + +echo 0 > /proc/sys/kernel/printk + +HOSTNAME= +[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname) +HOSTNAME=${HOSTNAME%%.*} +echo ${HOSTNAME:=linux} >/proc/sys/kernel/hostname + +chown 0:0 /tmp; chmod 1777 /tmp + +load_modules /etc/modules +for f in /etc/modules.d/*; do + [[ -e $f ]] && load_modules /etc/modules.d/* + break +done +exit 0 diff --git a/package/base-files/src/etc/init.d/done b/package/base-files/src/etc/init.d/done new file mode 100644 index 000000000..e5b655bb6 --- /dev/null +++ b/package/base-files/src/etc/init.d/done @@ -0,0 +1,4 @@ +#!/bin/sh +#INIT 98 +[[ $1 = autostart ]] && sysctl -p >&- +exit 0 diff --git a/package/base-files/src/etc/init.d/rcK b/package/base-files/src/etc/init.d/rcK new file mode 100755 index 000000000..e94d1a296 --- /dev/null +++ b/package/base-files/src/etc/init.d/rcK @@ -0,0 +1,21 @@ +#!/bin/sh +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +busybox reboot -d 60 -f & # just in case… +{ + [[ -f /proc/diag/led/power ]] && echo f >/proc/diag/led/power + test -e /etc/rc.shutdown && (/bin/sh /etc/rc.shutdown) 2>&1 + grep '^#INIT ' /etc/init.d/* | \ + sort -rnk2 | \ + while read line; do + shebang=$(sed -n '1s/^#![ ]*//p' ${line%%:*}) + case $shebang in + *[\ \ ]*) shebang=\'$(echo X"$shebang" | sed \ + -e 's/^X//' -e "s/'/'\\\\''/g" \ + -e 's/^\([^ ][^ ]*\)[ ]*$/\1/' \ + -e 's/^\([^ ][^ ]*\)[ ][ ]*\(..*\)$/\1 \2/' \ + -e 's/^\([^ ][^ ]*\) /\1'\'' '\''/')\' ;; + esac + ${shebang:-/bin/sh} ${line%%:*} autostop 2>&1 + done + [[ -f /proc/diag/led/power ]] && echo 0 >/proc/diag/led/power +} | logger -s -p 6 -t '' diff --git a/package/base-files/src/etc/init.d/rcS b/package/base-files/src/etc/init.d/rcS new file mode 100755 index 000000000..fd56feebf --- /dev/null +++ b/package/base-files/src/etc/init.d/rcS @@ -0,0 +1,10 @@ +#!/bin/sh +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +{ + grep '^#INIT ' /etc/init.d/* | \ + sort -nk2 | \ + while read line; do + /bin/sh ${line%%:*} autostart 2>&1 + done + test -e /etc/init.d/boot.local && (/bin/sh /etc/init.d/boot.local) 2>&1 +} | logger -s -p 6 -t '' & diff --git a/package/base-files/src/etc/inittab b/package/base-files/src/etc/inittab new file mode 100644 index 000000000..960ea77d8 --- /dev/null +++ b/package/base-files/src/etc/inittab @@ -0,0 +1,4 @@ +::sysinit:/etc/init.d/rcS +::shutdown:/etc/init.d/rcK +ttyS0::respawn:/sbin/getty -i -L ttyS0 115200 vt100 + diff --git a/package/base-files/src/etc/ipkg.conf b/package/base-files/src/etc/ipkg.conf new file mode 100644 index 000000000..6c9242620 --- /dev/null +++ b/package/base-files/src/etc/ipkg.conf @@ -0,0 +1,3 @@ +src openadk http://www.openadk.org/packages/@TARGET@ +dest root / +dest ram /tmp diff --git a/package/base-files/src/etc/mdev.conf b/package/base-files/src/etc/mdev.conf new file mode 100644 index 000000000..99c910d0b --- /dev/null +++ b/package/base-files/src/etc/mdev.conf @@ -0,0 +1,11 @@ +tun 0:0 660 >net/tun +null 0:0 777 +zero 0:0 666 +console 0:0 0600 +kmem 0:0 000 +mem 0:0 0640 +port 0:0 0640 +ptmx 0:0 666 +tty 0:0 0666 +ttyS* 0:0 640 +.* 0:0 644 @/lib/mdev/init diff --git a/package/base-files/src/etc/modules b/package/base-files/src/etc/modules new file mode 100644 index 000000000..014f40f2b --- /dev/null +++ b/package/base-files/src/etc/modules @@ -0,0 +1 @@ +# add modules to load on startup here diff --git a/package/base-files/src/etc/network/if-post-down.d/01-bridge b/package/base-files/src/etc/network/if-post-down.d/01-bridge new file mode 100755 index 000000000..47f3c976b --- /dev/null +++ b/package/base-files/src/etc/network/if-post-down.d/01-bridge @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ ! -x /usr/sbin/brctl ] +then + exit 0 +fi + +case "$IF_BRIDGE_PORTS" in + "") + exit 0 + ;; + none) + INTERFACES="" + ;; + *) + INTERFACES="$IF_BRIDGE_PORTS" + ;; +esac + +for IF in $INTERFACES; do + ip link set down dev $IF && brctl delif $IFACE $IF +done + +ip link set down dev $IFACE || exit 1 +brctl delbr $IFACE +exit 0 diff --git a/package/base-files/src/etc/network/if-post-down.d/02-vlan b/package/base-files/src/etc/network/if-post-down.d/02-vlan new file mode 100755 index 000000000..e448a7641 --- /dev/null +++ b/package/base-files/src/etc/network/if-post-down.d/02-vlan @@ -0,0 +1,10 @@ +#!/bin/sh + +[ -x /sbin/vconfig ] || exit 0 + +[ -e /proc/net/vlan/$IFACE ] && ( + ip link set down dev $IFACE + vconfig rem $IFACE +) + +exit 0 diff --git a/package/base-files/src/etc/network/if-pre-up.d/01-atm b/package/base-files/src/etc/network/if-pre-up.d/01-atm new file mode 100755 index 000000000..5c168c001 --- /dev/null +++ b/package/base-files/src/etc/network/if-pre-up.d/01-atm @@ -0,0 +1,41 @@ +#!/bin/sh + +[ -x /usr/sbin/br2684ctl ] || exit 0 + +[ "${IFACE%%[0-9]*}" = "nas" ] || exit 0 + +[ "$IF_ATM_ENCAPS" ] || encap=0 +[ "$IF_ATM_PAYLOAD" ] || payload=1 +[ "$IF_ATM_VPI" ] || IF_ATM_VPI=1 +[ "$IF_ATM_VCI" ] || IF_ATM_VCI=32 + +[ "$IF_ATM_PAYLOAD" ] && case "$IF_ATM_PAYLOAD" in +bridged) + payload=1 + ;; +routed) + payload=0 + ;; +*) + echo "Wrong payload, use either bridged or routed" + exit 1 + ;; +esac + +[ "$IF_ATM_ENCAPS" ] && case "$IF_ATM_ENCAPS" in +llc) + encap=0 + ;; +vc) + encap=1 + ;; +*) + echo "Wrong Encapsulation use either llc or vc" + exit 1 + ;; +esac + +br2684ctl -b -c ${IFACE##*[a-z]} -e $encap -p $payload -a $IF_ATM_VPI.$IF_ATM_VCI +ifconfig nas${IFACE##*[a-z]} up + +exit 0 diff --git a/package/base-files/src/etc/network/if-pre-up.d/02-vlan b/package/base-files/src/etc/network/if-pre-up.d/02-vlan new file mode 100755 index 000000000..35b7fca59 --- /dev/null +++ b/package/base-files/src/etc/network/if-pre-up.d/02-vlan @@ -0,0 +1,36 @@ +#!/bin/sh + +[ -x /sbin/vconfig ] || exit 0 +[ -d /proc/net/vlan ] || exit 0 + +case "$IFACE" in + vlan*) + vconfig set_name_type VLAN_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/vlan*//"` + ;; + eth*.*) + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"` + ;; + *) + exit 0 + ;; +esac + +if [ "$IF_VLAN_RAW_DEVICE" != "" ]; then + if ! grep -q "$IF_VLAN_RAW_DEVICE" /proc/net/dev + then + echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE" + exit 1 + fi + ip link set up dev $IF_VLAN_RAW_DEVICE + vconfig add $IF_VLAN_RAW_DEVICE $VLANID + if [ "$IF_MAC_ADDRESS" != "" ] + then + ip link set $IF_VLAN_RAW_DEVICE.$VLANID address $IF_MAC_ADDRESS + fi + ip link set up dev $IF_VLAN_RAW_DEVICE.$VLANID +fi + +exit 0 diff --git a/package/base-files/src/etc/network/if-pre-up.d/03-bridge b/package/base-files/src/etc/network/if-pre-up.d/03-bridge new file mode 100755 index 000000000..41ddb2b58 --- /dev/null +++ b/package/base-files/src/etc/network/if-pre-up.d/03-bridge @@ -0,0 +1,29 @@ +#!/bin/sh + +[ -x /usr/sbin/brctl ] || exit 0 + +case "$IF_BRIDGE_PORTS" in + "") + exit 0 + ;; + none) + INTERFACES="" + ;; + *) + INTERFACES="$IF_BRIDGE_PORTS" + ;; +esac + +brctl addbr $IFACE || exit 1 + +for IF in $INTERFACES; do + if ! grep -q $IF /proc/net/dev; then + echo "Error: interface '$IF' does not exist!" + brctl delbr $IFACE + exit 1 + fi + brctl addif $IFACE $IF + ip link set up dev $IF +done + +exit 0 diff --git a/package/base-files/src/etc/network/if-up.d/01-bridge b/package/base-files/src/etc/network/if-up.d/01-bridge new file mode 100755 index 000000000..e5962f12f --- /dev/null +++ b/package/base-files/src/etc/network/if-up.d/01-bridge @@ -0,0 +1,4 @@ +#!/bin/sh + +[ "${IFACE%%[0-9]*}" = "br" ] && ip link set up dev $IFACE +exit 0 diff --git a/package/base-files/src/etc/network/interfaces b/package/base-files/src/etc/network/interfaces new file mode 100644 index 000000000..f1bd92ed2 --- /dev/null +++ b/package/base-files/src/etc/network/interfaces @@ -0,0 +1,2 @@ +auto lo +iface lo inet loopback diff --git a/package/base-files/src/etc/passwd b/package/base-files/src/etc/passwd new file mode 100644 index 000000000..32531eb92 --- /dev/null +++ b/package/base-files/src/etc/passwd @@ -0,0 +1,2 @@ +root:x:0:0:root:/root:/bin/sh +nobody:*:65534:65534:nobody:/var:/bin/false diff --git a/package/base-files/src/etc/profile b/package/base-files/src/etc/profile new file mode 100644 index 000000000..1b8f4a6a6 --- /dev/null +++ b/package/base-files/src/etc/profile @@ -0,0 +1,12 @@ +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +export TERM=vt220 +if [[ $(id -u) = 0 ]]; then + export PS1='# ' +else + export PS1='$ ' + export HOME=/tmp +fi +cat /etc/banner 2>&- +[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi +[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } +[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 "$@"; } diff --git a/package/base-files/src/etc/protocols b/package/base-files/src/etc/protocols new file mode 100644 index 000000000..dfe58ed22 --- /dev/null +++ b/package/base-files/src/etc/protocols @@ -0,0 +1,45 @@ +ip 0 IP +icmp 1 ICMP +igmp 2 IGMP +ggp 3 GGP +ipencap 4 IP-ENCAP +st 5 ST +tcp 6 TCP +egp 8 EGP +igp 9 IGP +pup 12 PUP +udp 17 UDP +hmp 20 HMP +xns-idp 22 XNS-IDP +rdp 27 RDP +iso-tp4 29 ISO-TP4 +xtp 36 XTP +ddp 37 DDP +idpr-cmtp 38 IDPR-CMTP +ipv6 41 IPv6 +ipv6-route 43 IPv6-Route +ipv6-frag 44 IPv6-Frag +idrp 45 IDRP +rsvp 46 RSVP +gre 47 GRE +esp 50 IPSEC-ESP +ah 51 IPSEC-AH +skip 57 SKIP +ipv6-icmp 58 IPv6-ICMP +ipv6-nonxt 59 IPv6-NoNxt +ipv6-opts 60 IPv6-Opts +rspf 73 RSPF CPHB +vmtp 81 VMTP +eigrp 88 EIGRP +ospf 89 OSPFIGP +ax.25 93 AX.25 +ipip 94 IPIP +etherip 97 ETHERIP +encap 98 ENCAP +pim 103 PIM +ipcomp 108 IPCOMP +vrrp 112 VRRP +l2tp 115 L2TP +isis 124 ISIS +sctp 132 SCTP +fc 133 FC diff --git a/package/base-files/src/etc/rc.conf b/package/base-files/src/etc/rc.conf new file mode 100644 index 000000000..024007589 --- /dev/null +++ b/package/base-files/src/etc/rc.conf @@ -0,0 +1,3 @@ +# set variables service=YES|NO (YES to enable, NO to disable) +# set variables service_flags="X" (NO to disable the service) +# note: for flags, X can be empty diff --git a/package/base-files/src/etc/shadow b/package/base-files/src/etc/shadow new file mode 100644 index 000000000..3683d71ea --- /dev/null +++ b/package/base-files/src/etc/shadow @@ -0,0 +1,3 @@ +root:$1$8sJkb6fV$46vEIu5ntmbUuljmr55zY/:14191:0::::: +admin:$1$8sJkb6fV$46vEIu5ntmbUuljmr55zY/:14191:0::::: +nobody:*:9797:0::::: diff --git a/package/base-files/src/etc/sysctl.conf b/package/base-files/src/etc/sysctl.conf new file mode 100644 index 000000000..73260cf9d --- /dev/null +++ b/package/base-files/src/etc/sysctl.conf @@ -0,0 +1,17 @@ +# Disables the magic-sysrq key +#kernel.sysrq = 0 +# When the kernel panics, automatically reboot in 3 seconds +#kernel.panic = 3 +# Enable packet forwarding +#net.ipv4.ip_forward = 1 +# Disables IP dynaddr +#net.ipv4.ip_dynaddr = 0 +# Disable ECN +#net.ipv4.tcp_ecn = 0 +# Enables source route verification +net.ipv4.conf.default.rp_filter = 1 +# Enable reverse path +net.ipv4.conf.all.rp_filter = 1 +# Enable SYN cookies +#net.ipv4.tcp_syncookies = 1 + diff --git a/package/base-files/src/init b/package/base-files/src/init new file mode 100755 index 000000000..618547693 --- /dev/null +++ b/package/base-files/src/init @@ -0,0 +1,22 @@ +#!/bin/sh +echo "System initialization ..." +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +mount -nt proc proc /proc +mount -o nosuid,nodev,noexec -t sysfs sysfs /sys +[ ! -f /etc/notmpfs ] && { + size=$(awk '/MemTotal:/ { if ($2 > 16000) { print 4096 } else { print 2048 }}' /proc/meminfo) + mount none /tmp -t tmpfs -o size=${size}k + mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 +} +mount -o nosuid,size=128k,mode=0755 -t tmpfs mdev /dev +mkdir /dev/pts /dev/shm +mount -o nosuid,noexec -t devpts devpts /dev/pts +exec 0<>/dev/console >&0 2>&0 +echo >/dev/mdev.seq +echo "/sbin/mdev" >/proc/sys/kernel/hotplug +mdev -s +mount -o remount,rw / +cat /etc/.rnd >/dev/urandom 2>&1 +[ -f /etc/fstab ] && mount -a +[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;} +exec /sbin/init diff --git a/package/base-files/src/lib/mdev/init b/package/base-files/src/lib/mdev/init new file mode 100644 index 000000000..d2ae13e9c --- /dev/null +++ b/package/base-files/src/lib/mdev/init @@ -0,0 +1,21 @@ +#!/bin/sh +if [ "$ACTION" == "add" ];then + if [ "$DEVPATH" == "/bus/usb" ];then + mount -t usbfs usbfs /proc/bus/usb + fi +fi +if [ "$SUBSYSTEM" == "firmware" ];then + logger "Firmware load for $FIRMWARE requested" + if [ "$ACTION" == "add" ];then + if [ -e "/lib/firmware/$FIRMWARE" ];then + logger "Firmware loading ..." + echo 1 > /sys$DEVPATH/loading + cat "/lib/firmware/$FIRMWARE" > /sys$DEVPATH/data + echo 0 > /sys$DEVPATH/loading + logger "finished." + else + logger "Firmware file $FIRMWARE not found" + echo -1 > /sys$DEVPATH/loading + fi + fi +fi diff --git a/package/base-files/src/sbin/update b/package/base-files/src/sbin/update new file mode 100755 index 000000000..d41e23a0f --- /dev/null +++ b/package/base-files/src/sbin/update @@ -0,0 +1,75 @@ +#!/bin/sh + +who=$(id -u) +if [ $who -ne 0 ]; then + echo 'Exit. System update must be run as root.' + exit 1 +fi + +if [ -x /sbin/mtd ];then + updatecmd="mtd -r write - linux" +else + updatecmd="gunzip -c | tar -xf -" +fi + +check_exit() { + if [ $? -ne 0 ];then + echo "Update failed." + exit 1 + fi +} + +prepare() { + cd / + umount -f /etc + mount -o remount,rw / +} + +extract_from_file() { + prepare + cat $1 | eval $updatecmd + check_exit +} + +extract_from_ssh() { + prepare + ssh $1 "cat $2" | eval $updatecmd + check_exit +} + +extract_from_http() { + prepare + wget -O - $1 | eval $updatecmd + check_exit +} + +case $1 in + file://*|/*) + url=$(echo $1|sed -e "s#file://##") + echo "Updating system from $1" + extract_from_file $url + ;; + ssh://*) + host=$(echo $1|sed -e "s#ssh://\(.*\):.*#\1#") + file=$(echo $1|sed -e "s#ssh://.*:\(.*\)#\1#") + echo "Updating system from $1" + extract_from_ssh $host $file + ;; + http://*|ftp://*) + echo "Updating system from $1" + extract_from_http $1 + ;; + *) + echo "No or wrong uri given. exit." + echo "Use one of the following uri:" + echo "http://myserver/myupdate.tar.gz" + echo "ssh://myuser@myserver:/my/path/myupdate.tar.gz" + echo "file:///mypath/myupdate.tar.gz" + exit 1 + ;; +esac + +sync +mount -o bind /etc /tmp/.cfgfs/root + +echo "Update sucessful. You should reboot now." diff --git a/package/base-files/src/usr/share/udhcpc/default.script b/package/base-files/src/usr/share/udhcpc/default.script new file mode 100755 index 000000000..02e4a7a3c --- /dev/null +++ b/package/base-files/src/usr/share/udhcpc/default.script @@ -0,0 +1,38 @@ +#!/bin/sh +if [[ -z $1 ]]; then + echo "Error: should be run by udhcpc" + exit 1 +fi + +RESOLV_CONF=/tmp/resolv.conf + +case $1 in +(deconfig) + ip addr flush $interface + ;; +(renew|bound) + ip addr add $ip/${mask:-24} brd + dev $interface + + if [[ -n $router ]]; then + echo "deleting routers" + while ip route del default >&- 2>&-; do :; done + + for i in $router; do + echo "adding router $i" + ip route add to default via $i + done + fi + + echo -n >$RESOLV_CONF + ${domain:+echo search $domain} >>$RESOLV_CONF + for i in $dns; do + echo "adding dns $i" + echo "nameserver $i" >>$RESOLV_CONF + done + + # user rules + [ -f /etc/udhcpc.user ] && . /etc/udhcpc.user +;; +esac + +exit $? diff --git a/package/bash/Makefile b/package/bash/Makefile index 531ff7f82..82b6c2334 100644 --- a/package/bash/Makefile +++ b/package/bash/Makefile @@ -17,9 +17,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,BASH,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) XAKE_FLAGS+= LIBS_FOR_BUILD='' -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: $(INSTALL_DIR) $(IDIR_BASH)/bin diff --git a/package/bc/Makefile b/package/bc/Makefile index 3a231028a..dbe613550 100644 --- a/package/bc/Makefile +++ b/package/bc/Makefile @@ -17,10 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BC,bc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,DC,dc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: # bc ${INSTALL_DIR} ${IDIR_BC}/usr/bin diff --git a/package/bigreqsproto/Makefile b/package/bigreqsproto/Makefile index b5dad3a5b..52b61b367 100644 --- a/package/bigreqsproto/Makefile +++ b/package/bigreqsproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 882d49cc3bb591dbdccdf9e680bd2e4b PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bind/Makefile b/package/bind/Makefile index 2a75cfba4..b270af1a1 100644 --- a/package/bind/Makefile +++ b/package/bind/Makefile @@ -33,16 +33,11 @@ $(eval $(call PKG_template,BIND_DNSSEC,bind-dnssec,${PKG_VERSION}-${PKG_RELEASE} $(eval $(call PKG_template,BIND_HOST,bind-host,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_6},${PKG_SECTION})) $(eval $(call PKG_template,BIND_DIG,bind-dig,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_7},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -CONFIGURE_ENV+= BUILD_CC="${TARGET_CC}" \ - ac_cv_lib_nsl_inet_ntoa=no CONFIGURE_ARGS+= --with-randomdev=/dev/urandom \ --disable-threads \ --with-openssl=${STAGING_DIR}/usr/ \ --enable-epoll \ --with-libtool -BUILD_STYLE= auto -INSTALL_STYLE= auto pre-build: ${MAKE} -C ${WRKBUILD}/lib/dns \ diff --git a/package/binutils/Makefile b/package/binutils/Makefile index c622a1af7..9d1df7793 100644 --- a/package/binutils/Makefile +++ b/package/binutils/Makefile @@ -12,12 +12,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BINUTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TCFLAGS+= -fPIC -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --disable-werror \ --host=$(REAL_GNU_TARGET_NAME) \ --target=$(REAL_GNU_TARGET_NAME) -BUILD_STYLE= auto -INSTALL_STYLE= auto post-patch: ${PREVENT_PATCH} ${PATCH} ${WRKDIST} \ diff --git a/package/bison/Makefile b/package/bison/Makefile index 7c742fe6e..4c36f5892 100644 --- a/package/bison/Makefile +++ b/package/bison/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BISON,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_BISON}/usr/bin ${IDIR_BISON}/usr/share/bison ${INSTALL_BIN} ${WRKINST}/usr/bin/bison ${IDIR_BISON}/usr/bin diff --git a/package/bitlbee/Makefile b/package/bitlbee/Makefile index 8efc3c104..a0fbdab1a 100644 --- a/package/bitlbee/Makefile +++ b/package/bitlbee/Makefile @@ -4,33 +4,24 @@ include ${TOPDIR}/rules.mk PKG_NAME:= bitlbee -PKG_VERSION:= 1.2.3 +PKG_VERSION:= 1.2.4 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libiconv openssl glib -PKG_MD5SUM:= 2b1674d98804970809de3da3edf0bed2 +PKG_MD5SUM:= 26b9bfc5446bdf0e932e8074d117be67 PKG_DESCR:= IRC gateway to IM chat networks PKG_SECTION:= net -PKG_DEPENDS:= glib libopenssl libiconv +PKG_DEPENDS:= glib libiconv libopenssl +PKG_BUILDDEP+= glib libiconv openssl PKG_URL:= http://www.bitlbee.org -PKG_SITES:= http://get.bitlbee.org/src/ \ - http://get.bitlbee.be/src/ \ - http://get.us.bitlbee.org/src/ \ - http://ftp.snt.utwente.nl/pub/software/bitlbee/src/ +PKG_SITES:= http://get.bitlbee.org/src/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BITLBEE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -do-configure: - (cd $(WRKBUILD); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -fPIC" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - STAGING_DIR="$(STAGING_DIR)" \ - STRIP="$(STRIP)" \ - ./configure \ - --target=${REAL_GNU_TARGET_NAME} \ +CONFIG_STYLE:= minimal + +TCFLAGS+= -fPIC +CONFIGURE_ARGS:= --target=${REAL_GNU_TARGET_NAME} \ --prefix=/usr/ \ --bindir=/usr/sbin/ \ --etcdir=/etc/bitlbee/ \ @@ -39,19 +30,16 @@ do-configure: --arch=Linux \ --cpu="${ARCH}" \ --debug=0 \ - --strip=1 \ + --strip=0 \ --ipv6=1 \ - --ssl=openssl \ - ); + --ssl=openssl -BUILD_STYLE:= auto -INSTALL_STYLE:= auto INSTALL_TARGET= install-etc install-bin post-configure: @echo 'CFLAGS+="-I${STAGING_DIR}/usr/include/iconv"' >> \ ${WRKBUILD}/Makefile.settings - @echo 'LFLAGS+="-L${STAGING_DIR}/usr/lib/iconv"' >> \ + @echo 'LFLAGS+="-L${STAGING_DIR}/usr/lib"' >> \ ${WRKBUILD}/Makefile.settings post-install: diff --git a/package/bitlbee/patches/patch-Makefile b/package/bitlbee/patches/patch-Makefile deleted file mode 100644 index 8269d1977..000000000 --- a/package/bitlbee/patches/patch-Makefile +++ /dev/null @@ -1,22 +0,0 @@ ---- bitlbee-1.2.3.orig/Makefile 2008-09-06 14:33:14.000000000 +0200 -+++ bitlbee-1.2.3/Makefile 2009-08-28 11:18:09.268088045 +0200 -@@ -111,16 +111,16 @@ $(subdirs): - - $(objects): %.o: %.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $< -o $@ -+ $(CC) -c $(CFLAGS) $< -o $@ - - $(objects): Makefile Makefile.settings config.h - - $(OUTFILE): $(objects) $(subdirs) - @echo '*' Linking $(OUTFILE) -- @$(CC) $(objects) $(subdirobjs) -o $(OUTFILE) $(LFLAGS) $(EFLAGS) -+ $(CC) -shared $(objects) $(subdirobjs) -o $(OUTFILE) $(LDFLAGS) $(EFLAGS) - ifndef DEBUG - @echo '*' Stripping $(OUTFILE) -- @-$(STRIP) $(OUTFILE) -+ -$(STRIP) $(OUTFILE) - endif - - encode: crypting.c diff --git a/package/bitlbee/patches/patch-configure b/package/bitlbee/patches/patch-configure index 9f13c535c..1f4538ac4 100644 --- a/package/bitlbee/patches/patch-configure +++ b/package/bitlbee/patches/patch-configure @@ -1,4 +1,3 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ --- bitlbee-1.2.3.orig/configure 2008-09-06 14:33:13.000000000 +0200 +++ bitlbee-1.2.3/configure 2008-10-08 16:07:32.000000000 +0200 @@ -19,7 +19,6 @@ libevent='/usr/' diff --git a/package/bitlbee/patches/patch-lib_Makefile b/package/bitlbee/patches/patch-lib_Makefile deleted file mode 100644 index e43ddb2a0..000000000 --- a/package/bitlbee/patches/patch-lib_Makefile +++ /dev/null @@ -1,24 +0,0 @@ ---- bitlbee-1.2.3.orig/lib/Makefile 2008-09-06 14:33:13.000000000 +0200 -+++ bitlbee-1.2.3/lib/Makefile 2009-08-28 11:12:29.546939473 +0200 -@@ -12,7 +12,7 @@ - objects = arc.o base64.o $(EVENT_HANDLER) http_client.o ini.o md5.o misc.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o - - CFLAGS += -Wall --LFLAGS += -r -+#LFLAGS += -r - - # [SH] Phony targets - all: lib.o -@@ -32,10 +32,10 @@ distclean: clean $(subdirs) - - lib.o: $(objects) $(subdirs) - @echo '*' Linking lib.o -- @$(LD) $(LFLAGS) $(objects) -o lib.o -+ $(CC) -shared $(LDFLAGS) $(objects) -o lib.o - - $(objects): ../Makefile.settings Makefile - - $(objects): %.o: %.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $< -o $@ -+ $(CC) -c $(CFLAGS) $< -o $@ diff --git a/package/bitlbee/patches/patch-protocols_Makefile b/package/bitlbee/patches/patch-protocols_Makefile deleted file mode 100644 index 9e0f621f9..000000000 --- a/package/bitlbee/patches/patch-protocols_Makefile +++ /dev/null @@ -1,24 +0,0 @@ ---- bitlbee-1.2.3.orig/protocols/Makefile 2008-09-06 14:33:13.000000000 +0200 -+++ bitlbee-1.2.3/protocols/Makefile 2009-08-28 11:13:32.079800935 +0200 -@@ -21,7 +21,7 @@ subdirobjs = $(PROTOOBJS) - # Expansion of variables - subdirobjs := $(join $(subdirs),$(addprefix /,$(subdirobjs))) - CFLAGS += -Wall --LFLAGS += -r -+#LFLAGS += -r - - # [SH] Phony targets - all: protocols.o -@@ -44,10 +44,10 @@ $(subdirs): - - protocols.o: $(objects) $(subdirs) - @echo '*' Linking protocols.o -- @$(LD) $(LFLAGS) $(objects) $(subdirobjs) -o protocols.o -+ $(CC) -shared $(LDFLAGS) $(objects) $(subdirobjs) -o protocols.o - - $(objects): ../Makefile.settings Makefile - - $(objects): %.o: %.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $< -o $@ -+ $(CC) -c $(CFLAGS) $< -o $@ diff --git a/package/bitlbee/patches/patch-protocols_jabber_Makefile b/package/bitlbee/patches/patch-protocols_jabber_Makefile deleted file mode 100644 index 5bf35809d..000000000 --- a/package/bitlbee/patches/patch-protocols_jabber_Makefile +++ /dev/null @@ -1,22 +0,0 @@ ---- bitlbee-1.2.3.orig/protocols/jabber/Makefile 2008-09-06 14:33:13.000000000 +0200 -+++ bitlbee-1.2.3/protocols/jabber/Makefile 2009-08-28 11:15:01.100110500 +0200 -@@ -12,7 +12,7 @@ - objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o sasl.o - - CFLAGS += -Wall --LFLAGS += -r -+#LFLAGS += -r - - # [SH] Phony targets - all: jabber_mod.o -@@ -34,8 +34,8 @@ $(objects): ../../Makefile.settings Make - - $(objects): %.o: %.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $< -o $@ -+ $(CC) -c $(CFLAGS) $< -o $@ - - jabber_mod.o: $(objects) - @echo '*' Linking jabber_mod.o -- @$(LD) $(LFLAGS) $(objects) -o jabber_mod.o -+ $(CC) -shared $(LDFLAGS) $(objects) -o jabber_mod.o diff --git a/package/bitlbee/patches/patch-protocols_msn_Makefile b/package/bitlbee/patches/patch-protocols_msn_Makefile deleted file mode 100644 index df4370d39..000000000 --- a/package/bitlbee/patches/patch-protocols_msn_Makefile +++ /dev/null @@ -1,24 +0,0 @@ ---- bitlbee-1.2.3.orig/protocols/msn/Makefile 2008-09-06 14:33:13.000000000 +0200 -+++ bitlbee-1.2.3/protocols/msn/Makefile 2009-08-28 11:13:50.455844911 +0200 -@@ -12,7 +12,7 @@ - objects = msn.o msn_util.o ns.o passport.o sb.o tables.o - - CFLAGS += -Wall --LFLAGS += -r -+#LFLAGS += -r - - # [SH] Phony targets - all: msn_mod.o -@@ -34,10 +34,10 @@ $(objects): ../../Makefile.settings Make - - $(objects): %.o: %.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $< -o $@ -+ $(CC) -c $(CFLAGS) $< -o $@ - - msn_mod.o: $(objects) - @echo '*' Linking msn_mod.o -- @$(LD) $(LFLAGS) $(objects) -o msn_mod.o -+ $(CC) -shared $(LDFLAGS) $(objects) -o msn_mod.o - - diff --git a/package/bitlbee/patches/patch-protocols_oscar_Makefile b/package/bitlbee/patches/patch-protocols_oscar_Makefile deleted file mode 100644 index 2ff710800..000000000 --- a/package/bitlbee/patches/patch-protocols_oscar_Makefile +++ /dev/null @@ -1,22 +0,0 @@ ---- bitlbee-1.2.3.orig/protocols/oscar/Makefile 2008-09-06 14:33:13.000000000 +0200 -+++ bitlbee-1.2.3/protocols/oscar/Makefile 2009-08-28 11:16:04.032452435 +0200 -@@ -12,7 +12,7 @@ - objects = admin.o auth.o bos.o buddylist.o chat.o chatnav.o conn.o icq.o im.o info.o misc.o msgcookie.o rxhandlers.o rxqueue.o search.o service.o snac.o ssi.o stats.o tlv.o txqueue.o oscar_util.o oscar.o - - CFLAGS += -Wall --LFLAGS += -r -+#LFLAGS += -r - - # [SH] Phony targets - all: oscar_mod.o -@@ -34,8 +34,8 @@ $(objects): ../../Makefile.settings Make - - $(objects): %.o: %.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $< -o $@ -+ $(CC) -c $(CFLAGS) $< -o $@ - - oscar_mod.o: $(objects) - @echo '*' Linking oscar_mod.o -- @$(LD) $(LFLAGS) $(objects) -o oscar_mod.o -+ $(CC) -shared $(LDFLAGS) $(objects) -o oscar_mod.o diff --git a/package/bitlbee/patches/patch-protocols_yahoo_Makefile b/package/bitlbee/patches/patch-protocols_yahoo_Makefile deleted file mode 100644 index 51a294aa8..000000000 --- a/package/bitlbee/patches/patch-protocols_yahoo_Makefile +++ /dev/null @@ -1,22 +0,0 @@ ---- bitlbee-1.2.3.orig/protocols/yahoo/Makefile 2008-09-06 14:33:13.000000000 +0200 -+++ bitlbee-1.2.3/protocols/yahoo/Makefile 2009-08-28 11:14:08.877306693 +0200 -@@ -12,7 +12,7 @@ - objects = yahoo.o crypt.o libyahoo2.o yahoo_fn.o yahoo_httplib.o yahoo_util.o - - CFLAGS += -Wall -DSTDC_HEADERS -DHAVE_STRING_H -DHAVE_STRCHR -DHAVE_MEMCPY -DHAVE_GLIB --LFLAGS += -r -+#LFLAGS += -r - - # [SH] Phony targets - all: yahoo_mod.o -@@ -34,8 +34,8 @@ $(objects): ../../Makefile.settings Make - - $(objects): %.o: %.c - @echo '*' Compiling $< -- @$(CC) -c $(CFLAGS) $< -o $@ -+ $(CC) -c $(CFLAGS) $< -o $@ - - yahoo_mod.o: $(objects) - @echo '*' Linking yahoo_mod.o -- @$(LD) $(LFLAGS) $(objects) -o yahoo_mod.o -+ $(CC) -shared $(LDFLAGS) $(objects) -o yahoo_mod.o diff --git a/package/bluez-firmware/Makefile b/package/bluez-firmware/Makefile index 038e04d45..50961a2d7 100644 --- a/package/bluez-firmware/Makefile +++ b/package/bluez-firmware/Makefile @@ -15,12 +15,9 @@ PKG_SITES:= http://bluez.sourceforge.net/download/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,BLUEZ_FIRMWARE,bluez-firmware,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,BLUEZ_FIRMWARE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --libdir=/lib -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_BLUEZ_FIRMWARE}/lib/firmware diff --git a/package/bluez/Makefile b/package/bluez/Makefile index de238080f..c2c13ddc8 100644 --- a/package/bluez/Makefile +++ b/package/bluez/Makefile @@ -23,7 +23,6 @@ XAKE_FLAGS+= V=1 CCLD="$(TARGET_CC) -all-static -pthread" else XAKE_FLAGS+= V=1 endif -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_prog_cc_pie=no CONFIGURE_ARGS+= --enable-tools \ --enable-alsa \ @@ -35,8 +34,6 @@ CONFIGURE_ARGS+= --enable-tools \ --enable-netlink \ --disable-pie \ --disable-cups -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ifneq ($(ADK_STATIC),y) diff --git a/package/bogofilter/Makefile b/package/bogofilter/Makefile index c4458cb31..7add9631c 100644 --- a/package/bogofilter/Makefile +++ b/package/bogofilter/Makefile @@ -18,18 +18,17 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BOGOFILTER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= autotool gnu +AUTOTOOL_STYLE:= autotool CONFIGURE_ENV+= LIBS="-liconv" CONFIGURE_ARGS+= --without-libsqlite3-prefix \ --without-libqdbm-prefix \ --with-included-gsl \ --with-libdb-prefix=${STAGING_DIR}/usr \ --disable-transactions -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_BOGOFILTER}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/${PKG_NAME} ${IDIR_BOGOFILTER}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/bogofilter \ + ${IDIR_BOGOFILTER}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/bridge-utils/Makefile b/package/bridge-utils/Makefile index cdd6c2439..0d0dccb7f 100644 --- a/package/bridge-utils/Makefile +++ b/package/bridge-utils/Makefile @@ -17,13 +17,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BRIDGE_UTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= autoconf gnu +AUTOTOOL_STYLE:= autoconf CONFIGURE_ARGS+= --with-linux-headers=${LINUX_DIR} -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_BRIDGE_UTILS}/usr/sbin - ${INSTALL_BIN} ${WRKINST}/usr/sbin/brctl ${IDIR_BRIDGE_UTILS}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/brctl \ + ${IDIR_BRIDGE_UTILS}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 8481fd64f..800042444 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -18,6 +18,10 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,BUSYBOX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + ${TOPDIR}/.busyboxcfg: ${TOPDIR}/.config grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \ ${TOPDIR}/.busyboxcfg diff --git a/package/busybox/config/findutils/Config.in b/package/busybox/config/findutils/Config.in index 1869113ca..ba2e5f557 100644 --- a/package/busybox/config/findutils/Config.in +++ b/package/busybox/config/findutils/Config.in @@ -8,6 +8,7 @@ menu "Finding Utilities" config BUSYBOX_FIND bool "find" default y + depends on !ADK_PACKAGE_FINDUTILS help find is used to search your system to find specified files. diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 264beae90..20c583388 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -94,6 +94,7 @@ config BUSYBOX_DNSD config BUSYBOX_ETHER_WAKE bool "ether-wake" default n + depends on !ADK_PACKAGE_ETHER_WAKE help Send a magic packet to wake up sleeping machines. diff --git a/package/busybox/files/busybox.postinst b/package/busybox/files/busybox.postinst index 71d18be30..9f1f9987b 100644 --- a/package/busybox/files/busybox.postinst +++ b/package/busybox/files/busybox.postinst @@ -2,7 +2,7 @@ . $IPKG_INSTROOT/etc/functions.sh add_rcconf network network YES add_rcconf crond crond NO -add_rcconf watchdog watchdog YES +add_rcconf watchdog watchdog NO add_rcconf watchdog_flags watchdog_flags '-t 10 -T 20' add_rcconf 'use "-C32" normally, "NO" to disable' syslogd_flags '-C32' add_rcconf inetd inetd NO diff --git a/package/bwm/Makefile b/package/bwm/Makefile index 24c22034b..c26ae51ec 100644 --- a/package/bwm/Makefile +++ b/package/bwm/Makefile @@ -18,6 +18,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BWM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: ${TARGET_CC} ${TARGET_CFLAGS} ${WRKBUILD}/bwm.c -o ${WRKBUILD}/bwm diff --git a/package/bzip2/Makefile b/package/bzip2/Makefile index 62ac57e50..c954587af 100644 --- a/package/bzip2/Makefile +++ b/package/bzip2/Makefile @@ -16,10 +16,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BZIP2,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual + TCFLAGS+= -fPIC XAKE_FLAGS+= PREFIX=${WRKINST}/usr -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_BZIP2}/usr/bin diff --git a/package/ca-certificates/Makefile b/package/ca-certificates/Makefile index 8a9bf04e4..90754fbc7 100644 --- a/package/ca-certificates/Makefile +++ b/package/ca-certificates/Makefile @@ -22,8 +22,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,CA_CERTS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual post-install: ifeq (${ADK_PACKAGE_CA_CERTS_SMALL},n) @@ -39,5 +38,4 @@ else ${INSTALL_DATA} ./cert.pem ${IDIR_CA_CERTS}/etc/ssl/ endif - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ca-certificates/extra/update-ca-certificates b/package/ca-certificates/extra/update-ca-certificates deleted file mode 100644 index c86f7676f..000000000 --- a/package/ca-certificates/extra/update-ca-certificates +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# update-ca-certificates script for embedded systems. -# -# Copyright (C) 2009 Phil Sutter -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA - -CRTCONF=/etc/ca-certificates.conf -CRTDIR=/usr/share/ca-certificates -LNKDIR=/etc/ssl/certs -OPENSSL="openssl" - -cert_type() { # (certfile) - grep -qE '^-----BEGIN (X509 |TRUSTED |)CERTIFICATE-----' $1 && { - echo "cert" - return 0 - } - grep -qE '^-----BEGIN X509 CRL-----' $1 && { - echo "crl" - return 0 - } - echo "unknown" - return 1 -} - -${OPENSSL} version >/dev/null 2>&1 || { - echo "Fatal: no openssl executable found, bailing out" - exit 1 -} - -for l in $(ls ${DESTDIR}${LNKDIR}/* 2>/dev/null); do - [ -L "$l" ] && rm -f "$l" -done - -cat ${DESTDIR}$CRTCONF | while read crt; do - [ -n "$crt" ] || continue - [[ "$crt" = -* ]] && continue - - cname="$(basename $crt)" - - ln -s ${CRTDIR}/$crt ${DESTDIR}${LNKDIR}/$cname - - ctype="$(cert_type ${DESTDIR}${CRTDIR}/$crt)" - case $ctype in - cert) - sslcmd="x509" - pfx="" - ;; - crl) - sslcmd="crl" - pfx="r" - ;; - *) - echo "Warning: ignoring unknown filetype ${DESTDIR}${CRTDIR}/$crt" - continue - ;; - esac - - hsh="$(${OPENSSL} $sslcmd -hash -noout -in ${DESTDIR}${CRTDIR}/$crt)" - idx=0 - while [ -e ${DESTDIR}${LNKDIR}/${hsh}.${pfx}${idx} ]; do - let "idx++" - done - ln -s ${CRTDIR}/$crt ${DESTDIR}${LNKDIR}/${hsh}.${pfx}${idx} -done - -exit 0 diff --git a/package/ca-certificates/src/update-ca-certificates b/package/ca-certificates/src/update-ca-certificates new file mode 100644 index 000000000..c86f7676f --- /dev/null +++ b/package/ca-certificates/src/update-ca-certificates @@ -0,0 +1,80 @@ +#!/bin/sh +# +# update-ca-certificates script for embedded systems. +# +# Copyright (C) 2009 Phil Sutter +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA + +CRTCONF=/etc/ca-certificates.conf +CRTDIR=/usr/share/ca-certificates +LNKDIR=/etc/ssl/certs +OPENSSL="openssl" + +cert_type() { # (certfile) + grep -qE '^-----BEGIN (X509 |TRUSTED |)CERTIFICATE-----' $1 && { + echo "cert" + return 0 + } + grep -qE '^-----BEGIN X509 CRL-----' $1 && { + echo "crl" + return 0 + } + echo "unknown" + return 1 +} + +${OPENSSL} version >/dev/null 2>&1 || { + echo "Fatal: no openssl executable found, bailing out" + exit 1 +} + +for l in $(ls ${DESTDIR}${LNKDIR}/* 2>/dev/null); do + [ -L "$l" ] && rm -f "$l" +done + +cat ${DESTDIR}$CRTCONF | while read crt; do + [ -n "$crt" ] || continue + [[ "$crt" = -* ]] && continue + + cname="$(basename $crt)" + + ln -s ${CRTDIR}/$crt ${DESTDIR}${LNKDIR}/$cname + + ctype="$(cert_type ${DESTDIR}${CRTDIR}/$crt)" + case $ctype in + cert) + sslcmd="x509" + pfx="" + ;; + crl) + sslcmd="crl" + pfx="r" + ;; + *) + echo "Warning: ignoring unknown filetype ${DESTDIR}${CRTDIR}/$crt" + continue + ;; + esac + + hsh="$(${OPENSSL} $sslcmd -hash -noout -in ${DESTDIR}${CRTDIR}/$crt)" + idx=0 + while [ -e ${DESTDIR}${LNKDIR}/${hsh}.${pfx}${idx} ]; do + let "idx++" + done + ln -s ${CRTDIR}/$crt ${DESTDIR}${LNKDIR}/${hsh}.${pfx}${idx} +done + +exit 0 diff --git a/package/cairo/Makefile b/package/cairo/Makefile index ec6f2dd54..b15c9280e 100644 --- a/package/cairo/Makefile +++ b/package/cairo/Makefile @@ -22,11 +22,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CAIRO,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-ft=yes \ --enable-xlib=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_CAIRO}/usr/lib diff --git a/package/cbtt/Makefile b/package/cbtt/Makefile index 2062528ca..8f8573813 100644 --- a/package/cbtt/Makefile +++ b/package/cbtt/Makefile @@ -10,7 +10,7 @@ PKG_MD5SUM:= 19abea2817c49ccc9438e9671c402984 PKG_DESCR:= Bittorrent tracker PKG_SECTION:= net PKG_DEPENDS:= zlib -PKG_BUILDDEP+= mysql zlib +PKG_BUILDDEP+= zlib ifeq (${ADK_COMPILE_CBTT_WITH_UCLIBCXX},y) PKG_BUILDDEP+= uclibc++ endif @@ -19,9 +19,6 @@ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=bnbtusermods/} PKG_HOST_DEPENDS:= !cygwin -PKG_DESCR_1:= Bittorrent tracker with mysql support -PKG_DEPENDS_1:= ${PKG_DEPENDS} libmysqlclient - DISTFILES:= ${PKG_NAME}80-${PKG_VERSION}-src.tar.gz WRKDIST= ${WRKDIR}/${PKG_NAME}80-${PKG_VERSION}-src @@ -36,11 +33,11 @@ PKG_DEPENDS_1+= libstdcxx endif $(eval $(call PKG_template,CBTT,cbtt,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -$(eval $(call PKG_template,CBTT_MYSQL,cbtt-mysql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION})) -BUILD_STYLE= auto -TLDFLAGS+= -shared -L. -L${STAGING_DIR}/usr/lib/mysql \ - -lmysqlclient -lz -lpthread -lm -lgcc +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + +TLDFLAGS+= -shared -L. -lz -lpthread -lm -lgcc ifeq ($(ADK_TARGET_LIB_UCLIBCXX),y) TLDFLAGS+= -nodefaultlibs -lz -lpthread \ -luClibc++ -lc -lm -lgcc @@ -51,7 +48,5 @@ TCFLAGS+= -fPIC do-install: ${INSTALL_DIR} ${IDIR_CBTT}/usr/bin ${INSTALL_BIN} ${WRKBUILD}/bnbt ${IDIR_CBTT}/usr/bin/ - ${INSTALL_DIR} ${IDIR_CBTT_MYSQL}/usr/bin - ${INSTALL_BIN} ${WRKBUILD}/bnbtmysql ${IDIR_CBTT_MYSQL}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile index 806da3199..926473eb6 100644 --- a/package/cfgfs/Makefile +++ b/package/cfgfs/Makefile @@ -21,11 +21,8 @@ $(eval $(call PKG_template,CFGFS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG PKGDFLT_CFGFS= y -BUILD_STYLE:= auto - -do-configure: - mkdir -p ${WRKBUILD} - ${CP} ./src/* ${WRKBUILD} +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_CFGFS}/sbin diff --git a/package/cgilib/Makefile b/package/cgilib/Makefile index 7d8b2c59b..316b5e143 100644 --- a/package/cgilib/Makefile +++ b/package/cgilib/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CGILIB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: ${INSTALL_DIR} ${IDIR_CGILIB}/usr/lib ${CP} ${WRKINST}/usr/lib/libcgi.so* ${IDIR_CGILIB}/usr/lib/ diff --git a/package/cgilib/extra/m4/libtool.m4 b/package/cgilib/extra/m4/libtool.m4 deleted file mode 100644 index 2f42cf831..000000000 --- a/package/cgilib/extra/m4/libtool.m4 +++ /dev/null @@ -1,7370 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/package/cgilib/extra/m4/ltoptions.m4 b/package/cgilib/extra/m4/ltoptions.m4 deleted file mode 100644 index 34151a3ba..000000000 --- a/package/cgilib/extra/m4/ltoptions.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/package/cgilib/extra/m4/ltsugar.m4 b/package/cgilib/extra/m4/ltsugar.m4 deleted file mode 100644 index 9000a057d..000000000 --- a/package/cgilib/extra/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/package/cgilib/extra/m4/ltversion.m4 b/package/cgilib/extra/m4/ltversion.m4 deleted file mode 100644 index b8e154fe6..000000000 --- a/package/cgilib/extra/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3012 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6]) -m4_define([LT_PACKAGE_REVISION], [1.3012]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6' -macro_revision='1.3012' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/package/cgilib/extra/m4/lt~obsolete.m4 b/package/cgilib/extra/m4/lt~obsolete.m4 deleted file mode 100644 index 637bb2066..000000000 --- a/package/cgilib/extra/m4/lt~obsolete.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/package/cgilib/src/m4/libtool.m4 b/package/cgilib/src/m4/libtool.m4 new file mode 100644 index 000000000..2f42cf831 --- /dev/null +++ b/package/cgilib/src/m4/libtool.m4 @@ -0,0 +1,7370 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + # Handle Gentoo/FreeBSD as it was Linux + case $host_vendor in + gentoo) + version_type=linux ;; + *) + version_type=freebsd-$objformat ;; + esac + + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + linux) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + need_lib_prefix=no + need_version=no + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) diff --git a/package/cgilib/src/m4/ltoptions.m4 b/package/cgilib/src/m4/ltoptions.m4 new file mode 100644 index 000000000..34151a3ba --- /dev/null +++ b/package/cgilib/src/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/package/cgilib/src/m4/ltsugar.m4 b/package/cgilib/src/m4/ltsugar.m4 new file mode 100644 index 000000000..9000a057d --- /dev/null +++ b/package/cgilib/src/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/package/cgilib/src/m4/ltversion.m4 b/package/cgilib/src/m4/ltversion.m4 new file mode 100644 index 000000000..b8e154fe6 --- /dev/null +++ b/package/cgilib/src/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/package/cgilib/src/m4/lt~obsolete.m4 b/package/cgilib/src/m4/lt~obsolete.m4 new file mode 100644 index 000000000..637bb2066 --- /dev/null +++ b/package/cgilib/src/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/package/chillispot/Makefile b/package/chillispot/Makefile index 4d2ff3de6..b4baec4fc 100644 --- a/package/chillispot/Makefile +++ b/package/chillispot/Makefile @@ -17,13 +17,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CHILLISPOT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: ${INSTALL_DIR} ${IDIR_CHILLISPOT}/usr/sbin ${IDIR_CHILLISPOT}/etc - ${INSTALL_BIN} ./files/chilli.conf \ + ${INSTALL_DATA} ./files/chilli.conf \ ${IDIR_CHILLISPOT}/etc/ ${INSTALL_BIN} ${WRKINST}/usr/sbin/chilli ${IDIR_CHILLISPOT}/usr/sbin/ diff --git a/package/collectd/Makefile b/package/collectd/Makefile index 24d337b1d..1f8f003eb 100644 --- a/package/collectd/Makefile +++ b/package/collectd/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= collectd -PKG_VERSION:= 4.7.0 +PKG_VERSION:= 4.9.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= b077e3398bd6fac0e53e9df4794db264 +PKG_MD5SUM:= 31a63d8e3a796dee247024f70426ed1c PKG_DESCR:= System statistics collection daemon PKG_SECTION:= console PKG_DEPENDS:= libpthread @@ -36,7 +36,6 @@ ifneq (${ADK_PACKAGE_COLLECTD_PING},y) DISABLE_PING:=--disable-ping endif -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-apache \ --disable-apcups \ --disable-apple_sensors \ @@ -44,6 +43,7 @@ CONFIGURE_ARGS+= --disable-apache \ --disable-battery \ ${DISABLE_CPU} \ --disable-cpufreq \ + --disable-contextswitch \ --disable-disk \ --enable-csv \ --disable-df \ @@ -59,6 +59,7 @@ CONFIGURE_ARGS+= --disable-apache \ --disable-ipvs \ --disable-irq \ ${DISABLE_LOAD} \ + --disable-madwifi \ --disable-mbmon \ --disable-memcached \ ${DISABLE_MEMORY} \ @@ -90,19 +91,22 @@ CONFIGURE_ARGS+= --disable-apache \ --disable-unixsock \ --disable-users \ --disable-vserver \ - --enable-wireless \ + --disable-wireless \ + --disable-write_http \ --with-fp-layout=nothing \ --without-java \ --without-libiptc \ --with-nan-emulation XAKE_FLAGS+= LIBS='-lm' -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: - ${INSTALL_DIR} ${IDIR_COLLECTD}/usr/sbin ${IDIR_COLLECTD}/usr/lib/collectd - ${CP} ${WRKINST}/usr/sbin/collectd ${IDIR_COLLECTD}/usr/sbin/ - ${CP} ${WRKINST}/usr/lib/collectd/*.so ${IDIR_COLLECTD}/usr/lib/collectd/ + ${INSTALL_DIR} ${IDIR_COLLECTD}/usr/lib/collectd \ + ${IDIR_COLLECTD}/usr/sbin/ ${IDIR_COLLECTD}/etc + ${INSTALL_BIN} ${WRKINST}/usr/sbin/collectd ${IDIR_COLLECTD}/usr/sbin/ + ${CP} ${WRKINST}/usr/lib/collectd/*.so \ + ${IDIR_COLLECTD}/usr/lib/collectd/ + ${INSTALL_DATA} ./files/collectd.conf \ + ${IDIR_COLLECTD}/etc include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/collectd/files/collectd.conf b/package/collectd/files/collectd.conf new file mode 100644 index 000000000..faf2bf981 --- /dev/null +++ b/package/collectd/files/collectd.conf @@ -0,0 +1,847 @@ +# +# Config file for collectd(1). +# Please read collectd.conf(5) for a list of options. +# http://collectd.org/ +# + +############################################################################## +# Global # +#----------------------------------------------------------------------------# +# Global settings for the daemon. # +############################################################################## + +#Hostname "localhost" +FQDNLookup true +#BaseDir "/usr/var/lib/collectd" +#PIDFile "/usr/var/run/collectd.pid" +#PluginDir "/usr/lib/collectd" +#TypesDB "/usr/share/collectd/types.db" +#Interval 10 +#ReadThreads 5 + +############################################################################## +# Logging # +#----------------------------------------------------------------------------# +# Plugins which provide logging functions should be loaded first, so log # +# messages generated when loading or configuring other plugins can be # +# accessed. # +############################################################################## + +LoadPlugin syslog +##LoadPlugin logfile + +# +# LogLevel info +# File STDOUT +# Timestamp true +# + + + LogLevel info + + +############################################################################## +# LoadPlugin section # +#----------------------------------------------------------------------------# +# Lines beginning with a single `#' belong to plugins which have been built # +# but are disabled by default. # +# # +# Lines begnning with `##' belong to plugins which have not been built due # +# to missing dependencies or because they have been deactivated explicitly. # +############################################################################## + +##LoadPlugin apache +##LoadPlugin apcups +##LoadPlugin apple_sensors +##LoadPlugin ascent +##LoadPlugin battery +##LoadPlugin bind +#LoadPlugin conntrack +##LoadPlugin contextswitch +LoadPlugin cpu +##LoadPlugin cpufreq +LoadPlugin csv +#LoadPlugin curl +##LoadPlugin curl_json +##LoadPlugin dbi +##LoadPlugin df +##LoadPlugin disk +##LoadPlugin dns +##LoadPlugin email +##LoadPlugin entropy +##LoadPlugin exec +##LoadPlugin filecount +##LoadPlugin fscache +##LoadPlugin gmond +##LoadPlugin hddtemp +##LoadPlugin interface +##LoadPlugin iptables +##LoadPlugin ipmi +##LoadPlugin ipvs +##LoadPlugin irq +##LoadPlugin java +##LoadPlugin libvirt +LoadPlugin load +##LoadPlugin madwifi +##LoadPlugin mbmon +##LoadPlugin memcachec +##LoadPlugin memcached +LoadPlugin memory +##LoadPlugin multimeter +##LoadPlugin mysql +##LoadPlugin netapp +##LoadPlugin netlink +##LoadPlugin network +##LoadPlugin nfs +##LoadPlugin nginx +##LoadPlugin notify_desktop +##LoadPlugin notify_email +##LoadPlugin ntpd +##LoadPlugin nut +#LoadPlugin olsrd +##LoadPlugin onewire +##LoadPlugin openvpn +##LoadPlugin oracle +##LoadPlugin perl +##LoadPlugin ping +##LoadPlugin postgresql +##LoadPlugin powerdns +##LoadPlugin processes +#LoadPlugin protocols +##LoadPlugin python +##LoadPlugin routeros +##LoadPlugin rrdcached +##LoadPlugin rrdtool +##LoadPlugin sensors +##LoadPlugin serial +##LoadPlugin snmp +##LoadPlugin swap +#LoadPlugin table +#LoadPlugin tail +##LoadPlugin tape +#LoadPlugin tcpconns +##LoadPlugin teamspeak2 +##LoadPlugin ted +##LoadPlugin thermal +##LoadPlugin tokyotyrant +##LoadPlugin unixsock +#LoadPlugin uptime +##LoadPlugin users +#LoadPlugin uuid +#LoadPlugin vmem +##LoadPlugin vserver +##LoadPlugin wireless +##LoadPlugin write_http +##LoadPlugin xmms +##LoadPlugin zfs_arc + +############################################################################## +# Plugin configuration # +#----------------------------------------------------------------------------# +# In this section configuration stubs for each plugin are provided. A desc- # +# ription of those options is available in the collectd.conf(5) manual page. # +############################################################################## + +# +# URL "http://localhost/status?auto" +# User "www-user" +# Password "secret" +# CACert "/etc/ssl/ca.crt" +# + +# +# Host "localhost" +# Port "3551" +# + +# +# URL "http://localhost/ascent/status/" +# User "www-user" +# Password "secret" +# CACert "/etc/ssl/ca.crt" +# + +# +# URL "http://localhost:8053/" +# OpCodes true +# QTypes true +# +# ServerStats true +# ZoneMaintStats true +# ResolverStats false +# MemoryStats true +# +# +# QTypes true +# ResolverStats true +# CacheRRSets true +# +# Zone "127.in-addr.arpa/IN" +# +# + +# +# DataDir "/usr/var/lib/collectd/csv" +# StoreRates false +# + +# +# +# URL "http://finance.google.com/finance?q=NYSE%3AAMD" +# User "foo" +# Password "bar" +# MeasureResponseTime false +# +# Regex "]*> *([0-9]*\\.[0-9]+) *" +# DSType "GaugeAverage" +# Type "stock_value" +# Instance "AMD" +# +# +# + +# +## See: http://wiki.apache.org/couchdb/Runtime_Statistics +# +# Instance "httpd" +# +# Type "http_requests" +# +# +# +# Type "http_request_methods" +# +# +# +# Type "http_response_codes" +# +# +## Database status metrics: +# +# Instance "dbs" +# +# Type "gauge" +# +# +# Type "counter" +# +# +# Type "bytes" +# +# +# + +# +# +# Statement "SELECT 'customers' AS c_key, COUNT(*) AS c_value FROM customers_tbl" +# +# Type "gauge" +# InstancesFrom "c_key" +# ValuesFrom "c_value" +# +# +# +# Driver "mysql" +# DriverOption "host" "localhost" +# DriverOption "username" "collectd" +# DriverOption "password" "AeXohy0O" +# DriverOption "dbname" "custdb0" +# #SelectDB "custdb0" +# Query "num_of_customers" +# #Query "..." +# +# + +# +# Device "/dev/hda1" +# Device "192.168.0.2:/mnt/nfs" +# MountPoint "/home" +# FSType "ext3" +# IgnoreSelected false +# ReportByDevice false +# ReportReserved false +# ReportInodes false +# + +# +# Disk "/^[hs]d[a-f][0-9]?$/" +# IgnoreSelected false +# + +# +# Interface "eth0" +# IgnoreSource "192.168.0.1" +# SelectNumericQueryTypes true +# + +# +# SocketFile "/usr/var/run/collectd-email" +# SocketGroup "collectd" +# SocketPerms "0770" +# MaxConns 5 +# + +# +# Exec "user:group" "/path/to/exec" +# NotificationExec "user:group" "/path/to/exec" +# + +# +# +# Instance "foodir" +# Name "*.conf" +# MTime "-5m" +# Size "+10k" +# Recursive true +# +# + +# +# MCReceiveFrom "239.2.11.71" "8649" +# +# Type "swap" +# TypeInstance "total" +# DataSource "value" +# +# +# Type "swap" +# TypeInstance "free" +# DataSource "value" +# +# + +# +# Host "127.0.0.1" +# Port "7634" +# +# #----------------------------------------------------------------# +# # `TranslateDevicename' enables backwards compatibility behavior # +# # and is enabled by default. Setting this option to `false' is # +# # highly recommended. # +# #----------------------------------------------------------------# +# TranslateDevicename false +# + +# +# Interface "eth0" +# IgnoreSelected false +# + +# +# Sensor "some_sensor" +# Sensor "another_one" +# IgnoreSelected false +# NotifySensorAdd false +# NotifySensorRemove true +# NotifySensorNotPresent false +# + +# +# Chain table chain +# + +# +# Irq 7 +# Irq 8 +# Irq 9 +# IgnoreSelected true +# + +# +# JVMArg "-verbose:jni" +# JVMArg "-Djava.class.path=/usr/share/collectd/java" +# +# LoadPlugin "org.collectd.java.Foobar" +# +# # To be parsed by the plugin +# +# + +# +# Connection "xen:///" +# RefreshInterval 60 +# Domain "name" +# BlockDevice "name:device" +# InterfaceDevice "name:device" +# IgnoreSelected false +# HostnameFormat name +# + +# +# Interface "wlan0" +# IgnoreSelected false +# Source "SysFS" +# WatchSet "None" +# WatchAdd "node_octets" +# WatchAdd "node_rssi" +# WatchAdd "is_rx_acl" +# WatchAdd "is_scan_active" +# + +# +# Host "127.0.0.1" +# Port "411" +# + +# +# +# Server "localhost" +# Key "page_key" +# +# Regex "(\\d+) bytes sent" +# DSType CounterAdd +# Type "ipt_octets" +# Instance "type_instance" +# +# +# + +# +# Host "127.0.0.1" +# Port "11211" +# + +# +# +# Host "database.serv.er" +# User "db_user" +# Password "secret" +# Database "db_name" +# MasterStats true +# +# +# +# Host "localhost" +# Socket "/var/run/mysql/mysqld.sock" +# SlaveStats true +# SlaveNotifications true +# +# + +# +# +# Protocol "https" +# Address "10.0.0.1" +# Port 443 +# User "username" +# Password "aef4Aebe" +# Interval 30 +# +# +# Interval 30 +# GetNameCache true +# GetDirCache true +# GetBufferCache true +# GetInodeCache true +# +# +# +# Interval 30 +# GetBusy true +# +# +# +# Interval 30 +# GetIO "volume0" +# IgnoreSelectedIO false +# GetOps "volume0" +# IgnoreSelectedOps false +# GetLatency "volume0" +# IgnoreSelectedLatency false +# +# +# +# Interval 30 +# GetCapacity "vol0" +# GetCapacity "vol1" +# IgnoreSelectedCapacity false +# GetSnapshot "vol1" +# GetSnapshot "vol3" +# IgnoreSelectedSnapshot false +# +# +# +# Interval 30 +# GetCPULoad true +# GetInterfaces true +# GetDiskOps true +# GetDiskIO true +# +# +# + +# +# Interface "All" +# VerboseInterface "All" +# QDisc "eth0" "pfifo_fast-1:0" +# Class "ppp0" "htb-1:10" +# Filter "ppp0" "u32-1:0" +# 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 +## + +# +# URL "http://localhost/status?auto" +# User "www-user" +# Password "secret" +# CACert "/etc/ssl/ca.crt" +# + +# +# OkayTimeout 1000 +# WarningTimeout 5000 +# FailureTimeout 0 +# + +# +# SMTPServer "localhost" +# SMTPPort 25 +# SMTPUser "my-username" +# SMTPPassword "my-password" +# From "collectd@main0server.com" +# # on . beware! do not use not more than two %s in this string!!! +# Subject "Aaaaaa!! %s on %s!!!!!" +# Recipient "email1@domain1.net" +# Recipient "email2@domain2.com" +# + +# +# Host "localhost" +# Port 123 +# ReverseLookups false +# + +# +# UPS "upsname@hostname:port" +# + +# +# Host "127.0.0.1" +# Port "2006" +# CollectLinks "Summary" +# CollectRoutes "Summary" +# CollectTopology "Summary" +# + +# +# Device "-s localhost:4304" +# Sensor "F10FCA000800" +# IgnoreSelected false +# + +# +# StatusFile "/etc/openvpn/openvpn-status.log" +# + +# +# +# Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category" +# +# Type "gauge" +# InstancesFrom "category" +# ValuesFrom "value" +# +# +# +# ConnectID "db01" +# Username "oracle" +# Password "secret" +# Query "out_of_stock" +# +# + +# +# IncludeDir "/my/include/path" +# BaseName "Collectd::Plugin" +# EnableDebugger "" +# LoadPlugin Monitorus +# LoadPlugin OpenVZ +# +# +# Foo "Bar" +# Qux "Baz" +# +# + +# +# Host "host.foo.bar" +# Interval 1.0 +# Timeout 0.9 +# TTL 255 +# SourceAddress "1.2.3.4" +# Device "eth0" +# MaxMissed -1 +# + +# +# +# Statement "SELECT magic FROM wizard WHERE host = $1;" +# Param hostname +# +# Type gauge +# InstancePrefix "magic" +# ValuesFrom magic +# +# +# +# Statement "SELECT COUNT(type) AS count, type \ +# FROM (SELECT CASE \ +# WHEN resolved = 'epoch' THEN 'open' \ +# ELSE 'resolved' END AS type \ +# FROM tickets) type \ +# GROUP BY type;" +# +# Type counter +# InstancePrefix "rt36_tickets" +# InstancesFrom "type" +# ValuesFrom "count" +# +# +# +# Host "hostname" +# Port "5432" +# User "username" +# Password "secret" +# SSLMode "prefer" +# KRBSrvName "kerberos_service_name" +# Query magic +# +# +# Service "service_name" +# Query backend # predefined +# Query rt36_tickets +# +# + +# +# +# Collect "latency" +# Collect "udp-answers" "udp-queries" +# Socket "/var/run/pdns.controlsocket" +# +# +# Collect "questions" +# Collect "cache-hits" "cache-misses" +# Socket "/var/run/pdns_recursor.controlsocket" +# +# LocalSocket "/opt/collectd/var/run/collectd-powerdns" +# + +# +# Process "name" +# + +# +# Value "/^Tcp:/" +# IgnoreSelected false +# + +# +# ModulePath "/path/to/your/python/modules" +# LogTraces true +# Interactive true +# Import "spam" +# +# +# spam "wonderful" "lovely" +# +# + +# +# +# Host "router.example.com" +# Port "8728" +# User "admin" +# Password "dozaiTh4" +# CollectInterface true +# CollectRegistrationTable true +# +# + +# +# DaemonAddress "unix:/tmp/rrdcached.sock" +# DataDir "/usr/var/lib/collectd/rrd" +# CreateFiles true +# CollectStatistics true +# + +# +# DataDir "/usr/var/lib/collectd/rrd" +# CacheTimeout 120 +# CacheFlush 900 +# + +# +# Sensor "it8712-isa-0290/temperature-temp1" +# Sensor "it8712-isa-0290/fanspeed-fan3" +# Sensor "it8712-isa-0290/voltage-in8" +# IgnoreSelected false +# + +# +# +# Type "voltage" +# Table false +# Instance "input_line1" +# Values "SNMPv2-SMI::enterprises.6050.5.4.1.1.2.1" +# +# +# Type "users" +# Table false +# Instance "" +# Values "HOST-RESOURCES-MIB::hrSystemNumUsers.0" +# +# +# Type "if_octets" +# Table true +# Instance "IF-MIB::ifDescr" +# Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets" +# +# +# +# Address "192.168.0.2" +# Version 1 +# Community "community_string" +# Collect "std_traffic" +# Interval 120 +# +# +# Address "192.168.0.42" +# Version 2 +# Community "another_string" +# Collect "std_traffic" "hr_users" +# +# +# Address "192.168.0.3" +# Version 1 +# Community "more_communities" +# Collect "powerplus_voltge_input" +# Interval 300 +# +# + +# +# +# Instance "slabinfo" +# Separator " " +# +# Type gauge +# InstancePrefix "active_objs" +# InstancesFrom 0 +# ValuesFrom 1 +# +# +# Type gauge +# InstancePrefix "objperslab" +# InstancesFrom 0 +# ValuesFrom 4 +# +#
+#
+ +# +# +# Instance "exim" +# +# Regex "S=([1-9][0-9]*)" +# DSType "CounterAdd" +# Type "ipt_bytes" +# Instance "total" +# +# +# Regex "\\" +# DSType "CounterInc" +# Type "counter" +# Instance "local_user" +# +# +# + +# +# ListeningPorts false +# LocalPort "25" +# RemotePort "25" +# + +# +# Host "127.0.0.1" +# Port "51234" +# Server "8767" +# + +# +# Device "/dev/ttyUSB0" +# Retries 0 +# + +# +# ForceUseProcfs false +# Device "THRM" +# IgnoreSelected false +# + +# +# Host "localhost" +# Port "1978" +# + +# +# SocketFile "/usr/var/run/collectd-unixsock" +# SocketGroup "collectd" +# SocketPerms "0660" +# + +# +# UUIDFile "/etc/uuid" +# + +# +# Verbose false +# + +# +# +# User "collectd" +# Password "weCh3ik0" +# +# + +############################################################################## +# Filter configuration # +#----------------------------------------------------------------------------# +# The following configures collectd's filtering mechanism. Before changing # +# anything in this section, please read the `FILTER CONFIGURATION' section # +# in the collectd.conf(5) manual page. # +############################################################################## + +# Load required matches: +#LoadPlugin match_empty_counter +#LoadPlugin match_hashed +#LoadPlugin match_regex +#LoadPlugin match_value +#LoadPlugin match_timediff + +# Load required targets: +##LoadPlugin target_notification +##LoadPlugin target_replace +#LoadPlugin target_scale +##LoadPlugin target_set + +#----------------------------------------------------------------------------# +# The following block demonstrates the default behavior if no filtering is # +# configured at all: All values will be sent to all available write plugins. # +#----------------------------------------------------------------------------# + +# +# Target "write" +# diff --git a/package/comgt/Makefile b/package/comgt/Makefile index afc21e322..50816d485 100644 --- a/package/comgt/Makefile +++ b/package/comgt/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= comgt PKG_VERSION:= 0.32 PKG_RELEASE:= 1 PKG_MD5SUM:= db2452680c3d953631299e331daf49ef -PKG_DESCR:= Option GlobeTrotter GPRS/EDGE/3G/HSDPA and Vodafone 3G/GPRS datacard control tool +PKG_DESCR:= 3G/GPRS datacard control tool PKG_SECTION:= console PKG_URL:= http://sourceforge.net/projects/comgt PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=comgt/} @@ -19,7 +19,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,COMGT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + ALL_TARGET= comgt do-install: diff --git a/package/compositeproto/Makefile b/package/compositeproto/Makefile index b22dc08d3..6f7572f55 100644 --- a/package/compositeproto/Makefile +++ b/package/compositeproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 6994a209774fe7877fd8e0c9fafe2466 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cpio/Makefile b/package/cpio/Makefile index cb3e641d1..5bcbc2351 100644 --- a/package/cpio/Makefile +++ b/package/cpio/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CPIO,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_CPIO}/usr/bin ${CP} ${WRKINST}/usr/bin/cpio ${IDIR_CPIO}/usr/bin diff --git a/package/cpufrequtils/Makefile b/package/cpufrequtils/Makefile index 0e4d22450..27044290b 100644 --- a/package/cpufrequtils/Makefile +++ b/package/cpufrequtils/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= cpufrequtils PKG_VERSION:= 007 PKG_RELEASE:= 1 PKG_MD5SUM:= 40271a1e1eadce31457e9891cdb071f1 -PKG_DESCR:= Userspace utilities for the Linux kernel cpufreq subsystem +PKG_DESCR:= utilities for the Linux kernel cpufreq subsystem PKG_SECTION:= utils PKG_URL:= http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html PKG_SITES:= http://www.kernel.org/pub/linux/utils/kernel/cpufreq/ @@ -16,9 +16,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,CPUFREQUTILS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto -MAKE_FLAGS+= CROSS=${TARGET_CROSS} +CONFIG_STYLE:= manual post-install: $(INSTALL_DIR) $(IDIR_CPUFREQUTILS)/usr/lib diff --git a/package/cpufrequtils/patches/patch-Makefile b/package/cpufrequtils/patches/patch-Makefile index c85aba1ab..2aec7173f 100644 --- a/package/cpufrequtils/patches/patch-Makefile +++ b/package/cpufrequtils/patches/patch-Makefile @@ -1,5 +1,5 @@ --- cpufrequtils-007.orig/Makefile 2010-01-16 14:47:44.000000000 +0100 -+++ cpufrequtils-007/Makefile 2010-01-23 18:52:15.905985935 +0100 ++++ cpufrequtils-007/Makefile 2010-02-05 18:20:59.944334337 +0100 @@ -27,11 +27,11 @@ DEBUG ?= false @@ -133,7 +133,7 @@ install-lib: $(INSTALL) -d $(DESTDIR)${libdir} - $(LIBTOOL) --mode=install $(INSTALL) libcpufreq.la $(DESTDIR)${libdir}/libcpufreq.la -+ $(INSTALL) libcpufreq.so* $(DESTDIR)${libdir}/ ++ cp -Rp libcpufreq.so* $(DESTDIR)${libdir}/ $(INSTALL) -d $(DESTDIR)${includedir} $(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h diff --git a/package/cryptinit/Makefile b/package/cryptinit/Makefile index 6ffcef02e..0366fa2ef 100644 --- a/package/cryptinit/Makefile +++ b/package/cryptinit/Makefile @@ -15,15 +15,13 @@ NO_DISTFILES:= 1 include ${TOPDIR}/mk/package.mk +CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual -pre-configure: - mkdir -p ${WRKBUILD} - do-build: ${TARGET_CC} ${TCPPFLAGS} ${TCFLAGS} -c -o ${WRKBUILD}/cryptinit.o \ - ./src/cryptinit.c + ${WRKBUILD}/cryptinit.c ( cd ${WRKBUILD}; \ ${TARGET_CC} -static -o cryptinit cryptinit.o \ ${STAGING_DIR}/usr/lib/libcryptsetup.a \ diff --git a/package/cryptsetup/Makefile b/package/cryptsetup/Makefile index 7e41abe3b..d3bd57e6f 100644 --- a/package/cryptsetup/Makefile +++ b/package/cryptsetup/Makefile @@ -4,12 +4,14 @@ include ${TOPDIR}/rules.mk PKG_NAME:= cryptsetup -PKG_VERSION:= 1.0.7 +PKG_VERSION:= 1.1.0 PKG_RELEASE:= 1 -PKG_MD5SUM:= 5eea2a77391a8a1a651b31cbaef59e22 +PKG_MD5SUM:= 8177f1833f4d6aaacc5812046d2010b6 PKG_DESCR:= LUKS cryptsetup tools PKG_SECTION:= crypto -PKG_DEPENDS:= libgcrypt device-mapper libuuid libpopt kmod-dm-crypt kmod-crypto-aes kmod-crypto-cbc kmod-crypto-sha256 kmod-blk-dev-dm +PKG_DEPENDS:= libgcrypt device-mapper libuuid libpopt \ + kmod-dm-crypt kmod-crypto-aes kmod-crypto-cbc \ + kmod-crypto-sha256 kmod-blk-dev-dm PKG_BUILDDEP+= libgcrypt popt e2fsprogs lvm PKG_URL:= http://cryptsetup.googlecode.com PKG_SITES:= http://cryptsetup.googlecode.com/files/ @@ -22,27 +24,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CRYPTSETUP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -CONFIGURE_ARGS+= --disable-static -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - -# hackish way to although build the static libraries for cryptinit -pre-configure: - (cd ${WRKBUILD}; \ - env ${CONFIGURE_ENV} \ - ./configure --enable-static --disable-nls \ - --build=${GNU_HOST_NAME} \ - --host=${GNU_TARGET_NAME} \ - --target=${GNU_TARGET_NAME} \ - ); - $(MAKE) -C $(WRKBUILD) CC="$(TARGET_CC)" - $(MAKE) -C $(WRKBUILD) CC="$(TARGET_CC)" DESTDIR='${WRKINST}' install - $(MAKE) -C $(WRKBUILD) CC="$(TARGET_CC)" clean +AUTOTOOL_STYLE:= autotool +CONFIGURE_ARGS+= --disable-selinux post-install: ${INSTALL_DIR} ${IDIR_CRYPTSETUP}/usr/sbin ${IDIR_CRYPTSETUP}/usr/lib - ${CP} ${WRKINST}/usr/lib/libcryptsetup.so.* \ + ${CP} ${WRKINST}/usr/lib/libcryptsetup.so* \ ${IDIR_CRYPTSETUP}/usr/lib ${INSTALL_BIN} ${WRKINST}/usr/sbin/cryptsetup \ ${IDIR_CRYPTSETUP}/usr/sbin diff --git a/package/cryptsetup/patches/patch-configure_in b/package/cryptsetup/patches/patch-configure_in new file mode 100644 index 000000000..2b4c32ad9 --- /dev/null +++ b/package/cryptsetup/patches/patch-configure_in @@ -0,0 +1,31 @@ +--- cryptsetup-1.1.0.orig/configure.in 2010-01-17 11:26:31.000000000 +0100 ++++ cryptsetup-1.1.0/configure.in 2010-02-05 17:05:34.911823330 +0100 +@@ -80,7 +80,7 @@ LIBS=$saved_LIBS + if test "x$enable_selinux" != xno; then + AC_CHECK_LIB(sepol, sepol_bool_set) + AC_CHECK_LIB(selinux, is_selinux_enabled) +- if test x$enable_static = xyes; then ++ if test x$enable_static_cryptsetup = xyes; then + SELINUX_STATIC_LIBS=$LIBS + # Check if we need -pthread with --enable-static and selinux + saved_LIBS2=$LIBS +@@ -91,7 +91,7 @@ if test "x$enable_selinux" != xno; then + fi + fi + +-if test x$enable_static = xyes; then ++if test x$enable_static_cryptsetup = xyes; then + saved_LIBS2=$LIBS + LIBS="$LIBS -static" + # Check if it there is still not some missing dependency like static selinux libs +@@ -135,8 +135,8 @@ CS_NUM_WITH([luks1-keybits],[key length + + dnl ========================================================================== + +-AM_CONDITIONAL(STATIC_CRYPTSETUP, test x$enable_static = xyes) +-AM_CONDITIONAL(DYNAMIC_CRYPTSETUP, test x$enable_static = xno) ++AM_CONDITIONAL(STATIC_CRYPTSETUP, test x$enable_static_cryptsetup = xyes) ++AM_CONDITIONAL(DYNAMIC_CRYPTSETUP, test x$enable_static_cryptsetup = xno) + + dnl ========================================================================== + diff --git a/package/cryptsetup/patches/patch-lib_setup_c b/package/cryptsetup/patches/patch-lib_setup_c deleted file mode 100644 index 97b356f68..000000000 --- a/package/cryptsetup/patches/patch-lib_setup_c +++ /dev/null @@ -1,17 +0,0 @@ -already added in svn upstream ---- cryptsetup-1.0.7.orig/lib/setup.c 2009-07-22 13:12:44.000000000 +0200 -+++ cryptsetup-1.0.7/lib/setup.c 2009-08-22 15:10:32.000000000 +0200 -@@ -542,7 +542,12 @@ static int __crypt_luks_open(int arg, st - start: - mk=NULL; - -- if(get_key(prompt, &password, &passwordLen, 0, options->key_file, options->passphrase_fd, options->timeout, options->flags)) -+ if(options->passphrase) { -+ passwordLen = strlen(options->passphrase); -+ password = safe_alloc(passwordLen + 1); -+ strncpy(password, options->passphrase, passwordLen + 1); -+ tries = 0; -+ } else if(get_key(prompt, &password, &passwordLen, 0, options->key_file, options->passphrase_fd, options->timeout, options->flags)) - tries--; - else - tries = 0; diff --git a/package/ctorrent/Makefile b/package/ctorrent/Makefile index 6cc8878fa..aad41b850 100755 --- a/package/ctorrent/Makefile +++ b/package/ctorrent/Makefile @@ -7,7 +7,6 @@ PKG_NAME:= ctorrent PKG_VERSION:= dnh3.3.2 PKG_RELEASE:= 1 PKG_BUILDDEP+= openssl -#PKG_CXX:= CTORRENT PKG_MD5SUM:= 59b23dd05ff70791cd6449effa7fc3b6 PKG_DESCR:= console-based BitTorrent client PKG_SECTION:= net @@ -18,15 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CTORRENT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -#ifeq ($(ADK_COMPILE_CTORRENT_WITH_UCLIBCXX),y) -#TCXXFLAGS+= -fno-threadsafe-statics -fno-builtin -fno-rtti -nostdinc++ -#TLDFLAGS+= -lgcc_s -luClibc++ -lc -lm -nodefaultlibs -#endif - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_CTORRENT}/usr/bin ${CP} ${WRKINST}/usr/bin/ctorrent ${IDIR_CTORRENT}/usr/bin diff --git a/package/cups/Makefile b/package/cups/Makefile index fc9db155b..13ed31d70 100644 --- a/package/cups/Makefile +++ b/package/cups/Makefile @@ -11,9 +11,9 @@ PKG_MD5SUM:= d95e2d588e3d36e563027a963b117b1b PKG_DESCR:= Common Unix Printing System PKG_SECTION:= net PKG_DEPENDS:= zlib libpthread +PKG_BUILDDEP+= zlib PKG_URL:= http://www.cups.org -PKG_SITES:= http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/${PKG_VERSION}/ \ - ftp://ftp.easysw.com/pub/cups/${PKG_VERSION}/ +PKG_SITES:= ftp://ftp.easysw.com/pub/cups/${PKG_VERSION}/ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}-source.tar.bz2 @@ -21,7 +21,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CUPS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_func_sigset=no \ OPTIM='-fPIC' CONFIGURE_ARGS+= --with-cups-user=0 \ @@ -41,8 +40,7 @@ CONFIGURE_ARGS+= --with-cups-user=0 \ --disable-cdsassl \ --disable-dbus \ --disable-ssl -BUILD_STYLE:= auto -INSTALL_STYLE:= auto + FAKE_FLAGS+= DSTROOT="${WRKINST}" STRIP="/bin/true" XAKE_FLAGS+= OPTIM='-fPIC' @@ -66,8 +64,10 @@ post-install: ${IDIR_CUPS}/usr/share/doc/cups/ rm -f ${IDIR_CUPS}/usr/bin/cups-config ${CP} ${WRKINST}/usr/lib/libcups*.so* ${IDIR_CUPS}/usr/lib/ - ${CP} ${WRKINST}/usr/lib/cups/cgi-bin/* ${IDIR_CUPS}/usr/lib/cups/cgi-bin/ - ${CP} ${WRKINST}/usr/lib/cups/daemon/* ${IDIR_CUPS}/usr/lib/cups/daemon/ + ${CP} ${WRKINST}/usr/lib/cups/cgi-bin/* \ + ${IDIR_CUPS}/usr/lib/cups/cgi-bin/ + ${CP} ${WRKINST}/usr/lib/cups/daemon/* \ + ${IDIR_CUPS}/usr/lib/cups/daemon/ ${CP} ${WRKINST}/usr/share/cups/banners/* \ ${IDIR_CUPS}/usr/share/cups/banners/ ${CP} ${WRKINST}/usr/share/cups/templates/*.tmpl \ diff --git a/package/curl/Makefile b/package/curl/Makefile index 26037200c..9f771defb 100644 --- a/package/curl/Makefile +++ b/package/curl/Makefile @@ -32,7 +32,11 @@ $(eval $(call PKG_template,CURL,curl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS $(eval $(call PKG_template,LIBCURL,libcurl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_LIB},${PKG_DESCR_LIB},${PKG_SECTION_LIB})) $(eval $(call PKG_template,LIBCURL_DEV,libcurl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_LIB_DEV},${PKG_SECTION_LIB_DEV})) -CONFIGURE_STYLE:= gnu +SUB_INSTALLS-y:= +SUB_INSTALLS-m:= +SUB_INSTALLS-${ADK_PACKAGE_CURL}+= curl-install +SUB_INSTALLS-${ADK_PACKAGE_LIBCURL_DEV}+= libcurl-dev-install + CONFIGURE_ENV+= curl_typeof_curl_socklen_t=socklen_t CONFIGURE_ARGS+= --disable-thread \ --enable-cookies \ @@ -54,14 +58,18 @@ CONFIGURE_ARGS+= --disable-thread \ --without-ca-bundle \ --without-gnutls \ --without-libidn -BUILD_STYLE:= auto -INSTALL_STYLE:= auto -post-install: - ${INSTALL_DIR} ${IDIR_CURL}/usr/bin ${IDIR_LIBCURL}/usr/lib - ${CP} ${WRKINST}/usr/bin/curl ${IDIR_CURL}/usr/bin/ +post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} + ${INSTALL_DIR} ${IDIR_LIBCURL}/usr/lib ${CP} ${WRKINST}/usr/lib/libcurl.so* ${IDIR_LIBCURL}/usr/lib/ + +curl-install: + ${INSTALL_DIR} ${IDIR_CURL}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/curl ${IDIR_CURL}/usr/bin/ + +libcurl-dev-install: ${INSTALL_DIR} ${IDIR_LIBCURL_DEV}/usr/include/curl - ${CP} ${WRKINST}/usr/include/curl/*.h ${IDIR_LIBCURL_DEV}/usr/include/curl/ + ${CP} ${WRKINST}/usr/include/curl/*.h \ + ${IDIR_LIBCURL_DEV}/usr/include/curl/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cutter/Makefile b/package/cutter/Makefile index be28c34da..91317e914 100755 --- a/package/cutter/Makefile +++ b/package/cutter/Makefile @@ -18,8 +18,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CUTTER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: - ${TARGET_CC} ${TARGET_CFLAGS} ${WRKBUILD}/cutter.c -o ${WRKBUILD}/cutter + ${TARGET_CC} -Wall ${TCPPFLAGS} ${TCFLAGS} ${WRKBUILD}/cutter.c \ + -o ${WRKBUILD}/cutter do-install: ${INSTALL_DIR} ${IDIR_CUTTER}/usr/sbin diff --git a/package/cxxtools/Makefile b/package/cxxtools/Makefile index 326bed156..7a3e3f142 100644 --- a/package/cxxtools/Makefile +++ b/package/cxxtools/Makefile @@ -13,15 +13,14 @@ PKG_DEPENDS:= libiconv PKG_BUILDDEP+= libiconv PKG_URL:= http://www.tntnet.org PKG_SITES:= http://www.tntnet.org/download/ -#PKG_CXX:= CXXTOOLS - include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CXXTOOLS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y) -TCXXFLAGS+= -fno-builtin -nostdinc++ -I${STAGING_DIR}/usr/include/uClibc++ -Wl,-E +TCXXFLAGS+= -fno-builtin -nostdinc++ \ + -I${STAGING_DIR}/usr/include/uClibc++ -Wl,-E TLDFLAGS+= -luClibc++ -liconv -lm -nodefaultlibs -shared else TLDFLAGS+= -liconv -shared @@ -29,21 +28,10 @@ endif TCFLAGS+= -fPIC TCXXFLAGS+= -fPIC -CONFIGURE_STYLE:= gnu -CONFIGURE_ENV+= ac_cv_lib_nsl_setsockopt=no CONFIGURE_ARGS+= --with-libiconv-prefix='${STAGING_DIR}/usr' -BUILD_STYLE:= auto -INSTALL_STYLE:= auto confprog - -#ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y) -# add workaround because libtool tries to link libstdc++ -#post-configure: -# ${SED} 's#postdeps="-lstdc.*#postdeps=""#' \ -# ${WRKBUILD}/libtool -#endif post-install: ${INSTALL_DIR} ${IDIR_CXXTOOLS}/usr/lib - ${CP} ${WRKINST}/usr/lib/libcxxtools.so.* ${IDIR_CXXTOOLS}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libcxxtools.so* ${IDIR_CXXTOOLS}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cyrus-sasl/Makefile b/package/cyrus-sasl/Makefile index 60bb943ef..54dfc4195 100644 --- a/package/cyrus-sasl/Makefile +++ b/package/cyrus-sasl/Makefile @@ -6,10 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= cyrus-sasl PKG_VERSION:= 2.1.22 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= 45dde9d19193ae9dd388eb68b2027bc9 PKG_DESCR:= a general purpose authentication library PKG_SECTION:= libs +PKG_DEPENDS:= libopenssl +PKG_BUILDDEP+= openssl PKG_URL:= http://asg.web.cmu.edu/sasl PKG_SITES:= http://ftp.andrew.cmu.edu/pub/cyrus-mail/ @@ -17,7 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSASL2,libsasl2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --disable-sample \ --enable-staticdlopen \ --disable-java \ @@ -55,8 +55,6 @@ CONFIGURE_ARGS+= --disable-sample \ --without-dmalloc \ --without-sfio \ --disable-static -BUILD_STYLE= auto -INSTALL_STYLE= auto pre-build: ${MAKE} -C ${WRKBUILD}/include \ @@ -70,7 +68,8 @@ pre-build: post-install: ${INSTALL_DIR} ${IDIR_LIBSASL2}/usr/lib/sasl2 - ${CP} ${WRKINST}/usr/lib/libsasl2.so.* ${IDIR_LIBSASL2}/usr/lib/ - ${CP} ${WRKINST}/usr/lib/sasl2/lib*.so.* ${IDIR_LIBSASL2}/usr/lib/sasl2/ + ${CP} ${WRKINST}/usr/lib/libsasl2.so* ${IDIR_LIBSASL2}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/sasl2/lib*.so* \ + ${IDIR_LIBSASL2}/usr/lib/sasl2/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/damageproto/Makefile b/package/damageproto/Makefile index 3b63e93e7..129f2837d 100644 --- a/package/damageproto/Makefile +++ b/package/damageproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 423516fd64e43e8671120056b0d9f597 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dansguardian/Makefile b/package/dansguardian/Makefile index 62e23fc53..f48f2d2ad 100644 --- a/package/dansguardian/Makefile +++ b/package/dansguardian/Makefile @@ -25,15 +25,13 @@ CONFIGURE_ENV+= CXXFLAGS="-fno-threadsafe-statics -fno-builtin -nostdinc++ \ LIBS="-nodefaultlibs -luClibc++ -lgcc -lm" endif -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-orig-ip \ --with-proxyuser=proxy \ --with-proxygroup=proxy -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: - ${INSTALL_DIR} ${IDIR_DANSGUARDIAN}/usr/sbin ${IDIR_DANSGUARDIAN}/etc/dansguardian \ + ${INSTALL_DIR} ${IDIR_DANSGUARDIAN}/usr/sbin \ + ${IDIR_DANSGUARDIAN}/etc/dansguardian \ ${IDIR_DANSGUARDIAN}/usr/share/dansguardian/languages/ukenglish ${CP} ${WRKINST}/usr/share/dansguardian/languages/ukenglish/* \ ${IDIR_DANSGUARDIAN}/usr/share/dansguardian/languages/ukenglish @@ -41,6 +39,7 @@ post-install: ${IDIR_DANSGUARDIAN}/usr/share/dansguardian ${CP} ${WRKINST}/etc/dansguardian/* \ ${IDIR_DANSGUARDIAN}/etc/dansguardian - ${INSTALL_BIN} ${WRKINST}/usr/sbin/dansguardian ${IDIR_DANSGUARDIAN}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/dansguardian \ + ${IDIR_DANSGUARDIAN}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/davfs2/Makefile b/package/davfs2/Makefile index b664183c1..b3e63f2c9 100644 --- a/package/davfs2/Makefile +++ b/package/davfs2/Makefile @@ -28,11 +28,8 @@ endif $(eval $(call PKG_template,DAVFS2,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-neon CONFIGURE_ENV+= LIBS=-liconv -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_DAVFS2}/etc/davfs2 diff --git a/package/dbus/Makefile b/package/dbus/Makefile index 4dcb4067b..0e40fe548 100644 --- a/package/dbus/Makefile +++ b/package/dbus/Makefile @@ -13,6 +13,7 @@ PKG_DEPENDS:= libexpat PKG_BUILDDEP+= expat PKG_URL:= http://dbus.freedesktop.org PKG_SITES:= http://dbus.freedesktop.org/releases/dbus/ + ifeq ($(ADK_STATIC),y) PKG_OPTS:= libonly endif @@ -21,7 +22,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DBUS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-tests \ --disable-abstract-sockets \ --without-x \ @@ -32,8 +32,6 @@ CONFIGURE_ARGS+= --disable-tests \ --disable-xml-docs \ --disable-doxygen-docs CONFIGURE_ENV+= ac_cv_have_abstract_sockets=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto pre-install: ${INSTALL_DIR} $(STAGING_DIR)/usr/include/dbus-1.0/dbus @@ -41,7 +39,8 @@ pre-install: $(STAGING_DIR)/usr/include/dbus-1.0/dbus/ post-install: - ${INSTALL_DIR} ${IDIR_DBUS}/etc ${IDIR_DBUS}/usr/lib ${IDIR_DBUS}/usr/bin + ${INSTALL_DIR} ${IDIR_DBUS}/etc ${IDIR_DBUS}/usr/lib \ + ${IDIR_DBUS}/usr/bin ${CP} ${WRKINST}/etc/dbus-1 ${IDIR_DBUS}/etc/ ${CP} ${WRKINST}/usr/lib/libdbus-1.so.* ${IDIR_DBUS}/usr/lib/ ${INSTALL_BIN} ${WRKINST}/usr/bin/dbus-daemon ${IDIR_DBUS}/usr/bin/ diff --git a/package/deco/Makefile b/package/deco/Makefile index d0cab8dba..9cabc38ae 100644 --- a/package/deco/Makefile +++ b/package/deco/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= deco PKG_VERSION:= 39 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses PKG_MD5SUM:= f77f60e8be0cae1f814cba1ef61bf4d0 PKG_DESCR:= Text-based, full featured file manager PKG_SECTION:= misc PKG_DEPENDS:= libncurses +PKG_BUILDDEP+= ncurses PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=deco/} DISTFILES:= ${PKG_NAME}${PKG_VERSION}.tgz @@ -20,8 +20,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DECO,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_DECO}/usr/bin ${IDIR_DECO}/usr/lib/deco diff --git a/package/dhcp-forwarder/Makefile b/package/dhcp-forwarder/Makefile index b68e80096..7069f2ba1 100644 --- a/package/dhcp-forwarder/Makefile +++ b/package/dhcp-forwarder/Makefile @@ -19,14 +19,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DHCP_FORWARDER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --disable-dietlibc -BUILD_STYLE= auto -INSTALL_STYLE= auto XAKE_FLAGS+= cfg_filename="/etc/dhcp-fwd.conf" post-install: - ${INSTALL_DIR} ${IDIR_DHCP_FORWARDER}/usr/sbin ${IDIR_DHCP_FORWARDER}/etc + ${INSTALL_DIR} ${IDIR_DHCP_FORWARDER}/usr/sbin \ + ${IDIR_DHCP_FORWARDER}/etc ${INSTALL_DATA} ${WRKBUILD}/contrib/dhcp-fwd.conf \ ${IDIR_DHCP_FORWARDER}/etc/ ${INSTALL_BIN} ${WRKINST}/usr/sbin/dhcp-fwd \ diff --git a/package/dhcp/Makefile b/package/dhcp/Makefile index d8ec43a10..6bd7cf6a9 100644 --- a/package/dhcp/Makefile +++ b/package/dhcp/Makefile @@ -20,10 +20,7 @@ $(eval $(call PKG_template,DHCP_SERVER,dhcp-server,${PKG_VERSION}-${PKG_RELEASE} $(eval $(call PKG_template,DHCP_RELAY,dhcp-relay,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_RELAY},${PKG_SECTION})) #TCFLAGS+= -D_GNU_SOURCE -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_file__dev_random=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_DHCP_RELAY}/usr/sbin diff --git a/package/dialog/Makefile b/package/dialog/Makefile index 2763a0946..cefcfaa32 100644 --- a/package/dialog/Makefile +++ b/package/dialog/Makefile @@ -20,9 +20,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,DIALOG,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) MAKE_FILE:= makefile -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_DIALOG)/usr/bin diff --git a/package/diffutils/Makefile b/package/diffutils/Makefile index 70f1f53cd..1253b59b9 100644 --- a/package/diffutils/Makefile +++ b/package/diffutils/Makefile @@ -17,9 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DIFFUTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIGURE_ENV+= ac_use_included_regex=no -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_DIFFUTILS}/usr/bin diff --git a/package/digitemp/Makefile b/package/digitemp/Makefile index a291c127c..fc7a2bcc3 100644 --- a/package/digitemp/Makefile +++ b/package/digitemp/Makefile @@ -18,9 +18,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DIGITEMP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + TCFLAGS+= -I./src -I./userial ALL_TARGET= ds2490 -BUILD_STYLE:= auto do-install: ${INSTALL_DIR} ${IDIR_DIGITEMP}/usr/sbin diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index 21c4ba847..8bcb361f9 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -16,8 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DNSMASQ,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual INSTALL_STYLE:= manual + MAKE_FLAGS+= BINDIR=/usr/sbin MANDIR=/usr/man COPTS="${TCFLAGS}" do-install: diff --git a/package/dosfstools/Makefile b/package/dosfstools/Makefile index ae7e2bc57..8fcf39a54 100644 --- a/package/dosfstools/Makefile +++ b/package/dosfstools/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= dosfstools -PKG_VERSION:= 3.0.0 +PKG_VERSION:= 3.0.9 PKG_RELEASE:= 1 -PKG_MD5SUM:= 94c2ea84b191de958f765ee239457bd9 +PKG_MD5SUM:= bd273cf8aa6341c0b52cbac72050bcf4 PKG_DESCR:= Utilities to create and check MS-DOS FAT filesystems PKG_SECTION:= admin PKG_URL:= http://www.daniel-baumann.ch/software/dosfstools @@ -14,10 +14,10 @@ PKG_SITES:= http://www.daniel-baumann.ch/software/dosfstools/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,DOSFSTOOLS,dosfstools,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,DOSFSTOOLS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIG_STYLE:= manual -BUILD_STYLE= auto -INSTALL_STYLE= auto XAKE_FLAGS+= PREFIX="" \ OPTFLAGS="${TARGET_CFLAGS} -D_FILE_OFFSET_BITS=64" diff --git a/package/dovecot/Makefile b/package/dovecot/Makefile index 8153e9426..d4acd7275 100644 --- a/package/dovecot/Makefile +++ b/package/dovecot/Makefile @@ -4,19 +4,18 @@ include ${TOPDIR}/rules.mk PKG_NAME:= dovecot -PKG_VERSION:= 1.1.14 +PKG_VERSION:= 1.2.10 PKG_RELEASE:= 1 -PKG_MD5SUM:= 60b1deccc0ae77e5669060d2b1894e5e +PKG_MD5SUM:= b7d0081b17ff6afae85e8dc14157fa57 PKG_DESCR:= A minimal and secure imap server PKG_SECTION:= net PKG_URL:= http://www.dovecot.org -PKG_SITES:= http://www.dovecot.org/releases/1.1/ +PKG_SITES:= http://www.dovecot.org/releases/1.2/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DOVECOT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ignore_signed_size=1 \ have_rquota=no \ signed_size_t=no \ @@ -40,12 +39,10 @@ CONFIGURE_ARGS+= --with-notify=none \ --with-ioloop=epoll \ --with-ssl \ --with-moduledir=/usr/lib/dovecot/modules -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_DOVECOT}/etc - ${INSTALL_DIR} ${IDIR_DOVECOT}/usr/sbin/dovecot + ${INSTALL_DIR} ${IDIR_DOVECOT}/usr/lib/dovecot ${INSTALL_DATA} ./files/dovecot.conf ${IDIR_DOVECOT}/etc ${INSTALL_DIR} ${IDIR_DOVECOT}/usr/lib/dovecot/modules/{imap,lda,pop3} $(CP) ${WRKINST}/usr/lib/dovecot/modules/*.so \ @@ -56,7 +53,9 @@ post-install: ${IDIR_DOVECOT}/usr/lib/dovecot/modules/lda/ $(CP) ${WRKINST}/usr/lib/dovecot/modules/pop3/*.so \ ${IDIR_DOVECOT}/usr/lib/dovecot/modules/pop3/ - $(CP) ${WRKINST}/usr/sbin/dovecot/* \ - ${IDIR_DOVECOT}/usr/sbin/dovecot/ + $(INSTALL_BIN) ${WRKINST}/usr/sbin/dovecot/* \ + ${IDIR_DOVECOT}/usr/lib/dovecot/ + $(INSTALL_BIN) ${WRKINST}/usr/sbin/dovecot \ + ${IDIR_DOVECOT}/usr/sbin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dovecot/patches/patch-configure b/package/dovecot/patches/patch-configure deleted file mode 100644 index 5ccf6bfba..000000000 --- a/package/dovecot/patches/patch-configure +++ /dev/null @@ -1,41 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- dovecot-1.1.14.orig/configure 2009-04-17 04:38:09.000000000 +0200 -+++ dovecot-1.1.14/configure 2009-05-14 00:37:04.000000000 +0200 -@@ -30129,23 +30129,6 @@ if ! $RPCGEN -c /dev/null > /dev/null; t - fi - - --have_rquota=no --if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_RQUOTA --_ACEOF -- -- have_rquota=yes --fi -- if test "$have_rquota" = "yes"; then -- HAVE_RQUOTA_TRUE= -- HAVE_RQUOTA_FALSE='#' --else -- HAVE_RQUOTA_TRUE='#' -- HAVE_RQUOTA_FALSE= --fi -- - - if test "$want_solr" != "no"; then - # Extract the first word of "curl-config", so it can be a program name with args. -@@ -30684,13 +30667,6 @@ echo "$as_me: error: conditional \"BUILD - Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } - fi --if test -z "${HAVE_RQUOTA_TRUE}" && test -z "${HAVE_RQUOTA_FALSE}"; then -- { { echo "$as_me:$LINENO: error: conditional \"HAVE_RQUOTA\" was never defined. --Usually this means the macro was only invoked conditionally." >&5 --echo "$as_me: error: conditional \"HAVE_RQUOTA\" was never defined. --Usually this means the macro was only invoked conditionally." >&2;} -- { (exit 1); exit 1; }; } --fi - if test -z "${BUILD_SOLR_TRUE}" && test -z "${BUILD_SOLR_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_SOLR\" was never defined. - Usually this means the macro was only invoked conditionally." >&5 diff --git a/package/dovecot/patches/patch-src_lib-sql_sql-drivers-register_c b/package/dovecot/patches/patch-src_lib-sql_sql-drivers-register_c deleted file mode 100644 index 6c0403839..000000000 --- a/package/dovecot/patches/patch-src_lib-sql_sql-drivers-register_c +++ /dev/null @@ -1,13 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- dovecot-1.1.14.orig/src/lib-sql/sql-drivers-register.c 2009-04-17 04:40:53.000000000 +0200 -+++ dovecot-1.1.14/src/lib-sql/sql-drivers-register.c 2009-05-14 00:37:59.000000000 +0200 -@@ -1,9 +1,5 @@ - /* this file automatically generated by Makefile */ - #include "lib.h" - #include "sql-api.h" --extern struct sql_db driver_pgsql_db; --extern struct sql_db driver_mysql_db; - void sql_drivers_register_all(void) { --sql_driver_register(&driver_pgsql_db); --sql_driver_register(&driver_mysql_db); - } diff --git a/package/dovecot/patches/patch-src_plugins_quota_Makefile_in b/package/dovecot/patches/patch-src_plugins_quota_Makefile_in deleted file mode 100644 index ff405c296..000000000 --- a/package/dovecot/patches/patch-src_plugins_quota_Makefile_in +++ /dev/null @@ -1,70 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- dovecot-1.1.14.orig/src/plugins/quota/Makefile.in 2009-04-17 04:38:14.000000000 +0200 -+++ dovecot-1.1.14/src/plugins/quota/Makefile.in 2009-05-14 00:44:46.000000000 +0200 -@@ -55,12 +55,11 @@ LTLIBRARIES = $(module_LTLIBRARIES) - lib10_quota_plugin_la_DEPENDENCIES = - am__lib10_quota_plugin_la_SOURCES_DIST = quota.c quota-count.c \ - quota-fs.c quota-dict.c quota-dirsize.c quota-maildir.c \ -- quota-plugin.c quota-storage.c rquota_xdr.c -+ quota-plugin.c quota-storage.c - am__objects_1 = quota.lo quota-count.lo quota-fs.lo quota-dict.lo \ - quota-dirsize.lo quota-maildir.lo quota-plugin.lo \ - quota-storage.lo --@HAVE_RQUOTA_TRUE@am__objects_2 = rquota_xdr.lo --am_lib10_quota_plugin_la_OBJECTS = $(am__objects_1) $(am__objects_2) -+am_lib10_quota_plugin_la_OBJECTS = $(am__objects_1) - lib10_quota_plugin_la_OBJECTS = $(am_lib10_quota_plugin_la_OBJECTS) - lib10_quota_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -@@ -244,9 +243,6 @@ lib10_quota_plugin_la_LDFLAGS = -module - module_LTLIBRARIES = \ - lib10_quota_plugin.la - --@HAVE_RQUOTA_TRUE@lib10_quota_plugin_la_LIBADD = \ --@HAVE_RQUOTA_TRUE@ -lrpcsvc -- - quota_dist_sources = \ - quota.c \ - quota-count.c \ -@@ -258,11 +254,8 @@ quota_dist_sources = \ - quota-storage.c - - lib10_quota_plugin_la_SOURCES = \ -- $(quota_dist_sources) \ -- $(RQUOTA_XDR) -+ $(quota_dist_sources) - --@HAVE_RQUOTA_TRUE@RQUOTA_XDR = rquota_xdr.c --@HAVE_RQUOTA_TRUE@RQUOTA_X = /usr/include/rpcsvc/rquota.x - noinst_HEADERS = \ - quota.h \ - quota-fs.h \ -@@ -347,7 +340,6 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quota-plugin.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quota-storage.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quota.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rquota_xdr.Plo@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -553,20 +545,6 @@ uninstall-am: uninstall-moduleLTLIBRARIE - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-moduleLTLIBRARIES - --@HAVE_RQUOTA_TRUE@rquota_xdr.c: Makefile $(RQUOTA_X) --@HAVE_RQUOTA_TRUE@ (echo '#include "lib.h"'; \ --@HAVE_RQUOTA_TRUE@ echo '#include '; \ --@HAVE_RQUOTA_TRUE@ $(RPCGEN) -c $(RQUOTA_X) | \ --@HAVE_RQUOTA_TRUE@ sed -e 's/IXDR_PUT/(void)IXDR_PUT/g' \ --@HAVE_RQUOTA_TRUE@ -e 's,/usr/include/rpcsvc/rquota.h,rquota.h,' \ --@HAVE_RQUOTA_TRUE@ -e 's/int32_t \*buf/int32_t *buf ATTR_UNUSED/' \ --@HAVE_RQUOTA_TRUE@ -e 's/^static char rcsid.*//' ) > rquota_xdr.c -- --@HAVE_RQUOTA_TRUE@rquota.h: Makefile $(RQUOTA_X) --@HAVE_RQUOTA_TRUE@ $(RPCGEN) -h $(RQUOTA_X) > rquota.h -- --@HAVE_RQUOTA_TRUE@quota-fs.lo: rquota.h -- - install-exec-local: - for d in imap pop3 lda; do \ - $(mkdir_p) $(DESTDIR)$(moduledir)/$$d; \ diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile index 43a157700..6625cb21c 100644 --- a/package/dropbear/Makefile +++ b/package/dropbear/Makefile @@ -7,22 +7,23 @@ PKG_NAME:= dropbear PKG_VERSION:= 0.52 PKG_RELEASE:= 1 PKG_MD5SUM:= 1c69ec674481d7745452f68f2ea5597e -PKG_DESCR:= SSH 2 server/client designed for small memory environments +PKG_DESCR:= SSH 2 server/client designed for embedded systems PKG_SECTION:= net PKG_URL:= http://matt.ucc.asn.au/dropbear -PKG_SITES:= http://matt.ucc.asn.au/dropbear/releases/ \ - http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/ +PKG_SITES:= http://matt.ucc.asn.au/dropbear/releases/ -PKG_DESCR_1:= Utility for converting SSH keys +PKG_DESCR_UTIL:= Utility for converting SSH keys include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -$(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION})) +$(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_UTIL},${PKG_SECTION})) PKGDFLT_DROPBEAR:= y if !ADK_TOOLCHAIN_ONLY -CONFIGURE_STYLE= gnu +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + CONFIGURE_ARGS+= --disable-pam \ --enable-openpty \ --enable-syslog \ diff --git a/package/dsniff/Makefile b/package/dsniff/Makefile index 3e7925e41..edc333b66 100644 --- a/package/dsniff/Makefile +++ b/package/dsniff/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= dsniff PKG_VERSION:= 2.4b1 PKG_RELEASE:= 2 -PKG_BUILDDEP+= libnids openssl gdbm PKG_MD5SUM:= 2f761fa3475682a7512b0b43568ee7d6 PKG_DESCR:= tools for network auditing and penetration testing PKG_SECTION:= net PKG_DEPENDS:= libnet libpcap libnids libopenssl libgdbm +PKG_BUILDDEP+= libnids openssl gdbm libpcap libnet PKG_URL:= http://www.monkey.org/~dugsong/dsniff PKG_SITES:= http://www.monkey.org/~dugsong/dsniff/beta/ @@ -20,8 +20,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DSNIFF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no CONFIGURE_ARGS+= --without-db \ --without-x \ --with-gdbm="${STAGING_DIR}/usr" \ @@ -29,8 +27,6 @@ CONFIGURE_ARGS+= --without-db \ --with-libpcap="${STAGING_DIR}/usr" \ --with-libnet="${STAGING_DIR}/usr" \ --with-openssl="${STAGING_DIR}/usr" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto FAKE_FLAGS+= install_prefix="${WRKINST}" post-install: diff --git a/package/e2fsprogs/Makefile b/package/e2fsprogs/Makefile index 436bd3a13..2bc49ab16 100644 --- a/package/e2fsprogs/Makefile +++ b/package/e2fsprogs/Makefile @@ -30,12 +30,10 @@ $(eval $(call PKG_template,LIBCOM_ERR,libcom-err,${PKG_VERSION}-${PKG_RELEASE},, $(eval $(call PKG_template,LIBSS,libss,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR_SS},${PKG_SECTION_SS})) $(eval $(call PKG_template,LIBBLKID,libblkid,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR_BLKID},${PKG_SECTION_BLKID})) -CONFIGURE_STYLE:= gnu +XAKE_FLAGS+= V=1 CONFIGURE_ARGS+= --enable-elf-shlibs \ --disable-tls \ --enable-dynamic-e2fsck -BUILD_STYLE:= auto -INSTALL_STYLE:= auto INSTALL_TARGET+= install-libs pre-build: diff --git a/package/ebtables/Makefile b/package/ebtables/Makefile index 2a2c7dfe3..7dafb0ff1 100644 --- a/package/ebtables/Makefile +++ b/package/ebtables/Makefile @@ -19,8 +19,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,EBTABLES,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual post-install: ${INSTALL_DIR} ${IDIR_EBTABLES}/etc diff --git a/package/eglibc/Makefile b/package/eglibc/Makefile index 83d74ab10..932871dcf 100644 --- a/package/eglibc/Makefile +++ b/package/eglibc/Makefile @@ -14,6 +14,10 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,EGLIBC,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,EGLIBC_DEV,$(PKG_NAME)-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + SUB_INSTALLS-y:= SUB_INSTALLS-m:= SUB_INSTALLS-${ADK_PACKAGE_EGLIBC_DEV}+= eglibc-dev-install diff --git a/package/elinks/Makefile b/package/elinks/Makefile index cb810d76f..b2d0c6014 100644 --- a/package/elinks/Makefile +++ b/package/elinks/Makefile @@ -6,20 +6,21 @@ include ${TOPDIR}/rules.mk PKG_NAME:= elinks PKG_VERSION:= 0.11.7 PKG_RELEASE:= 2 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= 145c510cae41c204d0f23dce4bdd23ab PKG_DESCR:= advanced text web browser PKG_SECTION:= text PKG_DEPENDS:= libopenssl -PKG_URL:= http://elinks.or.cz +PKG_BUILDDEP+= openssl +PKG_URL:= http://elinks.or.cz/ PKG_SITES:= http://elinks.or.cz/download/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ELINKS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +INSTALL_STYLE:= manual + TCFLAGS+= -fPIC -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= $(shell echo ac_cv_file_./features.conf | tr [:blank:]-/. _)=yes CONFIGURE_ENV+= $(shell echo ac_cv_file_${WRKBUILD}/features.conf | tr [:blank:]-/. _)=yes CONFIGURE_ARGS+= --enable-small \ @@ -43,8 +44,7 @@ CONFIGURE_ARGS+= --enable-small \ --without-spidermonkey \ --without-x \ --without-zlib -BUILD_STYLE:= auto -MAKE_FLAGS+= V=1 CC='${TARGET_CC}' LD='${TARGET_CC}' +MAKE_FLAGS+= CC='${TARGET_CC}' LD='${TARGET_LD}' do-install: ${INSTALL_DIR} ${IDIR_ELINKS}/usr/bin diff --git a/package/elinks/patches/patch-Makefile_lib b/package/elinks/patches/patch-Makefile_lib deleted file mode 100644 index 28b35fc6f..000000000 --- a/package/elinks/patches/patch-Makefile_lib +++ /dev/null @@ -1,17 +0,0 @@ ---- elinks-0.11.7.orig/Makefile.lib 2009-08-22 13:15:08.000000000 +0200 -+++ elinks-0.11.7/Makefile.lib 2009-08-28 12:26:30.526558172 +0200 -@@ -43,12 +43,12 @@ quiet_cmd_compile = ' [$(CC_COLOR)C - - # Rule to compile a set of .o files into one .o file - quiet_cmd_ld_objs = " [$(LD_COLOR)LD$(END_COLOR)] $(RELPATH)$@" -- cmd_ld_objs = $(LD) -r -o $@ $(filter $(OBJS), $^) \ -+ cmd_ld_objs = $(LD) -shared -o $@ $(filter $(OBJS), $^) \ - $(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), \ - `test -e $(subdir)/$(LIB_O_NAME) && echo $(subdir)/$(LIB_O_NAME)`) - - quiet_cmd_link = ' [$(LINK_COLOR)LINK$(END_COLOR)] $(RELPATH)$@' -- cmd_link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -+ cmd_link = $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) - - quiet_cmd_sparse = ' [SPARSE] $(RELPATH)$(2)' - cmd_sparse = $(SPARSE) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(SPARSE_FLAGS) $(2) diff --git a/package/esound/Makefile b/package/esound/Makefile index b6ceecc2c..3bcf528ec 100644 --- a/package/esound/Makefile +++ b/package/esound/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= esound PKG_VERSION:= 0.2.41 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libaudiofile PKG_MD5SUM:= 3d8973ed87053d7acc1f4d44af2c4688 PKG_DESCR:= Enlightened Sound Daemon PKG_SECTION:= net PKG_DEPENDS:= libaudiofile +PKG_BUILDDEP+= libaudiofile PKG_URL:= http://www.tux.org/~ricdude/EsounD.html PKG_SITES:= ftp://ftp.gnome.org/pub/gnome/sources/esound/0.2/ @@ -18,13 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ESOUND,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_ESOUND}/usr/bin ${IDIR_ESOUND}/usr/lib ${INSTALL_BIN} ${WRKINST}/usr/bin/esd ${IDIR_ESOUND}/usr/bin/ - $(CP) $(WRKINST)/usr/lib/libesd.so.* $(IDIR_ESOUND)/usr/lib/ + $(CP) $(WRKINST)/usr/lib/libesd.so* $(IDIR_ESOUND)/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ether-wake/Makefile b/package/ether-wake/Makefile index ec8f43ccd..39985ea08 100644 --- a/package/ether-wake/Makefile +++ b/package/ether-wake/Makefile @@ -15,11 +15,16 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ETHER_WAKE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: - ${TARGET_CC} ${TARGET_CFLAGS} -o ${WRKBUILD}/${PKG_NAME} ${WRKBUILD}/${PKG_NAME}.c + ${TARGET_CC} -Wall ${TCPPFLAGS} ${TCFLAGS} -o \ + ${WRKBUILD}/ether-wake ${WRKBUILD}/ether-wake.c do-install: ${INSTALL_DIR} ${IDIR_ETHER_WAKE}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/${PKG_NAME} ${IDIR_ETHER_WAKE}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/ether-wake ${IDIR_ETHER_WAKE}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ether-wake/extra/ether-wake.c b/package/ether-wake/extra/ether-wake.c deleted file mode 100644 index 4bee57f90..000000000 --- a/package/ether-wake/extra/ether-wake.c +++ /dev/null @@ -1,386 +0,0 @@ -/* ether-wake.c: Send a magic packet to wake up sleeping machines. */ - -static char version_msg[] = -"ether-wake.c: v1.09 11/12/2003 Donald Becker, http://www.scyld.com/"; -static char brief_usage_msg[] = -"usage: ether-wake [-i ] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n" -" Use '-u' to see the complete set of options.\n"; -static char usage_msg[] = -"usage: ether-wake [-i ] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n" -"\n" -" This program generates and transmits a Wake-On-LAN (WOL)\n" -" \"Magic Packet\", used for restarting machines that have been\n" -" soft-powered-down (ACPI D3-warm state).\n" -" It currently generates the standard AMD Magic Packet format, with\n" -" an optional password appended.\n" -"\n" -" The single required parameter is the Ethernet MAC (station) address\n" -" of the machine to wake.\n" -" The MAC address may be found with the 'arp' program while the target\n" -" machine is awake.\n" -"\n" -" Options:\n" -" -b Send wake-up packet to the broadcast address.\n" -" -D Increase the debug level.\n" -" -i ifname Use interface IFNAME instead of the default 'eth0'.\n" -" -p Append the four or six byte password PW to the packet.\n" -" A password is only required for a few adapter types.\n" -" The password may be specified in ethernet hex format\n" -" or dotted decimal (Internet address)\n" -" -p 00:22:44:66:88:aa\n" -" -p 192.168.1.1\n"; - -/* - This program generates and transmits a Wake-On-LAN (WOL) "Magic Packet", - used for restarting machines that have been soft-powered-down - (ACPI D3-warm state). It currently generates the standard AMD Magic Packet - format, with an optional password appended. - - This software may be used and distributed according to the terms - of the GNU Public License, incorporated herein by reference. - Contact the author for use under other terms. - - This source file was originally part of the network tricks package, and - is now distributed to support the Scyld Beowulf system. - Copyright 1999-2003 Donald Becker and Scyld Computing Corporation. - - The author may be reached as becker@scyld, or C/O - Scyld Computing Corporation - 914 Bay Ridge Road, Suite 220 - Annapolis MD 21403 - - Notes: - On some systems dropping root capability allows the process to be - dumped, traced or debugged. - If someone traces this program, they get control of a raw socket. - Linux handles this safely, but beware when porting this program. - - An alternative to needing 'root' is using a UDP broadcast socket, however - doing so only works with adapters configured for unicast+broadcast Rx - filter. That configuration consumes more power. -*/ - -#include -#include -#include -#include -#include -#include - -#if 0 /* Only exists on some versions. */ -#include -#endif - -#include - -#include -#include -#include - -#include -#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1 -#include -#include -#else -#include -#include -#include -#endif -#include -#include - -/* Grrr, no consistency between include versions. - Enable this if setsockopt() isn't declared with your library. */ -#if 0 -extern int setsockopt __P ((int __fd, int __level, int __optname, - __ptr_t __optval, int __optlen)); -#else /* New, correct head files. */ -#include -#endif - -u_char outpack[1000]; -int outpack_sz = 0; -int debug = 0; -u_char wol_passwd[6]; -int wol_passwd_sz = 0; - -static int opt_no_src_addr = 0, opt_broadcast = 0; - -static int get_dest_addr(const char *arg, struct ether_addr *eaddr); -static int get_fill(unsigned char *pkt, struct ether_addr *eaddr); -static int get_wol_pw(const char *optarg); - -int main(int argc, char *argv[]) -{ - char *ifname = "eth0"; - int one = 1; /* True, for socket options. */ - int s; /* Raw socket */ - int errflag = 0, verbose = 0, do_version = 0; - int perm_failure = 0; - int i, c, pktsize; -#if defined(PF_PACKET) - struct sockaddr_ll whereto; -#else - struct sockaddr whereto; /* who to wake up */ -#endif - struct ether_addr eaddr; - - while ((c = getopt(argc, argv, "bDi:p:uvV")) != -1) - switch (c) { - case 'b': opt_broadcast++; break; - case 'D': debug++; break; - case 'i': ifname = optarg; break; - case 'p': get_wol_pw(optarg); break; - case 'u': printf(usage_msg); return 0; - case 'v': verbose++; break; - case 'V': do_version++; break; - case '?': - errflag++; - } - if (verbose || do_version) - printf("%s\n", version_msg); - if (errflag) { - fprintf(stderr, brief_usage_msg); - return 3; - } - - if (optind == argc) { - fprintf(stderr, "Specify the Ethernet address as 00:11:22:33:44:55.\n"); - return 3; - } - - /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to - work as non-root, but we need SOCK_PACKET to specify the Ethernet - destination address. */ -#if defined(PF_PACKET) - s = socket(PF_PACKET, SOCK_RAW, 0); -#else - s = socket(AF_INET, SOCK_PACKET, SOCK_PACKET); -#endif - if (s < 0) { - if (errno == EPERM) - fprintf(stderr, "ether-wake: This program must be run as root.\n"); - else - perror("ether-wake: socket"); - perm_failure++; - } - /* Don't revert if debugging allows a normal user to get the raw socket. */ - setuid(getuid()); - - /* We look up the station address before reporting failure so that - errors may be reported even when run as a normal user. - */ - if (get_dest_addr(argv[optind], &eaddr) != 0) - return 3; - if (perm_failure && ! debug) - return 2; - - pktsize = get_fill(outpack, &eaddr); - - /* Fill in the source address, if possible. - The code to retrieve the local station address is Linux specific. */ - if (! opt_no_src_addr) { - struct ifreq if_hwaddr; - unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data; - - strcpy(if_hwaddr.ifr_name, ifname); - if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) { - fprintf(stderr, "SIOCGIFHWADDR on %s failed: %s\n", ifname, - strerror(errno)); - /* Magic packets still work if our source address is bogus, but - we fail just to be anal. */ - return 1; - } - memcpy(outpack+6, if_hwaddr.ifr_hwaddr.sa_data, 6); - - if (verbose) { - printf("The hardware address (SIOCGIFHWADDR) of %s is type %d " - "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", ifname, - if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], - hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); - } - } - - if (wol_passwd_sz > 0) { - memcpy(outpack+pktsize, wol_passwd, wol_passwd_sz); - pktsize += wol_passwd_sz; - } - - if (verbose > 1) { - printf("The final packet is: "); - for (i = 0; i < pktsize; i++) - printf(" %2.2x", outpack[i]); - printf(".\n"); - } - - /* This is necessary for broadcasts to work */ - if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&one, sizeof(one)) < 0) - perror("setsockopt: SO_BROADCAST"); - -#if defined(PF_PACKET) - { - struct ifreq ifr; - strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); - if (ioctl(s, SIOCGIFINDEX, &ifr) == -1) { - fprintf(stderr, "SIOCGIFINDEX on %s failed: %s\n", ifname, - strerror(errno)); - return 1; - } - memset(&whereto, 0, sizeof(whereto)); - whereto.sll_family = AF_PACKET; - whereto.sll_ifindex = ifr.ifr_ifindex; - /* The manual page incorrectly claims the address must be filled. - We do so because the code may change to match the docs. */ - whereto.sll_halen = ETH_ALEN; - memcpy(whereto.sll_addr, outpack, ETH_ALEN); - - } -#else - whereto.sa_family = 0; - strcpy(whereto.sa_data, ifname); -#endif - - if ((i = sendto(s, outpack, pktsize, 0, (struct sockaddr *)&whereto, - sizeof(whereto))) < 0) - perror("sendto"); - else if (debug) - printf("Sendto worked ! %d.\n", i); - -#ifdef USE_SEND - if (bind(s, (struct sockaddr *)&whereto, sizeof(whereto)) < 0) - perror("bind"); - else if (send(s, outpack, 100, 0) < 0) - perror("send"); -#endif -#ifdef USE_SENDMSG - { - struct msghdr msghdr = { 0,}; - struct iovec iovector[1]; - msghdr.msg_name = &whereto; - msghdr.msg_namelen = sizeof(whereto); - msghdr.msg_iov = iovector; - msghdr.msg_iovlen = 1; - iovector[0].iov_base = outpack; - iovector[0].iov_len = pktsize; - if ((i = sendmsg(s, &msghdr, 0)) < 0) - perror("sendmsg"); - else if (debug) - printf("sendmsg worked, %d (%d).\n", i, errno); - } -#endif - - return 0; -} - -/* Convert the host ID string to a MAC address. - The string may be a - Host name - IP address string - MAC address string -*/ - -static int get_dest_addr(const char *hostid, struct ether_addr *eaddr) -{ - struct ether_addr *eap; - - eap = ether_aton(hostid); - if (eap) { - *eaddr = *eap; - if (debug) - fprintf(stderr, "The target station address is %s.\n", - ether_ntoa(eaddr)); - } else { - (void)fprintf(stderr, - "ether-wake: The Magic Packet host address must be " - "specified as a station address, 00:11:22:33:44:55.\n"); - return -1; - } - return 0; -} - - -static int get_fill(unsigned char *pkt, struct ether_addr *eaddr) -{ - int offset, i; - unsigned char *station_addr = eaddr->ether_addr_octet; - - if (opt_broadcast) - memset(pkt+0, 0xff, 6); - else - memcpy(pkt, station_addr, 6); - memcpy(pkt+6, station_addr, 6); - pkt[12] = 0x08; /* Or 0x0806 for ARP, 0x8035 for RARP */ - pkt[13] = 0x42; - offset = 14; - - memset(pkt+offset, 0xff, 6); - offset += 6; - - for (i = 0; i < 16; i++) { - memcpy(pkt+offset, station_addr, 6); - offset += 6; - } - if (debug) { - fprintf(stderr, "Packet is "); - for (i = 0; i < offset; i++) - fprintf(stderr, " %2.2x", pkt[i]); - fprintf(stderr, ".\n"); - } - return offset; -} - -static int get_wol_pw(const char *optarg) -{ - int passwd[6]; - int byte_cnt; - int i; - - byte_cnt = sscanf(optarg, "%2x:%2x:%2x:%2x:%2x:%2x", - &passwd[0], &passwd[1], &passwd[2], - &passwd[3], &passwd[4], &passwd[5]); - if (byte_cnt < 4) - byte_cnt = sscanf(optarg, "%d.%d.%d.%d", - &passwd[0], &passwd[1], &passwd[2], &passwd[3]); - if (byte_cnt < 4) { - fprintf(stderr, "Unable to read the Wake-On-LAN password.\n"); - return 0; - } - printf(" The Magic packet password is %2.2x %2.2x %2.2x %2.2x (%d).\n", - passwd[0], passwd[1], passwd[2], passwd[3], byte_cnt); - for (i = 0; i < byte_cnt; i++) - wol_passwd[i] = passwd[i]; - return wol_passwd_sz = byte_cnt; -} - -#if 0 -{ - to = (struct sockaddr_in *)&whereto; - to->sin_family = AF_INET; - if (inet_aton(target, &to->sin_addr)) { - hostname = target; - } - memset (&sa, 0, sizeof sa); - sa.sa_family = AF_INET; - strncpy (sa.sa_data, interface, sizeof sa.sa_data); - sendto (sock, buf, bufix + len, 0, &sa, sizeof sa); - strncpy (sa.sa_data, interface, sizeof sa.sa_data); -#if 1 - sendto (sock, buf, bufix + len, 0, &sa, sizeof sa); -#else - bind (sock, &sa, sizeof sa); - connect(); - send (sock, buf, bufix + len, 0); -#endif -} -#endif - - -/* - * Local variables: - * compile-command: "gcc -O -Wall -o ether-wake ether-wake.c" - * c-indent-level: 4 - * c-basic-offset: 4 - * c-indent-level: 4 - * tab-width: 4 - * End: - */ diff --git a/package/ether-wake/src/ether-wake.c b/package/ether-wake/src/ether-wake.c new file mode 100644 index 000000000..4bee57f90 --- /dev/null +++ b/package/ether-wake/src/ether-wake.c @@ -0,0 +1,386 @@ +/* ether-wake.c: Send a magic packet to wake up sleeping machines. */ + +static char version_msg[] = +"ether-wake.c: v1.09 11/12/2003 Donald Becker, http://www.scyld.com/"; +static char brief_usage_msg[] = +"usage: ether-wake [-i ] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n" +" Use '-u' to see the complete set of options.\n"; +static char usage_msg[] = +"usage: ether-wake [-i ] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n" +"\n" +" This program generates and transmits a Wake-On-LAN (WOL)\n" +" \"Magic Packet\", used for restarting machines that have been\n" +" soft-powered-down (ACPI D3-warm state).\n" +" It currently generates the standard AMD Magic Packet format, with\n" +" an optional password appended.\n" +"\n" +" The single required parameter is the Ethernet MAC (station) address\n" +" of the machine to wake.\n" +" The MAC address may be found with the 'arp' program while the target\n" +" machine is awake.\n" +"\n" +" Options:\n" +" -b Send wake-up packet to the broadcast address.\n" +" -D Increase the debug level.\n" +" -i ifname Use interface IFNAME instead of the default 'eth0'.\n" +" -p Append the four or six byte password PW to the packet.\n" +" A password is only required for a few adapter types.\n" +" The password may be specified in ethernet hex format\n" +" or dotted decimal (Internet address)\n" +" -p 00:22:44:66:88:aa\n" +" -p 192.168.1.1\n"; + +/* + This program generates and transmits a Wake-On-LAN (WOL) "Magic Packet", + used for restarting machines that have been soft-powered-down + (ACPI D3-warm state). It currently generates the standard AMD Magic Packet + format, with an optional password appended. + + This software may be used and distributed according to the terms + of the GNU Public License, incorporated herein by reference. + Contact the author for use under other terms. + + This source file was originally part of the network tricks package, and + is now distributed to support the Scyld Beowulf system. + Copyright 1999-2003 Donald Becker and Scyld Computing Corporation. + + The author may be reached as becker@scyld, or C/O + Scyld Computing Corporation + 914 Bay Ridge Road, Suite 220 + Annapolis MD 21403 + + Notes: + On some systems dropping root capability allows the process to be + dumped, traced or debugged. + If someone traces this program, they get control of a raw socket. + Linux handles this safely, but beware when porting this program. + + An alternative to needing 'root' is using a UDP broadcast socket, however + doing so only works with adapters configured for unicast+broadcast Rx + filter. That configuration consumes more power. +*/ + +#include +#include +#include +#include +#include +#include + +#if 0 /* Only exists on some versions. */ +#include +#endif + +#include + +#include +#include +#include + +#include +#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1 +#include +#include +#else +#include +#include +#include +#endif +#include +#include + +/* Grrr, no consistency between include versions. + Enable this if setsockopt() isn't declared with your library. */ +#if 0 +extern int setsockopt __P ((int __fd, int __level, int __optname, + __ptr_t __optval, int __optlen)); +#else /* New, correct head files. */ +#include +#endif + +u_char outpack[1000]; +int outpack_sz = 0; +int debug = 0; +u_char wol_passwd[6]; +int wol_passwd_sz = 0; + +static int opt_no_src_addr = 0, opt_broadcast = 0; + +static int get_dest_addr(const char *arg, struct ether_addr *eaddr); +static int get_fill(unsigned char *pkt, struct ether_addr *eaddr); +static int get_wol_pw(const char *optarg); + +int main(int argc, char *argv[]) +{ + char *ifname = "eth0"; + int one = 1; /* True, for socket options. */ + int s; /* Raw socket */ + int errflag = 0, verbose = 0, do_version = 0; + int perm_failure = 0; + int i, c, pktsize; +#if defined(PF_PACKET) + struct sockaddr_ll whereto; +#else + struct sockaddr whereto; /* who to wake up */ +#endif + struct ether_addr eaddr; + + while ((c = getopt(argc, argv, "bDi:p:uvV")) != -1) + switch (c) { + case 'b': opt_broadcast++; break; + case 'D': debug++; break; + case 'i': ifname = optarg; break; + case 'p': get_wol_pw(optarg); break; + case 'u': printf(usage_msg); return 0; + case 'v': verbose++; break; + case 'V': do_version++; break; + case '?': + errflag++; + } + if (verbose || do_version) + printf("%s\n", version_msg); + if (errflag) { + fprintf(stderr, brief_usage_msg); + return 3; + } + + if (optind == argc) { + fprintf(stderr, "Specify the Ethernet address as 00:11:22:33:44:55.\n"); + return 3; + } + + /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to + work as non-root, but we need SOCK_PACKET to specify the Ethernet + destination address. */ +#if defined(PF_PACKET) + s = socket(PF_PACKET, SOCK_RAW, 0); +#else + s = socket(AF_INET, SOCK_PACKET, SOCK_PACKET); +#endif + if (s < 0) { + if (errno == EPERM) + fprintf(stderr, "ether-wake: This program must be run as root.\n"); + else + perror("ether-wake: socket"); + perm_failure++; + } + /* Don't revert if debugging allows a normal user to get the raw socket. */ + setuid(getuid()); + + /* We look up the station address before reporting failure so that + errors may be reported even when run as a normal user. + */ + if (get_dest_addr(argv[optind], &eaddr) != 0) + return 3; + if (perm_failure && ! debug) + return 2; + + pktsize = get_fill(outpack, &eaddr); + + /* Fill in the source address, if possible. + The code to retrieve the local station address is Linux specific. */ + if (! opt_no_src_addr) { + struct ifreq if_hwaddr; + unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data; + + strcpy(if_hwaddr.ifr_name, ifname); + if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) { + fprintf(stderr, "SIOCGIFHWADDR on %s failed: %s\n", ifname, + strerror(errno)); + /* Magic packets still work if our source address is bogus, but + we fail just to be anal. */ + return 1; + } + memcpy(outpack+6, if_hwaddr.ifr_hwaddr.sa_data, 6); + + if (verbose) { + printf("The hardware address (SIOCGIFHWADDR) of %s is type %d " + "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", ifname, + if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], + hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); + } + } + + if (wol_passwd_sz > 0) { + memcpy(outpack+pktsize, wol_passwd, wol_passwd_sz); + pktsize += wol_passwd_sz; + } + + if (verbose > 1) { + printf("The final packet is: "); + for (i = 0; i < pktsize; i++) + printf(" %2.2x", outpack[i]); + printf(".\n"); + } + + /* This is necessary for broadcasts to work */ + if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&one, sizeof(one)) < 0) + perror("setsockopt: SO_BROADCAST"); + +#if defined(PF_PACKET) + { + struct ifreq ifr; + strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGIFINDEX, &ifr) == -1) { + fprintf(stderr, "SIOCGIFINDEX on %s failed: %s\n", ifname, + strerror(errno)); + return 1; + } + memset(&whereto, 0, sizeof(whereto)); + whereto.sll_family = AF_PACKET; + whereto.sll_ifindex = ifr.ifr_ifindex; + /* The manual page incorrectly claims the address must be filled. + We do so because the code may change to match the docs. */ + whereto.sll_halen = ETH_ALEN; + memcpy(whereto.sll_addr, outpack, ETH_ALEN); + + } +#else + whereto.sa_family = 0; + strcpy(whereto.sa_data, ifname); +#endif + + if ((i = sendto(s, outpack, pktsize, 0, (struct sockaddr *)&whereto, + sizeof(whereto))) < 0) + perror("sendto"); + else if (debug) + printf("Sendto worked ! %d.\n", i); + +#ifdef USE_SEND + if (bind(s, (struct sockaddr *)&whereto, sizeof(whereto)) < 0) + perror("bind"); + else if (send(s, outpack, 100, 0) < 0) + perror("send"); +#endif +#ifdef USE_SENDMSG + { + struct msghdr msghdr = { 0,}; + struct iovec iovector[1]; + msghdr.msg_name = &whereto; + msghdr.msg_namelen = sizeof(whereto); + msghdr.msg_iov = iovector; + msghdr.msg_iovlen = 1; + iovector[0].iov_base = outpack; + iovector[0].iov_len = pktsize; + if ((i = sendmsg(s, &msghdr, 0)) < 0) + perror("sendmsg"); + else if (debug) + printf("sendmsg worked, %d (%d).\n", i, errno); + } +#endif + + return 0; +} + +/* Convert the host ID string to a MAC address. + The string may be a + Host name + IP address string + MAC address string +*/ + +static int get_dest_addr(const char *hostid, struct ether_addr *eaddr) +{ + struct ether_addr *eap; + + eap = ether_aton(hostid); + if (eap) { + *eaddr = *eap; + if (debug) + fprintf(stderr, "The target station address is %s.\n", + ether_ntoa(eaddr)); + } else { + (void)fprintf(stderr, + "ether-wake: The Magic Packet host address must be " + "specified as a station address, 00:11:22:33:44:55.\n"); + return -1; + } + return 0; +} + + +static int get_fill(unsigned char *pkt, struct ether_addr *eaddr) +{ + int offset, i; + unsigned char *station_addr = eaddr->ether_addr_octet; + + if (opt_broadcast) + memset(pkt+0, 0xff, 6); + else + memcpy(pkt, station_addr, 6); + memcpy(pkt+6, station_addr, 6); + pkt[12] = 0x08; /* Or 0x0806 for ARP, 0x8035 for RARP */ + pkt[13] = 0x42; + offset = 14; + + memset(pkt+offset, 0xff, 6); + offset += 6; + + for (i = 0; i < 16; i++) { + memcpy(pkt+offset, station_addr, 6); + offset += 6; + } + if (debug) { + fprintf(stderr, "Packet is "); + for (i = 0; i < offset; i++) + fprintf(stderr, " %2.2x", pkt[i]); + fprintf(stderr, ".\n"); + } + return offset; +} + +static int get_wol_pw(const char *optarg) +{ + int passwd[6]; + int byte_cnt; + int i; + + byte_cnt = sscanf(optarg, "%2x:%2x:%2x:%2x:%2x:%2x", + &passwd[0], &passwd[1], &passwd[2], + &passwd[3], &passwd[4], &passwd[5]); + if (byte_cnt < 4) + byte_cnt = sscanf(optarg, "%d.%d.%d.%d", + &passwd[0], &passwd[1], &passwd[2], &passwd[3]); + if (byte_cnt < 4) { + fprintf(stderr, "Unable to read the Wake-On-LAN password.\n"); + return 0; + } + printf(" The Magic packet password is %2.2x %2.2x %2.2x %2.2x (%d).\n", + passwd[0], passwd[1], passwd[2], passwd[3], byte_cnt); + for (i = 0; i < byte_cnt; i++) + wol_passwd[i] = passwd[i]; + return wol_passwd_sz = byte_cnt; +} + +#if 0 +{ + to = (struct sockaddr_in *)&whereto; + to->sin_family = AF_INET; + if (inet_aton(target, &to->sin_addr)) { + hostname = target; + } + memset (&sa, 0, sizeof sa); + sa.sa_family = AF_INET; + strncpy (sa.sa_data, interface, sizeof sa.sa_data); + sendto (sock, buf, bufix + len, 0, &sa, sizeof sa); + strncpy (sa.sa_data, interface, sizeof sa.sa_data); +#if 1 + sendto (sock, buf, bufix + len, 0, &sa, sizeof sa); +#else + bind (sock, &sa, sizeof sa); + connect(); + send (sock, buf, bufix + len, 0); +#endif +} +#endif + + +/* + * Local variables: + * compile-command: "gcc -O -Wall -o ether-wake ether-wake.c" + * c-indent-level: 4 + * c-basic-offset: 4 + * c-indent-level: 4 + * tab-width: 4 + * End: + */ diff --git a/package/ethtool/Makefile b/package/ethtool/Makefile index 3172231da..76b3b16c9 100644 --- a/package/ethtool/Makefile +++ b/package/ethtool/Makefile @@ -15,10 +15,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ETHTOOL,ethtool,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_ETHTOOL}/usr/sbin ${CP} ${WRKINST}/usr/sbin/ethtool ${IDIR_ETHTOOL}/usr/sbin diff --git a/package/evieext/Makefile b/package/evieext/Makefile index de5796c1b..b1765b721 100644 --- a/package/evieext/Makefile +++ b/package/evieext/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 68e61ce53caa495a3ad4085f66010eb8 PKG_SITES:= ftp://ftp.x.org/pub/individual/proto/ include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/evilwm/Makefile b/package/evilwm/Makefile index 1dabdf9d5..95b1a422a 100644 --- a/package/evilwm/Makefile +++ b/package/evilwm/Makefile @@ -18,9 +18,9 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,EVILWM,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual + MAKE_FLAGS+= XROOT="$(STAGING_DIR)/usr" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_EVILWM)/usr/bin diff --git a/package/exmap/Makefile b/package/exmap/Makefile index 22acc5997..5f551b785 100644 --- a/package/exmap/Makefile +++ b/package/exmap/Makefile @@ -27,10 +27,10 @@ $(eval $(call PKG_template,EXMAPD,exmapd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEP $(eval $(call PKG_template,EXMAPSERVER,exmapserver,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_EXMAPSERVER},${PKG_SECTION})) $(eval $(call PKG_template,KMOD_EXMAP,kmod-exmap,${KERNEL_VERSION}+${PKG_VERSION}-${ADK_TARGET}-${PKG_RELEASE},,${PKG_DESCR_KMOD_EXMAP},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +INSTALL_STYLE:= manual + CONFIGURE_ARGS+= --disable-doc CONFIGURE_ENV+= LIBS="-lncurses" -BUILD_STYLE:= auto pre-build: KERNEL_PATH=${LINUX_DIR} \ diff --git a/package/expat/Makefile b/package/expat/Makefile index d0c570f3e..6d267e53e 100644 --- a/package/expat/Makefile +++ b/package/expat/Makefile @@ -11,6 +11,7 @@ PKG_DESCR:= a XML parsing library PKG_SECTION:= libs PKG_URL:= http://expat.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=expat/} + ifeq ($(ADK_STATIC),y) PKG_OPTS:= libonly endif @@ -19,10 +20,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBEXPAT,libexpat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBEXPAT}/usr/lib ${CP} ${WRKINST}/usr/lib/libexpat.so* ${IDIR_LIBEXPAT}/usr/lib/ diff --git a/package/ez-ipupdate/Makefile b/package/ez-ipupdate/Makefile index 2d1b0db96..73888a990 100644 --- a/package/ez-ipupdate/Makefile +++ b/package/ez-ipupdate/Makefile @@ -19,8 +19,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,EZIPUPDATE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_EZIPUPDATE}/etc ${IDIR_EZIPUPDATE}/usr/sbin diff --git a/package/faad2/Makefile b/package/faad2/Makefile index 5c55d5344..ab794dab2 100644 --- a/package/faad2/Makefile +++ b/package/faad2/Makefile @@ -16,14 +16,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBFAAD2,libfaad2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-mpeg4ip \ --without-xmms -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBFAAD2}/usr/lib - ${CP} ${WRKINST}/usr/lib/libfaad.so.* ${IDIR_LIBFAAD2}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libfaad.so* ${IDIR_LIBFAAD2}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/fakeidentd/Makefile b/package/fakeidentd/Makefile index ecf18041e..a5a6aa027 100644 --- a/package/fakeidentd/Makefile +++ b/package/fakeidentd/Makefile @@ -18,8 +18,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FAKEIDENTD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: - ${TARGET_CC} ${TARGET_CFLAGS} -o ${WRKBUILD}/${PKG_NAME} ${WRKBUILD}/identd.c + ${TARGET_CC} -Wall ${TCPPFLAGS} ${TCFLAGS} -o \ + ${WRKBUILD}/fakeidentd ${WRKBUILD}/identd.c do-install: ${INSTALL_DIR} ${IDIR_FAKEIDENTD}/usr/sbin diff --git a/package/fbset/Makefile b/package/fbset/Makefile index 1591e6704..6d3784cb0 100644 --- a/package/fbset/Makefile +++ b/package/fbset/Makefile @@ -15,6 +15,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FBSET,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual diff --git a/package/fetchmail/Makefile b/package/fetchmail/Makefile index ea569df1d..f22a409ab 100644 --- a/package/fetchmail/Makefile +++ b/package/fetchmail/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= fetchmail PKG_VERSION:= 6.3.9 PKG_RELEASE:= 1 PKG_MD5SUM:= 72c20ad2b9629f1a109668b05a84d823 -PKG_DESCR:= fetch mail from a POP, IMAP, ETRN, or ODMR-capable server +PKG_DESCR:= fetch mail from a POP or IMAP server PKG_SECTION:= text ifeq (${ADK_PACKAGE_FETCHMAIL_SSL},y) PKG_DEPENDS:= libopenssl @@ -25,10 +25,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FETCHMAIL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-hesiod -BUILD_STYLE:= auto -INSTALL_STYLE:= auto ifeq (${ADK_PACKAGE_FETCHMAIL_SSL},y) CONFIGURE_ARGS+= --with-ssl='${STAGING_DIR}/usr' @@ -38,6 +35,7 @@ endif post-install: ${INSTALL_DIR} ${IDIR_FETCHMAIL}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/${PKG_NAME} ${IDIR_FETCHMAIL}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/fetchmail \ + ${IDIR_FETCHMAIL}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile index 1f920ec4a..a2d577fbe 100644 --- a/package/ffmpeg/Makefile +++ b/package/ffmpeg/Makefile @@ -9,6 +9,8 @@ PKG_RELEASE:= 2 PKG_MD5SUM:= be8503f15c3b81ba00eb8379ca8dcf33 PKG_DESCR:= solution to record, convert and stream audio and video PKG_SECTION:= sound +PKG_DEPENDS:= libfaad2 +PKG_BUILDDEP+= faad2 PKG_URL:= http://www.ffmpeg.org PKG_SITES:= http://www.ffmpeg.org/releases/ @@ -18,37 +20,31 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FFMPEG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= manual -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= minimal include ${TOPDIR}/mk/cpu.mk -do-configure: - cd ${WRKBUILD}; \ - env ${CONFIGURE_ENV} \ - ${BASH} ${WRKSRC}/configure \ - --prefix=/usr \ - --arch=${CPU_ARCH} \ - --enable-cross-compile \ - --source-path=${WRKSRC} \ - --cross-prefix=${TARGET_CROSS} \ - --cc=$(TARGET_CC) \ - --host-cc=$(HOSTCC) \ - --disable-debug \ - --disable-stripping \ - --enable-small \ - --enable-shared \ - --enable-static \ - --disable-ffmpeg \ - --disable-ffplay \ - --disable-ffserver \ - --disable-vhook \ - --enable-gpl \ - --enable-swscale \ - --enable-postproc \ - --enable-libfaad \ - ${CONFIGURE_CPU_OPTS} +CONFIGURE_ARGS:= --prefix=/usr \ + --arch=${CPU_ARCH} \ + --enable-cross-compile \ + --source-path=${WRKSRC} \ + --cross-prefix=${TARGET_CROSS} \ + --cc=$(TARGET_CC) \ + --host-cc=$(HOSTCC) \ + --disable-debug \ + --disable-stripping \ + --enable-small \ + --enable-shared \ + --enable-static \ + --disable-ffmpeg \ + --disable-ffplay \ + --disable-ffserver \ + --disable-vhook \ + --enable-gpl \ + --enable-swscale \ + --enable-postproc \ + --enable-libfaad \ + ${CONFIGURE_CPU_OPTS} post-install: ${INSTALL_DIR} ${IDIR_FFMPEG}/usr/lib diff --git a/package/file/Makefile b/package/file/Makefile index c535ee35b..c090033f4 100644 --- a/package/file/Makefile +++ b/package/file/Makefile @@ -17,10 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FILE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - pre-configure: (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \ CFLAGS="-static" \ diff --git a/package/findutils/Makefile b/package/findutils/Makefile index 69f7f0e57..25c4e9ac7 100644 --- a/package/findutils/Makefile +++ b/package/findutils/Makefile @@ -13,21 +13,17 @@ PKG_DEPENDS:= libpthread PKG_URL:= http://www.gnu.org/software/findutils/ PKG_SITES:= http://ftp.gnu.org/pub/gnu/findutils/ -# FIXME: test this port with some libc different from glibc - include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FINDUTILS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -# the following prevents gnulib from defining it's own fseeko (which conflicts with the libc one) CONFIGURE_ENV+= gl_cv_func_wcwidth_works=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_FINDUTILS)/usr/{s,}bin - $(INSTALL_BIN) $(WRKINST)/usr/bin/{find,locate,oldfind,updatedb,xargs} $(IDIR_FINDUTILS)/usr/bin - $(INSTALL_BIN) $(WRKINST)/usr/sbin/{bigram,code,frcode} $(IDIR_FINDUTILS)/usr/sbin + $(INSTALL_BIN) $(WRKINST)/usr/bin/{find,locate,oldfind,updatedb,xargs} \ + $(IDIR_FINDUTILS)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/sbin/{bigram,code,frcode} \ + $(IDIR_FINDUTILS)/usr/sbin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/fixesproto/Makefile b/package/fixesproto/Makefile index 4900aee48..07cf45150 100644 --- a/package/fixesproto/Makefile +++ b/package/fixesproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 95806b9b648639d4c3e5b226d10927c0 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/flac/Makefile b/package/flac/Makefile index d5c06c17f..fa7ccb9f8 100644 --- a/package/flac/Makefile +++ b/package/flac/Makefile @@ -16,13 +16,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBFLAC,libflac,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --disable-asm-optimizations \ --disable-xmms-plugin \ --disable-cpplibs \ --disable-ogg -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog post-install: ${INSTALL_DIR} ${IDIR_LIBFLAC}/usr/lib diff --git a/package/flex/Makefile b/package/flex/Makefile index bb2eda080..824371592 100644 --- a/package/flex/Makefile +++ b/package/flex/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FLEX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_FLEX}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/flex ${IDIR_FLEX}/usr/bin diff --git a/package/font-adobe-100dpi/Makefile b/package/font-adobe-100dpi/Makefile index 013910dd5..d41034333 100644 --- a/package/font-adobe-100dpi/Makefile +++ b/package/font-adobe-100dpi/Makefile @@ -18,10 +18,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_ADOBE_100DPI,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_ADOBE_100DPI)/usr/share/fonts/X11/100dpi $(CP) ${WRKINST}/usr/share/fonts/X11/100dpi/* \ diff --git a/package/font-adobe-75dpi/Makefile b/package/font-adobe-75dpi/Makefile index 34ace47f1..2af0aa60c 100644 --- a/package/font-adobe-75dpi/Makefile +++ b/package/font-adobe-75dpi/Makefile @@ -18,10 +18,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_ADOBE_75DPI,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_ADOBE_75DPI)/usr/share/fonts/X11/75dpi $(CP) ${WRKINST}/usr/share/fonts/X11/75dpi/* \ diff --git a/package/font-bh-100dpi/Makefile b/package/font-bh-100dpi/Makefile index 7af15ff0c..e70fb4810 100644 --- a/package/font-bh-100dpi/Makefile +++ b/package/font-bh-100dpi/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BH_100DPI,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BH_100DPI)/usr/share/fonts/X11/100dpi $(CP) ${WRKINST}/usr/share/fonts/X11/100dpi/* \ diff --git a/package/font-bh-75dpi/Makefile b/package/font-bh-75dpi/Makefile index 48ae24be3..e3e3aa3d4 100644 --- a/package/font-bh-75dpi/Makefile +++ b/package/font-bh-75dpi/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BH_75DPI,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BH_75DPI)/usr/share/fonts/X11/75dpi $(CP) ${WRKINST}/usr/share/fonts/X11/75dpi/* \ diff --git a/package/font-bh-lucidatypewriter-100dpi/Makefile b/package/font-bh-lucidatypewriter-100dpi/Makefile index 1c99e99f1..9d8635e55 100644 --- a/package/font-bh-lucidatypewriter-100dpi/Makefile +++ b/package/font-bh-lucidatypewriter-100dpi/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BH_LUCIDATYPEWRITER_100DPI,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BH_LUCIDATYPEWRITER_100DPI)/usr/share/fonts/X11/100dpi $(CP) ${WRKINST}/usr/share/fonts/X11/100dpi/* \ diff --git a/package/font-bh-lucidatypewriter-75dpi/Makefile b/package/font-bh-lucidatypewriter-75dpi/Makefile index 76e23c0e7..a84ebb107 100644 --- a/package/font-bh-lucidatypewriter-75dpi/Makefile +++ b/package/font-bh-lucidatypewriter-75dpi/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BH_LUCIDATYPEWRITER_75DPI,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BH_LUCIDATYPEWRITER_75DPI)/usr/share/fonts/X11/75dpi $(CP) ${WRKINST}/usr/share/fonts/X11/75dpi/* \ diff --git a/package/font-bh-ttf/Makefile b/package/font-bh-ttf/Makefile index 944c400ad..5d816443f 100644 --- a/package/font-bh-ttf/Makefile +++ b/package/font-bh-ttf/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BH_TTF,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BH_TTF)/usr/share/fonts/X11/TTF $(CP) ${WRKINST}/usr/share/fonts/X11/TTF/* \ diff --git a/package/font-bh-type1/Makefile b/package/font-bh-type1/Makefile index 27885e75c..81ff1c74c 100644 --- a/package/font-bh-type1/Makefile +++ b/package/font-bh-type1/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BH_TYPE1,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BH_TYPE1)/usr/share/fonts/X11/Type1 $(CP) ${WRKINST}/usr/share/fonts/X11/Type1/* \ diff --git a/package/font-bitstream-100dpi/Makefile b/package/font-bitstream-100dpi/Makefile index 05cff3d1a..efb8e66a2 100644 --- a/package/font-bitstream-100dpi/Makefile +++ b/package/font-bitstream-100dpi/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BITSTREAM_100DPI,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BITSTREAM_100DPI)/usr/share/fonts/X11/100dpi $(CP) ${WRKINST}/usr/share/fonts/X11/100dpi/* \ diff --git a/package/font-bitstream-75dpi/Makefile b/package/font-bitstream-75dpi/Makefile index a58f28fef..6a7dcae13 100644 --- a/package/font-bitstream-75dpi/Makefile +++ b/package/font-bitstream-75dpi/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BITSTREAM_75DPI,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BITSTREAM_75DPI)/usr/share/fonts/X11/75dpi $(CP) ${WRKINST}/usr/share/fonts/X11/75dpi/* \ diff --git a/package/font-bitstream-type1/Makefile b/package/font-bitstream-type1/Makefile index a32aa4bd0..4672b2463 100644 --- a/package/font-bitstream-type1/Makefile +++ b/package/font-bitstream-type1/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_BITSTREAM_TYPE1,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_BITSTREAM_TYPE1)/usr/share/fonts/X11/Type1 $(CP) ${WRKINST}/usr/share/fonts/X11/Type1/* \ diff --git a/package/font-misc-misc/Makefile b/package/font-misc-misc/Makefile index deba7e3f3..1c16cf0c5 100644 --- a/package/font-misc-misc/Makefile +++ b/package/font-misc-misc/Makefile @@ -17,10 +17,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_MISC_MISC,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_MISC_MISC)/usr/share/fonts/X11/misc $(CP) ${WRKINST}/usr/share/fonts/X11/misc/* \ diff --git a/package/font-util/Makefile b/package/font-util/Makefile index eb89dd3e3..cdd1632b2 100644 --- a/package/font-util/Makefile +++ b/package/font-util/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FONT_UTIL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_FONT_UTIL}/usr/share/fonts/X11/util ${CP} ${WRKINST}/usr/share/fonts/X11/util/* \ diff --git a/package/font-xfree86-type1/Makefile b/package/font-xfree86-type1/Makefile index a2960a494..41e6c0d34 100644 --- a/package/font-xfree86-type1/Makefile +++ b/package/font-xfree86-type1/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,FONT_XFREE86_TYPE1,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_FONT_XFREE86_TYPE1)/usr/share/fonts/X11/Type1 $(CP) ${WRKINST}/usr/share/fonts/X11/Type1/* \ diff --git a/package/fontcacheproto/Makefile b/package/fontcacheproto/Makefile index 34f567d0b..ce103cade 100644 --- a/package/fontcacheproto/Makefile +++ b/package/fontcacheproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= dc8c34a8c3559bf3b008bcdf7ba5a743 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/fontconfig/Makefile b/package/fontconfig/Makefile index 824704dcd..2c6b18a65 100644 --- a/package/fontconfig/Makefile +++ b/package/fontconfig/Makefile @@ -20,11 +20,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FONTCONFIG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-arch=${ARCH} \ --disable-docs -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_FONTCONFIG}/usr/lib diff --git a/package/fontsproto/Makefile b/package/fontsproto/Makefile index 82c2ebe6a..718d10a53 100644 --- a/package/fontsproto/Makefile +++ b/package/fontsproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 6819fc82585daac68cec17938b659bf0 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/fping/Makefile b/package/fping/Makefile index a7842392f..002639da2 100644 --- a/package/fping/Makefile +++ b/package/fping/Makefile @@ -18,13 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FPING,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu - -do-build: - ${MAKE} CC="${TARGET_CC}" CFLAGS="${TARGET_CFLAGS}" -C ${WRKBUILD} ${PKG_NAME} - -do-install: - ${INSTALL_DIR} ${IDIR_FPING}/usr/bin - ${CP} ${WRKBUILD}/${PKG_NAME} ${IDIR_FPING}/usr/bin/${PKG_NAME} +post-install: + ${INSTALL_DIR} ${IDIR_FPING}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/fping ${IDIR_FPING}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/fprobe-ulog/Makefile b/package/fprobe-ulog/Makefile index 7b7fda126..6192723ee 100644 --- a/package/fprobe-ulog/Makefile +++ b/package/fprobe-ulog/Makefile @@ -18,12 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FPROBE_ULOG,fprobe-ulog,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-piddir=/var \ --with-membulk=index8 \ --with-hash=xor8 -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_FPROBE_ULOG}/usr/sbin diff --git a/package/fprobe/Makefile b/package/fprobe/Makefile index 6e4edf980..510dd466f 100644 --- a/package/fprobe/Makefile +++ b/package/fprobe/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= fprobe PKG_VERSION:= 1.1 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap PKG_MD5SUM:= 65850d0470078269b33eee58cba77ac2 PKG_DESCR:= NetFlow probe PKG_SECTION:= net PKG_DEPENDS:= libpcap libpthread +PKG_BUILDDEP+= libpcap PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=fprobe/} DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 @@ -19,14 +19,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FPROBE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-piddir=/var \ --with-pcap=${STAGING_DIR}/usr/include \ --with-libpcap=${STAGING_DIR}/usr/lib \ --with-membulk=index8 \ --with-hash=xor8 \ -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_FPROBE}/usr/sbin diff --git a/package/freeradius-client/Makefile b/package/freeradius-client/Makefile index f6e94cf6f..17d7db7ee 100644 --- a/package/freeradius-client/Makefile +++ b/package/freeradius-client/Makefile @@ -21,10 +21,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FREERADIUS_CLIENT,freeradius-client,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBFREERADIUS_CLIENT,libfreeradius-client,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_func_uname=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_FREERADIUS_CLIENT}/usr/sbin diff --git a/package/freeradius-server/Makefile b/package/freeradius-server/Makefile index 69f19397c..b202f44fd 100644 --- a/package/freeradius-server/Makefile +++ b/package/freeradius-server/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= freeradius-server -PKG_VERSION:= 2.1.7 +PKG_VERSION:= 2.1.8 PKG_RELEASE:= 1 -PKG_MD5SUM:= b1f77c5e3116bcb0ac0aa9080a06ebf1 +PKG_MD5SUM:= aa2ae711387af144df7c351b28b8789c PKG_DESCR:= a flexible RADIUS server PKG_SECTION:= net PKG_MULTI:= 1 @@ -25,9 +25,7 @@ PKG_BUILDDEP+= postgresql PKG_DEPENDS_PGSQL:= libpq endif PKG_URL:= http://www.freeradius.org -PKG_SITES:= ftp://ftp.freeradius.org/pub/radius/ \ - http://freeradius.portal-to-web.de/ \ - ftp://ftp.uk.freeradius.org/pub/radius/ +PKG_SITES:= ftp://ftp.freeradius.org/pub/radius/ PKG_HOST_DEPENDS:= !cygwin @@ -46,34 +44,31 @@ PKG_DESCR_MYSQL:= MySQL module PKG_DESCR_PGSQL:= PostgreSQL module PKG_DESCR_UTILS:= Misc. client utilities -PKG_CONFIGURE_OPTIONS:= +PKG_CONFIGURE_OPTS:= ifneq (${ADK_PACKAGE_FREERADIUS_MOD_LDAP},) -PKG_CONFIGURE_LIBS+= -lcrypto -lssl -PKG_CONFIGURE_OPTIONS+= \ - --with-rlm_ldap-include-dir="${STAGING_DIR}/usr/include" \ - --with-rlm_ldap-lib-dir="${STAGING_DIR}/usr/lib" +PKG_CONFIGURE_LIBS+= -lcrypto -lssl +PKG_CONFIGURE_OPTS+= --with-rlm_ldap-include-dir="${STAGING_DIR}/usr/include" \ + --with-rlm_ldap-lib-dir="${STAGING_DIR}/usr/lib" else -PKG_CONFIGURE_OPTIONS+= --without-rlm_ldap +PKG_CONFIGURE_OPTS+= --without-rlm_ldap endif ifneq (${ADK_PACKAGE_FREERADIUS_MOD_SQL_MYSQL},) PKG_CONFIGURE_LIBS+= -lz -PKG_CONFIGURE_OPTIONS+= \ - --with-mysql-include-dir="${STAGING_DIR}/usr/include" \ - --with-mysql-lib-dir="${STAGING_DIR}/usr/lib/mysql" \ - --without-threads \ - --with-rlm_sql +PKG_CONFIGURE_OPTS+= --with-mysql-include-dir="${STAGING_DIR}/usr/include" \ + --with-mysql-lib-dir="${STAGING_DIR}/usr/lib/mysql" \ + --without-threads \ + --with-rlm_sql else -PKG_CONFIGURE_OPTIONS+= --without-rlm_sql_mysql +PKG_CONFIGURE_OPTS+= --without-rlm_sql_mysql endif ifneq (${ADK_PACKAGE_FREERADIUS_MOD_SQL_PGSQL},) -PKG_CONFIGURE_OPTIONS+= \ - --with-rlm_sql_postgresql-include-dir="${STAGING_DIR}/usr/include" \ - --with-rlm_sql_postgresql-lib-dir="${STAGING_DIR}/usr/lib" \ - --with-rlm_sql +PKG_CONFIGURE_OPTS+= --with-rlm_sql_postgresql-include-dir="${STAGING_DIR}/usr/include" \ + --with-rlm_sql_postgresql-lib-dir="${STAGING_DIR}/usr/lib" \ + --with-rlm_sql else -PKG_CONFIGURE_OPTIONS+= --without-rlm_sql_postgresql +PKG_CONFIGURE_OPTS+= --without-rlm_sql_postgresql endif include ${TOPDIR}/mk/package.mk @@ -124,16 +119,15 @@ $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL,rlm_sql,sql.conf)) $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_MYSQL,rlm_sql_mysql,)) $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_PGSQL,rlm_sql_postgresql,)) -CONFIGURE_STYLE:= gnu -CONFIGURE_ENV+= ac_cv_lib_nsl_inet_ntoa=no -CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTIONS} \ +CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTS} \ --with-openssl-includes=${STAGING_DIR}/usr/include \ --with-openssl-libraries=${STAGING_DIR}/usr/lib \ + --with-system-libltld \ --enable-strict-dependencies \ --with-raddbdir=/etc/freeradius \ --without-edir \ --without-snmp \ - --with-experimental-modules \ + --without-experimental-modules \ --without-rlm_attr-rewrite \ --without-rlm_checkval \ --without-rlm_counter \ @@ -168,16 +162,16 @@ CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTIONS} \ --without-rlm_sql_sqlite \ --libdir=/usr/lib/freeradius \ --libexecdir=/usr/lib/freeradius -BUILD_STYLE:= auto -INSTALL_STYLE:= auto FAKE_FLAGS+= R="${WRKINST}" \ INSTALLSTRIP="" post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/etc/freeradius ${CP} ./files/users ${IDIR_FREERADIUS_SERVER}/etc/freeradius/ - ${INSTALL_DATA} ./files/radiusd.conf ${IDIR_FREERADIUS_SERVER}/etc/freeradius - ${INSTALL_DATA} ./files/clients.conf ${IDIR_FREERADIUS_SERVER}/etc/freeradius + ${INSTALL_DATA} ./files/radiusd.conf \ + ${IDIR_FREERADIUS_SERVER}/etc/freeradius + ${INSTALL_DATA} ./files/clients.conf \ + ${IDIR_FREERADIUS_SERVER}/etc/freeradius for f in dictionary; do \ ${CP} ${WRKINST}/etc/freeradius/$${f} \ ${IDIR_FREERADIUS_SERVER}/etc/freeradius/ ; \ @@ -203,6 +197,7 @@ post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/demoCA/index* rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/demoCA/serial* ${INSTALL_DIR} ${IDIR_FREERADIUS_UTILS}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/radclient ${IDIR_FREERADIUS_UTILS}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/radclient \ + ${IDIR_FREERADIUS_UTILS}/usr/bin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/freeradius-server/files/freeradius-server.conffiles b/package/freeradius-server/files/freeradius-server.conffiles new file mode 100644 index 000000000..56552e6c1 --- /dev/null +++ b/package/freeradius-server/files/freeradius-server.conffiles @@ -0,0 +1,2 @@ +/etc/freeradius/clients.conf +/etc/freeradius/radiusd.conf diff --git a/package/freeradius-server/files/freeradius-server.postinst b/package/freeradius-server/files/freeradius-server.postinst new file mode 100644 index 000000000..c65fa195f --- /dev/null +++ b/package/freeradius-server/files/freeradius-server.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf radiusd radiusd NO +gid=$(get_next_gid) +add_group radius $gid +add_user radius $(get_next_uid) $gid /usr/lib/radius diff --git a/package/freeradius-server/files/freeradius.conffiles b/package/freeradius-server/files/freeradius.conffiles deleted file mode 100644 index 56552e6c1..000000000 --- a/package/freeradius-server/files/freeradius.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/freeradius/clients.conf -/etc/freeradius/radiusd.conf diff --git a/package/freeradius-server/files/freeradius.postinst b/package/freeradius-server/files/freeradius.postinst deleted file mode 100644 index c65fa195f..000000000 --- a/package/freeradius-server/files/freeradius.postinst +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh -add_rcconf radiusd radiusd NO -gid=$(get_next_gid) -add_group radius $gid -add_user radius $(get_next_uid) $gid /usr/lib/radius diff --git a/package/freeradius-server/patches/patch-share_dictionary b/package/freeradius-server/patches/patch-share_dictionary deleted file mode 100644 index 075c19c71..000000000 --- a/package/freeradius-server/patches/patch-share_dictionary +++ /dev/null @@ -1,440 +0,0 @@ ---- freeradius-server-2.1.7.orig/share/dictionary 2009-09-14 16:43:29.000000000 +0200 -+++ freeradius-server-2.1.7/share/dictionary 2009-11-19 22:39:16.000000000 +0100 -@@ -1,224 +1,224 @@ --# -*- text -*- --# --# Version $Id$ --# --# DO NOT EDIT THE FILES IN THIS DIRECTORY --# --# The files in this directory are maintained and updated by --# the FreeRADIUS project. Newer releases of software may update --# or change these files. --# --# Use the main dictionary file (usually /etc/raddb/dictionary) --# for local system attributes and $INCLUDEs. --# --# --# --# This file contains dictionary translations for parsing --# requests and generating responses. All transactions are --# composed of Attribute/Value Pairs. The value of each attribute --# is specified as one of 4 data types. Valid data types are: --# --# text - printable, generally UTF-8 encoded (subset of 'string') --# string - 0-253 octets --# ipaddr - 4 octets in network byte order --# integer - 32 bit value in big endian order (high byte first) --# date - 32 bit value in big endian order - seconds since --# 00:00:00 GMT, Jan. 1, 1970 --# ifid - 8 octets in network byte order --# ipv6addr - 16 octets in network byte order --# ipv6prefix - 18 octets in network byte order --# ether - 6 octets of hh:hh:hh:hh:hh:hh --# where 'h' is hex digits, upper or lowercase. --# --# FreeRADIUS includes extended data types which are not defined --# in the RFC's. These data types are: --# --# abinary - Ascend's binary filter format. --# octets - raw octets, printed and input as hex strings. --# e.g.: 0x123456789abcdef --# --# --# Enumerated values are stored in the user file with dictionary --# VALUE translations for easy administration. --# --# Example: --# --# ATTRIBUTE VALUE --# --------------- ----- --# Framed-Protocol = PPP --# 7 = 1 (integer encoding) --# -- --# --# Include compatibility dictionary for older users file. Move --# this directive to the end of this file if you want to see the --# old names in the logfiles, INSTEAD OF the new names. --# --$INCLUDE dictionary.compat -- --# --# Include the RFC dictionaries next. --# --# For a complete list of the standard attributes and values, --# see: --# http://www.iana.org/assignments/radius-types --# --$INCLUDE dictionary.rfc2865 --$INCLUDE dictionary.rfc2866 --$INCLUDE dictionary.rfc2867 --$INCLUDE dictionary.rfc2868 --$INCLUDE dictionary.rfc2869 --$INCLUDE dictionary.rfc3162 --$INCLUDE dictionary.rfc3576 --$INCLUDE dictionary.rfc3580 --$INCLUDE dictionary.rfc4072 --$INCLUDE dictionary.rfc4372 --$INCLUDE dictionary.rfc4675 --$INCLUDE dictionary.rfc4679 --$INCLUDE dictionary.rfc4818 --$INCLUDE dictionary.rfc4849 --$INCLUDE dictionary.rfc5176 --$INCLUDE dictionary.rfc5580 -- --# --# Include vendor dictionaries after the standard ones. -+## -*- text -*- -+## -+## Version $Id$ -+## -+## DO NOT EDIT THE FILES IN THIS DIRECTORY -+## -+## The files in this directory are maintained and updated by -+## the FreeRADIUS project. Newer releases of software may update -+## or change these files. -+## -+## Use the main dictionary file (usually /etc/raddb/dictionary) -+## for local system attributes and $INCLUDEs. -+## -+## -+## -+## This file contains dictionary translations for parsing -+## requests and generating responses. All transactions are -+## composed of Attribute/Value Pairs. The value of each attribute -+## is specified as one of 4 data types. Valid data types are: -+## -+## text - printable, generally UTF-8 encoded (subset of 'string') -+## string - 0-253 octets -+## ipaddr - 4 octets in network byte order -+## integer - 32 bit value in big endian order (high byte first) -+## date - 32 bit value in big endian order - seconds since -+## 00:00:00 GMT, Jan. 1, 1970 -+## ifid - 8 octets in network byte order -+## ipv6addr - 16 octets in network byte order -+## ipv6prefix - 18 octets in network byte order -+## ether - 6 octets of hh:hh:hh:hh:hh:hh -+## where 'h' is hex digits, upper or lowercase. -+## -+## FreeRADIUS includes extended data types which are not defined -+## in the RFC's. These data types are: -+## -+## abinary - Ascend's binary filter format. -+## octets - raw octets, printed and input as hex strings. -+## e.g.: 0x123456789abcdef -+## -+## -+## Enumerated values are stored in the user file with dictionary -+## VALUE translations for easy administration. -+## -+## Example: -+## -+## ATTRIBUTE VALUE -+## --------------- ----- -+## Framed-Protocol = PPP -+## 7 = 1 (integer encoding) -+## - # --$INCLUDE dictionary.3com --$INCLUDE dictionary.3gpp --$INCLUDE dictionary.3gpp2 --$INCLUDE dictionary.acc --$INCLUDE dictionary.airespace --$INCLUDE dictionary.alcatel --$INCLUDE dictionary.alteon --$INCLUDE dictionary.alvarion --$INCLUDE dictionary.apc --$INCLUDE dictionary.aruba --$INCLUDE dictionary.azaire --$INCLUDE dictionary.ascend --$INCLUDE dictionary.bay --$INCLUDE dictionary.bintec --$INCLUDE dictionary.cablelabs --$INCLUDE dictionary.cabletron --$INCLUDE dictionary.chillispot --$INCLUDE dictionary.cisco -+## -+## Include compatibility dictionary for older users file. Move -+## this directive to the end of this file if you want to see the -+## old names in the logfiles, INSTEAD OF the new names. -+## -+##$INCLUDE dictionary.compat - # --# The Cisco VPN300 dictionary is the same as the altiga one. --# You shouldn't use both at the same time. -+## -+## Include the RFC dictionaries next. -+## -+## For a complete list of the standard attributes and values, -+## see: -+## http://www.iana.org/assignments/radius-types -+## -+#$INCLUDE dictionary.rfc2865 -+#$INCLUDE dictionary.rfc2866 -+#$INCLUDE dictionary.rfc2867 -+#$INCLUDE dictionary.rfc2868 -+#$INCLUDE dictionary.rfc2869 -+#$INCLUDE dictionary.rfc3162 -+#$INCLUDE dictionary.rfc3576 -+#$INCLUDE dictionary.rfc3580 -+#$INCLUDE dictionary.rfc4072 -+#$INCLUDE dictionary.rfc4372 -+#$INCLUDE dictionary.rfc4675 -+#$INCLUDE dictionary.rfc4679 -+#$INCLUDE dictionary.rfc4818 -+#$INCLUDE dictionary.rfc4849 -+#$INCLUDE dictionary.rfc5176 -+#$INCLUDE dictionary.rfc5580 - # --#$INCLUDE dictionary.cisco.vpn3000 --$INCLUDE dictionary.cisco.vpn5000 --$INCLUDE dictionary.cisco.bbsm --$INCLUDE dictionary.clavister --$INCLUDE dictionary.colubris --$INCLUDE dictionary.cosine --#$INCLUDE dictionary.dhcp --$INCLUDE dictionary.digium --$INCLUDE dictionary.epygi --$INCLUDE dictionary.erx --$INCLUDE dictionary.ericsson --$INCLUDE dictionary.extreme -+## -+## Include vendor dictionaries after the standard ones. -+## -+#$INCLUDE dictionary.3com -+#$INCLUDE dictionary.3gpp -+#$INCLUDE dictionary.3gpp2 -+#$INCLUDE dictionary.acc -+#$INCLUDE dictionary.airespace -+#$INCLUDE dictionary.alcatel -+#$INCLUDE dictionary.alteon -+#$INCLUDE dictionary.alvarion -+#$INCLUDE dictionary.apc -+#$INCLUDE dictionary.aruba -+#$INCLUDE dictionary.azaire -+#$INCLUDE dictionary.ascend -+#$INCLUDE dictionary.bay -+#$INCLUDE dictionary.bintec -+#$INCLUDE dictionary.cablelabs -+#$INCLUDE dictionary.cabletron -+#$INCLUDE dictionary.chillispot -+#$INCLUDE dictionary.cisco -+## -+## The Cisco VPN300 dictionary is the same as the altiga one. -+## You shouldn't use both at the same time. -+## -+##$INCLUDE dictionary.cisco.vpn3000 -+#$INCLUDE dictionary.cisco.vpn5000 -+#$INCLUDE dictionary.cisco.bbsm -+#$INCLUDE dictionary.clavister -+#$INCLUDE dictionary.colubris -+#$INCLUDE dictionary.cosine -+##$INCLUDE dictionary.dhcp -+#$INCLUDE dictionary.digium -+#$INCLUDE dictionary.epygi -+#$INCLUDE dictionary.erx -+#$INCLUDE dictionary.ericsson -+#$INCLUDE dictionary.extreme - $INCLUDE dictionary.freeradius --$INCLUDE dictionary.freeswitch --$INCLUDE dictionary.fortinet --$INCLUDE dictionary.foundry --$INCLUDE dictionary.gandalf --$INCLUDE dictionary.gemtek --$INCLUDE dictionary.h3c --$INCLUDE dictionary.hp --$INCLUDE dictionary.huawei --$INCLUDE dictionary.iea --$INCLUDE dictionary.infonet --$INCLUDE dictionary.issanni --$INCLUDE dictionary.itk --$INCLUDE dictionary.ipunplugged --$INCLUDE dictionary.juniper --$INCLUDE dictionary.jradius --$INCLUDE dictionary.karlnet --$INCLUDE dictionary.lancom --$INCLUDE dictionary.livingston --$INCLUDE dictionary.localweb --$INCLUDE dictionary.lucent --$INCLUDE dictionary.manzara --$INCLUDE dictionary.merit --$INCLUDE dictionary.microsoft --$INCLUDE dictionary.mikrotik --$INCLUDE dictionary.navini --$INCLUDE dictionary.netscreen --$INCLUDE dictionary.networkphysics --$INCLUDE dictionary.nexans --$INCLUDE dictionary.ntua --$INCLUDE dictionary.nokia --# --# Commented out because of attribute conflicts. --# --#$INCLUDE dictionary.nokia.conflict --$INCLUDE dictionary.nomadix --$INCLUDE dictionary.nortel --# --# Commented out because of attribute conflicts. -+#$INCLUDE dictionary.freeswitch -+#$INCLUDE dictionary.fortinet -+#$INCLUDE dictionary.foundry -+#$INCLUDE dictionary.gandalf -+#$INCLUDE dictionary.gemtek -+#$INCLUDE dictionary.h3c -+#$INCLUDE dictionary.hp -+#$INCLUDE dictionary.huawei -+#$INCLUDE dictionary.iea -+#$INCLUDE dictionary.infonet -+#$INCLUDE dictionary.issanni -+#$INCLUDE dictionary.itk -+#$INCLUDE dictionary.ipunplugged -+#$INCLUDE dictionary.juniper -+#$INCLUDE dictionary.jradius -+#$INCLUDE dictionary.karlnet -+#$INCLUDE dictionary.lancom -+#$INCLUDE dictionary.livingston -+#$INCLUDE dictionary.localweb -+#$INCLUDE dictionary.lucent -+#$INCLUDE dictionary.manzara -+#$INCLUDE dictionary.merit -+#$INCLUDE dictionary.microsoft -+#$INCLUDE dictionary.mikrotik -+#$INCLUDE dictionary.navini -+#$INCLUDE dictionary.netscreen -+#$INCLUDE dictionary.networkphysics -+#$INCLUDE dictionary.nexans -+#$INCLUDE dictionary.ntua -+#$INCLUDE dictionary.nokia -+## -+## Commented out because of attribute conflicts. -+## -+##$INCLUDE dictionary.nokia.conflict -+#$INCLUDE dictionary.nomadix -+#$INCLUDE dictionary.nortel -+## -+## Commented out because of attribute conflicts. -+## -+##$INCLUDE dictionary.openser -+#$INCLUDE dictionary.packeteer -+#$INCLUDE dictionary.patton -+#$INCLUDE dictionary.propel -+#$INCLUDE dictionary.prosoft -+#$INCLUDE dictionary.quiconnect -+#$INCLUDE dictionary.quintum -+#$INCLUDE dictionary.redback -+#$INCLUDE dictionary.redcreek -+#$INCLUDE dictionary.riverstone -+#$INCLUDE dictionary.roaringpenguin -+#$INCLUDE dictionary.shasta -+#$INCLUDE dictionary.shiva -+#$INCLUDE dictionary.slipstream -+#$INCLUDE dictionary.sonicwall -+#$INCLUDE dictionary.springtide -+#$INCLUDE dictionary.starent -+#$INCLUDE dictionary.telebit -+#$INCLUDE dictionary.trapeze -+#$INCLUDE dictionary.tropos -+#$INCLUDE dictionary.t_systems_nova -+#$INCLUDE dictionary.usr -+#$INCLUDE dictionary.utstarcom -+#$INCLUDE dictionary.valemount -+#$INCLUDE dictionary.versanet -+#$INCLUDE dictionary.vqp -+#$INCLUDE dictionary.waverider -+#$INCLUDE dictionary.walabi -+#$INCLUDE dictionary.wimax -+#$INCLUDE dictionary.wispr -+#$INCLUDE dictionary.xedia -+#$INCLUDE dictionary.xylan - # --#$INCLUDE dictionary.openser --$INCLUDE dictionary.packeteer --$INCLUDE dictionary.patton --$INCLUDE dictionary.propel --$INCLUDE dictionary.prosoft --$INCLUDE dictionary.quiconnect --$INCLUDE dictionary.quintum --$INCLUDE dictionary.redback --$INCLUDE dictionary.redcreek --$INCLUDE dictionary.riverstone --$INCLUDE dictionary.roaringpenguin --$INCLUDE dictionary.shasta --$INCLUDE dictionary.shiva --$INCLUDE dictionary.slipstream --$INCLUDE dictionary.sonicwall --$INCLUDE dictionary.springtide --$INCLUDE dictionary.starent --$INCLUDE dictionary.telebit --$INCLUDE dictionary.trapeze --$INCLUDE dictionary.tropos --$INCLUDE dictionary.t_systems_nova --$INCLUDE dictionary.usr --$INCLUDE dictionary.utstarcom --$INCLUDE dictionary.valemount --$INCLUDE dictionary.versanet --$INCLUDE dictionary.vqp --$INCLUDE dictionary.waverider --$INCLUDE dictionary.walabi --$INCLUDE dictionary.wimax --$INCLUDE dictionary.wispr --$INCLUDE dictionary.xedia --$INCLUDE dictionary.xylan -- -+## -+## And finally the server internal attributes. -+## -+#$INCLUDE dictionary.freeradius.internal - # --# And finally the server internal attributes. -+## -+## Miscellaneous attributes defined in weird places that -+## don't really belong anywhere else... -+## -+#ATTRIBUTE Originating-Line-Info 94 string - # --$INCLUDE dictionary.freeradius.internal -- -+## As defined in draft-sterman-aaa-sip-00.txt -+#ATTRIBUTE Digest-Response 206 string -+#ATTRIBUTE Digest-Attributes 207 octets # stupid format - # --# Miscellaneous attributes defined in weird places that --# don't really belong anywhere else... -+## -+## Integer Translations -+## -+#VALUE Service-Type Voice 12 -+#VALUE Service-Type Fax 13 -+#VALUE Service-Type Modem-Relay 14 -+#VALUE Service-Type IAPP-Register 15 -+#VALUE Service-Type IAPP-AP-Check 16 - # --ATTRIBUTE Originating-Line-Info 94 string -- --# As defined in draft-sterman-aaa-sip-00.txt --ATTRIBUTE Digest-Response 206 string --ATTRIBUTE Digest-Attributes 207 octets # stupid format -- -+#VALUE Framed-Protocol GPRS-PDP-Context 7 - # --# Integer Translations -+#VALUE NAS-Port-Type Wireless-CDMA2000 22 -+#VALUE NAS-Port-Type Wireless-UMTS 23 -+#VALUE NAS-Port-Type Wireless-1X-EV 24 -+#VALUE NAS-Port-Type IAPP 25 - # --VALUE Service-Type Voice 12 --VALUE Service-Type Fax 13 --VALUE Service-Type Modem-Relay 14 --VALUE Service-Type IAPP-Register 15 --VALUE Service-Type IAPP-AP-Check 16 -- --VALUE Framed-Protocol GPRS-PDP-Context 7 -- --VALUE NAS-Port-Type Wireless-CDMA2000 22 --VALUE NAS-Port-Type Wireless-UMTS 23 --VALUE NAS-Port-Type Wireless-1X-EV 24 --VALUE NAS-Port-Type IAPP 25 -- --VALUE Framed-Protocol PPTP 9 -+#VALUE Framed-Protocol PPTP 9 diff --git a/package/freeradius-server/patches/patch-src_main_event_c b/package/freeradius-server/patches/patch-src_main_event_c index 8dbcddf99..1750f53d5 100644 --- a/package/freeradius-server/patches/patch-src_main_event_c +++ b/package/freeradius-server/patches/patch-src_main_event_c @@ -1,15 +1,15 @@ ---- freeradius-server-2.1.7.orig/src/main/event.c 2009-09-14 16:43:29.000000000 +0200 -+++ freeradius-server-2.1.7/src/main/event.c 2009-11-19 22:55:03.000000000 +0100 -@@ -1143,7 +1143,7 @@ static void wait_a_bit(void *ctx) - break; +--- freeradius-server-2.1.8.orig/src/main/event.c 2009-12-30 16:44:35.000000000 +0100 ++++ freeradius-server-2.1.8/src/main/event.c 2010-02-05 19:43:55.803074411 +0100 +@@ -1177,7 +1177,7 @@ static void wait_a_bit(void *ctx) } + stop_processing: -#if defined(HAVE_PTHREAD_H) || defined(WITH_PROXY) +#if defined(HAVE_PTHREAD_H) /* * A child thread MAY still be running on the * request. Ask the thread to stop working on -@@ -1617,7 +1617,9 @@ static int originated_coa_request(REQUES +@@ -1646,7 +1646,9 @@ static int originated_coa_request(REQUES */ request->num_proxied_requests = 1; request->num_proxied_responses = 0; diff --git a/package/freeradius-server/patches/patch-src_main_modules_c b/package/freeradius-server/patches/patch-src_main_modules_c new file mode 100644 index 000000000..c72807f5c --- /dev/null +++ b/package/freeradius-server/patches/patch-src_main_modules_c @@ -0,0 +1,11 @@ +--- freeradius-server-2.1.8.orig/src/main/modules.c 2009-12-30 16:44:35.000000000 +0100 ++++ freeradius-server-2.1.8/src/main/modules.c 2010-02-05 20:05:22.174324929 +0100 +@@ -22,6 +22,8 @@ + * Copyright 2000 Alan Curry + */ + ++#define lt__PROGRAM__LTX_preloaded_symbols lt_libltdl_LTX_preloaded_symbols ++ + #include + RCSID("$Id$") + diff --git a/package/freeradius-server/patches/patch-src_modules_rlm_eap_Makefile_in b/package/freeradius-server/patches/patch-src_modules_rlm_eap_Makefile_in index 17bbf64c2..da95c44c1 100644 --- a/package/freeradius-server/patches/patch-src_modules_rlm_eap_Makefile_in +++ b/package/freeradius-server/patches/patch-src_modules_rlm_eap_Makefile_in @@ -1,5 +1,5 @@ ---- freeradius-server-2.1.7.orig/src/modules/rlm_eap/Makefile.in 2009-09-14 16:43:29.000000000 +0200 -+++ freeradius-server-2.1.7/src/modules/rlm_eap/Makefile.in 2009-11-19 22:37:45.000000000 +0100 +--- freeradius-server-2.1.8.orig/src/modules/rlm_eap/Makefile.in 2009-12-30 16:44:35.000000000 +0100 ++++ freeradius-server-2.1.8/src/modules/rlm_eap/Makefile.in 2010-02-05 20:33:01.401922559 +0100 @@ -37,7 +37,7 @@ radeapclient.lo: radeapclient.c $(HEADER install-subdirs: diff --git a/package/freetype/Makefile b/package/freetype/Makefile index 6acb8c2da..eab453ba6 100644 --- a/package/freetype/Makefile +++ b/package/freetype/Makefile @@ -22,12 +22,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBFREETYPE,libfreetype,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBFREETYPE}/usr/lib - ${CP} ${WRKINST}/usr/lib/libfreetype.so.* ${IDIR_LIBFREETYPE}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libfreetype.so* ${IDIR_LIBFREETYPE}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/frickin/Makefile b/package/frickin/Makefile index e43d5d0eb..0c16037a8 100644 --- a/package/frickin/Makefile +++ b/package/frickin/Makefile @@ -15,7 +15,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FRICKIN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_FRICKIN}/usr/sbin diff --git a/package/frickin/patches/patch-Makefile b/package/frickin/patches/patch-Makefile new file mode 100644 index 000000000..eb8052f4f --- /dev/null +++ b/package/frickin/patches/patch-Makefile @@ -0,0 +1,9 @@ +--- frickin-1.3.orig/Makefile 2004-10-13 18:24:56.000000000 +0200 ++++ frickin-1.3/Makefile 2010-02-05 19:12:36.101852925 +0100 +@@ -1,5 +1,5 @@ + #CFLAGS = -g -Wall +-CFLAGS = -O3 -Wall ++CFLAGS ?= -O3 -Wall + + all: frickin + diff --git a/package/frickin/patches/patch-src_Makefile b/package/frickin/patches/patch-src_Makefile new file mode 100644 index 000000000..97e0adf86 --- /dev/null +++ b/package/frickin/patches/patch-src_Makefile @@ -0,0 +1,9 @@ +--- frickin-1.3.orig/src/Makefile 2004-10-13 18:24:56.000000000 +0200 ++++ frickin-1.3/src/Makefile 2010-02-05 19:13:44.344334596 +0100 +@@ -1,5 +1,5 @@ + #CFLAGS = -g3 -Wall +-CFLAGS = -O3 -Wall ++CFLAGS ?= -O3 -Wall + + all: frickin + diff --git a/package/frickin/patches/patch-src_main_c b/package/frickin/patches/patch-src_main_c new file mode 100644 index 000000000..8a893d3c0 --- /dev/null +++ b/package/frickin/patches/patch-src_main_c @@ -0,0 +1,20 @@ +--- frickin-1.3.orig/src/main.c 2005-05-31 16:51:36.000000000 +0200 ++++ frickin-1.3/src/main.c 2010-02-05 19:12:23.654334206 +0100 +@@ -259,7 +259,7 @@ int _connect_to_server() + { + SIN sin; + +- bzero(&sin, sizeof(SIN)); ++ memset(&sin, 0, sizeof(SIN)); + sin.sin_family = AF_INET; + sin.sin_port = htons(PPTP_PORT); + sin.sin_addr.s_addr = inet_addr(g_target_ip); +@@ -713,7 +713,7 @@ int main(int argc, char **argv) + { + SIN sin; + +- bzero(&sin, sizeof(SIN)); ++ memset(&sin, 0, sizeof(SIN)); + sin.sin_family = AF_INET; + sin.sin_port = htons(PPTP_PORT); + sin.sin_addr.s_addr = inet_addr(g_listen_ip); diff --git a/package/fuse/Makefile b/package/fuse/Makefile index 692427867..f2682d4aa 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -17,7 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FUSE_UTILS,fuse-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --enable-lib \ --disable-shared \ --enable-static \ @@ -26,8 +25,6 @@ CONFIGURE_ARGS+= --enable-lib \ --disable-auto-modprobe \ --disable-mtab \ --disable-kernel-module -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog post-install: ${INSTALL_DIR} ${IDIR_FUSE_UTILS}/usr/bin diff --git a/package/gatling/Makefile b/package/gatling/Makefile index cb1c48188..38a1afcb8 100644 --- a/package/gatling/Makefile +++ b/package/gatling/Makefile @@ -20,7 +20,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GATLING,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FILE:= GNUmakefile ALL_TARGET:= gatling TCPPFLAGS+= -I${STAGING_DIR}/usr/include/owfat diff --git a/package/gawk/Makefile b/package/gawk/Makefile index e47aad514..a4d1bbb03 100644 --- a/package/gawk/Makefile +++ b/package/gawk/Makefile @@ -17,9 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GAWK,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIGURE_ARGS+= --disable-libsigsegv -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_GAWK}/usr/bin diff --git a/package/gcc/Makefile b/package/gcc/Makefile index 4e613efef..534395d7a 100644 --- a/package/gcc/Makefile +++ b/package/gcc/Makefile @@ -18,7 +18,6 @@ $(eval $(call PKG_template,GCC,gcc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS}, TCFLAGS:= '' TCPPFLAGS:= '' -CONFIGURE_STYLE:= gnu ifeq ($(ADK_LINUX_MIPS64_LEMOTE),y) CONFIGURE_ARGS+= --with-abi=64 endif @@ -37,8 +36,6 @@ CONFIGURE_ARGS+= --enable-languages=c,c++ \ --disable-libgomp \ --disable-multilib \ --disable-libstdcxx-pch -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin diff --git a/package/gdb/Makefile b/package/gdb/Makefile index 86152fced..e01721222 100644 --- a/package/gdb/Makefile +++ b/package/gdb/Makefile @@ -15,14 +15,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GDB,gdb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TCFLAGS+= ${TCPPFLAGS} -fPIC -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --without-uiout --enable-gdbmi \ --disable-tui --disable-gdbtk --without-x \ --without-included-gettext --disable-sim \ --enable-threads --with-curses --disable-werror \ --enable-static -BUILD_STYLE= auto -INSTALL_STYLE= auto XAKE_FLAGS+= LDFLAGS='${TLDFLAGS}' post-install: diff --git a/package/gdbm/Makefile b/package/gdbm/Makefile index d1d001112..fcef44550 100644 --- a/package/gdbm/Makefile +++ b/package/gdbm/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= gdbm PKG_VERSION:= 1.8.3 PKG_RELEASE:= 1 PKG_MD5SUM:= 1d1b1d5c0245b1c00aff92da751e9aa1 -PKG_DESCR:= disk file format database which stores key/data-pairs in single files +PKG_DESCR:= disk file format database PKG_SECTION:= libs PKG_URL:= http://www.gnu.org/software/gdbm PKG_SITES:= ${MASTER_SITE_GNU:=gdbm/} @@ -16,15 +16,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBGDBM,libgdbm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto XAKE_FLAGS+= BINOWN=`id -u` \ BINGRP=`id -g` \ INSTALL_ROOT="${WRKINST}" post-install: ${INSTALL_DIR} ${IDIR_LIBGDBM}/usr/lib - ${CP} ${WRKINST}/usr/lib/libgdbm.so.* ${IDIR_LIBGDBM}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libgdbm.so* ${IDIR_LIBGDBM}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/gdbserver/Makefile b/package/gdbserver/Makefile index 8b6034b43..cfbed5260 100644 --- a/package/gdbserver/Makefile +++ b/package/gdbserver/Makefile @@ -14,10 +14,6 @@ WRKSRC= ${WRKDIST}/gdb/gdbserver $(eval $(call PKG_template,GDBSERVER,gdbserver,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_GDBSERVER}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/gdbserver ${IDIR_GDBSERVER}/usr/bin/ diff --git a/package/gettext/Makefile b/package/gettext/Makefile index 0a06b3f32..4ef29852e 100644 --- a/package/gettext/Makefile +++ b/package/gettext/Makefile @@ -13,6 +13,7 @@ PKG_DEPENDS:= libiconv libpthread PKG_BUILDDEP+= libiconv libpthread PKG_URL:= http://www.gnu.org/software/gettext/ PKG_SITES:= ${MASTER_SITE_GNU:=gettext/} + ifeq ($(ADK_STATIC),y) PKG_OPTS:= libonly endif @@ -23,7 +24,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GETTEXT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-java \ --disable-native-java \ --disable-csharp \ @@ -37,8 +37,6 @@ CONFIGURE_ARGS+= --disable-java \ CONFIGURE_ENV+= nls_cv_use_gnu_gettext=yes \ ac_cv_gnu_library_2=no \ gt_use_preinstalled_gnugettext=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_GETTEXT}/usr/lib diff --git a/package/git/Makefile b/package/git/Makefile index 1e38b5099..171f857d8 100644 --- a/package/git/Makefile +++ b/package/git/Makefile @@ -21,13 +21,10 @@ $(eval $(call PKG_template,GIT,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_D MAKE_ENV+= NO_PERL=1 NO_NSEC=1 NO_TCLTK=1 \ NO_CROSS_DIRECTORY_HARDLINKS=1 \ CURLDIR=${STAGING_DIR} EXPATDIR=${STAGING_DIR} -XAKE_FLAGS+= V=1 uname_S=Linux uname_O=GNU/Linux -CONFIGURE_STYLE:= gnu +XAKE_FLAGS+= uname_S=Linux uname_O=GNU/Linux CONFIGURE_ENV+= ac_cv_c_c99_format=yes \ ac_cv_fread_reads_directories=no \ ac_cv_snprintf_returns_bogus=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_GIT)/usr/bin $(IDIR_GIT)/usr/sbin/git-core diff --git a/package/gkrellmd/Makefile b/package/gkrellmd/Makefile index 51daec7b3..65b9b9fd8 100644 --- a/package/gkrellmd/Makefile +++ b/package/gkrellmd/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= gkrellmd PKG_VERSION:= 2.3.2 PKG_RELEASE:= 1 -PKG_BUILDDEP+= glib PKG_MD5SUM:= db8a983a60577a6b4886db96d6def011 PKG_DESCR:= The GNU Krell Monitors Server PKG_SECTION:= net PKG_DEPENDS:= glib libpthread +PKG_BUILDDEP+= glib PKG_URL:= http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html PKG_SITES:= http://members.dslextreme.com/users/billw/gkrellm/ @@ -21,7 +21,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GKRELLMD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_GKRELLMD}/usr/bin ${IDIR_GKRELLMD}/etc diff --git a/package/glib/Makefile b/package/glib/Makefile index a2e5a3fc2..8d1430ea7 100644 --- a/package/glib/Makefile +++ b/package/glib/Makefile @@ -6,13 +6,14 @@ include ${TOPDIR}/rules.mk PKG_NAME:= glib PKG_VERSION:= 2.22.2 PKG_RELEASE:= 1 -PKG_BUILDDEP+= gettext libiconv PKG_MD5SUM:= 00eb873975e2ef9361b8177131c7c943 PKG_DESCR:= low-level core library that forms the basis of GTK+ PKG_SECTION:= libs PKG_DEPENDS:= gettext libiconv libpthread +PKG_BUILDDEP+= gettext libiconv PKG_URL:= http://www.gtk.org/ PKG_SITES:= ftp://ftp.gtk.org/pub/glib/2.22/ + ifeq ($(ADK_STATIC),y) PKG_OPTS:= libonly endif @@ -21,7 +22,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GLIB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-debug=no \ --disable-mem-pools \ --disable-rebuilds \ @@ -34,11 +34,13 @@ CONFIGURE_ENV+= glib_cv_long_long_format=ll \ glib_cv_uscore=no \ ac_cv_func_posix_getpwuid_r=yes \ ac_cv_func_posix_getgrgid_r=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_GLIB}/usr/lib - ${CP} ${WRKINST}/usr/lib/lib*.so.* ${IDIR_GLIB}/usr/lib + ${CP} ${WRKINST}/usr/lib/libgio*.so* ${IDIR_GLIB}/usr/lib + ${CP} ${WRKINST}/usr/lib/libglib*.so* ${IDIR_GLIB}/usr/lib + ${CP} ${WRKINST}/usr/lib/libgobject*.so* ${IDIR_GLIB}/usr/lib + ${CP} ${WRKINST}/usr/lib/libgmodule*.so* ${IDIR_GLIB}/usr/lib + ${CP} ${WRKINST}/usr/lib/libgthread*.so* ${IDIR_GLIB}/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/glibc/Makefile b/package/glibc/Makefile index 27f5baafc..ddda531a9 100644 --- a/package/glibc/Makefile +++ b/package/glibc/Makefile @@ -30,6 +30,10 @@ GLIBC_CONFOPTS:= \ $(eval $(call PKG_template,GLIBC,glibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,GLIBC_DEV,glibc-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + SUB_INSTALLS-y:= SUB_INSTALLS-m:= SUB_INSTALLS-${ADK_PACKAGE_GLIBC_DEV}+= glibc-dev-install diff --git a/package/gmediaserver/Makefile b/package/gmediaserver/Makefile index eb38904cd..11b830abe 100644 --- a/package/gmediaserver/Makefile +++ b/package/gmediaserver/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= gmediaserver PKG_VERSION:= 0.13.0 PKG_RELEASE:= 1 -PKG_BUILDDEP+= id3lib libupnp PKG_MD5SUM:= c422de386331e2a1a859d45f6fa270a3 PKG_DESCR:= An UPnP music media server PKG_SECTION:= net PKG_DEPENDS:= id3lib libupnp +PKG_BUILDDEP+= id3lib libupnp PKG_URL:= http://www.gnu.org/software/gmediaserver PKG_SITES:= http://savannah.nongnu.org/download/gmediaserver/ @@ -18,13 +18,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GMEDIASERVER,gmediaserver,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ENV+= LIBS=" -lixml -lthreadutil -lupnp -lz" \ am_cv_func_iconv=no CONFIGURE_ARGS+= --with-id3lib="${STAGING_DIR}/usr" \ --with-libupnp="${STAGING_DIR}/usr" -BUILD_STYLE= auto -INSTALL_STYLE= auto ifeq ($(ADK_TARGET_LIB_UCLIBCXX),y) CONFIGURE_ENV+= LIBS=" -lixml -lthreadutil -lupnp -luClibc++ -lz" @@ -32,6 +29,7 @@ endif post-install: ${INSTALL_DIR} ${IDIR_GMEDIASERVER}/usr/sbin - ${INSTALL_BIN} ${WRKINST}/usr/bin/gmediaserver ${IDIR_GMEDIASERVER}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/gmediaserver \ + ${IDIR_GMEDIASERVER}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/gmp/Makefile b/package/gmp/Makefile index e3e0c7d0d..b7e6c2e82 100644 --- a/package/gmp/Makefile +++ b/package/gmp/Makefile @@ -12,12 +12,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBGMP,libgmp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBGMP}/usr/lib - ${CP} ${WRKINST}/usr/lib/libgmp.so.* ${IDIR_LIBGMP}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libgmp.so* ${IDIR_LIBGMP}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/gnupg/Makefile b/package/gnupg/Makefile index 0a14439f5..950b1ffbe 100644 --- a/package/gnupg/Makefile +++ b/package/gnupg/Makefile @@ -18,9 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GNUPG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -CONFIGURE_ENV+= ac_cv_c_bigendian=no \ - ac_cv_sizeof_off_t=8 CONFIGURE_ARGS+= --disable-asm \ --disable-gnupg-iconv \ --disable-card-support \ @@ -34,11 +31,13 @@ CONFIGURE_ARGS+= --disable-asm \ --disable-dns-srv \ --enable-fake-curl \ --disable-regex -BUILD_STYLE:= auto -do-install: +post-install: ${INSTALL_DIR} ${IDIR_GNUPG}/usr/bin/ - ${INSTALL_BIN} ${WRKBUILD}/g10/gpg ${IDIR_GNUPG}/usr/bin/ + ${INSTALL_DIR} ${IDIR_GNUPG}/usr/share/gnupg + ${INSTALL_DATA} ${WRKINST}/usr/share/gnupg/options.skel \ + ${IDIR_GNUPG}/usr/share/gnupg + ${INSTALL_BIN} ${WRKINST}/usr/bin/gpg ${IDIR_GNUPG}/usr/bin/ # we need root privileges for secure memory (locked pages) chmod u+s ${IDIR_GNUPG}/usr/bin/gpg diff --git a/package/gnutls/Makefile b/package/gnutls/Makefile index 603e67cc9..4745d1594 100644 --- a/package/gnutls/Makefile +++ b/package/gnutls/Makefile @@ -26,13 +26,10 @@ $(eval $(call PKG_template,GNUTLS_UTILS,gnutls-utils,${PKG_VERSION}-${PKG_RELEAS $(eval $(call PKG_template,LIBGNUTLS_EXTRA,libgnutls-extra,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBGNUTLS_OPENSSL,libgnutls-openssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-libopencdk-prefix \ --disable-camellia \ --with-libgcrypt-prefix=${STAGING_DIR}/usr \ --without-libz-prefix -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBGNUTLS}/usr/lib diff --git a/package/gperf/Makefile b/package/gperf/Makefile index da90d16b8..eb6045495 100644 --- a/package/gperf/Makefile +++ b/package/gperf/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GPERF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_GPERF}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/gperf ${IDIR_GPERF}/usr/bin diff --git a/package/gpm/Makefile b/package/gpm/Makefile index 8058b82a6..2b2866ef0 100644 --- a/package/gpm/Makefile +++ b/package/gpm/Makefile @@ -16,10 +16,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GPM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu TCFLAGS+= -I${WRKSRC}/src/headers -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_GPM}/usr/sbin ${IDIR_GPM}/usr/lib diff --git a/package/gpsd/Makefile b/package/gpsd/Makefile index 6adea4d87..8b88305da 100644 --- a/package/gpsd/Makefile +++ b/package/gpsd/Makefile @@ -21,7 +21,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GPSD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,GPSD_CLIENTS,gpsd-clients,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= EGREP="grep -E" \ CPP="$(TARGET_CC) -E" \ ac_cv_func_strlcpy=no \ @@ -30,8 +29,6 @@ CONFIGURE_ENV+= EGREP="grep -E" \ # --disable-python breaks configure script CONFIGURE_ARGS+= --without-x \ --disable-dbus -BUILD_STYLE= auto -INSTALL_STYLE= auto ifeq ($(ADK_COMPILE_GPSD_WITH_UCLIBCXX),y) TCXXFLAGS+= -fno-builtin -fno-rtti -nostdinc++ \ diff --git a/package/grub-bin/Makefile b/package/grub-bin/Makefile index 0ae841ec6..f7ae5c08b 100644 --- a/package/grub-bin/Makefile +++ b/package/grub-bin/Makefile @@ -22,6 +22,8 @@ $(eval $(call PKG_template,GRUB_BIN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ PKGDFLT_GRUB_BIN= y +CONFIG_STYLE:= manual +BUILD_STYLE:= manual INSTALL_STYLE:= manual do-install: diff --git a/package/grub/Makefile b/package/grub/Makefile index 894910f16..37d20708a 100644 --- a/package/grub/Makefile +++ b/package/grub/Makefile @@ -19,13 +19,10 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,GRUB,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-grub-emu \ --disable-efiemu \ --disable-grub-mkfont \ --disable-grub-fstest -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} $(IDIR_GRUB)/usr/{sbin,lib,bin} diff --git a/package/gsm/Makefile b/package/gsm/Makefile index 308c174c9..ef5beb10b 100644 --- a/package/gsm/Makefile +++ b/package/gsm/Makefile @@ -23,14 +23,14 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBGSM,libgsm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,GSM_UTILS,gsm-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION})) +CONFIG_STYLE:= manual + XAKE_FLAGS+= COPTS="${TARGET_CFLAGS} -fPIC" \ INSTALL_ROOT="${WRKINST}" -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_LIBGSM}/usr/lib - ${CP} ${WRKINST}/usr/lib/libgsm.so.1.0.10 ${IDIR_LIBGSM}/usr/lib + ${CP} ${WRKINST}/usr/lib/libgsm.so* ${IDIR_LIBGSM}/usr/lib ${INSTALL_DIR} ${IDIR_GSM_UTILS}/usr/bin ${CP} ${WRKINST}/usr/bin/toast ${IDIR_GSM_UTILS}/usr/bin diff --git a/package/gtk+/Makefile b/package/gtk+/Makefile index 45e00ca4a..95ed06d3c 100644 --- a/package/gtk+/Makefile +++ b/package/gtk+/Makefile @@ -4,15 +4,16 @@ include ${TOPDIR}/rules.mk PKG_NAME:= gtk+ -PKG_VERSION:= 2.18.3 +PKG_VERSION:= 2.18.6 PKG_RELEASE:= 1 -PKG_BUILDDEP+= cairo atk pango libXext renderproto libXrender -PKG_MD5SUM:= 8b34f75642ff6cc783dfa7e3af0ba443 +PKG_MD5SUM:= f98617af9f6be3065f64248f78dae2b7 PKG_DESCR:= GTK+ library PKG_SECTION:= libs PKG_DEPENDS:= glib +PKG_BUILDDEP+= cairo atk pango libXext renderproto libXrender PKG_URL:= http://www.gtk.org/ PKG_SITES:= http://ftp.gnome.org/pub/gnome/sources/gtk+/2.18/ + ifeq ($(ADK_STATIC),y) PKG_OPTS:= libonly endif @@ -21,13 +22,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GTK,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= gio_can_sniff=no \ ac_cv_path_GTK_UPDATE_ICON_CACHE="" CONFIGURE_ARGS+= --without-libtiff \ --without-libjpeg -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_GTK}/usr/lib diff --git a/package/haserl/Makefile b/package/haserl/Makefile index 59c1f6d0c..8a44ad07f 100644 --- a/package/haserl/Makefile +++ b/package/haserl/Makefile @@ -17,9 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,HASERL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TCFLAGS+= -DMAX_UPLOAD_KB=8192 -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_HASERL}/usr/bin diff --git a/package/hdparm/Makefile b/package/hdparm/Makefile index 2e8921870..ab2e42d6a 100644 --- a/package/hdparm/Makefile +++ b/package/hdparm/Makefile @@ -14,10 +14,9 @@ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=hdparm/} include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,HDPARM,hdparm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,HDPARM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -MAKE_ENV+= STRIP=${TARGET_CROSS}strip -BUILD_STYLE= auto +CONFIG_STYLE:= manual post-install: ${INSTALL_DIR} ${IDIR_HDPARM}/usr/sbin diff --git a/package/hdparm/patches/patch-Makefile b/package/hdparm/patches/patch-Makefile new file mode 100644 index 000000000..26a759821 --- /dev/null +++ b/package/hdparm/patches/patch-Makefile @@ -0,0 +1,19 @@ +--- hdparm-9.15.orig/Makefile 2008-12-10 01:14:28.000000000 +0100 ++++ hdparm-9.15/Makefile 2010-02-05 22:40:21.943083430 +0100 +@@ -13,7 +13,7 @@ oldmandir = $(manprefix)/man + CC ?= gcc + STRIP ?= strip + +-CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS) ++CFLAGS ?= -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS) + + #LDFLAGS = -s -static + LDFLAGS = -s +@@ -28,7 +28,6 @@ all: hdparm + + hdparm: hdparm.h sgio.h $(OBJS) + $(CC) $(LDFLAGS) -o hdparm $(OBJS) +- $(STRIP) hdparm + + hdparm.o: hdparm.h sgio.h + diff --git a/package/heimdal/Makefile b/package/heimdal/Makefile index b7ac0e376..96e1e2406 100644 --- a/package/heimdal/Makefile +++ b/package/heimdal/Makefile @@ -9,6 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 6e5028077e2a6b101a4a72801ba71b9e PKG_DESCR:= Kerberos 5 server PKG_SECTION:= net +PKG_NOPARALLEL:= 1 PKG_DEPENDS:= libheimdal libheimdal-client libncurses libcom-err PKG_BUILDDEP+= openssl ncurses e2fsprogs ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_BDB},y) @@ -73,11 +74,8 @@ endif TCFLAGS+= -I${STAGING_DIR}/usr/include/et -pthread -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= ${CONFIGURE_OPTS} CONFIGURE_ENV+= ac_cv_func_getaddrinfo_numserv=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto ifeq ($(ADK_HOST_CYGWIN),y) EXEEXT:= .exe @@ -96,6 +94,8 @@ pre-configure: ${STAGING_TOOLS}/bin ${INSTALL_BIN} ${WRKBUILD}/lib/sl/slc$(EXEEXT) \ ${STAGING_TOOLS}/bin + ${MAKE} -C ${WRKBUILD}/lib/asn1 clean + ${MAKE} -C ${WRKBUILD}/lib/roken clean ${MAKE} -C ${WRKBUILD} clean post-install: diff --git a/package/heyu/Makefile b/package/heyu/Makefile index bef18a7e7..78ab5e17e 100644 --- a/package/heyu/Makefile +++ b/package/heyu/Makefile @@ -19,8 +19,14 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,HEYU,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -do-build: +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + +do-configure: (cd ${WRKBUILD} && ${BASH} ./Configure linux); + +do-build: ${MAKE} -C ${WRKBUILD} \ CC="${TARGET_CC}" LD=${TARGET_CROSS}ld \ CFLAGS="${TARGET_CFLAGS} -I${WRKBUILD} -DSYSV -DPOSIX -DHAS_ITIMER -DLINUX -DHASSELECT -DHASTZ" diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index 29827f7c9..0b8a93464 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -21,7 +21,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,HOSTAPD,hostapd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,HOSTAPD_UTILS,hostapd-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual do-configure: ${CP} ./files/hostapd.config ${WRKBUILD}/.config diff --git a/package/htpdate/Makefile b/package/htpdate/Makefile index e8dbe39f3..39fcc7c9b 100644 --- a/package/htpdate/Makefile +++ b/package/htpdate/Makefile @@ -4,23 +4,22 @@ include ${TOPDIR}/rules.mk PKG_NAME:= htpdate -PKG_VERSION:= 1.0.3 +PKG_VERSION:= 1.0.4 PKG_RELEASE:= 1 -PKG_MD5SUM:= 82953fe72d2f40411585222f85f2afab +PKG_MD5SUM:= a3da5ad8965345eb734695c765010acf PKG_DESCR:= an HTP (Hypertext Time Protocol) implementation PKG_SECTION:= net -PKG_URL:= http://www.clevervest.com/twiki/bin/view/HTP +PKG_URL:= http://www.vervest.org/htp/ PKG_SITES:= http://www.clevervest.com/htp/archive/c/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,HTPDATE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE= auto +CONFIG_STYLE:= manual -do-install: +post-install: ${INSTALL_DIR} ${IDIR_HTPDATE}/usr/sbin ${INSTALL_BIN} ${WRKBUILD}/htpdate ${IDIR_HTPDATE}/usr/sbin/ - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/htpdate/patches/patch-Makefile b/package/htpdate/patches/patch-Makefile index 46b1a9cef..9afe7bc70 100644 --- a/package/htpdate/patches/patch-Makefile +++ b/package/htpdate/patches/patch-Makefile @@ -1,14 +1,35 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- htpdate-1.0.3.orig/Makefile 2008-09-02 22:24:09.000000000 +0200 -+++ htpdate-1.0.3/Makefile 2009-05-29 14:24:39.045810534 +0200 +--- htpdate-1.0.4.orig/Makefile 2008-10-13 21:04:08.000000000 +0200 ++++ htpdate-1.0.4/Makefile 2010-02-05 22:49:58.954334284 +0100 @@ -2,8 +2,8 @@ prefix = /usr bindir = ${prefix}/bin mandir = ${prefix}/share/man -CC = gcc --CFLAGS += -Wall -pedantic -ansi -O2 +-CFLAGS += -Wall -O2 +CC ?= gcc -+CFLAGS ?= -Wall -pedantic -ansi -O2 - #CFLAGS += -Wall -ansi -O2 ++CFLAGS ?= -Wall -O2 + #CFLAGS += -Wall -pedantic -ansi -O2 INSTALL = /usr/bin/install -c +@@ -15,15 +15,14 @@ htpdate: htpdate.c + $(CC) $(CFLAGS) -o htpdate htpdate.c + + install: all +- $(STRIP) htpdate +- mkdir -p $(bindir) +- $(INSTALL) -m 755 htpdate $(bindir)/htpdate +- mkdir -p $(mandir)/man8 +- $(INSTALL) -m 644 htpdate.8.gz $(mandir)/man8/htpdate.8.gz ++ mkdir -p $(DESTDIR)$(bindir) ++ $(INSTALL) -m 755 htpdate $(DESTDIR)$(bindir)/htpdate ++ mkdir -p $(DESTDIR)$(mandir)/man8 ++ $(INSTALL) -m 644 htpdate.8.gz $(DESTDIR)$(mandir)/man8/htpdate.8.gz + + clean: + rm -rf htpdate + + uninstall: +- rm -rf $(bindir)/htpdate +- rm -rf $(mandir)/man8/htpdate.8.gz ++ rm -rf $(DESTDIR)$(bindir)/htpdate ++ rm -rf $(DESTDIR)$(mandir)/man8/htpdate.8.gz diff --git a/package/htpdate/patches/patch-htpdate_c b/package/htpdate/patches/patch-htpdate_c index 6dec28424..c8294b11c 100644 --- a/package/htpdate/patches/patch-htpdate_c +++ b/package/htpdate/patches/patch-htpdate_c @@ -1,7 +1,6 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- htpdate-1.0.3.orig/htpdate.c 2008-09-02 22:24:09.000000000 +0200 -+++ htpdate-1.0.3/htpdate.c 2009-05-29 14:28:27.252071728 +0200 -@@ -351,6 +351,7 @@ static int setclock( double timedelta, i +--- htpdate-1.0.4.orig/htpdate.c 2008-10-13 21:04:08.000000000 +0200 ++++ htpdate-1.0.4/htpdate.c 2010-02-05 22:48:28.624323989 +0100 +@@ -353,6 +353,7 @@ static int setclock( double timedelta, i } @@ -9,15 +8,16 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ static int htpdate_adjtimex( double drift ) { struct timex tmx; long freq; -@@ -379,6 +380,7 @@ static int htpdate_adjtimex( double drif +@@ -381,7 +382,7 @@ static int htpdate_adjtimex( double drif } } +- +#endif - static void showhelp() { -@@ -404,7 +406,6 @@ Usage: htpdate [-046abdhlqstxD] [-i pid + puts("htpdate version "VERSION"\n\ +@@ -406,7 +407,6 @@ Usage: htpdate [-046abdhlqstxD] [-i pid -s set time\n\ -t turn off sanity time check\n\ -u run daemon as user\n\ @@ -25,7 +25,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ host web server hostname or ip address (maximum of 16)\n\ port port number (default 80 and 8080 for proxy server)\n"); -@@ -584,9 +585,11 @@ int main( int argc, char *argv[] ) { +@@ -586,9 +586,11 @@ int main( int argc, char *argv[] ) { } } break; @@ -37,7 +37,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ case 'D': /* run as daemon */ daemonize = 1; logmode = 1; -@@ -777,6 +780,7 @@ int main( int argc, char *argv[] ) { +@@ -779,6 +781,7 @@ int main( int argc, char *argv[] ) { printlog( 0, "Drift %.2f PPM, %.2f s/day", \ drift*1e6, drift*86400 ); @@ -45,7 +45,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ /* Adjust system clock */ if ( setmode == 3 ) { starttime = time(NULL); -@@ -787,6 +791,7 @@ int main( int argc, char *argv[] ) { +@@ -789,6 +792,7 @@ int main( int argc, char *argv[] ) { /* Drop root privileges again */ if ( sw_uid ) seteuid( sw_uid ); } diff --git a/package/httping/Makefile b/package/httping/Makefile index 7d4e0b754..7f0d6add6 100644 --- a/package/httping/Makefile +++ b/package/httping/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= httping -PKG_VERSION:= 1.3.0 +PKG_VERSION:= 1.4.1 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl -PKG_MD5SUM:= 41c912a9ecc904e51d7260053fc2195c +PKG_MD5SUM:= bde1ff3c01343d2371d8f34fbf8a1d9a PKG_DESCR:= Httping is like 'ping' but for http-requests PKG_SECTION:= net PKG_DEPENDS:= libopenssl +PKG_BUILDDEP+= openssl PKG_SITES:= http://www.vanheusden.com/httping/ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz @@ -19,11 +19,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,HTTPING,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -MAKE_FLAGS+= STAGING_DIR=${STAGING_DIR} -BUILD_STYLE:= auto +CONFIG_STYLE:= manual -do-install: - ${INSTALL_DIR} ${IDIR_HTTPING}/usr/sbin - ${CP} ${WRKBUILD}/${PKG_NAME} ${IDIR_HTTPING}/usr/sbin/ +post-install: + ${INSTALL_DIR} ${IDIR_HTTPING}/usr/bin + ${CP} ${WRKINST}/usr/bin/httping ${IDIR_HTTPING}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/httping/patches/patch-Makefile b/package/httping/patches/patch-Makefile deleted file mode 100644 index 89099b868..000000000 --- a/package/httping/patches/patch-Makefile +++ /dev/null @@ -1,14 +0,0 @@ -$Id$ ---- httping-1.2.3.orig/Makefile 2007-05-01 14:05:43.000000000 +0000 -+++ httping-1.2.3/Makefile 2007-06-20 14:19:59.000000000 +0000 -@@ -15,8 +15,8 @@ - include version - - DEBUG=-g # -D_DEBUG --LDFLAGS+=-lssl -lcrypto $(DEBUG) --CFLAGS+=-O2 -Wall -DVERSION=\"$(VERSION)\" $(DEBUG) -+LDFLAGS+=-lssl -lcrypto $(DEBUG) -L$(STAGING_DIR)/usr/lib -+CFLAGS+=-O2 -Wall -DVERSION=\"$(VERSION)\" $(DEBUG) -I$(STAGING_DIR)/usr/include - - OBJS=mem.o http.o io.o str.o error.o utils.o main.o tcp.o mssl.o res.o - diff --git a/package/httping/patches/patch-io_c b/package/httping/patches/patch-io_c deleted file mode 100644 index b1ac1166b..000000000 --- a/package/httping/patches/patch-io_c +++ /dev/null @@ -1,12 +0,0 @@ -$Id$ ---- httping-1.2.3.orig/io.c 2007-05-01 14:05:43.000000000 +0000 -+++ httping-1.2.3/io.c 2007-06-20 14:19:11.000000000 +0000 -@@ -37,7 +37,7 @@ ssize_t myread(int fd, char *whereto, si - struct timeval to; - fd_set rfds; - -- FD_ZERO(&rfds); -+ //FD_ZERO(&rfds); - FD_SET(fd, &rfds); - - to.tv_sec = timeout / 1000; diff --git a/package/httping/patches/patch-str_c b/package/httping/patches/patch-str_c deleted file mode 100644 index 8778ef40b..000000000 --- a/package/httping/patches/patch-str_c +++ /dev/null @@ -1,16 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- httping-1.3.0.orig/str.c 2009-02-18 16:32:43.000000000 +0100 -+++ httping-1.3.0/str.c 2009-06-01 21:31:19.000000000 +0200 -@@ -18,6 +18,7 @@ - #include "mem.h" - #include "utils.h" - -+/* - #ifndef strndup - char *strndup(char *in, int size) - { -@@ -29,3 +30,4 @@ char *strndup(char *in, int size) - return out; - } - #endif -+*/ diff --git a/package/httping/patches/patch-str_h b/package/httping/patches/patch-str_h deleted file mode 100644 index c7b81ed65..000000000 --- a/package/httping/patches/patch-str_h +++ /dev/null @@ -1,12 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- httping-1.3.0.orig/str.h 2009-02-18 16:32:43.000000000 +0100 -+++ httping-1.3.0/str.h 2009-06-01 21:30:39.000000000 +0200 -@@ -15,6 +15,8 @@ - - #include - -+/* - #ifndef strndup - char *strndup(char *in, int size); - #endif -+*/ diff --git a/package/httptunnel/Makefile b/package/httptunnel/Makefile index 4d4171d30..8df81f557 100644 --- a/package/httptunnel/Makefile +++ b/package/httptunnel/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,HTTPTUNNEL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: ${INSTALL_DIR} ${IDIR_HTTPTUNNEL}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/hts ${IDIR_HTTPTUNNEL}/usr/bin/ diff --git a/package/icecast/Makefile b/package/icecast/Makefile index fe9d193ca..9428af1df 100644 --- a/package/icecast/Makefile +++ b/package/icecast/Makefile @@ -18,8 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ICECAST,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +AUTOTOOL_STYLE:= autotool + TCPPFLAGS+= -I${STAGING_DIR}/usr/include/libxml2 -CONFIGURE_STYLE= autotool gnu CONFIGURE_ARGS+= --disable-yp \ --with-curl="yes" \ --with-curl-config="${STAGING_DIR}/usr/bin/curl-config" \ @@ -28,8 +29,6 @@ CONFIGURE_ARGS+= --disable-yp \ --with-speex="no" \ --with-theora="no" \ --with-xslt-config="${STAGING_DIR}/usr/bin/xslt-config" -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_ICECAST}/etc @@ -37,7 +36,9 @@ post-install: ${INSTALL_DIR} ${IDIR_ICECAST}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/icecast ${IDIR_ICECAST}/usr/bin/ ${INSTALL_DIR} ${IDIR_ICECAST}/usr/share/icecast - ${CP} ${WRKINST}/usr/share/icecast/admin ${IDIR_ICECAST}/usr/share/icecast/ - ${CP} ${WRKINST}/usr/share/icecast/web ${IDIR_ICECAST}/usr/share/icecast/ + ${CP} ${WRKINST}/usr/share/icecast/admin \ + ${IDIR_ICECAST}/usr/share/icecast/ + ${CP} ${WRKINST}/usr/share/icecast/web \ + ${IDIR_ICECAST}/usr/share/icecast/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/icecast/patches/patch-m4_xiph_curl_m4 b/package/icecast/patches/patch-m4_xiph_curl_m4 index b88806380..5c6abbce6 100644 --- a/package/icecast/patches/patch-m4_xiph_curl_m4 +++ b/package/icecast/patches/patch-m4_xiph_curl_m4 @@ -1,4 +1,3 @@ -$Id$ --- icecast-2.3.2.orig/m4/xiph_curl.m4 2008-04-19 03:54:26.000000000 +0200 +++ icecast-2.3.2/m4/xiph_curl.m4 2008-08-29 12:34:17.000000000 +0200 @@ -52,7 +52,7 @@ AC_CHECK_HEADERS([curl/curl.h],, curl_ok diff --git a/package/id3lib/Makefile b/package/id3lib/Makefile index 5df274613..983ac7a1d 100644 --- a/package/id3lib/Makefile +++ b/package/id3lib/Makefile @@ -6,12 +6,12 @@ include ${TOPDIR}/rules.mk PKG_NAME:= id3lib PKG_VERSION:= 3.8.3 PKG_RELEASE:= 1 -PKG_BUILDDEP+= zlib libiconv -PKG_CXX:= ID3LIB PKG_MD5SUM:= 19f27ddd2dda4b2d26a559a4f0f402a7 PKG_DESCR:= An ID3v1/ID3v2 tagging library PKG_SECTION:= libs +PKG_CXX:= ID3LIB PKG_DEPENDS:= zlib libiconv +PKG_BUILDDEP+= zlib libiconv PKG_URL:= http://id3lib.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=id3lib/} @@ -20,10 +20,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ID3LIB,id3lib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TCFLAGS+= -fPIC -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-cxx-warnings=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto ifeq ($(ADK_COMPILE_ID3LIB_WITH_UCLIBCXX),y) TCXXFLAGS+= -fno-builtin -fno-rtti -nostdinc++ \ @@ -35,6 +32,6 @@ endif post-install: ${INSTALL_DIR} ${IDIR_ID3LIB}/usr/lib - ${CP} ${WRKINST}/usr/lib/libid3-*.so.* ${IDIR_ID3LIB}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libid3-*.so* ${IDIR_ID3LIB}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/iftop/Makefile b/package/iftop/Makefile index c6059a58b..374cf5410 100644 --- a/package/iftop/Makefile +++ b/package/iftop/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= iftop PKG_VERSION:= 0.17 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap libpthread ncurses PKG_MD5SUM:= 062bc8fb3856580319857326e0b8752d PKG_DESCR:= display bandwith usage on an interface PKG_SECTION:= net PKG_DEPENDS:= libncurses libpcap libpthread +PKG_BUILDDEP+= libpcap libpthread ncurses PKG_URL:= http://www.ex-parrot.com/~pdw/iftop PKG_SITES:= http://www.ex-parrot.com/~pdw/iftop/download/ @@ -18,10 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IFTOP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_IFTOP}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/sbin/iftop ${IDIR_IFTOP}/usr/bin/ diff --git a/package/igmpproxy/Makefile b/package/igmpproxy/Makefile index cfa09f93e..567b1c12f 100644 --- a/package/igmpproxy/Makefile +++ b/package/igmpproxy/Makefile @@ -18,13 +18,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IGMPPROXY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +TCFLAGS+= -std=gnu99 post-install: ${INSTALL_DIR} ${IDIR_IGMPPROXY}/usr/sbin ${IDIR_IGMPPROXY}/etc - ${INSTALL_BIN} ${WRKINST}/usr/sbin/${PKG_NAME} ${IDIR_IGMPPROXY}/usr/sbin/ - ${INSTALL_DATA} ${WRKINST}/etc/${PKG_NAME}.conf ${IDIR_IGMPPROXY}/etc + ${INSTALL_BIN} ${WRKINST}/usr/sbin/igmpproxy \ + ${IDIR_IGMPPROXY}/usr/sbin/ + ${INSTALL_DATA} ${WRKINST}/etc/igmpproxy.conf ${IDIR_IGMPPROXY}/etc include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/inputproto/Makefile b/package/inputproto/Makefile index c61a053f4..e9243c8cf 100644 --- a/package/inputproto/Makefile +++ b/package/inputproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 13d91739cf70a781f1db24d8d3677574 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ipcad/Makefile b/package/ipcad/Makefile index d238b86ab..342822d26 100644 --- a/package/ipcad/Makefile +++ b/package/ipcad/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ipcad PKG_VERSION:= 3.7.3 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap PKG_MD5SUM:= 125605249958894148ec26d3c88189f5 PKG_DESCR:= IP Cisco Accounting Daemon PKG_SECTION:= net PKG_DEPENDS:= libpcap +PKG_BUILDDEP+= libpcap PKG_URL:= http://lionet.info/ipcad PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=ipcad/} @@ -18,14 +18,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IPCAD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -CONFIGURE_ENV+= ac_cv_lib_nsl_inet_pton=no CONFIGURE_ARGS+= --with-ifst=linux \ --with-psrc=pcap \ --with-pcap-include="${STAGING_DIR}/usr/include" \ --with-pcap-libraries="${STAGING_DIR}/usr/lib" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto pre-build: touch $(WRKBUILD)/cfglex.c $(WRKBUILD)/cslex.c diff --git a/package/iperf/Makefile b/package/iperf/Makefile index 23231a8d6..2876f1464 100644 --- a/package/iperf/Makefile +++ b/package/iperf/Makefile @@ -6,21 +6,17 @@ include ${TOPDIR}/rules.mk PKG_NAME:= iperf PKG_VERSION:= 2.0.4 PKG_RELEASE:= 1 -PKG_CXX:= IPERF PKG_MD5SUM:= 8c5bc14cc2ea55f18f22afe3c23e3dcb PKG_DESCR:= Internet Protocol bandwidth measuring tool PKG_SECTION:= net +PKG_CXX:= IPERF PKG_DEPENDS:= libpthread PKG_URL:= http://sourceforge.net/projects/iperf PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=iperf/} include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,IPERF,iperf,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto +$(eval $(call PKG_template,IPERF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) ifeq ($(ADK_COMPILE_IPERF_WITH_UCLIBCXX),y) TCXXFLAGS+= -fno-builtin -fno-rtti -nostdinc++ diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile index a70b675b5..f65a61e2c 100644 --- a/package/iproute2/Makefile +++ b/package/iproute2/Makefile @@ -42,10 +42,7 @@ TCFLAGS+= -D_GNU_SOURCE XAKE_FLAGS+= CCOPTS="${TCFLAGS}" MFLAGS="CC=${TARGET_CC}" \ HOSTCFLAGS="-I${LINUX_HEADER_DIR}/include" -CONFIGURE_STYLE:= gnu CONFIGURE_FLAGS+= KERNEL_INCLUDE="${LINUX_DIR}/include" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto INSTALL_y:= INSTALL_m:= @@ -72,7 +69,8 @@ install-tc: install-tc-atm: ${INSTALL_DIR} ${IDIR_TC_ATM}/usr/lib/tc - ${INSTALL_DATA} ${WRKINST}/usr/lib/tc/q_atm.so ${IDIR_TC_ATM}/usr/lib/tc/ + ${INSTALL_DATA} ${WRKINST}/usr/lib/tc/q_atm.so \ + ${IDIR_TC_ATM}/usr/lib/tc/ install-ifstat: ${INSTALL_DIR} ${IDIR_IFSTAT}/usr/sbin diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index f17d09f22..3bee75f27 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ipsec-tools PKG_VERSION:= 0.7.2 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= 72861f005746ee27984b2ee715ecc629 PKG_DESCR:= IPsec management tools PKG_SECTION:= net PKG_DEPENDS:= libopenssl +PKG_BUILDDEP+= openssl PKG_URL:= http://ipsec-tools.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=ipsec-tools/} @@ -20,15 +20,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IPSEC_TOOLS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-kernel-headers="${LINUX_DIR}/include" \ --without-readline \ --disable-security-context \ --with-openssl="${STAGING_DIR}/usr" \ --without-libradius \ --without-libpam -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_IPSEC_TOOLS}/usr/sbin ${IDIR_IPSEC_TOOLS}/usr/lib @@ -40,7 +37,8 @@ post-install: ${INSTALL_BIN} ${WRKINST}/usr/sbin/plainrsa-gen \ ${IDIR_IPSEC_TOOLS}/usr/sbin/ ${INSTALL_BIN} ${WRKINST}/usr/sbin/racoon ${IDIR_IPSEC_TOOLS}/usr/sbin - ${INSTALL_BIN} ${WRKINST}/usr/sbin/racoonctl ${IDIR_IPSEC_TOOLS}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/racoonctl \ + ${IDIR_IPSEC_TOOLS}/usr/sbin ${INSTALL_BIN} ${WRKINST}/usr/sbin/setkey ${IDIR_IPSEC_TOOLS}/usr/sbin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ipset/Makefile b/package/ipset/Makefile index d41c12d1e..0dfca4d14 100644 --- a/package/ipset/Makefile +++ b/package/ipset/Makefile @@ -19,9 +19,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IPSET,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,KMOD_IPSET,kmod-ipset,${KERNEL_VERSION}+${PKG_VERSION}-${ADK_TARGET}-${PKG_RELEASE},,${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual + XAKE_FLAGS+= PREFIX=/usr -BUILD_STYLE:= auto -INSTALL_STYLE:= auto ALL_TARGET:= binaries INSTALL_TARGET:= binaries_install diff --git a/package/iptables-snmp/Makefile b/package/iptables-snmp/Makefile index 4b3bff57f..cebcfc057 100644 --- a/package/iptables-snmp/Makefile +++ b/package/iptables-snmp/Makefile @@ -17,9 +17,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,IPTABLES_SNMP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto FAKE_FLAGS+= INSTALL_PREFIX="${WRKINST}" post-install: diff --git a/package/iptables/Makefile b/package/iptables/Makefile index f5f2d2392..f07604877 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -9,7 +9,11 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= c67cf30e281a924def6426be0973df56 PKG_DESCR:= The netfilter firewalling software PKG_SECTION:= net -PKG_DEPENDS:= kmod-ip-nf-iptables kmod-nf-conntrack kmod-nf-conntrack-ipv4 kmod-nf-nat kmod-ip-nf-target-masquerade kmod-ip-nf-target-reject kmod-ip-nf-filter kmod-ip-nf-match-state kmod-netfilter-xt-target-tcpmss +PKG_DEPENDS:= kmod-ip-nf-iptables kmod-nf-conntrack +PKG_DEPENDS+= kmod-nf-conntrack-ipv4 kmod-nf-nat +PKG_DEPENDS+= kmod-ip-nf-target-masquerade kmod-ip-nf-target-reject +PKG_DEPENDS+= kmod-ip-nf-filter kmod-ip-nf-match-state +PKG_DEPENDS+= kmod-netfilter-xt-target-tcpmss PKG_URL:= http://www.netfilter.org PKG_SITES:= http://www.netfilter.org/projects/iptables/files/ \ ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \ @@ -27,10 +31,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IPTABLES,iptables,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,IP6TABLES,ip6tables,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-devel -BUILD_STYLE:= auto -INSTALL_STYLE:= auto SUB_INSTALL-${ADK_PACKAGE_IP6TABLES}+= ip6tables-install diff --git a/package/iptraf/Makefile b/package/iptraf/Makefile index ccd333219..e45ec244e 100644 --- a/package/iptraf/Makefile +++ b/package/iptraf/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= iptraf PKG_VERSION:= 3.0.0 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses PKG_MD5SUM:= 377371c28ee3c21a76f7024920649ea8 PKG_DESCR:= A console-based network monitoring program. PKG_SECTION:= net PKG_DEPENDS:= libncurses +PKG_BUILDDEP+= ncurses PKG_URL:= http://iptraf.seul.org PKG_SITES:= ftp://iptraf.seul.org/pub/iptraf/ \ ftp://the.wiretapped.net/pub/security/network-monitoring/iptraf/ @@ -19,6 +19,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IPTRAF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: ${MAKE} -C ${WRKBUILD}/src \ ${TARGET_CONFIGURE_OPTS} \ diff --git a/package/irssi/Makefile b/package/irssi/Makefile index 1b502cff0..820bb94d7 100644 --- a/package/irssi/Makefile +++ b/package/irssi/Makefile @@ -27,15 +27,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IRSSI,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-perl=no \ --with-gnu-ld \ --with-textui \ --with-terminfo \ --without-bot \ - --without-proxy \ - --enable-static -BUILD_STYLE= auto + --without-proxy ifeq (${ADK_PACKAGE_IRSSI_SSL},y) CONFIGURE_ARGS+= --enable-ssl @@ -43,9 +40,8 @@ else CONFIGURE_ARGS+= --disable-ssl endif -do-install: +post-install: ${INSTALL_DIR} ${IDIR_IRSSI}/usr/bin - ${INSTALL_BIN} ${WRKBUILD}/src/fe-text/${PKG_NAME} \ - ${IDIR_IRSSI}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/irssi ${IDIR_IRSSI}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/iw/Makefile b/package/iw/Makefile index 106b702e4..d2ea171a6 100644 --- a/package/iw/Makefile +++ b/package/iw/Makefile @@ -20,9 +20,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IW,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual + XAKE_FLAGS:= V=1 -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_IW}/usr/sbin diff --git a/package/jamvm/Makefile b/package/jamvm/Makefile index 6a5ef3e18..0a734af58 100644 --- a/package/jamvm/Makefile +++ b/package/jamvm/Makefile @@ -20,7 +20,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,JAMVM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + CONFIGURE_ARGS+= --enable-ffi do-build: @@ -36,6 +38,7 @@ do-install: ${INSTALL_DIR} ${IDIR_JAMVM}/usr/bin ${INSTALL_DIR} ${IDIR_JAMVM}/usr/share/jamvm ${INSTALL_BIN} ${WRKINST}/usr/bin/jamvm ${IDIR_JAMVM}/usr/bin - ${CP} ${WRKINST}/usr/share/jamvm/classes.zip ${IDIR_JAMVM}/usr/share/jamvm + ${CP} ${WRKINST}/usr/share/jamvm/classes.zip \ + ${IDIR_JAMVM}/usr/share/jamvm include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/jpeg/Makefile b/package/jpeg/Makefile index 972eb44a5..34d1c72ea 100644 --- a/package/jpeg/Makefile +++ b/package/jpeg/Makefile @@ -23,10 +23,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBJPEG,libjpeg,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBJPEG}/usr/lib ${CP} ${WRKINST}/usr/lib/libjpeg.so* ${IDIR_LIBJPEG}/usr/lib/ diff --git a/package/kbproto/Makefile b/package/kbproto/Makefile index 62da57203..f84afa463 100644 --- a/package/kbproto/Makefile +++ b/package/kbproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 4deef518a03bc94a7a25902bb7c98dd6 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/kismet/Makefile b/package/kismet/Makefile index e6ecf710c..a14a54838 100644 --- a/package/kismet/Makefile +++ b/package/kismet/Makefile @@ -18,6 +18,8 @@ $(eval $(call PKG_template,KISMET_CLIENT,kismet-client,${PKG_VERSION}-${PKG_RELE $(eval $(call PKG_template,KISMET_DRONE,kismet-drone,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,KISMET_SERVER,kismet-server,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +INSTALL_STYLE:= manual + ifeq ($(ADK_COMPILE_KISMET_WITH_UCLIBCXX),y) TCFLAGS+= -fno-builtin -fno-rtti -nostdinc++ -I${STAGING_DIR}/usr/include/uClibc++ TLDFLAGS+= -luClibc++ -lc -lm -lgcc_s -nodefaultlibs @@ -26,12 +28,10 @@ CONFIGURE_ENV+= CXXFLAGS="-fno-builtin -fno-rtti -nostdinc++ \ else TLDFLAGS+= -shared endif -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --sysconfdir=/etc/kismet \ --enable-syspcap=yes \ --disable-setuid \ --disable-gpsmap -BUILD_STYLE= auto do-install: ${INSTALL_DIR} ${IDIR_KISMET}/usr/bin/ diff --git a/package/knock/Makefile b/package/knock/Makefile index 60c0af0bb..cbfeb9093 100644 --- a/package/knock/Makefile +++ b/package/knock/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= knock PKG_VERSION:= 0.5 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap PKG_MD5SUM:= ca09d61458974cff90a700aba6120891 PKG_DESCR:= A port-knocking client PKG_SECTION:= net PKG_URL:= http://www.zeroflux.org/projects/knock +PKG_BUILDDEP+= libpcap PKG_SITES:= http://www.zeroflux.org/proj/knock/files/ PKG_DESCR_1:= A port-knocking server @@ -22,10 +22,7 @@ $(eval $(call PKG_template,KNOCK,knock,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESC $(eval $(call PKG_template,KNOCKD,knockd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION})) TCXXFLAGS+= ${TCPPFLAGS} ${TCFLAGS} -CONFIGURE_STYLE= gnu CONFIGURE_ENV+= ac_cv_lib_pcap_pcap_open_live=yes -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_KNOCK}/usr/bin diff --git a/package/krb5/Makefile b/package/krb5/Makefile index 6f1c72a18..533e50c39 100644 --- a/package/krb5/Makefile +++ b/package/krb5/Makefile @@ -26,7 +26,6 @@ $(eval $(call PKG_template,KRB5_SERVER,krb5-server,$(PKG_VERSION)-${PKG_RELEASE} $(eval $(call PKG_template,LIBKRB5,libkrb5,$(PKG_VERSION)-${PKG_RELEASE},,${PKG_DESCR_LIB},${PKG_SECTION_LIB})) TCFLAGS+= -I${STAGING_DIR}/usr/include/et -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-static \ --disable-profiled \ --with-system-ss \ @@ -37,8 +36,6 @@ CONFIGURE_ENV+= krb5_cv_attr_constructor_destructor=yes,yes \ ac_cv_printf_positional=yes \ ac_cv_file__etc_environment=no \ ac_cv_file__etc_TIMEZONE=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-extract: (cd ${WRKDIR}; tar xzf ${PKG_NAME}-${PKG_VERSION}.tar.gz) diff --git a/package/l2tpns/Makefile b/package/l2tpns/Makefile index 5a5b95a22..677eca10e 100644 --- a/package/l2tpns/Makefile +++ b/package/l2tpns/Makefile @@ -18,8 +18,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,L2TPNS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_FLAGS:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual post-install: ${INSTALL_DIR} ${IDIR_L2TPNS}/etc/l2tpns diff --git a/package/lame/Makefile b/package/lame/Makefile index 5d86199a6..1488591ad 100644 --- a/package/lame/Makefile +++ b/package/lame/Makefile @@ -18,17 +18,13 @@ PKG_SECTION_1:= libs include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,LAME,lame,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LAME,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBLAME,liblame,$(PKG_VERSION)-${PKG_RELEASE},,${PKG_DESCR_1},${PKG_SECTION_1})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: $(INSTALL_DIR) $(IDIR_LAME)/usr/bin $(INSTALL_BIN) $(WRKINST)/usr/bin/lame $(IDIR_LAME)/usr/bin/ $(INSTALL_DIR) $(IDIR_LIBLAME)/usr/lib - $(CP) $(WRKINST)/usr/lib/lib*.so* $(IDIR_LIBLAME)/usr/lib + $(CP) $(WRKINST)/usr/lib/libmp3lame.so* $(IDIR_LIBLAME)/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/less/Makefile b/package/less/Makefile index ff82edefc..4b5d28bbb 100644 --- a/package/less/Makefile +++ b/package/less/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= less PKG_VERSION:= 429 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses PKG_MD5SUM:= 206f2f13b9b0a35e45df660fcb6af31d PKG_DESCR:= A text mode pager PKG_SECTION:= text PKG_DEPENDS:= libncurses +PKG_BUILDDEP+= ncurses PKG_URL:= http://www.greenwoodsoftware.com/less PKG_SITES:= http://www.greenwoodsoftware.com/less/ @@ -18,11 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LESS,less,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto - -do-install: +post-install: ${INSTALL_DIR} ${IDIR_LESS}/usr/bin - ${INSTALL_BIN} ${WRKBUILD}/less ${IDIR_LESS}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/less ${IDIR_LESS}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libICE/Makefile b/package/libICE/Makefile index 4f7e7e660..13fd7b39d 100644 --- a/package/libICE/Makefile +++ b/package/libICE/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBICE,libice,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBICE}/usr/lib ${CP} ${WRKINST}/usr/lib/libICE.so* ${IDIR_LIBICE}/usr/lib/ diff --git a/package/libSM/Makefile b/package/libSM/Makefile index d00f16fb0..dfedcaa23 100644 --- a/package/libSM/Makefile +++ b/package/libSM/Makefile @@ -17,10 +17,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBSM,libsm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBSM}/usr/lib ${CP} ${WRKINST}/usr/lib/libSM.so* ${IDIR_LIBSM}/usr/lib/ diff --git a/package/libX11/Makefile b/package/libX11/Makefile index e1a990ada..866579cbf 100644 --- a/package/libX11/Makefile +++ b/package/libX11/Makefile @@ -6,10 +6,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:= libX11 PKG_VERSION:= 1.3.2 PKG_RELEASE:= 1 -PKG_BUILDDEP+= xproto xextproto xtrans libXdmcp libXau xcmiscproto bigreqsproto kbproto inputproto PKG_MD5SUM:= b68aebbfcac1174c4c95d260e9369766 PKG_DESCR:= X11 client-side library PKG_SECTION:= x11 +PKG_BUILDDEP+= xproto xextproto xtrans libXdmcp libXau xcmiscproto bigreqsproto kbproto inputproto PKG_SITES:= ${MASTER_SITE_XORG} ifeq ($(ADK_STATIC),y) @@ -21,14 +21,11 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBX11,libx11,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) XAKE_FLAGS+= HOSTCPPFLAGS=-I${STAGING_DIR}/usr/include/xproto -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-xlocale \ --disable-specs \ --disable-xf86bigfont \ --disable-malloc0returnsnull \ --without-xcb -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBX11}/usr/lib ${IDIR_LIBX11}/usr/share/X11 diff --git a/package/libXau/Makefile b/package/libXau/Makefile index a82823a74..bb57992d0 100644 --- a/package/libXau/Makefile +++ b/package/libXau/Makefile @@ -19,10 +19,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXAU,libxau,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBXAU}/usr/lib ${CP} ${WRKINST}/usr/lib/libXau.so* ${IDIR_LIBXAU}/usr/lib/ diff --git a/package/libXaw/Makefile b/package/libXaw/Makefile index 4d6277f05..9b6481da8 100644 --- a/package/libXaw/Makefile +++ b/package/libXaw/Makefile @@ -16,10 +16,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXAW,libxaw,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-docs -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBXAW}/usr/lib diff --git a/package/libXdmcp/Makefile b/package/libXdmcp/Makefile index d0d6f461f..b525949b6 100644 --- a/package/libXdmcp/Makefile +++ b/package/libXdmcp/Makefile @@ -19,10 +19,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXDMCP,libxdmcp,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBXDMCP}/usr/lib ${CP} ${WRKINST}/usr/lib/libXdmcp.so* ${IDIR_LIBXDMCP}/usr/lib/ diff --git a/package/libXext/Makefile b/package/libXext/Makefile index 259a66019..42e972aaf 100644 --- a/package/libXext/Makefile +++ b/package/libXext/Makefile @@ -20,10 +20,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXEXT,libxext,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-malloc0returnsnull -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBXEXT}/usr/lib diff --git a/package/libXfont/Makefile b/package/libXfont/Makefile index 4606b2115..c51d2e58b 100644 --- a/package/libXfont/Makefile +++ b/package/libXfont/Makefile @@ -19,9 +19,6 @@ $(eval $(call PKG_template,LIBXFONT,libxfont,$(PKG_VERSION)-${PKG_RELEASE},${PKG XAKE_FLAGS+= V=1 CONFIGURE_ENV+= ac_cv_path_XMLTO=true -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBXFONT}/usr/lib diff --git a/package/libXmu/Makefile b/package/libXmu/Makefile index 208bf5256..c208c65e6 100644 --- a/package/libXmu/Makefile +++ b/package/libXmu/Makefile @@ -6,20 +6,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:= libXmu PKG_VERSION:= 1.0.5 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libXt PKG_MD5SUM:= f49e3587cdc299707da0786a681f9c05 PKG_DESCR:= miscellaneous utility functions for X libraries PKG_SECTION:= x11 +PKG_BUILDDEP+= libXt PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXMU,libxmu,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBXMU}/usr/lib ${CP} ${WRKINST}/usr/lib/libXmu.so* ${IDIR_LIBXMU}/usr/lib/ diff --git a/package/libXpm/Makefile b/package/libXpm/Makefile index da5a647fe..05170d5bd 100644 --- a/package/libXpm/Makefile +++ b/package/libXpm/Makefile @@ -15,10 +15,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXPM,libxpm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_search_gettext=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBXPM}/usr/lib diff --git a/package/libXrender/Makefile b/package/libXrender/Makefile index 145c36988..4fcfcd89e 100644 --- a/package/libXrender/Makefile +++ b/package/libXrender/Makefile @@ -20,10 +20,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXRENDER,libxrender,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-malloc0returnsnull -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBXRENDER}/usr/lib diff --git a/package/libXt/Makefile b/package/libXt/Makefile index e14d75f1a..8f42e9c2d 100644 --- a/package/libXt/Makefile +++ b/package/libXt/Makefile @@ -6,10 +6,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:= libXt PKG_VERSION:= 1.0.7 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libSM PKG_MD5SUM:= 28f627c7a5ca08c2413ce91d21c177d8 PKG_DESCR:= X Toolkit Intrinsics PKG_SECTION:= x11 +PKG_BUILDDEP+= libSM PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk @@ -17,11 +17,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXT,libxt,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) XAKE_FLAGS+= HOSTCPPFLAGS=-I${STAGING_DIR}/usr/include/xproto -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-malloc0returnsnull \ --disable-install-makestrs -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBXT}/usr/lib diff --git a/package/libXt/patches/patch-util_Makefile_in b/package/libXt/patches/patch-util_Makefile_in index 7a9a888b7..a02ec514f 100644 --- a/package/libXt/patches/patch-util_Makefile_in +++ b/package/libXt/patches/patch-util_Makefile_in @@ -1,5 +1,27 @@ --- libXt-1.0.7.orig/util/Makefile.in 2009-10-09 06:51:17.000000000 +0200 -+++ libXt-1.0.7/util/Makefile.in 2009-12-11 18:16:05.000000000 +0100 ++++ libXt-1.0.7/util/Makefile.in 2010-02-05 23:31:14.324191435 +0100 +@@ -63,10 +63,10 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ ++ $(LIBTOOLFLAGS) --mode=compile $(CC_FOR_BUILD) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) + AM_V_CC = $(am__v_CC_$(V)) +@@ -75,7 +75,7 @@ am__v_CC_0 = @echo " CC " $@; + AM_V_at = $(am__v_at_$(V)) + am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) + am__v_at_0 = @ +-CCLD = $(CC) ++CCLD = $(CC_FOR_BUILD) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ @@ -131,7 +131,7 @@ CFLAGS = @CFLAGS_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ CHANGELOG_CMD = @CHANGELOG_CMD@ @@ -30,17 +52,17 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='makestrs.c' object='makestrs-makestrs.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) $(makestrs_CFLAGS) $(CFLAGS) -c -o makestrs-makestrs.o `test -f 'makestrs.c' || echo '$(srcdir)/'`makestrs.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(makestrs_CPPFLAGS) $(makestrs_CFLAGS) $(CFLAGS) -c -o makestrs-makestrs.o `test -f 'makestrs.c' || echo '$(srcdir)/'`makestrs.c ++@am__fastdepCC_FALSE@ $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(makestrs_CPPFLAGS) $(makestrs_CFLAGS) $(CFLAGS) -c -o makestrs-makestrs.o `test -f 'makestrs.c' || echo '$(srcdir)/'`makestrs.c makestrs-makestrs.obj: makestrs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makestrs_CFLAGS) $(CFLAGS) -MT makestrs-makestrs.obj -MD -MP -MF $(DEPDIR)/makestrs-makestrs.Tpo -c -o makestrs-makestrs.obj `if test -f 'makestrs.c'; then $(CYGPATH_W) 'makestrs.c'; else $(CYGPATH_W) '$(srcdir)/makestrs.c'; fi` -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(makestrs_CPPFLAGS) $(makestrs_CFLAGS) $(CFLAGS) -MT makestrs-makestrs.obj -MD -MP -MF $(DEPDIR)/makestrs-makestrs.Tpo -c -o makestrs-makestrs.obj `if test -f 'makestrs.c'; then $(CYGPATH_W) 'makestrs.c'; else $(CYGPATH_W) '$(srcdir)/makestrs.c'; fi` ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(makestrs_CPPFLAGS) $(makestrs_CFLAGS) $(CFLAGS) -MT makestrs-makestrs.obj -MD -MP -MF $(DEPDIR)/makestrs-makestrs.Tpo -c -o makestrs-makestrs.obj `if test -f 'makestrs.c'; then $(CYGPATH_W) 'makestrs.c'; else $(CYGPATH_W) '$(srcdir)/makestrs.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/makestrs-makestrs.Tpo $(DEPDIR)/makestrs-makestrs.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='makestrs.c' object='makestrs-makestrs.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) $(makestrs_CFLAGS) $(CFLAGS) -c -o makestrs-makestrs.obj `if test -f 'makestrs.c'; then $(CYGPATH_W) 'makestrs.c'; else $(CYGPATH_W) '$(srcdir)/makestrs.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(makestrs_CPPFLAGS) $(makestrs_CFLAGS) $(CFLAGS) -c -o makestrs-makestrs.obj `if test -f 'makestrs.c'; then $(CYGPATH_W) 'makestrs.c'; else $(CYGPATH_W) '$(srcdir)/makestrs.c'; fi` ++@am__fastdepCC_FALSE@ $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(makestrs_CPPFLAGS) $(makestrs_CFLAGS) $(CFLAGS) -c -o makestrs-makestrs.obj `if test -f 'makestrs.c'; then $(CYGPATH_W) 'makestrs.c'; else $(CYGPATH_W) '$(srcdir)/makestrs.c'; fi` mostlyclean-libtool: -rm -f *.lo diff --git a/package/libXv/Makefile b/package/libXv/Makefile index 4165f8547..13172660e 100644 --- a/package/libXv/Makefile +++ b/package/libXv/Makefile @@ -16,10 +16,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXV,libxv,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-malloc0returnsnull -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBXV}/usr/lib diff --git a/package/libXxf86dga/Makefile b/package/libXxf86dga/Makefile index c850aa81e..15209dd30 100644 --- a/package/libXxf86dga/Makefile +++ b/package/libXxf86dga/Makefile @@ -6,20 +6,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:= libXxf86dga PKG_VERSION:= 1.1.1 PKG_RELEASE:= 1 -PKG_BUILDDEP+= xf86dgaproto libXext libXaw PKG_MD5SUM:= ecb81708157e1a1eeaba0e124f0ade08 PKG_DESCR:= client library for the XFree86-DGA extension PKG_SECTION:= x11 +PKG_BUILDDEP+= xf86dgaproto libXext libXaw PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXXF86DGA,libxxf86dga,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-malloc0returnsnull -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBXXF86DGA}/usr/lib diff --git a/package/libao/Makefile b/package/libao/Makefile index d728b47ee..116769b9a 100644 --- a/package/libao/Makefile +++ b/package/libao/Makefile @@ -16,16 +16,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBAO,libao,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --disable-esd \ --disable-arts \ --disable-nas \ --disable-polyp -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog post-install: ${INSTALL_DIR} ${IDIR_LIBAO}/usr/lib - ${CP} ${WRKINST}/usr/lib/libao.so.* ${IDIR_LIBAO}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libao.so* ${IDIR_LIBAO}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libart/Makefile b/package/libart/Makefile index 3f21e9300..b41a9377a 100644 --- a/package/libart/Makefile +++ b/package/libart/Makefile @@ -18,12 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBART,libart,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog - post-install: ${INSTALL_DIR} ${IDIR_LIBART}/usr/lib - ${CP} ${WRKINST}/usr/lib/libart_lgpl_2.so.* ${IDIR_LIBART}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libart_lgpl_2.so* ${IDIR_LIBART}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libaudiofile/Makefile b/package/libaudiofile/Makefile index 4818887bd..4b4f74d35 100644 --- a/package/libaudiofile/Makefile +++ b/package/libaudiofile/Makefile @@ -16,14 +16,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBAUDIOFILE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_linux_vers=2 CONFIGURE_ARGS+= --with-build-cc=${HOSTCC} -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBAUDIOFILE}/usr/lib - ${CP} ${WRKINST}/usr/lib/libaudiofile.so.* ${IDIR_LIBAUDIOFILE}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libaudiofile.so* ${IDIR_LIBAUDIOFILE}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libc/Makefile b/package/libc/Makefile index 700f97a66..29b30d546 100644 --- a/package/libc/Makefile +++ b/package/libc/Makefile @@ -14,6 +14,10 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBC,libc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + # do nothing, use native c library do-install: ${INSTALL_DIR} $(IDIR_LIBC)/lib diff --git a/package/libcli/Makefile b/package/libcli/Makefile index 41d4eead2..46be223bc 100755 --- a/package/libcli/Makefile +++ b/package/libcli/Makefile @@ -16,11 +16,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBCLI,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE= auto -INSTALL_STYLE= auto +CONFIG_STYLE:= manual post-install: ${INSTALL_DIR} ${IDIR_LIBCLI}/usr/lib - ${CP} ${WRKINST}/usr/lib/libcli.so.* ${IDIR_LIBCLI}/usr/lib + ${CP} ${WRKINST}/usr/lib/libcli.so* ${IDIR_LIBCLI}/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libdaemon/Makefile b/package/libdaemon/Makefile index 1e5eaeae5..59df1fed9 100644 --- a/package/libdaemon/Makefile +++ b/package/libdaemon/Makefile @@ -16,12 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBDAEMON,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu # uClibc setpgrp does not take arguments CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes CONFIGURE_ARGS+= --disable-lynx -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBDAEMON}/usr/lib diff --git a/package/libdb/Makefile b/package/libdb/Makefile index 40cdb4763..9cb09cb85 100644 --- a/package/libdb/Makefile +++ b/package/libdb/Makefile @@ -14,59 +14,29 @@ PKG_SITES:= http://www.openadk.org/distfiles/ DISTFILES:= db-${PKG_VERSION}.tar.gz WRKDIST= ${WRKDIR}/db-${PKG_VERSION} +WRKBUILD= ${WRKSRC}/build_unix include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBDB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -do-configure: - (cd ${WRKBUILD}/build_unix ; \ - ${TARGET_CONFIGURE_OPTS} \ - CFLAGS="${TARGET_CFLAGS}" \ - CPPFLAGS="-I${STAGING_DIR}/usr/include" \ - LDFLAGS="-L${STAGING_DIR}/usr/lib" \ - ../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 \ - --enable-smallbuild \ - --disable-debug_rop \ - --disable-debug_wop \ - --disable-diagnostic \ - --disable-java \ - --disable-cxx \ - --disable-posixmutexes \ - --disable-uimutexes \ - --disable-tcl \ - --disable-rpc \ - --disable-compat185 \ - --disable-statistics \ - --disable-replication \ - --disable-cryptography \ - --disable-queue \ - --with-mutex=UNIX/fcntl \ - ); - -do-install: - ${MAKE} -C ${WRKBUILD}/build_unix \ - DESTDIR="${WRKINST}" install +CONFIGURE_PROG:= dist/configure +CONFIGURE_ARGS+= --enable-smallbuild \ + --disable-debug_rop \ + --disable-debug_wop \ + --disable-diagnostic \ + --disable-java \ + --disable-cxx \ + --disable-posixmutexes \ + --disable-uimutexes \ + --disable-tcl \ + --disable-rpc \ + --disable-compat185 \ + --disable-statistics \ + --disable-replication \ + --disable-cryptography \ + --disable-queue \ + --with-mutex=UNIX/fcntl post-install: ${INSTALL_DIR} ${IDIR_LIBDB}/usr/lib diff --git a/package/libdnet/Makefile b/package/libdnet/Makefile index a1e028bbb..ebe03f276 100644 --- a/package/libdnet/Makefile +++ b/package/libdnet/Makefile @@ -14,17 +14,13 @@ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=$(PKG_NAME)/} include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,LIBDNET,libdnet,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBDNET,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ENV+= ac_cv_dnet_bsd_bpf=no CONFIGURE_ARGS+= --without-check -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: $(INSTALL_DIR) $(IDIR_LIBDNET)/usr/lib - $(INSTALL_DIR) $(IDIR_LIBDNET)/usr/sbin - $(CP) $(WRKINST)/usr/lib/libdnet.so.* $(IDIR_LIBDNET)/usr/lib/ + $(CP) $(WRKINST)/usr/lib/libdnet.so* $(IDIR_LIBDNET)/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libelf/Makefile b/package/libelf/Makefile index cc308facb..a5847bc87 100644 --- a/package/libelf/Makefile +++ b/package/libelf/Makefile @@ -13,19 +13,16 @@ PKG_SITES:= http://www.mr511.de/software/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,LIBELF,libelf,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBELF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ENV+= mr_cv_target_elf=yes \ ac_cv_sizeof_long_long=8 CONFIGURE_ARGS+= --enable-elf64=yes \ --disable-sanity-checks -BUILD_STYLE= auto -INSTALL_STYLE= confprog auto FAKE_FLAGS+= instroot="${WRKINST}" post-install: ${INSTALL_DIR} ${IDIR_LIBELF}/usr/lib - ${CP} ${WRKINST}/usr/lib/libelf.so.* ${IDIR_LIBELF}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libelf.so* ${IDIR_LIBELF}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libevent/Makefile b/package/libevent/Makefile index 8a35575c3..fb664f92f 100644 --- a/package/libevent/Makefile +++ b/package/libevent/Makefile @@ -14,15 +14,11 @@ PKG_SITES:= http://www.monkey.org/~provos/ include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,LIBEVENT,libevent,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto +$(eval $(call PKG_template,LIBEVENT,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) post-install: $(INSTALL_DIR) $(IDIR_LIBEVENT)/usr/lib - $(CP) $(WRKINST)/usr/lib/libevent-$(PKG_VERSION).so.* \ + $(CP) $(WRKINST)/usr/lib/libevent-$(PKG_VERSION).so* \ $(IDIR_LIBEVENT)/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libffi/Makefile b/package/libffi/Makefile index d17d844a8..de82811d8 100644 --- a/package/libffi/Makefile +++ b/package/libffi/Makefile @@ -14,14 +14,10 @@ PKG_SITES:= ftp://sourceware.org/pub/libffi/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,LIBFFI,libffi,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto +$(eval $(call PKG_template,LIBFFI,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) post-install: ${INSTALL_DIR} ${IDIR_LIBFFI}/usr/lib - ${CP} ${WRKINST}/usr/lib/libffi.so.* ${IDIR_LIBFFI}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libffi.so* ${IDIR_LIBFFI}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libfontenc/Makefile b/package/libfontenc/Makefile index f815b6c72..3b2238bb1 100644 --- a/package/libfontenc/Makefile +++ b/package/libfontenc/Makefile @@ -6,20 +6,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:= libfontenc PKG_VERSION:= 1.0.5 PKG_RELEASE:= 1 -PKG_BUILDDEP+= xproto zlib PKG_MD5SUM:= 0fa1988d08021225d18ced519a30d2b1 PKG_DESCR:= helps to deal with different encodings of fonts PKG_SECTION:= x11 +PKG_DEPENDS:= zlib +PKG_BUILDDEP+= xproto zlib PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBFONTENC,libfontenc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBFONTENC}/usr/lib ${CP} ${WRKINST}/usr/lib/libfontenc.so* ${IDIR_LIBFONTENC}/usr/lib/ diff --git a/package/libgcrypt/Makefile b/package/libgcrypt/Makefile index e9794bd1d..20b5da9c8 100644 --- a/package/libgcrypt/Makefile +++ b/package/libgcrypt/Makefile @@ -18,11 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBGCRYPT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-asm \ --with-gpg-error-prefix="${STAGING_DIR}/usr" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBGCRYPT}/usr/lib diff --git a/package/libgd/Makefile b/package/libgd/Makefile index b6eac8885..3dfd06b33 100644 --- a/package/libgd/Makefile +++ b/package/libgd/Makefile @@ -18,18 +18,16 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBGD,libgd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= autotool gnu +AUTOTOOL_STYLE:= autotool CONFIGURE_ENV+= LIBPNG12_CONFIG="${STAGING_DIR}/usr/bin/libpng12-config" CONFIGURE_ARGS+= --without-x \ --without-freetype \ --with-jpeg=${STAGING_DIR}/usr \ --with-png=${STAGING_DIR}/usr \ --without-xpm -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_LIBGD}/usr/lib - ${CP} ${WRKINST}/usr/lib/libgd.so.* ${IDIR_LIBGD}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libgd.so* ${IDIR_LIBGD}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libgpg-error/Makefile b/package/libgpg-error/Makefile index 415196934..20fbc14cd 100644 --- a/package/libgpg-error/Makefile +++ b/package/libgpg-error/Makefile @@ -18,10 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBGPG_ERROR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBGPG_ERROR}/usr/lib ${CP} ${WRKINST}/usr/lib/libgpg-error.so* \ diff --git a/package/libgssglue/Makefile b/package/libgssglue/Makefile index c239cc54f..dea01211d 100644 --- a/package/libgssglue/Makefile +++ b/package/libgssglue/Makefile @@ -13,11 +13,7 @@ PKG_SITES:= http://www.citi.umich.edu/projects/nfsv4/linux/libgssglue/ include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,LIBGSSGLUE,libgssglue,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +$(eval $(call PKG_template,LIBGSSGLUE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) post-install: $(INSTALL_DIR) $(IDIR_LIBGSSGLUE)/usr/lib diff --git a/package/libiconv/Makefile b/package/libiconv/Makefile index 9d9d0413a..1fbb35271 100644 --- a/package/libiconv/Makefile +++ b/package/libiconv/Makefile @@ -11,6 +11,7 @@ PKG_DESCR:= character set conversion library PKG_SECTION:= libs PKG_URL:= http://www.gnu.org/software/libiconv PKG_SITES:= ${MASTER_SITE_GNU:=libiconv/} + ifeq ($(ADK_STATIC),y) PKG_OPTS:= libonly endif @@ -20,9 +21,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBICONV,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) TCFLAGS+= -fPIC -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto FAKE_FLAGS+= libdir="${WRKINST}/usr/lib" \ includedir="${WRKINST}/usr/include" \ INSTALL_TARGET= install-lib diff --git a/package/libid3tag/Makefile b/package/libid3tag/Makefile index 3ab98c3c2..0a0f1cf68 100644 --- a/package/libid3tag/Makefile +++ b/package/libid3tag/Makefile @@ -6,22 +6,19 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libid3tag PKG_VERSION:= 0.15.1b PKG_RELEASE:= 1 -PKG_BUILDDEP+= zlib PKG_MD5SUM:= e5808ad997ba32c498803822078748c3 PKG_DESCR:= an ID3 tag manipulation library PKG_SECTION:= libs PKG_DEPENDS:= zlib +PKG_BUILDDEP+= zlib PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=mad/} include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBID3TAG,libid3tag,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --disable-debugging \ --disable-profiling -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog pre-install: ${INSTALL_DIR} ${WRKINST}/usr/lib/pkgconfig diff --git a/package/liblzo/Makefile b/package/liblzo/Makefile index c10b4d689..f15759356 100644 --- a/package/liblzo/Makefile +++ b/package/liblzo/Makefile @@ -16,14 +16,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBLZO,liblzo,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-static -BUILD_STYLE:= auto MAKE_FLAGS+= CFLAGS_O="${TARGET_CFLAGS}" -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBLZO}/usr/lib/ - ${CP} ${WRKINST}/usr/lib/liblzo2.so.* ${IDIR_LIBLZO}/usr/lib + ${CP} ${WRKINST}/usr/lib/liblzo2.so* ${IDIR_LIBLZO}/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libmad/Makefile b/package/libmad/Makefile index 045bd6d8e..e881756ef 100644 --- a/package/libmad/Makefile +++ b/package/libmad/Makefile @@ -26,12 +26,9 @@ endif #FPM:=mips #endif -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --enable-fpm=${FPM} \ --disable-debugging \ --enable-speed -BUILD_STYLE= auto -INSTALL_STYLE= auto pre-install: ${INSTALL_DIR} ${WRKINST}/usr/lib/pkgconfig diff --git a/package/libmms/Makefile b/package/libmms/Makefile index f9cc90dfb..f32301a3e 100644 --- a/package/libmms/Makefile +++ b/package/libmms/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBMMS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBMMS}/usr/lib ${CP} ${WRKINST}/usr/lib/libmms.so* ${IDIR_LIBMMS}/usr/lib/ diff --git a/package/libnet/Makefile b/package/libnet/Makefile index e1ad7ca7b..679da1c05 100644 --- a/package/libnet/Makefile +++ b/package/libnet/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libnet PKG_VERSION:= 1.1.4 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap PKG_MD5SUM:= c5e06418a89cc4209f677a776a798fd9 PKG_DESCR:= a low-level packet creation library PKG_SECTION:= libs PKG_DEPENDS:= libpcap +PKG_BUILDDEP+= libpcap PKG_URL:= http://sourceforge.net/projects/libnet-dev/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libnet-dev/libnet-${PKG_VERSION}/} @@ -23,14 +23,11 @@ endif $(eval $(call PKG_template,LIBNET,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_libnet_have_pf_packet=yes \ ac_cv_libnet_endianess=${ENDIAN} \ LL_INT_TYPE=linux \ ac_cv_lbl_unaligned_fail=no CONFIGURE_ARGS+= --with-pf_packet=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBNET}/usr/lib diff --git a/package/libnetfilter_queue/Makefile b/package/libnetfilter_queue/Makefile index a5769a212..737b3d5cc 100644 --- a/package/libnetfilter_queue/Makefile +++ b/package/libnetfilter_queue/Makefile @@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:= libnetfilter_queue PKG_VERSION:= 0.0.17 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libnfnetlink PKG_MD5SUM:= 2cde35e678ead3a8f9eb896bf807a159 PKG_DESCR:= API to packets that have been queued by the kernel packet filter PKG_SECTION:= libs PKG_DEPENDS:= libnfnetlink +PKG_BUILDDEP+= libnfnetlink PKG_URL:= http://www.netfilter.org/projects/libnetfilter_queue/ PKG_SITES:= http://www.netfilter.org/projects/libnetfilter_queue/files/ @@ -20,10 +20,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBNETFILTER_QUEUE,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_LIBNETFILTER_QUEUE)/usr/lib $(CP) $(WRKINST)/usr/lib/libnetfilter_queue*so* \ diff --git a/package/libnfnetlink/Makefile b/package/libnfnetlink/Makefile index e73fe97ba..51111e768 100644 --- a/package/libnfnetlink/Makefile +++ b/package/libnfnetlink/Makefile @@ -18,10 +18,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBNFNETLINK,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_LIBNFNETLINK)/usr/lib $(CP) $(WRKINST)/usr/lib/libnfnetlink.so* $(IDIR_LIBNFNETLINK)/usr/lib/ diff --git a/package/libnfsidmap/Makefile b/package/libnfsidmap/Makefile index 1a4bd35af..eca543039 100644 --- a/package/libnfsidmap/Makefile +++ b/package/libnfsidmap/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBNFSIDMAP,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: $(INSTALL_DIR) $(IDIR_LIBNFSIDMAP)/usr/lib $(CP) $(WRKINST)/usr/lib/libnfsidmap.so* \ diff --git a/package/libnids/Makefile b/package/libnids/Makefile index 3129465d3..704f9d183 100644 --- a/package/libnids/Makefile +++ b/package/libnids/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libnids PKG_VERSION:= 1.23 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libnet libpcap PKG_MD5SUM:= af35e8ef403a0ca95df2da94db856428 PKG_DESCR:= Network Intrusion Detection System library PKG_SECTION:= libs PKG_DEPENDS:= libnet libpcap +PKG_BUILDDEP+= libnet libpcap PKG_URL:= http://libnids.sourceforge.net/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libnids/} @@ -18,12 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBNIDS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= autoconf gnu +AUTOTOOL_STYLE:= autoconf CONFIGURE_ARGS+= --with-libpcap=${STAGING_DIR}/usr -CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no XAKE_FLAGS+= install_prefix="${WRKINST}" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBNIDS}/usr/lib diff --git a/package/libnl/Makefile b/package/libnl/Makefile index 4f7372e47..1cbe9f093 100644 --- a/package/libnl/Makefile +++ b/package/libnl/Makefile @@ -13,11 +13,7 @@ PKG_SITES:= http://downloads.openwrt.org/sources/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,LIBNL,libnl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +$(eval $(call PKG_template,LIBNL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) post-install: ${INSTALL_DIR} ${IDIR_LIBNL}/usr/lib diff --git a/package/libogg/Makefile b/package/libogg/Makefile index 3242d1b91..baebf4e9a 100644 --- a/package/libogg/Makefile +++ b/package/libogg/Makefile @@ -16,12 +16,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBOGG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog - post-install: ${INSTALL_DIR} ${IDIR_LIBOGG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libogg.so.* ${IDIR_LIBOGG}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libogg.so* ${IDIR_LIBOGG}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libol/Makefile b/package/libol/Makefile index ae0c7dca6..3b2067089 100644 --- a/package/libol/Makefile +++ b/package/libol/Makefile @@ -16,13 +16,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBOL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBOL}/usr/lib - ${CP} ${WRKINST}/usr/lib/libol.so.* ${IDIR_LIBOL}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libol.so* ${IDIR_LIBOL}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libosip2/Makefile b/package/libosip2/Makefile index 1b5ab5b03..fa6b20068 100644 --- a/package/libosip2/Makefile +++ b/package/libosip2/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= libosip2 PKG_VERSION:= 3.3.0 PKG_RELEASE:= 1 PKG_MD5SUM:= 81493bb4d4ae6d55b71a0d4369339125 -PKG_DESCR:= GNU oSIP library, a SIP (Session Initiation Protocol) implementation +PKG_DESCR:= a SIP (Session Initiation Protocol) implementation PKG_SECTION:= libs PKG_DEPENDS:= libpthread PKG_URL:= http://www.gnu.org/software/osip @@ -17,17 +17,14 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBOSIP2,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -CONFIGURE_ENV+= ac_cv_lib_nsl_nis_add=no CONFIGURE_ARGS+= --disable-trace \ --enable-pthread \ --enable-semaphore \ --enable-ntimer -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_LIBOSIP2}/usr/lib - ${CP} ${WRKINST}/usr/lib/libosip{,parser}2.so.* ${IDIR_LIBOSIP2}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libosip{,parser}2.so* \ + ${IDIR_LIBOSIP2}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libowfat/Makefile b/package/libowfat/Makefile index 1af2234df..02cd4f89a 100644 --- a/package/libowfat/Makefile +++ b/package/libowfat/Makefile @@ -14,8 +14,8 @@ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 include ${TOPDIR}/mk/package.mk -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual + TCFLAGS+= ${TCPPFLAGS} MAKE_FILE= GNUmakefile MAKE_FLAGS+= DIET= CC='${TARGET_CC}' CROSS=${TARGET_CROSS} diff --git a/package/libp11/Makefile b/package/libp11/Makefile index 92ab3a367..34ea80d0d 100644 --- a/package/libp11/Makefile +++ b/package/libp11/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libp11 PKG_VERSION:= 0.2.4 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl libtool PKG_MD5SUM:= 9e2c5cbececde245e2d2f535bd49ce35 PKG_DESCR:= library implementing a small layer on top of PKCS11 API PKG_SECTION:= libs PKG_DEPENDS:= libopenssl libltdl +PKG_BUILDDEP+= openssl libtool PKG_URL:= http://www.opensc-project.org/libp11 PKG_SITES:= http://www.opensc-project.org/files/libp11/ @@ -18,12 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBP11,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBP11}/usr/lib - ${CP} ${WRKINST}/usr/lib/libp11.so.* ${IDIR_LIBP11}/usr/lib + ${CP} ${WRKINST}/usr/lib/libp11.so* ${IDIR_LIBP11}/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index 2eb2ac249..b9ef5c807 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -14,21 +14,15 @@ PKG_SITES:= http://www.tcpdump.org/release/ include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,LIBPCAP,libpcap,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBPCAP,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ENV+= ac_cv_linux_vers=26 CONFIGURE_ARGS+= --disable-yydebug \ --with-build-cc=$(HOSTCC) \ --with-pcap=linux -BUILD_STYLE= auto TCFLAGS+= ${TCPPFLAGS} -INSTALL_STYLE= auto INSTALL_TARGET= install install-shared -pre-install: - ${INSTALL_DIR} ${WRKINST}/usr/bin - post-install: ${INSTALL_DIR} ${IDIR_LIBPCAP}/usr/lib/ ${CP} ${WRKINST}/usr/lib/libpcap.so* ${IDIR_LIBPCAP}/usr/lib/ diff --git a/package/libpciaccess/Makefile b/package/libpciaccess/Makefile index fdc2da826..9fe0cd9ef 100644 --- a/package/libpciaccess/Makefile +++ b/package/libpciaccess/Makefile @@ -13,14 +13,11 @@ PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,LIBPCIACCESS,libpciaccess,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +$(eval $(call PKG_template,LIBPCIACCESS,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) post-install: ${INSTALL_DIR} ${IDIR_LIBPCIACCESS}/usr/lib - ${CP} ${WRKINST}/usr/lib/libpciaccess.so* ${IDIR_LIBPCIACCESS}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libpciaccess.so* \ + ${IDIR_LIBPCIACCESS}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libpng/Makefile b/package/libpng/Makefile index d8f206b59..87da9297b 100644 --- a/package/libpng/Makefile +++ b/package/libpng/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libpng PKG_VERSION:= 1.2.36 PKG_RELEASE:= 1 -PKG_BUILDDEP+= zlib PKG_MD5SUM:= 4779cd011409ea9b591e11638781f0bf PKG_DESCR:= A library for reading/writing PNG images PKG_SECTION:= libs PKG_DEPENDS:= zlib +PKG_BUILDDEP+= zlib PKG_URL:= http://www.libpng.org/pub/png/libpng.html PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libpng/} @@ -22,12 +22,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBPNG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto confprog - post-install: ${INSTALL_DIR} ${IDIR_LIBPNG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libpng{,12}.so.* ${IDIR_LIBPNG}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libpng{,12}.so* ${IDIR_LIBPNG}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libpri/Makefile b/package/libpri/Makefile index fa0be1090..4a1e80329 100644 --- a/package/libpri/Makefile +++ b/package/libpri/Makefile @@ -16,13 +16,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBPRI,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual + MAKE_FLAGS+= CC='${TARGET_CC}' LDCONFIG='' FAKE_FLAGS+= INSTALL_BASE=/usr -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBPRI}/usr/lib - ${CP} ${WRKINST}/usr/lib/libpri.so.* ${IDIR_LIBPRI}/usr/lib + ${CP} ${WRKINST}/usr/lib/libpri.so* ${IDIR_LIBPRI}/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libpthread/Makefile b/package/libpthread/Makefile index b7ff49f7e..d1ea2621a 100644 --- a/package/libpthread/Makefile +++ b/package/libpthread/Makefile @@ -24,7 +24,11 @@ endif include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,LIBPTHREAD,libpthread,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +$(eval $(call PKG_template,LIBPTHREAD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) + +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_LIBPTHREAD}/lib diff --git a/package/librpcsecgss/Makefile b/package/librpcsecgss/Makefile index 50b856deb..69bd9f6db 100644 --- a/package/librpcsecgss/Makefile +++ b/package/librpcsecgss/Makefile @@ -17,10 +17,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBRPCSECGSS,librpcsecgss,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_LIBRPCSECGSS)/usr/lib $(CP) $(WRKINST)/usr/lib/librpcsecgss.so* $(IDIR_LIBRPCSECGSS)/usr/lib/ diff --git a/package/libshout/Makefile b/package/libshout/Makefile index fef009845..479c8c57c 100644 --- a/package/libshout/Makefile +++ b/package/libshout/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libshout PKG_VERSION:= 2.2.2 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libvorbis PKG_MD5SUM:= 4f75fc9901c724b712c371c9a1e782d3 PKG_DESCR:= Library which can be used to write a source client for streaming PKG_SECTION:= libs PKG_DEPENDS:= libvorbis libogg +PKG_BUILDDEP+= libvorbis PKG_URL:= http://directory.fsf.org/project/libshout PKG_SITES:= http://downloads.us.xiph.org/releases/libshout/ @@ -18,14 +18,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSHOUT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-speex=no \ --with-theora=no -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_LIBSHOUT}/usr/lib - ${CP} ${WRKINST}/usr/lib/libshout.so.* ${IDIR_LIBSHOUT}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libshout.so* ${IDIR_LIBSHOUT}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libsigc++/Makefile b/package/libsigc++/Makefile index a4a5fc825..f19f49e5f 100644 --- a/package/libsigc++/Makefile +++ b/package/libsigc++/Makefile @@ -11,31 +11,13 @@ PKG_DESCR:= Callback framework for C++ PKG_SECTION:= libs PKG_URL:= http://libsigc.sourceforge.net PKG_SITES:= ${MASTER_SITE_GNOME:=libsigc++/2.2/} -#PKG_CXX:= LIBSIGCXX include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSIGCXX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -#ifeq ($(ADK_COMPILE_LIBSIGCXX_WITH_UCLIBCXX),y) -#CONFIGURE_ENV+= CXXFLAGS="-fno-builtin -fno-rtti -nostdinc++ \ -# -I${STAGING_DIR}/usr/include/uClibc++" \ -# LIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc" -#endif - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - -#ifeq (${ADK_COMPILE_LIBSIGCXX_WITH_UCLIBCXX},y) -# add workaround because libtool tries to link libstdc++ -#post-configure: -# ${SED} 's#postdeps="-lstdc.*#postdeps=""#' \ -# ${WRKBUILD}/libtool -#endif - post-install: ${INSTALL_DIR} ${IDIR_LIBSIGCXX}/usr/lib - ${CP} ${WRKINST}/usr/lib/libsigc-2.0.so.* ${IDIR_LIBSIGCXX}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libsigc-2.0.so* ${IDIR_LIBSIGCXX}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libstdcxx/Makefile b/package/libstdcxx/Makefile index c2aa1ba09..05de53da2 100644 --- a/package/libstdcxx/Makefile +++ b/package/libstdcxx/Makefile @@ -13,6 +13,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSTDCXX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-install: ${INSTALL_DIR} ${IDIR_LIBSTDCXX}/lib ifeq ($(ADK_NATIVE),y) diff --git a/package/libtasn1/Makefile b/package/libtasn1/Makefile index e6cc3afa5..2593708f7 100644 --- a/package/libtasn1/Makefile +++ b/package/libtasn1/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBTASN1,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBTASN1}/usr/lib ${CP} ${WRKINST}/usr/lib/libtasn1.so* ${IDIR_LIBTASN1}/usr/lib diff --git a/package/libthread_db/Makefile b/package/libthread_db/Makefile index 42e9311b5..ef3ed22cd 100644 --- a/package/libthread_db/Makefile +++ b/package/libthread_db/Makefile @@ -18,6 +18,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBTHREAD_DB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-install: ${INSTALL_DIR} ${IDIR_LIBTHREAD_DB}/lib ${CP} ${STAGING_DIR}/lib/libthread_db*.so* ${IDIR_LIBTHREAD_DB}/lib diff --git a/package/libtiff/Makefile b/package/libtiff/Makefile index 13bc06ac5..9c3efa0f8 100644 --- a/package/libtiff/Makefile +++ b/package/libtiff/Makefile @@ -23,10 +23,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBTIFF,libtiff,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --disable-cxx -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_LIBTIFF}/usr/lib diff --git a/package/libtirpc/Makefile b/package/libtirpc/Makefile index 987051b3e..1702106c4 100644 --- a/package/libtirpc/Makefile +++ b/package/libtirpc/Makefile @@ -20,17 +20,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBTIRPC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu - ifneq (${ADK_COMPILE_NFS_UTILS_WITH_KERBEROS},y) CONFIGURE_ARGS+= --disable-gss else CONFIGURE_ARGS+= --enable-gss endif -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBTIRPC}/usr/lib ${IDIR_LIBTIRPC}/etc ${CP} ${WRKINST}/usr/lib/libtirpc*.so* ${IDIR_LIBTIRPC}/usr/lib/ diff --git a/package/libtool/Makefile b/package/libtool/Makefile index 512593872..237d358d6 100644 --- a/package/libtool/Makefile +++ b/package/libtool/Makefile @@ -17,10 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBTOOL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBLTDL,libltdl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBLTDL}/usr/lib ${CP} ${WRKINST}/usr/lib/libltdl.so.* ${IDIR_LIBLTDL}/usr/lib/ diff --git a/package/libtorrent/Makefile b/package/libtorrent/Makefile index 5f33fa97b..ea0de0c28 100644 --- a/package/libtorrent/Makefile +++ b/package/libtorrent/Makefile @@ -13,32 +13,15 @@ PKG_SECTION:= libs PKG_DEPENDS:= libopenssl libsigc++ PKG_URL:= http://libtorrent.rakshasa.no PKG_SITES:= http://libtorrent.rakshasa.no/downloads/ -#PKG_CXX:= LIBTORRENT include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBTORRENT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -#ifeq ($(ADK_COMPILE_LIBTORRENT_WITH_UCLIBCXX),y) -#CONFIGURE_ENV+= CXXFLAGS="-fno-builtin -fno-rtti -nostdinc++ -fno-strict-aliasing -fno-inline \ -# -I${STAGING_DIR}/usr/include/uClibc++" \ -# LIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc" -#endif - -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-aligned -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - -#ifeq (${ADK_COMPILE_LIBTORRENT_WITH_UCLIBCXX},y) -# add workaround because libtool tries to link libstdc++ -#post-configure: -# ${SED} 's#postdeps="-lstdc.*#postdeps=""#' \ -# ${WRKBUILD}/libtool -#endif post-install: ${INSTALL_DIR} ${IDIR_LIBTORRENT}/usr/lib - ${CP} ${WRKINST}/usr/lib/libtorrent.so.* ${IDIR_LIBTORRENT}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libtorrent.so* ${IDIR_LIBTORRENT}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libupnp/Makefile b/package/libupnp/Makefile index 248c73709..f36e728c6 100644 --- a/package/libupnp/Makefile +++ b/package/libupnp/Makefile @@ -19,14 +19,14 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBUPNP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +AUTOTOOL_STYLE:= autotool + TCFLAGS+= -fPIC -CONFIGURE_STYLE:= autotool gnu CONFIGURE_ARGS+= --disable-samples -BUILD_STYLE:= auto -INSTALL_STYLE:= auto confprog post-build: - sed -i -e 's#^libdir=.*#libdir=#' ${WRKBUILD}/threadutil/libthreadutil.la + sed -i -e 's#^libdir=.*#libdir=#' \ + ${WRKBUILD}/threadutil/libthreadutil.la post-install: ${INSTALL_DIR} ${IDIR_LIBUPNP}/usr/lib diff --git a/package/libusb-compat/Makefile b/package/libusb-compat/Makefile index 63048e40c..d10c06083 100644 --- a/package/libusb-compat/Makefile +++ b/package/libusb-compat/Makefile @@ -6,10 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libusb-compat PKG_VERSION:= 0.1.1 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libusb PKG_MD5SUM:= 32c775b97da7a11c6be7c487a0c9fc00 PKG_DESCR:= a Library for accessing Linux USB devices PKG_SECTION:= libs +PKG_BUILDDEP+= libusb PKG_URL:= http://libusb.wiki.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libusb/} @@ -23,10 +23,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBUSB_COMPAT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBUSB_COMPAT}/usr/lib ${CP} ${WRKINST}/usr/lib/libusb*.so* ${IDIR_LIBUSB_COMPAT}/usr/lib/ diff --git a/package/libusb/Makefile b/package/libusb/Makefile index b5fe7ccee..a5dec2885 100644 --- a/package/libusb/Makefile +++ b/package/libusb/Makefile @@ -11,6 +11,7 @@ PKG_DESCR:= a library for accessing Linux USB devices PKG_SECTION:= libs PKG_URL:= http://libusb.wiki.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libusb/} + ifeq ($(ADK_STATIC),y) PKG_OPTS:= libonly endif @@ -21,10 +22,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBUSB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBUSB}/usr/lib ${CP} ${WRKINST}/usr/lib/libusb*.so* ${IDIR_LIBUSB}/usr/lib/ diff --git a/package/libvirt/Makefile b/package/libvirt/Makefile index 7535732e9..f76bffa39 100644 --- a/package/libvirt/Makefile +++ b/package/libvirt/Makefile @@ -22,7 +22,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBVIRT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TCFLAGS+= -std=c99 -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-xen \ --without-uml \ --without-esx \ @@ -31,8 +30,6 @@ CONFIGURE_ARGS+= --without-xen \ --without-vbox \ --disable-silent-rules \ --without-sasl -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBVIRT}/usr/lib ${IDIR_LIBVIRT}/usr/bin diff --git a/package/libvorbis/Makefile b/package/libvorbis/Makefile index 3837f47f7..76e156ae4 100644 --- a/package/libvorbis/Makefile +++ b/package/libvorbis/Makefile @@ -6,10 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libvorbis PKG_VERSION:= 1.2.0 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libogg PKG_MD5SUM:= 478646358c49f34aedcce58948793619 PKG_DESCR:= The Vorbis General Audio Compression Codec library PKG_SECTION:= libs +PKG_BUILDDEP+= libogg PKG_URL:= http://www.xiph.org/vorbis/ PKG_SITES:= http://downloads.xiph.org/releases/vorbis/ @@ -18,13 +18,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBVORBIS,libvorbis,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBVORBISENC,libvorbisenc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ENV+= LIBS="-lm -logg" CONFIGURE_ARGS+= --with-ogg="${STAGING_DIR}/usr" \ --with-ogg-includes="${STAGING_DIR}/usr/include" \ --with-ogg-libraries="${STAGING_DIR}/usr/lib" -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog post-install: ${INSTALL_DIR} ${IDIR_LIBVORBIS}/usr/lib diff --git a/package/libvorbisidec/Makefile b/package/libvorbisidec/Makefile index d68e1a46b..0e6cc53d8 100644 --- a/package/libvorbisidec/Makefile +++ b/package/libvorbisidec/Makefile @@ -17,17 +17,12 @@ WRKDIST= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)+$(PKG_VARIANT) include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,LIBVORBISIDEC,libvorbisidec,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBVORBISIDEC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - -post-extract: - cd ${WRKBUILD}; ./autogen.sh +AUTOTOOL_STYLE:= autogen post-install: ${INSTALL_DIR} ${IDIR_LIBVORBISIDEC}/usr/lib - ${CP} ${WRKINST}/usr/lib/libvorbisidec.so.* ${IDIR_LIBVORBISIDEC}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libvorbisidec.so* ${IDIR_LIBVORBISIDEC}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libxkbfile/Makefile b/package/libxkbfile/Makefile index d6da115a4..bad308103 100644 --- a/package/libxkbfile/Makefile +++ b/package/libxkbfile/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXKBFILE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBXKBFILE}/usr/lib ${CP} ${WRKINST}/usr/lib/libxkbfile.so* ${IDIR_LIBXKBFILE}/usr/lib/ diff --git a/package/libxml2/Makefile b/package/libxml2/Makefile index d2fa1fc54..c6a911370 100644 --- a/package/libxml2/Makefile +++ b/package/libxml2/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libxml2 PKG_VERSION:= 2.7.3 PKG_RELEASE:= 1 -PKG_BUILDDEP+= zlib PKG_MD5SUM:= 8f4fda3969237c2a33bdb1583b5d06b2 PKG_DESCR:= XML C parser and toolkit PKG_SECTION:= libs PKG_DEPENDS:= zlib +PKG_BUILDDEP+= zlib PKG_URL:= http://www.xmlsoft.org/ PKG_SITES:= http://xmlsoft.org/sources/ \ ftp://fr.rpmfind.net/pub/libxml/ @@ -19,7 +19,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBXML2,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --without-c14n \ --without-catalog \ --without-debug \ @@ -48,11 +47,8 @@ CONFIGURE_ARGS+= --without-c14n \ --with-xptr \ --with-zlib -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog - post-install: ${INSTALL_DIR} ${IDIR_LIBXML2}/usr/lib - ${CP} ${WRKINST}/usr/lib/libxml2.so.* ${IDIR_LIBXML2}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libxml2.so* ${IDIR_LIBXML2}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libxslt/Makefile b/package/libxslt/Makefile index 6e648c26b..3f18857f4 100644 --- a/package/libxslt/Makefile +++ b/package/libxslt/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libxslt PKG_VERSION:= 1.1.24 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libxml2 PKG_MD5SUM:= e83ec5d27fc4c10c6f612879bea9a153 PKG_DESCR:= XSLT Library PKG_SECTION:= libs PKG_DEPENDS:= libxml2 +PKG_BUILDDEP+= libxml2 PKG_URL:= http://xmlsoft.org/XSLT PKG_SITES:= http://xmlsoft.org/sources/ \ ftp://fr.rpmfind.net/pub/libxml/ @@ -19,7 +19,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBXSLT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-libxml-prefix="${STAGING_DIR}/usr" \ --with-libxml-include-prefix="${STAGING_DIR}/usr/include/libxml2" \ --with-libxml-libs-prefix="${STAGING_DIR}/usr/lib" \ @@ -28,11 +27,9 @@ CONFIGURE_ARGS+= --with-libxml-prefix="${STAGING_DIR}/usr" \ --without-debug \ --without-mem-debug \ --without-debugger -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog post-install: ${INSTALL_DIR} ${IDIR_LIBXSLT}/usr/lib - ${CP} ${WRKINST}/usr/lib/libxslt.so.* ${IDIR_LIBXSLT}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libxslt.so* ${IDIR_LIBXSLT}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/lighttpd/Makefile b/package/lighttpd/Makefile index 8a3e584c6..0c6954ba2 100644 --- a/package/lighttpd/Makefile +++ b/package/lighttpd/Makefile @@ -67,7 +67,6 @@ $(eval $(call PKG_mod_template,LIGHTTPD_MOD_USERTRACK,usertrack)) $(eval $(call PKG_mod_template,LIGHTTPD_MOD_WEBDAV,webdav)) TCPPFLAGS+= -I$(STAGING_DIR)/usr/include/libxml2 -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= PCRE_LIB="-lpcre" CONFIGURE_ARGS+= \ --libdir=/usr/lib/lighttpd \ @@ -83,8 +82,6 @@ CONFIGURE_ARGS+= \ --with-pcre \ --without-valgrind \ --with-webdav-props -BUILD_STYLE:= auto -INSTALL_STYLE:= auto ifeq (${ADK_COMPILE_LIGHTTPD_WITH_OPENSSL},y) CONFIGURE_ARGS+= --with-openssl='${STAGING_DIR}/usr' else diff --git a/package/links/Makefile b/package/links/Makefile index 0c69aa24d..1c2c02baa 100644 --- a/package/links/Makefile +++ b/package/links/Makefile @@ -18,7 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LINKS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-graphics \ --with-ssl \ --without-svgalib \ @@ -26,8 +25,6 @@ CONFIGURE_ARGS+= --enable-graphics \ --without-directfb \ --without-pmshell \ --without-atheos -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LINKS}/usr/bin diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile index 3e6089d9e..227459d18 100644 --- a/package/linux-atm/Makefile +++ b/package/linux-atm/Makefile @@ -26,10 +26,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBATM,libatm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,BR2684CTL,br2684ctl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBATM}/usr/lib ${CP} ${WRKINST}/usr/lib/libatm.so* ${IDIR_LIBATM}/usr/lib diff --git a/package/linux-atm/patches/patch-src_qgen_Makefile_in b/package/linux-atm/patches/patch-src_qgen_Makefile_in index 211ff90ff..71ecf3f15 100644 --- a/package/linux-atm/patches/patch-src_qgen_Makefile_in +++ b/package/linux-atm/patches/patch-src_qgen_Makefile_in @@ -1,5 +1,23 @@ --- linux-atm-2.5.1.orig/src/qgen/Makefile.in 2009-11-30 17:21:18.000000000 +0100 -+++ linux-atm-2.5.1/src/qgen/Makefile.in 2009-12-17 16:17:11.216421967 +0100 ++++ linux-atm-2.5.1/src/qgen/Makefile.in 2010-02-05 22:35:31.371836598 +0100 +@@ -57,14 +57,14 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ +- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ --mode=compile $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ +- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ ++ --mode=link $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ + LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) + LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -91,7 +91,7 @@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ diff --git a/package/logrotate/Makefile b/package/logrotate/Makefile index 36b667534..a49e1fe34 100644 --- a/package/logrotate/Makefile +++ b/package/logrotate/Makefile @@ -4,29 +4,27 @@ include ${TOPDIR}/rules.mk PKG_NAME:= logrotate -PKG_VERSION:= 3.7.1 +PKG_VERSION:= 3.7.8 PKG_RELEASE:= 1 -PKG_BUILDDEP+= popt -PKG_MD5SUM:= 552639142e163745f6bcd4f1f3816d8a +PKG_MD5SUM:= b3589bea6d8d5afc8a84134fddaae973 PKG_DESCR:= logfile rotation utility PKG_SECTION:= misc PKG_DEPENDS:= libpopt -PKG_SITES:= http://ftp.debian.org/debian/pool/main/l/logrotate/ - -DISTFILES:= ${PKG_NAME}_${PKG_VERSION}.orig.tar.gz +PKG_BUILDDEP+= popt +PKG_SITES:= https://fedorahosted.org/releases/l/o/logrotate/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LOGROTATE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -TCFLAGS+= -D_GNU_SOURCE -DLinux -DVERSION=\"$(PKG_VERSION)\" -ALL_TARGET= logrotate -BUILD_STYLE= auto +CONFIG_STYLE:= manual + +TCFLAGS+= -D_GNU_SOURCE -DVERSION=\"$(PKG_VERSION)\" -do-install: +post-install: ${INSTALL_DIR} ${IDIR_LOGROTATE}/usr/sbin - ${CP} ${WRKBUILD}/logrotate ${IDIR_LOGROTATE}/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/logrotate ${IDIR_LOGROTATE}/usr/sbin ${INSTALL_DIR} ${IDIR_LOGROTATE}/etc/logrotate.d - ${CP} ./files/logrotate.conf ${IDIR_LOGROTATE}/etc + ${INSTALL_DATA} ./files/logrotate.conf ${IDIR_LOGROTATE}/etc include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/logrotate/patches/patch-Makefile b/package/logrotate/patches/patch-Makefile index 0ac175346..2b348b75f 100644 --- a/package/logrotate/patches/patch-Makefile +++ b/package/logrotate/patches/patch-Makefile @@ -1,21 +1,36 @@ -$Id$ ---- logrotate-3.7.1.orig/Makefile Thu Oct 9 22:05:07 2003 -+++ logrotate-3.7.1/Makefile Sat Jan 20 19:25:23 2007 -@@ -3,7 +3,7 @@ CVSROOT = $(shell cat CVS/Root) - CVSTAG = r$(subst .,-,$(VERSION)) - OS_NAME = $(shell uname -s) +--- logrotate-3.7.8.orig/Makefile 2008-05-19 12:25:54.000000000 +0200 ++++ logrotate-3.7.8/Makefile 2010-02-06 00:00:58.853084930 +0100 +@@ -1,7 +1,7 @@ + VERSION = $(shell awk '/Version:/ { print $$2 }' logrotate.spec) +-OS_NAME = $(shell uname -s) ++OS_NAME = Linux LFS = $(shell echo `getconf LFS_CFLAGS 2>/dev/null`) -CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS) +CFLAGS ?= -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS) PROG = logrotate MAN = logrotate.8 LOADLIBES = -lpopt -@@ -69,7 +69,7 @@ SOURCES = $(subst .o,.c,$(OBJS) $(LIBOBJ +@@ -96,16 +96,16 @@ test: $(TARGET) + (cd test; ./test) - ifeq ($(RPM_OPT_FLAGS),) - CFLAGS += -g --LDFLAGS = -g -+LDFLAGS ?= -g - endif + install: +- [ -d $(PREFIX)/$(BINDIR) ] || mkdir -p $(PREFIX)/$(BINDIR) +- [ -d $(PREFIX)/$(MANDIR) ] || mkdir -p $(PREFIX)/$(MANDIR) +- [ -d $(PREFIX)/$(MANDIR)/man8 ] || mkdir -p $(PREFIX)/$(MANDIR)/man8 ++ [ -d $(DESTDIR)/$(BINDIR) ] || mkdir -p $(DESTDIR)/$(BINDIR) ++ [ -d $(DESTDIR)/$(MANDIR) ] || mkdir -p $(DESTDIR)/$(MANDIR) ++ [ -d $(DESTDIR)/$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)/$(MANDIR)/man8 - ifeq (.depend,$(wildcard .depend)) + if [ "$(OS_NAME)" = HP-UX ]; then \ +- $(INSTALL) $(PROG) $(PREFIX)/$(BINDIR) 0755 bin bin; \ +- $(INSTALL) $(MAN) $(PREFIX)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"` 0644 bin bin; \ ++ $(INSTALL) $(PROG) $(DESTDIR)/$(BINDIR) 0755 bin bin; \ ++ $(INSTALL) $(MAN) $(DESTDIR)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"` 0644 bin bin; \ + else \ +- $(INSTALL) -m 755 $(PROG) $(PREFIX)/$(BINDIR); \ +- $(INSTALL) -m 644 $(MAN) $(PREFIX)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"`/$(MAN); \ ++ $(INSTALL) -m 755 $(PROG) $(DESTDIR)/$(BINDIR); \ ++ $(INSTALL) -m 644 $(MAN) $(DESTDIR)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"`/$(MAN); \ + fi + + co: diff --git a/package/logrotate/patches/patch-config_c b/package/logrotate/patches/patch-config_c deleted file mode 100644 index deea32c0f..000000000 --- a/package/logrotate/patches/patch-config_c +++ /dev/null @@ -1,59 +0,0 @@ -$Id$ ---- logrotate-3.7.1.orig/config.c Thu Aug 7 13:13:14 2003 -+++ logrotate-3.7.1/config.c Sat Jan 20 18:54:35 2007 -@@ -142,12 +142,17 @@ static int checkFile(const char * fname) - (!fname[1] || (fname[1] == '.' && !fname[2]))) - return 0; - -+ /* 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 */ - for (i = 0; i < tabooCount; i++) { - if (!strcmp(fname + strlen(fname) - strlen(tabooExts[i]), - tabooExts[i])) { -- message(MESS_ERROR, "Ignoring %s, because of %s " -+ message(MESS_DEBUG, "Ignoring %s, because of %s " - "ending\n", fname, tabooExts[i]); - - return 0; -@@ -511,6 +516,14 @@ static int readConfigFile(const char * c - newlog->flags &= ~LOG_FLAG_IFEMPTY; - - *endtag = oldchar, start = endtag; -+ } else if (!strcmp(start, "dateext")) { -+ newlog->flags |= LOG_FLAG_DATEEXT; -+ -+ *endtag = oldchar, start = endtag; -+ } else if (!strcmp(start, "nodateext")) { -+ newlog->flags &= ~LOG_FLAG_DATEEXT; -+ -+ *endtag = oldchar, start = endtag; - } else if (!strcmp(start, "noolddir")) { - newlog->oldDir = NULL; - -@@ -667,6 +680,21 @@ static int readConfigFile(const char * c - message(MESS_ERROR, "%s:%d bad start count '%s'\n", - configFile, lineNum, start); - return 1; -+ } -+ *endtag = oldchar, start = endtag; -+ } -+ } else if (!strcmp(start, "maxage")) { -+ *endtag = oldchar, start = endtag; -+ -+ if (!isolateValue(configFile, lineNum, "maxage count", &start, -+ &endtag)) { -+ oldchar = *endtag, *endtag = '\0'; -+ -+ newlog->rotateAge = strtoul(start, &chptr, 0); -+ if (*chptr || newlog->rotateAge < 0) { -+ message(MESS_ERROR, "%s:%d bad maximum age '%s'\n", -+ configFile, lineNum, start); -+ return 1; - } - *endtag = oldchar, start = endtag; - } diff --git a/package/logrotate/patches/patch-logrotate_8 b/package/logrotate/patches/patch-logrotate_8 deleted file mode 100644 index 0673a449c..000000000 --- a/package/logrotate/patches/patch-logrotate_8 +++ /dev/null @@ -1,28 +0,0 @@ -$Id$ ---- logrotate-3.7.1.orig/logrotate.8 Thu Aug 7 13:13:14 2003 -+++ logrotate-3.7.1/logrotate.8 Sat Jan 20 18:54:35 2007 -@@ -200,6 +200,11 @@ file for the omitted attributes. This op - Log files are rotated every day. - - .TP -+\fBdateext\fR -+Archive old versions of log files adding a daily extension like YYYYMMDD -+instead of simply adding a number. -+ -+.TP - \fBdelaycompress\fR - Postpone compression of the previous log file to the next rotation cycle. - This has only effect when used in combination with \fBcompress\fR. -@@ -244,6 +249,12 @@ instead of the about-to-expire file. - \fBmaillast\fR - When using the \fBmail\fR command, mail the about-to-expire file, - instead of the just-rotated file (this is the default). -+ -+.TP -+\fBmaxage\fR \fIcount\fR -+Remove rotated logs older than days. The age is only checked -+if the logfile is to be rotated. The files are mailed to the -+configured address if \fBmaillast\fR and \fBmail\fR are configured. - - .TP - \fBmissingok\fR diff --git a/package/logrotate/patches/patch-logrotate_c b/package/logrotate/patches/patch-logrotate_c deleted file mode 100644 index 0222b1e5c..000000000 --- a/package/logrotate/patches/patch-logrotate_c +++ /dev/null @@ -1,429 +0,0 @@ -$Id$ ---- logrotate-3.7.1.orig/logrotate.c Tue Oct 19 23:41:24 2004 -+++ logrotate-3.7.1/logrotate.c Sat Jan 20 18:56:30 2007 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #ifdef WITH_SELINUX - #include -@@ -22,6 +23,10 @@ int selinux_enabled=0; - #include "log.h" - #include "logrotate.h" - -+#if !defined(GLOB_ABORTED) && defined(GLOB_ABEND) -+#define GLOB_ABORTED GLOB_ABEND -+#endif -+ - typedef struct { - char * fn; - struct tm lastRotated; /* only tm.mon, tm_mday, tm_year are good! */ -@@ -42,6 +47,14 @@ int debug = 0; - char * mailCommand = DEFAULT_MAIL_COMMAND; - time_t nowSecs = 0; - -+static int globerr(const char * pathname, int theerr) { -+ message(MESS_ERROR, "error accessing %s: %s\n", pathname, -+ strerror(theerr)); -+ -+ /* We want the glob operation to continue, so return 0 */ -+ return 1; -+} -+ - static logState * findState(const char * fn, struct stateSet * sip) { - int i; - logState * states = sip->states; -@@ -49,9 +62,11 @@ static logState * findState(const char * - struct tm now = *localtime(&nowSecs); - time_t lr_time; - -+ /* find the filename fn in the statesPtr list */ - for (i = 0; i < numStates; i++) - if (!strcmp(fn, states[i].fn)) break; - -+ /* not in statesPtr list, so add new entry */ - if (i == numStates) { - i = numStates++; - states = realloc(states, sizeof(*states) * numStates); -@@ -75,10 +90,7 @@ static logState * findState(const char * - } - - static int runScript(char * logfn, char * script) { -- int fd; -- char *filespec; - int rc; -- char buf[256]; - - if (debug) { - message(MESS_DEBUG, "running script with arg %s: \"%s\"\n", -@@ -86,39 +98,24 @@ static int runScript(char * logfn, char - return 0; - } - -- filespec = buf; -- snprintf(buf, sizeof(buf), "%s/logrotate.XXXXXX", getenv("TMPDIR") ?: "/tmp"); -- fd = -1; -- if (!filespec || (fd = mkstemp(filespec)) < 0 || fchmod(fd, 0700)) { -- message(MESS_DEBUG, "error creating %s: %s\n", filespec, -- strerror(errno)); -- if (fd >= 0) { -- close(fd); -- unlink(filespec); -- } -- return -1; -- } -- -- if (write(fd, "#!/bin/sh\n\n", 11) != 11 || -- write(fd, script, strlen(script)) != strlen(script)) { -- message(MESS_DEBUG, "error writing %s\n", filespec); -- close(fd); -- unlink(filespec); -- return -1; -- } -- -- close(fd); -- - if (!fork()) { -- execlp(filespec, filespec, logfn, NULL); -+ execl("/bin/sh", "sh", "-c", script, NULL); - exit(1); - } - - wait(&rc); -+ return rc; -+} - -- unlink(filespec); -+static int removeLogFile(char * name) { -+ message(MESS_DEBUG, "removing old log %s\n", name); - -- return rc; -+ if (!debug && unlink(name)) { -+ message(MESS_ERROR, "Failed to remove old log %s: %s\n", -+ name, strerror(errno)); -+ return 1; -+ } -+ return 0; - } - - static int compressLogFile(char * name, logInfo * log, struct stat *sb) { -@@ -265,6 +262,25 @@ static int mailLog(char * logFile, char - return rc; - } - -+static int mailLogWrapper (char * mailFilename, char * mailCommand, int logNum, logInfo * log) { -+ /* if the log is compressed (and we're not mailing a -+ * file whose compression has been delayed), we need -+ * to uncompress it */ -+ if ((log->flags & LOG_FLAG_COMPRESS) && -+ !((log->flags & LOG_FLAG_DELAYCOMPRESS) && -+ (log->flags & LOG_FLAG_MAILFIRST))) { -+ if (mailLog(mailFilename, mailCommand, -+ log->uncompress_prog, log->logAddress, -+ log->files[logNum])) -+ return 1; -+ } else { -+ if (mailLog(mailFilename, mailCommand, NULL, -+ log->logAddress, mailFilename)) -+ return 1; -+ } -+ return 0; -+} -+ - static int copyTruncate(char * currLog, char * saveLog, struct stat * sb, int flags) { - char buf[BUFSIZ]; - int fdcurr = -1, fdsave = -1; -@@ -424,12 +440,15 @@ int findNeedRotating(logInfo * log, int - switch (log->criterium) { - case ROT_WEEKLY: - /* 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) || -- ((mktime(&now) - mktime(&state->lastRotated)) > -+ state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday && -+ now.tm_yday != state->lastRotated.tm_yday) || -+ ((mktime(&now) - mktime(&state->lastRotated)) > - (7 * 24 * 3600))); - break; - case ROT_MONTHLY: -@@ -479,6 +498,9 @@ int rotateSingleLog(logInfo * log, int l - char * baseName; - char * dirName; - char * firstRotated; -+ char * glob_pattern; -+ glob_t globResult; -+ int rc; - size_t alloc_size; - int rotateCount = log->rotateCount ? log->rotateCount : 1; - int logStart = (log->logStart == -1) ? 1 : log->logStart; -@@ -509,7 +531,7 @@ int rotateSingleLog(logInfo * log, int l - - alloc_size = strlen(dirName) + strlen(baseName) + - strlen(log->files[logNum]) + strlen(fileext) + -- strlen(compext) + 10; -+ strlen(compext) + 18; - - oldName = alloca(alloc_size); - newName = alloca(alloc_size); -@@ -531,16 +553,116 @@ int rotateSingleLog(logInfo * log, int l - /* First compress the previous log when necessary */ - if (log->flags & LOG_FLAG_COMPRESS && - log->flags & LOG_FLAG_DELAYCOMPRESS) { -- struct stat sbprev; -- -- sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -- if (stat(oldName, &sbprev)) { -- message(MESS_DEBUG, "previous log %s does not exist\n", -- oldName); -- } else { -- hasErrors = compressLogFile(oldName, log, &sbprev); -+ if (log->flags & LOG_FLAG_DATEEXT) { -+ /* glob for uncompressed files with our pattern */ -+ glob_pattern = malloc(strlen(dirName) + strlen(baseName) -+ + strlen(fileext) + 44 ); -+ sprintf(glob_pattern, -+ "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s", -+ dirName, baseName, fileext); -+ rc = glob(glob_pattern, 0, globerr, &globResult); -+ if (!rc && globResult.gl_pathc > 0) { -+ for (i = 0; i < globResult.gl_pathc && !hasErrors; i++) { -+ struct stat sbprev; -+ sprintf(oldName,"%s",(globResult.gl_pathv)[i]); -+ if (stat(oldName, &sbprev)) { -+ message(MESS_DEBUG, "previous log %s does not exist\n", oldName); -+ } else { -+ hasErrors = compressLogFile(oldName, log, &sbprev); -+ } -+ } -+ } else { -+ message (MESS_DEBUG, "glob finding logs to compress failed\n"); -+ /* fallback to old behaviour */ -+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -+ } -+ globfree(&globResult); -+ free(glob_pattern); -+ } else { -+ struct stat sbprev; -+ -+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -+ if (stat(oldName, &sbprev)) { -+ message(MESS_DEBUG, "previous log %s does not exist\n", -+ oldName); -+ } else { -+ hasErrors = compressLogFile(oldName, log, &sbprev); -+ } - } - } -+ -+ firstRotated = alloca(strlen(dirName) + strlen(baseName) + -+ strlen(fileext) + strlen(compext) + 30); -+ -+ if(log->flags & LOG_FLAG_DATEEXT) { -+ /* glob for compressed files with our pattern -+ * and compress ext */ -+ glob_pattern = malloc(strlen(dirName)+strlen(baseName) -+ +strlen(fileext)+strlen(compext)+44); -+ sprintf(glob_pattern, -+ "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s%s", -+ dirName, baseName, fileext, compext); -+ rc = glob(glob_pattern, 0, globerr, &globResult); -+ if (!rc) { -+ /* search for files to drop, if we find one remember it, -+ * if we find another one mail and remove the first and -+ * remember the second and so on */ -+ struct stat fst_buf; -+ int mail_out = -1; -+ /* remove the first (n - rotateCount) matches -+ * no real rotation needed, since the files have -+ * the date in their name */ -+ for (i = 0; i < globResult.gl_pathc; i++) { -+ if( !stat((globResult.gl_pathv)[i],&fst_buf) ) { -+ if ((i <= ((int)globResult.gl_pathc - rotateCount)) -+ || ((log->rotateAge > 0) -+ && (((nowSecs - fst_buf.st_mtime)/60/60/24) -+ > log->rotateAge))) { -+ if ( mail_out != -1 ) { -+ if (!hasErrors && log->logAddress) { -+ char * mailFilename = (globResult.gl_pathv)[mail_out]; -+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log); -+ if (!hasErrors) -+ hasErrors = removeLogFile(mailFilename); -+ } -+ } -+ mail_out = i; -+ } -+ } -+ } -+ if ( mail_out != -1 ) { -+ /* oldName is oldest Backup found (for unlink later) */ -+ sprintf(oldName, "%s", (globResult.gl_pathv)[mail_out]); -+ strcpy(disposeName, oldName); -+ } else -+ disposeName = NULL; -+ } else { -+ message (MESS_DEBUG, "glob finding old rotated logs failed\n"); -+ disposeName = NULL; -+ } -+ /* firstRotated is most recently created/compressed rotated log */ -+ sprintf(firstRotated, "%s/%s-%04d%02d%02d%s%s", -+ dirName, baseName, now.tm_year+1900, -+ now.tm_mon+1, now.tm_mday, fileext, compext); -+ globfree(&globResult); -+ free(glob_pattern); -+ } else { -+ if ( log->rotateAge ) { -+ struct stat fst_buf; -+ for (i=1; i <= rotateCount; i++) { -+ sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName, -+ rotateCount + 1, fileext, compext); -+ if(!stat(oldName,&fst_buf) -+ && (((nowSecs - fst_buf.st_mtime)/60/60/24) -+ > log->rotateAge)) { -+ char * mailFilename = (globResult.gl_pathv)[i]; -+ if (!hasErrors && log->logAddress) -+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log); -+ if (!hasErrors) -+ hasErrors = removeLogFile(mailFilename); -+ } -+ } -+ } - - sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName, - logStart + rotateCount, fileext, compext); -@@ -548,8 +670,6 @@ int rotateSingleLog(logInfo * log, int l - - strcpy(disposeName, oldName); - -- firstRotated = alloca(strlen(dirName) + strlen(baseName) + -- strlen(fileext) + strlen(compext) + 30); - sprintf(firstRotated, "%s/%s.%d%s%s", dirName, baseName, - logStart, fileext, - (log->flags & LOG_FLAG_DELAYCOMPRESS) ? "" : compext); -@@ -600,12 +720,27 @@ int rotateSingleLog(logInfo * log, int l - } - } - } -- -+ } /* !LOG_FLAG_DATEEXT */ -+ - finalName = oldName; -- -- /* note: the gzip extension is *not* used here! */ -- sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -- -+ -+ if(log->flags & LOG_FLAG_DATEEXT) { -+ char * destFile = alloca(strlen(dirName) + strlen(baseName) + -+ strlen(fileext) + strlen(compext) + 30); -+ struct stat fst_buf; -+ sprintf(finalName, "%s/%s-%04d%02d%02d%s", -+ dirName, baseName, now.tm_year+1900, -+ now.tm_mon+1, now.tm_mday, fileext); -+ sprintf(destFile, "%s%s", finalName, compext); -+ if(!stat(destFile,&fst_buf)) { -+ message (MESS_DEBUG, "destination %s already exists, skipping rotation\n", firstRotated); -+ hasErrors = 1; -+ } -+ } else { -+ /* note: the gzip extension is *not* used here! */ -+ sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -+ } -+ - /* if the last rotation doesn't exist, that's okay */ - if (!debug && access(disposeName, F_OK)) { - message(MESS_DEBUG, "log %s doesn't exist -- won't try to " -@@ -613,9 +748,6 @@ int rotateSingleLog(logInfo * log, int l - disposeName = NULL; - } - -- free(dirName); -- free(baseName); -- - if (!hasErrors) { - if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) { - message(MESS_DEBUG, "running prerotate script\n"); -@@ -722,33 +854,12 @@ int rotateSingleLog(logInfo * log, int l - else - mailFilename = disposeName; - -- if (mailFilename) { -- /* if the log is compressed (and we're not mailing a -- file whose compression has been delayed), we need -- to uncompress it */ -- if ((log->flags & LOG_FLAG_COMPRESS) && -- !((log->flags & LOG_FLAG_DELAYCOMPRESS) && -- (log->flags & LOG_FLAG_MAILFIRST))) { -- if (mailLog(mailFilename, mailCommand, -- log->uncompress_prog, log->logAddress, -- log->files[logNum])) -- hasErrors = 1; -- } else { -- if (mailLog(mailFilename, mailCommand, NULL, -- log->logAddress, mailFilename)) -- hasErrors = 1; -- } -- } -+ if (mailFilename) -+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log); - } - - if (!hasErrors && disposeName) { -- message(MESS_DEBUG, "removing old log %s\n", disposeName); -- -- if (!debug && unlink(disposeName)) { -- message(MESS_ERROR, "Failed to remove old log %s: %s\n", -- disposeName, strerror(errno)); -- hasErrors = 1; -- } -+ hasErrors = removeLogFile(disposeName); - } - } - -@@ -761,6 +872,8 @@ int rotateSingleLog(logInfo * log, int l - } - } - #endif -+ free(dirName); -+ free(baseName); - return hasErrors; - } - -@@ -1002,7 +1115,7 @@ static int readState(char * stateFilenam - } - - /* 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); - fclose(f); -@@ -1047,7 +1160,9 @@ static int readState(char * stateFilenam - - int main(int argc, const char ** argv) { - logInfo defConfig = { NULL, NULL, 0, NULL, ROT_SIZE, -- /* threshHold */ 1024 * 1024, 0, -+ /* threshHold */ 1024 * 1024, -+ /* rotateCount */ 0, -+ /* rotateAge */ 0, - /* log start */ -1, - /* pre, post */ NULL, NULL, - /* first, last */ NULL, NULL, -@@ -1108,8 +1223,7 @@ int main(int argc, const char ** argv) { - - files = poptGetArgs((poptContext) optCon); - if (!files) { -- fprintf(stderr, "logrotate " VERSION -- " - Copyright (C) 1995-2001 Red Hat, Inc.\n"); -+ fprintf(stderr, "logrotate - Copyright (C) 1995-2001 Red Hat, Inc.\n"); - fprintf(stderr, "This may be freely redistributed under the terms of " - "the GNU Public License\n\n"); - poptPrintUsage(optCon, stderr, 0); diff --git a/package/logrotate/patches/patch-logrotate_h b/package/logrotate/patches/patch-logrotate_h deleted file mode 100644 index 9a3adefc5..000000000 --- a/package/logrotate/patches/patch-logrotate_h +++ /dev/null @@ -1,19 +0,0 @@ -$Id$ ---- logrotate-3.7.1.orig/logrotate.h Thu Aug 7 13:13:14 2003 -+++ logrotate-3.7.1/logrotate.h Sat Jan 20 18:54:35 2007 -@@ -15,6 +15,7 @@ - #define LOG_FLAG_MAILFIRST (1 << 6) - #define LOG_FLAG_SHAREDSCRIPTS (1 << 7) - #define LOG_FLAG_COPY (1 << 8) -+#define LOG_FLAG_DATEEXT (1 << 9) - - #define NO_FORCE_ROTATE 0 - #define FORCE_ROTATE 1 -@@ -34,6 +35,7 @@ typedef struct { - enum { ROT_DAYS, ROT_WEEKLY, ROT_MONTHLY, ROT_SIZE, ROT_FORCE } criterium; - unsigned int threshhold; - int rotateCount; -+ int rotateAge; - int logStart; - char * pre, * post, * first, * last; - char * logAddress; diff --git a/package/lrzsz/Makefile b/package/lrzsz/Makefile index d1b5f1b24..ba6d107e2 100644 --- a/package/lrzsz/Makefile +++ b/package/lrzsz/Makefile @@ -16,11 +16,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LRZSZ,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -CONFIGURE_ARGS+= ac_cv_lib_nsl_gethostbyname=no +INSTALL_STYLE:= manual + CONFIGURE_ARGS+= --without-libiconv-prefix \ --without-libintl-prefix -BUILD_STYLE:= auto do-install: ${INSTALL_DIR} ${IDIR_LRZSZ}/usr/bin diff --git a/package/lua/Makefile b/package/lua/Makefile index 583de4562..bafdadb50 100644 --- a/package/lua/Makefile +++ b/package/lua/Makefile @@ -22,6 +22,10 @@ $(eval $(call PKG_template,LUA,lua,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS}, $(eval $(call PKG_template,LUAC,luac,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LUA_EXAMPLES,lua-examples,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: ${MAKE} -C ${WRKBUILD} \ CC="${TARGET_CC}" \ diff --git a/package/lvm/Makefile b/package/lvm/Makefile index 6c73678a0..d67bbc43e 100644 --- a/package/lvm/Makefile +++ b/package/lvm/Makefile @@ -22,12 +22,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LVM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,DEVICE_MAPPER,device-mapper,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR_DM},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-user="" --with-group="" \ --with-optimisation="" \ --with-lvm1=none -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: # lvm diff --git a/package/lynx/Makefile b/package/lynx/Makefile index 443dd82de..edea58071 100644 --- a/package/lynx/Makefile +++ b/package/lynx/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME= lynx PKG_VERSION= 2.8.7dev.7 PKG_RELEASE= 2 -PKG_BUILDDEP+= ncurses openssl zlib PKG_MD5SUM= 83891107c873421e5ac917cc0ab53fe8 PKG_DESCR:= Standard text browser PKG_SECTION:= text PKG_DEPENDS:= libncurses libopenssl zlib +PKG_BUILDDEP+= ncurses openssl zlib PKG_URL:= http://lynx.isc.org PKG_SITES= http://lynx.isc.org/current/ \ ${MASTER_SITE_MIRBSD} @@ -27,7 +27,6 @@ TCPPFLAGS+= -I${STAGING_DIR}/include/openssl TCPPFLAGS+= -DUSE_OPENSSL_INCL -DUSE_X509_SUPPORT TLDFLAGS+= -lz -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_path_TELNET=telnet \ ac_cv_path_TN3270=tn3270 \ ac_cv_path_RLOGIN=rlogin \ @@ -80,11 +79,7 @@ CONFIGURE_ARGS+= \ --disable-widec \ --disable-locale-charset -# --prefix=${STAGING_DIR}/usr - MAKE_FILE:= makefile -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LYNX}/etc ${IDIR_LYNX}/usr/bin diff --git a/package/m4/Makefile b/package/m4/Makefile index df6a82bdf..2f762d7fe 100644 --- a/package/m4/Makefile +++ b/package/m4/Makefile @@ -16,11 +16,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,M4,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_func_mbrtowc=no \ gl_cv_func_wcrtomb_retval=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_M4}/usr/bin diff --git a/package/macchanger/Makefile b/package/macchanger/Makefile index e36ef4cd3..723c932b4 100755 --- a/package/macchanger/Makefile +++ b/package/macchanger/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MACCHANGER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_MACCHANGER}/usr/bin ${IDIR_MACCHANGER}/usr/share ${INSTALL_BIN} ${WRKINST}/usr/bin/macchanger ${IDIR_MACCHANGER}/usr/bin diff --git a/package/madplay/Makefile b/package/madplay/Makefile index 1ac596651..9fd699efb 100644 --- a/package/madplay/Makefile +++ b/package/madplay/Makefile @@ -19,7 +19,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MADPLAY,madplay,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= BUILD_CC="${TARGET_CC}" HOSTCC=${HOST_CC} \ LIBS="-lz" \ ac_cv_linux_vers=2 \ @@ -31,8 +30,6 @@ CONFIGURE_ARGS+= --disable-debugging \ --without-libintl-prefix \ --without-esd \ --with-alsa -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_MADPLAY}/usr/bin diff --git a/package/make/Makefile b/package/make/Makefile index e8af2ed26..5d546c0af 100644 --- a/package/make/Makefile +++ b/package/make/Makefile @@ -16,10 +16,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,MAKE,make,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: $(INSTALL_DIR) $(IDIR_MAKE)/usr/bin $(INSTALL_BIN) $(WRKINST)/usr/bin/make $(IDIR_MAKE)/usr/bin diff --git a/package/maradns/Makefile b/package/maradns/Makefile index 45c95bc79..235bd1ebd 100644 --- a/package/maradns/Makefile +++ b/package/maradns/Makefile @@ -9,26 +9,25 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 9e715104234cc9bf01e2afaad27eb787 PKG_DESCR:= small and secure DNS server PKG_SECTION:= net +PKG_NOPARALLEL:= 1 PKG_DEPENDS:= libpthread PKG_URL:= http://www.maradns.org PKG_SITES:= http://www.maradns.org/download/1.4/${PKG_VERSION}/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,MARADNS,maradns,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,MARADNS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIG_STYLE:= manual -BUILD_STYLE:= auto -MAKE_FLAGS+= CFLAGS="${TCFLAGS}" \ - FLAGS="${TCFLAGS}" \ - CC="${TARGET_CC}" \ - HOSTCC="${HOSTCC}" -INSTALL_STYLE:= auto FAKE_FLAGS+= PREFIX="${WRKINST}/usr" \ RPM_BUILD_ROOT="${WRKINST}" pre-install: - mkdir -p ${WRKINST}/usr/{bin,sbin} - mkdir -p ${WRKINST}/usr/man/man{1,5,8} + @mkdir -p ${WRKINST}/usr/man/man{1,5,8} + +do-configure: + (cd ${WRKBUILD} && ./configure); post-install: ${INSTALL_DIR} ${IDIR_MARADNS}/etc/maradns diff --git a/package/maradns/patches/cross-compile-fix.patch b/package/maradns/patches/cross-compile-fix.patch index d8ee0e051..8277956c5 100644 --- a/package/maradns/patches/cross-compile-fix.patch +++ b/package/maradns/patches/cross-compile-fix.patch @@ -1,7 +1,7 @@ diff -urN maradns-1.0.26.old/rng/Makefile maradns-1.0.26.dev/rng/Makefile ---- maradns-1.0.26.old/rng/Makefile 2003-08-02 21:39:36.000000000 +0200 -+++ maradns-1.0.26.dev/rng/Makefile 2005-04-30 23:29:30.000000000 +0200 -@@ -20,7 +20,7 @@ +--- maradns-1.4.03.orig/rng/Makefile 2006-01-02 17:59:33.000000000 +0100 ++++ maradns-1.4.03/rng/Makefile 2010-02-06 00:19:48.241836878 +0100 +@@ -25,7 +25,7 @@ rng-api-fst.o: rng-alg-fst.o rng-api-fst $(CC) -c $(FLAGS) -o rng-api-fst.o rng-api-fst.c make_32bit_tables: make_32bit_tables.c diff --git a/package/maradns/patches/patch-Makefile b/package/maradns/patches/patch-Makefile new file mode 100644 index 000000000..d1fc651c4 --- /dev/null +++ b/package/maradns/patches/patch-Makefile @@ -0,0 +1,94 @@ +--- maradns-1.4.03.orig/Makefile 2006-01-02 17:59:33.000000000 +0100 ++++ maradns-1.4.03/Makefile 2010-02-06 00:19:48.471836901 +0100 +@@ -1,15 +1,82 @@ +-# This is a wrapper that runs "./configure ; make" +-all: +- ./compile.sh ++VERSION=1.4.03 ++COMPILED="Linux system at Sat Feb 6 00:19:48 CET 2010" ++COMPILED_DEBUG="Linux system at Sat Feb 6 00:19:48 CET 2010 (Debug)" ++# Server objects ++SOBJECTS=server/MaraBigHash.o ++# js_string library (buffer overflow resistant string library) objects ++JOBJS=libs/JsStr.o libs/JsStrOS.o libs/JsStrCP.o ++# MaraHash (assosciative array) library objects ++MHOBJS=libs/MaraHash.o ++# Parser objects ++POBJECTS=parse/ParseMaraRc.o parse/ParseCsv1.o ../parse/ParseIpAcl.o ++# DNS query processing library objects ++DOBJECTS=dns/Queries.o dns/Compress.o dns/bobbit.o ++# Secure random number generator objects ++ROBJECTS=rng/rng-api-fst.o rng/rng-alg-fst.o ++OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS) ++EXECS=server/maradns + +-debug: +- ./configure ; make debug ++# Uncomment the following three lines to get this to compile on Solaris ++# LDFLAGS=-lxnet ++# CC=gcc $(LDFLAGS) -DSELECT_PROBLEM ++# M="CC=$(CC)" ++# These are currently unused, but will be needed again if we use flock() again ++# CFLAGS=-I/usr/ucbinclude ++# L="CC=$(CC) $(CFLAGS)" ++# LDFLAGS=-L/usr/ucblib -lucb -lxnet ++# end the Solaris section ++# Non-Solaris version of "M" ++V="VERSION=$(VERSION)" ++Q="DEFINES=-DSELECT_PROBLEM" ++ ++# Debug ++ ++FLAGS = -O2 -Wall -DSELECT_PROBLEM ++M="CC=$(CC) $(FLAGS)" ++D="CC=$(CC) $(FLAGS) -DDEBUG -DTHREADS" ++#FLAGS = -g ++ ++all: ++ cd libs ; make $(M) ; cd ../dns ; make $(M) ; \ ++ cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \ ++ cd ../qual ; make $(M) ; cd ../server ; \ ++ make $(M) $(V) COMPILED=\"$(COMPILED)\" ; \ ++ cd ../tools ; make $(M) ; \ ++ cd ../tcp ; make $(M) $(V) ; cat ../00README.FIRST ++ ++debug: ++ cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \ ++ cd ../dns ; make $(D) ; cd ../rng ; make $(D) ; \ ++ cd ../parse ; make $(D) ; cd ../qual ; make $(D) ; \ ++ cd ../server ; \ ++ make $(D) $(Q) $(V) COMPILED=\"$(COMPILED_DEBUG)\" ; \ ++ cd ../tools ; make $(D) ; \ ++ cd ../tcp ; make $(D) $(V) ; cat ../00README.FIRST + + clean: +- ./configure ; make clean ++ rm -f $(OBJECTS) core $(EXECS) ; \ ++ cp build/Makefile.w Makefile ; cd dns ; make clean ; \ ++ cd ../libs ; make clean ; cd ../parse ; make clean ; \ ++ cd ../qual ; make clean ; \ ++ cd ../server ; make clean ; \ ++ cp Makefile.recursive Makefile ; \ ++ cd ../test ; make clean ; \ ++ cd ../tools ; make clean ; \ ++ cd misc ; make clean ; \ ++ cd ../../utf8 ; make clean ; \ ++ cd ../tcp ; make clean ; \ ++ cd ../rng ; make clean ; \ ++ cd ../sqa ; make clean ; \ ++ # ; cd .. ; find . -type d | grep .deps | xargs rm -fr ; find . -name '*.o' | xargs rm + +-uninstall: +- ./configure ; make uninstall ++strip: ++ cd server; strip maradns ; cd ../tcp ; \ ++ strip zoneserver getzone fetchzone ; \ ++ cd ../tools ; strip askmara + + install: +- echo Please compile MaraDNS first ++ VERSION=$(VERSION) ./build/install.sh ++ ++uninstall: ++ VERSION=$(VERSION) ./build/uninstall.sh ++ diff --git a/package/maradns/patches/patch-build_Makefile_linux b/package/maradns/patches/patch-build_Makefile_linux new file mode 100644 index 000000000..2e7dec5be --- /dev/null +++ b/package/maradns/patches/patch-build_Makefile_linux @@ -0,0 +1,32 @@ +--- maradns-1.4.03.orig/build/Makefile.linux 2006-11-24 12:44:29.000000000 +0100 ++++ maradns-1.4.03/build/Makefile.linux 2010-02-06 00:23:58.393084387 +0100 +@@ -23,23 +23,23 @@ EXECS=server/maradns + # LDFLAGS=-L/usr/ucblib -lucb -lxnet + # end the Solaris section + # Non-Solaris version of "M" +-V="VERSION=$(VERSION)" ++VER="VERSION=$(VERSION)" + Q="DEFINES=-DSELECT_PROBLEM" + + # Debug + +-FLAGS = -O2 -Wall -DSELECT_PROBLEM +-M="CC=$(CC) $(FLAGS)" +-D="CC=$(CC) $(FLAGS) -DDEBUG -DTHREADS" ++CFLAGS ?= -O2 -Wall -DSELECT_PROBLEM ++M="CC=$(CC) $(CFLAGS)" ++D="CC=$(CC) $(CFLAGS) -DDEBUG -DTHREADS" + #FLAGS = -g + + all: + cd libs ; make $(M) ; cd ../dns ; make $(M) ; \ + cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \ + cd ../qual ; make $(M) ; cd ../server ; \ +- make $(M) $(V) COMPILED=\"$(COMPILED)\" ; \ ++ make $(M) $(VER) COMPILED=\"$(COMPILED)\" ; \ + cd ../tools ; make $(M) ; \ +- cd ../tcp ; make $(M) $(V) ; cat ../00README.FIRST ++ cd ../tcp ; make $(M) $(VER) + + debug: + cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \ diff --git a/package/maradns/patches/patch-configure b/package/maradns/patches/patch-configure new file mode 100644 index 000000000..d6d698a78 --- /dev/null +++ b/package/maradns/patches/patch-configure @@ -0,0 +1,19 @@ +--- maradns-1.4.03.orig/configure 2007-10-19 15:54:14.000000000 +0200 ++++ maradns-1.4.03/configure 2010-02-06 00:22:18.533084157 +0100 +@@ -31,12 +31,12 @@ BUILDDIR=build + export BUILDDIR + + # Show them the disclaimer +-cat 00README.FIRST +-echo ----- +-echo ++#cat 00README.FIRST ++#echo ----- ++#echo + + # Try to determine what kind of system we are running +-UNAME=`uname -s` ++UNAME=Linux + + # Make sure the Makefile has the current version number of MaraDNS + # VERSION is a one line file in the form "VERSION=0.1.23" (without the diff --git a/package/maradns/patches/patch-dns_Makefile b/package/maradns/patches/patch-dns_Makefile new file mode 100644 index 000000000..70713032f --- /dev/null +++ b/package/maradns/patches/patch-dns_Makefile @@ -0,0 +1,11 @@ +--- maradns-1.4.03.orig/dns/Makefile 2005-12-20 11:10:40.000000000 +0100 ++++ maradns-1.4.03/dns/Makefile 2010-02-06 00:19:48.481829524 +0100 +@@ -3,7 +3,7 @@ JOBJS=../libs/JsStr.o ../libs/JsStrOS.o + MHOBJS=../libs/MaraHash.o + OBJECTS=$(DOBJECTS) $(JOBJS) $(MHOBJS) + +-FLAGS = -g -Wall $(DEBUG) ++#FLAGS = -g -Wall $(DEBUG) + #FLAGS = -g $(DEBUG) + + all: Queries.o Compress.o bobbit.o Decompress.o diff --git a/package/maradns/patches/patch-qual_Makefile b/package/maradns/patches/patch-qual_Makefile new file mode 100644 index 000000000..b78ce7096 --- /dev/null +++ b/package/maradns/patches/patch-qual_Makefile @@ -0,0 +1,12 @@ +--- maradns-1.4.03.orig/qual/Makefile 2006-01-02 17:59:33.000000000 +0100 ++++ maradns-1.4.03/qual/Makefile 2010-02-06 00:19:48.481829524 +0100 +@@ -2,9 +2,6 @@ DOBJECTS=qual_timestamp.o + JOBJS=../libs/JsStr.o ../libs/JsStrOS.o ../libs/JsStrCP.o + OBJECTS=$(DOBJECTS) + +-#FLAGS = -g -Wall $(DEBUG) +-#FLAGS = -g $(DEBUG) +- + all: qual_timestamp.o + + clean: diff --git a/package/maradns/patches/patch-rng_rng-32bit-tables_h b/package/maradns/patches/patch-rng_rng-32bit-tables_h new file mode 100644 index 000000000..61ebbff70 --- /dev/null +++ b/package/maradns/patches/patch-rng_rng-32bit-tables_h @@ -0,0 +1,655 @@ +--- maradns-1.4.03.orig/rng/rng-32bit-tables.h 2010-02-02 18:12:47.000000000 +0100 ++++ maradns-1.4.03/rng/rng-32bit-tables.h 2010-02-06 00:19:49.965584207 +0100 +@@ -1,332 +1,332 @@ + /* This file is automatically generated by the program make_32bit_tables.c */ + + static const u32 Te0[256] = { +-0xb3e2509bU, 0x63b4ca06U, 0x85e4a2d4U, 0x216c4602U, +-0x3a6f3fa8U, 0xa616bd75U, 0x134d0610U, 0x4d60b99cU, +-0x176ab44dU, 0x7f41f98eU, 0xe277da8fU, 0xcdec08c9U, +-0x5a0a0dd1U, 0x1b0379aaU, 0x7b664bd3U, 0xa1e0f757U, +-0xfaa55b5aU, 0xea39a535U, 0xc5a27773U, 0xb17c0938U, +-0x2023e7deU, 0xd47128c0U, 0x7c9001f1U, 0x22bdbe7dU, +-0xec804ecbU, 0xb9327682U, 0xbd15c4dfU, 0xc9cbba94U, +-0xa488e4d6U, 0x014fa1dcU, 0x60653279U, 0xfe82e907U, +-0x74de7e4bU, 0xa8e12931U, 0x0427b25dU, 0xe65068d2U, +-0x898d6f33U, 0x928e1699U, 0x1202a7ccU, 0x7a29ea0fU, +-0x1f24cbf7U, 0x64428024U, 0xdd70f6a6U, 0xbec43ca0U, +-0x2d058be5U, 0x15f4edeeU, 0x572c61eaU, 0x1cf53388U, +-0xf974a325U, 0x4046d5a7U, 0x2bbc601bU, 0xdea10ed9U, +-0x42d88c04U, 0x8f3484cdU, 0x5f621e50U, 0x835d492aU, +-0xf51d6ec2U, 0x2f9bd246U, 0xbf8b9d7cU, 0xee1e1768U, +-0x6c0cff9eU, 0x16251591U, 0x37495393U, 0x5cb3e62fU, +-0x3f072c29U, 0x4bd95262U, 0x05681381U, 0x90104f3aU, +-0x03d1f87fU, 0x5244726bU, 0xd53e891cU, 0x9ac06923U, +-0x51958a14U, 0x915feee6U, 0xdfeeaf05U, 0x79f81270U, +-0xd2c8c33eU, 0x39bec7d7U, 0x764027e8U, 0x4808aa1dU, +-0xcf72516aU, 0x269a0c20U, 0xab30d14eU, 0xc2543d51U, +-0x770f8634U, 0xa0af568bU, 0x27d5adfcU, 0x4ffee03fU, +-0xb4141ab9U, 0x8ce57cb2U, 0x2af3c1c7U, 0xdbc91d58U, +-0xd6ef7163U, 0x3cd6d456U, 0x5b45ac0dU, 0x3e488df5U, +-0x32214012U, 0xe1a622f0U, 0x9b8fc8ffU, 0x43972dd8U, +-0xcca3a915U, 0x286d9864U, 0x31f0b86dU, 0x3498abecU, +-0x73283469U, 0x6fdd07e1U, 0x682b4dc3U, 0x66dcd987U, +-0x5663c036U, 0x62fb6bdaU, 0x95785cbbU, 0xe71fc90eU, +-0x726795b5U, 0xcb55e337U, 0x5dfc47f3U, 0x70f9cc16U, +-0xb68a431aU, 0x81c31089U, 0xe4ce3171U, 0x0d266c3bU, +-0xacc69b6cU, 0x985e3080U, 0xda86bc84U, 0x6d435e42U, +-0x6964ec1fU, 0x06b9ebfeU, 0x84ab0308U, 0xbae38efdU, +-0x11d35fb3U, 0x00000000U, 0x0ef79444U, 0xfbeafa86U, +-0xbbac2f21U, 0x650d21f8U, 0xae58c2cfU, 0x86355aabU, +-0x612a93a5U, 0xf452cf1eU, 0x446167faU, 0x877afb77U, +-0xf3a4853cU, 0xa7591ca9U, 0x7ddfa02dU, 0x58945472U, +-0x9c7982ddU, 0xd818e527U, 0x336ee1ceU, 0x07f64a22U, +-0xa5c7450aU, 0x808cb155U, 0xb7c5e2c6U, 0xef51b6b4U, +-0x3606f24fU, 0xffcd48dbU, 0x55b23849U, 0x6bfab5bcU, +-0x4eb141e3U, 0x8e7b2511U, 0x6ab51460U, 0xfd531178U, +-0x18d281d5U, 0xd38762e2U, 0xf2eb24e0U, 0xca1a42ebU, +-0xdc3f577aU, 0x88c2ceefU, 0x8daadd6eU, 0x029e59a3U, +-0x199d2009U, 0xb033a8e4U, 0x0901de66U, 0x0c69cde7U, +-0x0fb83598U, 0xf7833761U, 0xf6cc96bdU, 0x78b7b3acU, +-0x7591df97U, 0x49470bc1U, 0xe58190adU, 0x97e60518U, +-0xd7a0d0bfU, 0x4a96f3beU, 0x9fa87aa2U, 0xe9e85d4aU, +-0x0b9f87c5U, 0x452ec626U, 0xbc5a6503U, 0xd95744fbU, +-0x9911915cU, 0x96a9a4c4U, 0x46ff3e59U, 0x4c2f1840U, +-0x9437fd67U, 0xe3387b53U, 0x3d99758aU, 0xc73c2ed0U, +-0x2c4a2a39U, 0x254bf45fU, 0x23f21fa1U, 0x1a4cd876U, +-0xd0569a9dU, 0xb87dd75eU, 0x1dba9254U, 0x38f1660bU, +-0xa2310f28U, 0x5e2dbf8cU, 0x47b09f85U, 0x14bb4c32U, +-0xa9ae88edU, 0x50da2bc8U, 0x24045583U, 0xeb7604e9U, +-0xb55bbb65U, 0x1e6b6a2bU, 0x8212e8f6U, 0xf13adc9fU, +-0xc0ca64f2U, 0x084e7fbaU, 0xa37eaef4U, 0x35d70a30U, +-0xedcfef17U, 0xe0e9832cU, 0x30bf19b1U, 0x9ee7db7eU, +-0xe8a7fc96U, 0x93c1b745U, 0xfc1cb0a4U, 0xb2adf147U, +-0x109cfe6fU, 0xad893ab0U, 0xaf176313U, 0x2ed4739aU, +-0x6e92a63dU, 0x9d362301U, 0xf83b02f9U, 0xc6738f0cU, +-0xc185c52eU, 0xc8841b48U, 0x6793785bU, 0xaa7f7092U, +-0x4109747bU, 0xc31b9c8dU, 0x71b66dcaU, 0x8b133690U, +-0xd1193b41U, 0x54fd9995U, 0xc4edd6afU, 0x7e0e5852U, +-0x3b209e74U, 0x8a5c974cU, 0xf0757d43U, 0x59dbf5aeU, +-0xce3df0b6U, 0x530bd3b7U, 0x0ad02619U, 0x292239b8U, ++0xb3e2509bU, 0x63b4ca06U, 0x85e4a2d4U, 0x216c4602U, ++0x3a6f3fa8U, 0xa616bd75U, 0x134d0610U, 0x4d60b99cU, ++0x176ab44dU, 0x7f41f98eU, 0xe277da8fU, 0xcdec08c9U, ++0x5a0a0dd1U, 0x1b0379aaU, 0x7b664bd3U, 0xa1e0f757U, ++0xfaa55b5aU, 0xea39a535U, 0xc5a27773U, 0xb17c0938U, ++0x2023e7deU, 0xd47128c0U, 0x7c9001f1U, 0x22bdbe7dU, ++0xec804ecbU, 0xb9327682U, 0xbd15c4dfU, 0xc9cbba94U, ++0xa488e4d6U, 0x014fa1dcU, 0x60653279U, 0xfe82e907U, ++0x74de7e4bU, 0xa8e12931U, 0x0427b25dU, 0xe65068d2U, ++0x898d6f33U, 0x928e1699U, 0x1202a7ccU, 0x7a29ea0fU, ++0x1f24cbf7U, 0x64428024U, 0xdd70f6a6U, 0xbec43ca0U, ++0x2d058be5U, 0x15f4edeeU, 0x572c61eaU, 0x1cf53388U, ++0xf974a325U, 0x4046d5a7U, 0x2bbc601bU, 0xdea10ed9U, ++0x42d88c04U, 0x8f3484cdU, 0x5f621e50U, 0x835d492aU, ++0xf51d6ec2U, 0x2f9bd246U, 0xbf8b9d7cU, 0xee1e1768U, ++0x6c0cff9eU, 0x16251591U, 0x37495393U, 0x5cb3e62fU, ++0x3f072c29U, 0x4bd95262U, 0x05681381U, 0x90104f3aU, ++0x03d1f87fU, 0x5244726bU, 0xd53e891cU, 0x9ac06923U, ++0x51958a14U, 0x915feee6U, 0xdfeeaf05U, 0x79f81270U, ++0xd2c8c33eU, 0x39bec7d7U, 0x764027e8U, 0x4808aa1dU, ++0xcf72516aU, 0x269a0c20U, 0xab30d14eU, 0xc2543d51U, ++0x770f8634U, 0xa0af568bU, 0x27d5adfcU, 0x4ffee03fU, ++0xb4141ab9U, 0x8ce57cb2U, 0x2af3c1c7U, 0xdbc91d58U, ++0xd6ef7163U, 0x3cd6d456U, 0x5b45ac0dU, 0x3e488df5U, ++0x32214012U, 0xe1a622f0U, 0x9b8fc8ffU, 0x43972dd8U, ++0xcca3a915U, 0x286d9864U, 0x31f0b86dU, 0x3498abecU, ++0x73283469U, 0x6fdd07e1U, 0x682b4dc3U, 0x66dcd987U, ++0x5663c036U, 0x62fb6bdaU, 0x95785cbbU, 0xe71fc90eU, ++0x726795b5U, 0xcb55e337U, 0x5dfc47f3U, 0x70f9cc16U, ++0xb68a431aU, 0x81c31089U, 0xe4ce3171U, 0x0d266c3bU, ++0xacc69b6cU, 0x985e3080U, 0xda86bc84U, 0x6d435e42U, ++0x6964ec1fU, 0x06b9ebfeU, 0x84ab0308U, 0xbae38efdU, ++0x11d35fb3U, 0x00000000U, 0x0ef79444U, 0xfbeafa86U, ++0xbbac2f21U, 0x650d21f8U, 0xae58c2cfU, 0x86355aabU, ++0x612a93a5U, 0xf452cf1eU, 0x446167faU, 0x877afb77U, ++0xf3a4853cU, 0xa7591ca9U, 0x7ddfa02dU, 0x58945472U, ++0x9c7982ddU, 0xd818e527U, 0x336ee1ceU, 0x07f64a22U, ++0xa5c7450aU, 0x808cb155U, 0xb7c5e2c6U, 0xef51b6b4U, ++0x3606f24fU, 0xffcd48dbU, 0x55b23849U, 0x6bfab5bcU, ++0x4eb141e3U, 0x8e7b2511U, 0x6ab51460U, 0xfd531178U, ++0x18d281d5U, 0xd38762e2U, 0xf2eb24e0U, 0xca1a42ebU, ++0xdc3f577aU, 0x88c2ceefU, 0x8daadd6eU, 0x029e59a3U, ++0x199d2009U, 0xb033a8e4U, 0x0901de66U, 0x0c69cde7U, ++0x0fb83598U, 0xf7833761U, 0xf6cc96bdU, 0x78b7b3acU, ++0x7591df97U, 0x49470bc1U, 0xe58190adU, 0x97e60518U, ++0xd7a0d0bfU, 0x4a96f3beU, 0x9fa87aa2U, 0xe9e85d4aU, ++0x0b9f87c5U, 0x452ec626U, 0xbc5a6503U, 0xd95744fbU, ++0x9911915cU, 0x96a9a4c4U, 0x46ff3e59U, 0x4c2f1840U, ++0x9437fd67U, 0xe3387b53U, 0x3d99758aU, 0xc73c2ed0U, ++0x2c4a2a39U, 0x254bf45fU, 0x23f21fa1U, 0x1a4cd876U, ++0xd0569a9dU, 0xb87dd75eU, 0x1dba9254U, 0x38f1660bU, ++0xa2310f28U, 0x5e2dbf8cU, 0x47b09f85U, 0x14bb4c32U, ++0xa9ae88edU, 0x50da2bc8U, 0x24045583U, 0xeb7604e9U, ++0xb55bbb65U, 0x1e6b6a2bU, 0x8212e8f6U, 0xf13adc9fU, ++0xc0ca64f2U, 0x084e7fbaU, 0xa37eaef4U, 0x35d70a30U, ++0xedcfef17U, 0xe0e9832cU, 0x30bf19b1U, 0x9ee7db7eU, ++0xe8a7fc96U, 0x93c1b745U, 0xfc1cb0a4U, 0xb2adf147U, ++0x109cfe6fU, 0xad893ab0U, 0xaf176313U, 0x2ed4739aU, ++0x6e92a63dU, 0x9d362301U, 0xf83b02f9U, 0xc6738f0cU, ++0xc185c52eU, 0xc8841b48U, 0x6793785bU, 0xaa7f7092U, ++0x4109747bU, 0xc31b9c8dU, 0x71b66dcaU, 0x8b133690U, ++0xd1193b41U, 0x54fd9995U, 0xc4edd6afU, 0x7e0e5852U, ++0x3b209e74U, 0x8a5c974cU, 0xf0757d43U, 0x59dbf5aeU, ++0xce3df0b6U, 0x530bd3b7U, 0x0ad02619U, 0x292239b8U, + }; + static const u32 Te1[256] = { +-0x9bb3e250U, 0x0663b4caU, 0xd485e4a2U, 0x02216c46U, +-0xa83a6f3fU, 0x75a616bdU, 0x10134d06U, 0x9c4d60b9U, +-0x4d176ab4U, 0x8e7f41f9U, 0x8fe277daU, 0xc9cdec08U, +-0xd15a0a0dU, 0xaa1b0379U, 0xd37b664bU, 0x57a1e0f7U, +-0x5afaa55bU, 0x35ea39a5U, 0x73c5a277U, 0x38b17c09U, +-0xde2023e7U, 0xc0d47128U, 0xf17c9001U, 0x7d22bdbeU, +-0xcbec804eU, 0x82b93276U, 0xdfbd15c4U, 0x94c9cbbaU, +-0xd6a488e4U, 0xdc014fa1U, 0x79606532U, 0x07fe82e9U, +-0x4b74de7eU, 0x31a8e129U, 0x5d0427b2U, 0xd2e65068U, +-0x33898d6fU, 0x99928e16U, 0xcc1202a7U, 0x0f7a29eaU, +-0xf71f24cbU, 0x24644280U, 0xa6dd70f6U, 0xa0bec43cU, +-0xe52d058bU, 0xee15f4edU, 0xea572c61U, 0x881cf533U, +-0x25f974a3U, 0xa74046d5U, 0x1b2bbc60U, 0xd9dea10eU, +-0x0442d88cU, 0xcd8f3484U, 0x505f621eU, 0x2a835d49U, +-0xc2f51d6eU, 0x462f9bd2U, 0x7cbf8b9dU, 0x68ee1e17U, +-0x9e6c0cffU, 0x91162515U, 0x93374953U, 0x2f5cb3e6U, +-0x293f072cU, 0x624bd952U, 0x81056813U, 0x3a90104fU, +-0x7f03d1f8U, 0x6b524472U, 0x1cd53e89U, 0x239ac069U, +-0x1451958aU, 0xe6915feeU, 0x05dfeeafU, 0x7079f812U, +-0x3ed2c8c3U, 0xd739bec7U, 0xe8764027U, 0x1d4808aaU, +-0x6acf7251U, 0x20269a0cU, 0x4eab30d1U, 0x51c2543dU, +-0x34770f86U, 0x8ba0af56U, 0xfc27d5adU, 0x3f4ffee0U, +-0xb9b4141aU, 0xb28ce57cU, 0xc72af3c1U, 0x58dbc91dU, +-0x63d6ef71U, 0x563cd6d4U, 0x0d5b45acU, 0xf53e488dU, +-0x12322140U, 0xf0e1a622U, 0xff9b8fc8U, 0xd843972dU, +-0x15cca3a9U, 0x64286d98U, 0x6d31f0b8U, 0xec3498abU, +-0x69732834U, 0xe16fdd07U, 0xc3682b4dU, 0x8766dcd9U, +-0x365663c0U, 0xda62fb6bU, 0xbb95785cU, 0x0ee71fc9U, +-0xb5726795U, 0x37cb55e3U, 0xf35dfc47U, 0x1670f9ccU, +-0x1ab68a43U, 0x8981c310U, 0x71e4ce31U, 0x3b0d266cU, +-0x6cacc69bU, 0x80985e30U, 0x84da86bcU, 0x426d435eU, +-0x1f6964ecU, 0xfe06b9ebU, 0x0884ab03U, 0xfdbae38eU, +-0xb311d35fU, 0x00000000U, 0x440ef794U, 0x86fbeafaU, +-0x21bbac2fU, 0xf8650d21U, 0xcfae58c2U, 0xab86355aU, +-0xa5612a93U, 0x1ef452cfU, 0xfa446167U, 0x77877afbU, +-0x3cf3a485U, 0xa9a7591cU, 0x2d7ddfa0U, 0x72589454U, +-0xdd9c7982U, 0x27d818e5U, 0xce336ee1U, 0x2207f64aU, +-0x0aa5c745U, 0x55808cb1U, 0xc6b7c5e2U, 0xb4ef51b6U, +-0x4f3606f2U, 0xdbffcd48U, 0x4955b238U, 0xbc6bfab5U, +-0xe34eb141U, 0x118e7b25U, 0x606ab514U, 0x78fd5311U, +-0xd518d281U, 0xe2d38762U, 0xe0f2eb24U, 0xebca1a42U, +-0x7adc3f57U, 0xef88c2ceU, 0x6e8daaddU, 0xa3029e59U, +-0x09199d20U, 0xe4b033a8U, 0x660901deU, 0xe70c69cdU, +-0x980fb835U, 0x61f78337U, 0xbdf6cc96U, 0xac78b7b3U, +-0x977591dfU, 0xc149470bU, 0xade58190U, 0x1897e605U, +-0xbfd7a0d0U, 0xbe4a96f3U, 0xa29fa87aU, 0x4ae9e85dU, +-0xc50b9f87U, 0x26452ec6U, 0x03bc5a65U, 0xfbd95744U, +-0x5c991191U, 0xc496a9a4U, 0x5946ff3eU, 0x404c2f18U, +-0x679437fdU, 0x53e3387bU, 0x8a3d9975U, 0xd0c73c2eU, +-0x392c4a2aU, 0x5f254bf4U, 0xa123f21fU, 0x761a4cd8U, +-0x9dd0569aU, 0x5eb87dd7U, 0x541dba92U, 0x0b38f166U, +-0x28a2310fU, 0x8c5e2dbfU, 0x8547b09fU, 0x3214bb4cU, +-0xeda9ae88U, 0xc850da2bU, 0x83240455U, 0xe9eb7604U, +-0x65b55bbbU, 0x2b1e6b6aU, 0xf68212e8U, 0x9ff13adcU, +-0xf2c0ca64U, 0xba084e7fU, 0xf4a37eaeU, 0x3035d70aU, +-0x17edcfefU, 0x2ce0e983U, 0xb130bf19U, 0x7e9ee7dbU, +-0x96e8a7fcU, 0x4593c1b7U, 0xa4fc1cb0U, 0x47b2adf1U, +-0x6f109cfeU, 0xb0ad893aU, 0x13af1763U, 0x9a2ed473U, +-0x3d6e92a6U, 0x019d3623U, 0xf9f83b02U, 0x0cc6738fU, +-0x2ec185c5U, 0x48c8841bU, 0x5b679378U, 0x92aa7f70U, +-0x7b410974U, 0x8dc31b9cU, 0xca71b66dU, 0x908b1336U, +-0x41d1193bU, 0x9554fd99U, 0xafc4edd6U, 0x527e0e58U, +-0x743b209eU, 0x4c8a5c97U, 0x43f0757dU, 0xae59dbf5U, +-0xb6ce3df0U, 0xb7530bd3U, 0x190ad026U, 0xb8292239U, ++0x9bb3e250U, 0x0663b4caU, 0xd485e4a2U, 0x02216c46U, ++0xa83a6f3fU, 0x75a616bdU, 0x10134d06U, 0x9c4d60b9U, ++0x4d176ab4U, 0x8e7f41f9U, 0x8fe277daU, 0xc9cdec08U, ++0xd15a0a0dU, 0xaa1b0379U, 0xd37b664bU, 0x57a1e0f7U, ++0x5afaa55bU, 0x35ea39a5U, 0x73c5a277U, 0x38b17c09U, ++0xde2023e7U, 0xc0d47128U, 0xf17c9001U, 0x7d22bdbeU, ++0xcbec804eU, 0x82b93276U, 0xdfbd15c4U, 0x94c9cbbaU, ++0xd6a488e4U, 0xdc014fa1U, 0x79606532U, 0x07fe82e9U, ++0x4b74de7eU, 0x31a8e129U, 0x5d0427b2U, 0xd2e65068U, ++0x33898d6fU, 0x99928e16U, 0xcc1202a7U, 0x0f7a29eaU, ++0xf71f24cbU, 0x24644280U, 0xa6dd70f6U, 0xa0bec43cU, ++0xe52d058bU, 0xee15f4edU, 0xea572c61U, 0x881cf533U, ++0x25f974a3U, 0xa74046d5U, 0x1b2bbc60U, 0xd9dea10eU, ++0x0442d88cU, 0xcd8f3484U, 0x505f621eU, 0x2a835d49U, ++0xc2f51d6eU, 0x462f9bd2U, 0x7cbf8b9dU, 0x68ee1e17U, ++0x9e6c0cffU, 0x91162515U, 0x93374953U, 0x2f5cb3e6U, ++0x293f072cU, 0x624bd952U, 0x81056813U, 0x3a90104fU, ++0x7f03d1f8U, 0x6b524472U, 0x1cd53e89U, 0x239ac069U, ++0x1451958aU, 0xe6915feeU, 0x05dfeeafU, 0x7079f812U, ++0x3ed2c8c3U, 0xd739bec7U, 0xe8764027U, 0x1d4808aaU, ++0x6acf7251U, 0x20269a0cU, 0x4eab30d1U, 0x51c2543dU, ++0x34770f86U, 0x8ba0af56U, 0xfc27d5adU, 0x3f4ffee0U, ++0xb9b4141aU, 0xb28ce57cU, 0xc72af3c1U, 0x58dbc91dU, ++0x63d6ef71U, 0x563cd6d4U, 0x0d5b45acU, 0xf53e488dU, ++0x12322140U, 0xf0e1a622U, 0xff9b8fc8U, 0xd843972dU, ++0x15cca3a9U, 0x64286d98U, 0x6d31f0b8U, 0xec3498abU, ++0x69732834U, 0xe16fdd07U, 0xc3682b4dU, 0x8766dcd9U, ++0x365663c0U, 0xda62fb6bU, 0xbb95785cU, 0x0ee71fc9U, ++0xb5726795U, 0x37cb55e3U, 0xf35dfc47U, 0x1670f9ccU, ++0x1ab68a43U, 0x8981c310U, 0x71e4ce31U, 0x3b0d266cU, ++0x6cacc69bU, 0x80985e30U, 0x84da86bcU, 0x426d435eU, ++0x1f6964ecU, 0xfe06b9ebU, 0x0884ab03U, 0xfdbae38eU, ++0xb311d35fU, 0x00000000U, 0x440ef794U, 0x86fbeafaU, ++0x21bbac2fU, 0xf8650d21U, 0xcfae58c2U, 0xab86355aU, ++0xa5612a93U, 0x1ef452cfU, 0xfa446167U, 0x77877afbU, ++0x3cf3a485U, 0xa9a7591cU, 0x2d7ddfa0U, 0x72589454U, ++0xdd9c7982U, 0x27d818e5U, 0xce336ee1U, 0x2207f64aU, ++0x0aa5c745U, 0x55808cb1U, 0xc6b7c5e2U, 0xb4ef51b6U, ++0x4f3606f2U, 0xdbffcd48U, 0x4955b238U, 0xbc6bfab5U, ++0xe34eb141U, 0x118e7b25U, 0x606ab514U, 0x78fd5311U, ++0xd518d281U, 0xe2d38762U, 0xe0f2eb24U, 0xebca1a42U, ++0x7adc3f57U, 0xef88c2ceU, 0x6e8daaddU, 0xa3029e59U, ++0x09199d20U, 0xe4b033a8U, 0x660901deU, 0xe70c69cdU, ++0x980fb835U, 0x61f78337U, 0xbdf6cc96U, 0xac78b7b3U, ++0x977591dfU, 0xc149470bU, 0xade58190U, 0x1897e605U, ++0xbfd7a0d0U, 0xbe4a96f3U, 0xa29fa87aU, 0x4ae9e85dU, ++0xc50b9f87U, 0x26452ec6U, 0x03bc5a65U, 0xfbd95744U, ++0x5c991191U, 0xc496a9a4U, 0x5946ff3eU, 0x404c2f18U, ++0x679437fdU, 0x53e3387bU, 0x8a3d9975U, 0xd0c73c2eU, ++0x392c4a2aU, 0x5f254bf4U, 0xa123f21fU, 0x761a4cd8U, ++0x9dd0569aU, 0x5eb87dd7U, 0x541dba92U, 0x0b38f166U, ++0x28a2310fU, 0x8c5e2dbfU, 0x8547b09fU, 0x3214bb4cU, ++0xeda9ae88U, 0xc850da2bU, 0x83240455U, 0xe9eb7604U, ++0x65b55bbbU, 0x2b1e6b6aU, 0xf68212e8U, 0x9ff13adcU, ++0xf2c0ca64U, 0xba084e7fU, 0xf4a37eaeU, 0x3035d70aU, ++0x17edcfefU, 0x2ce0e983U, 0xb130bf19U, 0x7e9ee7dbU, ++0x96e8a7fcU, 0x4593c1b7U, 0xa4fc1cb0U, 0x47b2adf1U, ++0x6f109cfeU, 0xb0ad893aU, 0x13af1763U, 0x9a2ed473U, ++0x3d6e92a6U, 0x019d3623U, 0xf9f83b02U, 0x0cc6738fU, ++0x2ec185c5U, 0x48c8841bU, 0x5b679378U, 0x92aa7f70U, ++0x7b410974U, 0x8dc31b9cU, 0xca71b66dU, 0x908b1336U, ++0x41d1193bU, 0x9554fd99U, 0xafc4edd6U, 0x527e0e58U, ++0x743b209eU, 0x4c8a5c97U, 0x43f0757dU, 0xae59dbf5U, ++0xb6ce3df0U, 0xb7530bd3U, 0x190ad026U, 0xb8292239U, + }; + static const u32 Te2[256] = { +-0x509bb3e2U, 0xca0663b4U, 0xa2d485e4U, 0x4602216cU, +-0x3fa83a6fU, 0xbd75a616U, 0x0610134dU, 0xb99c4d60U, +-0xb44d176aU, 0xf98e7f41U, 0xda8fe277U, 0x08c9cdecU, +-0x0dd15a0aU, 0x79aa1b03U, 0x4bd37b66U, 0xf757a1e0U, +-0x5b5afaa5U, 0xa535ea39U, 0x7773c5a2U, 0x0938b17cU, +-0xe7de2023U, 0x28c0d471U, 0x01f17c90U, 0xbe7d22bdU, +-0x4ecbec80U, 0x7682b932U, 0xc4dfbd15U, 0xba94c9cbU, +-0xe4d6a488U, 0xa1dc014fU, 0x32796065U, 0xe907fe82U, +-0x7e4b74deU, 0x2931a8e1U, 0xb25d0427U, 0x68d2e650U, +-0x6f33898dU, 0x1699928eU, 0xa7cc1202U, 0xea0f7a29U, +-0xcbf71f24U, 0x80246442U, 0xf6a6dd70U, 0x3ca0bec4U, +-0x8be52d05U, 0xedee15f4U, 0x61ea572cU, 0x33881cf5U, +-0xa325f974U, 0xd5a74046U, 0x601b2bbcU, 0x0ed9dea1U, +-0x8c0442d8U, 0x84cd8f34U, 0x1e505f62U, 0x492a835dU, +-0x6ec2f51dU, 0xd2462f9bU, 0x9d7cbf8bU, 0x1768ee1eU, +-0xff9e6c0cU, 0x15911625U, 0x53933749U, 0xe62f5cb3U, +-0x2c293f07U, 0x52624bd9U, 0x13810568U, 0x4f3a9010U, +-0xf87f03d1U, 0x726b5244U, 0x891cd53eU, 0x69239ac0U, +-0x8a145195U, 0xeee6915fU, 0xaf05dfeeU, 0x127079f8U, +-0xc33ed2c8U, 0xc7d739beU, 0x27e87640U, 0xaa1d4808U, +-0x516acf72U, 0x0c20269aU, 0xd14eab30U, 0x3d51c254U, +-0x8634770fU, 0x568ba0afU, 0xadfc27d5U, 0xe03f4ffeU, +-0x1ab9b414U, 0x7cb28ce5U, 0xc1c72af3U, 0x1d58dbc9U, +-0x7163d6efU, 0xd4563cd6U, 0xac0d5b45U, 0x8df53e48U, +-0x40123221U, 0x22f0e1a6U, 0xc8ff9b8fU, 0x2dd84397U, +-0xa915cca3U, 0x9864286dU, 0xb86d31f0U, 0xabec3498U, +-0x34697328U, 0x07e16fddU, 0x4dc3682bU, 0xd98766dcU, +-0xc0365663U, 0x6bda62fbU, 0x5cbb9578U, 0xc90ee71fU, +-0x95b57267U, 0xe337cb55U, 0x47f35dfcU, 0xcc1670f9U, +-0x431ab68aU, 0x108981c3U, 0x3171e4ceU, 0x6c3b0d26U, +-0x9b6cacc6U, 0x3080985eU, 0xbc84da86U, 0x5e426d43U, +-0xec1f6964U, 0xebfe06b9U, 0x030884abU, 0x8efdbae3U, +-0x5fb311d3U, 0x00000000U, 0x94440ef7U, 0xfa86fbeaU, +-0x2f21bbacU, 0x21f8650dU, 0xc2cfae58U, 0x5aab8635U, +-0x93a5612aU, 0xcf1ef452U, 0x67fa4461U, 0xfb77877aU, +-0x853cf3a4U, 0x1ca9a759U, 0xa02d7ddfU, 0x54725894U, +-0x82dd9c79U, 0xe527d818U, 0xe1ce336eU, 0x4a2207f6U, +-0x450aa5c7U, 0xb155808cU, 0xe2c6b7c5U, 0xb6b4ef51U, +-0xf24f3606U, 0x48dbffcdU, 0x384955b2U, 0xb5bc6bfaU, +-0x41e34eb1U, 0x25118e7bU, 0x14606ab5U, 0x1178fd53U, +-0x81d518d2U, 0x62e2d387U, 0x24e0f2ebU, 0x42ebca1aU, +-0x577adc3fU, 0xceef88c2U, 0xdd6e8daaU, 0x59a3029eU, +-0x2009199dU, 0xa8e4b033U, 0xde660901U, 0xcde70c69U, +-0x35980fb8U, 0x3761f783U, 0x96bdf6ccU, 0xb3ac78b7U, +-0xdf977591U, 0x0bc14947U, 0x90ade581U, 0x051897e6U, +-0xd0bfd7a0U, 0xf3be4a96U, 0x7aa29fa8U, 0x5d4ae9e8U, +-0x87c50b9fU, 0xc626452eU, 0x6503bc5aU, 0x44fbd957U, +-0x915c9911U, 0xa4c496a9U, 0x3e5946ffU, 0x18404c2fU, +-0xfd679437U, 0x7b53e338U, 0x758a3d99U, 0x2ed0c73cU, +-0x2a392c4aU, 0xf45f254bU, 0x1fa123f2U, 0xd8761a4cU, +-0x9a9dd056U, 0xd75eb87dU, 0x92541dbaU, 0x660b38f1U, +-0x0f28a231U, 0xbf8c5e2dU, 0x9f8547b0U, 0x4c3214bbU, +-0x88eda9aeU, 0x2bc850daU, 0x55832404U, 0x04e9eb76U, +-0xbb65b55bU, 0x6a2b1e6bU, 0xe8f68212U, 0xdc9ff13aU, +-0x64f2c0caU, 0x7fba084eU, 0xaef4a37eU, 0x0a3035d7U, +-0xef17edcfU, 0x832ce0e9U, 0x19b130bfU, 0xdb7e9ee7U, +-0xfc96e8a7U, 0xb74593c1U, 0xb0a4fc1cU, 0xf147b2adU, +-0xfe6f109cU, 0x3ab0ad89U, 0x6313af17U, 0x739a2ed4U, +-0xa63d6e92U, 0x23019d36U, 0x02f9f83bU, 0x8f0cc673U, +-0xc52ec185U, 0x1b48c884U, 0x785b6793U, 0x7092aa7fU, +-0x747b4109U, 0x9c8dc31bU, 0x6dca71b6U, 0x36908b13U, +-0x3b41d119U, 0x999554fdU, 0xd6afc4edU, 0x58527e0eU, +-0x9e743b20U, 0x974c8a5cU, 0x7d43f075U, 0xf5ae59dbU, +-0xf0b6ce3dU, 0xd3b7530bU, 0x26190ad0U, 0x39b82922U, ++0x509bb3e2U, 0xca0663b4U, 0xa2d485e4U, 0x4602216cU, ++0x3fa83a6fU, 0xbd75a616U, 0x0610134dU, 0xb99c4d60U, ++0xb44d176aU, 0xf98e7f41U, 0xda8fe277U, 0x08c9cdecU, ++0x0dd15a0aU, 0x79aa1b03U, 0x4bd37b66U, 0xf757a1e0U, ++0x5b5afaa5U, 0xa535ea39U, 0x7773c5a2U, 0x0938b17cU, ++0xe7de2023U, 0x28c0d471U, 0x01f17c90U, 0xbe7d22bdU, ++0x4ecbec80U, 0x7682b932U, 0xc4dfbd15U, 0xba94c9cbU, ++0xe4d6a488U, 0xa1dc014fU, 0x32796065U, 0xe907fe82U, ++0x7e4b74deU, 0x2931a8e1U, 0xb25d0427U, 0x68d2e650U, ++0x6f33898dU, 0x1699928eU, 0xa7cc1202U, 0xea0f7a29U, ++0xcbf71f24U, 0x80246442U, 0xf6a6dd70U, 0x3ca0bec4U, ++0x8be52d05U, 0xedee15f4U, 0x61ea572cU, 0x33881cf5U, ++0xa325f974U, 0xd5a74046U, 0x601b2bbcU, 0x0ed9dea1U, ++0x8c0442d8U, 0x84cd8f34U, 0x1e505f62U, 0x492a835dU, ++0x6ec2f51dU, 0xd2462f9bU, 0x9d7cbf8bU, 0x1768ee1eU, ++0xff9e6c0cU, 0x15911625U, 0x53933749U, 0xe62f5cb3U, ++0x2c293f07U, 0x52624bd9U, 0x13810568U, 0x4f3a9010U, ++0xf87f03d1U, 0x726b5244U, 0x891cd53eU, 0x69239ac0U, ++0x8a145195U, 0xeee6915fU, 0xaf05dfeeU, 0x127079f8U, ++0xc33ed2c8U, 0xc7d739beU, 0x27e87640U, 0xaa1d4808U, ++0x516acf72U, 0x0c20269aU, 0xd14eab30U, 0x3d51c254U, ++0x8634770fU, 0x568ba0afU, 0xadfc27d5U, 0xe03f4ffeU, ++0x1ab9b414U, 0x7cb28ce5U, 0xc1c72af3U, 0x1d58dbc9U, ++0x7163d6efU, 0xd4563cd6U, 0xac0d5b45U, 0x8df53e48U, ++0x40123221U, 0x22f0e1a6U, 0xc8ff9b8fU, 0x2dd84397U, ++0xa915cca3U, 0x9864286dU, 0xb86d31f0U, 0xabec3498U, ++0x34697328U, 0x07e16fddU, 0x4dc3682bU, 0xd98766dcU, ++0xc0365663U, 0x6bda62fbU, 0x5cbb9578U, 0xc90ee71fU, ++0x95b57267U, 0xe337cb55U, 0x47f35dfcU, 0xcc1670f9U, ++0x431ab68aU, 0x108981c3U, 0x3171e4ceU, 0x6c3b0d26U, ++0x9b6cacc6U, 0x3080985eU, 0xbc84da86U, 0x5e426d43U, ++0xec1f6964U, 0xebfe06b9U, 0x030884abU, 0x8efdbae3U, ++0x5fb311d3U, 0x00000000U, 0x94440ef7U, 0xfa86fbeaU, ++0x2f21bbacU, 0x21f8650dU, 0xc2cfae58U, 0x5aab8635U, ++0x93a5612aU, 0xcf1ef452U, 0x67fa4461U, 0xfb77877aU, ++0x853cf3a4U, 0x1ca9a759U, 0xa02d7ddfU, 0x54725894U, ++0x82dd9c79U, 0xe527d818U, 0xe1ce336eU, 0x4a2207f6U, ++0x450aa5c7U, 0xb155808cU, 0xe2c6b7c5U, 0xb6b4ef51U, ++0xf24f3606U, 0x48dbffcdU, 0x384955b2U, 0xb5bc6bfaU, ++0x41e34eb1U, 0x25118e7bU, 0x14606ab5U, 0x1178fd53U, ++0x81d518d2U, 0x62e2d387U, 0x24e0f2ebU, 0x42ebca1aU, ++0x577adc3fU, 0xceef88c2U, 0xdd6e8daaU, 0x59a3029eU, ++0x2009199dU, 0xa8e4b033U, 0xde660901U, 0xcde70c69U, ++0x35980fb8U, 0x3761f783U, 0x96bdf6ccU, 0xb3ac78b7U, ++0xdf977591U, 0x0bc14947U, 0x90ade581U, 0x051897e6U, ++0xd0bfd7a0U, 0xf3be4a96U, 0x7aa29fa8U, 0x5d4ae9e8U, ++0x87c50b9fU, 0xc626452eU, 0x6503bc5aU, 0x44fbd957U, ++0x915c9911U, 0xa4c496a9U, 0x3e5946ffU, 0x18404c2fU, ++0xfd679437U, 0x7b53e338U, 0x758a3d99U, 0x2ed0c73cU, ++0x2a392c4aU, 0xf45f254bU, 0x1fa123f2U, 0xd8761a4cU, ++0x9a9dd056U, 0xd75eb87dU, 0x92541dbaU, 0x660b38f1U, ++0x0f28a231U, 0xbf8c5e2dU, 0x9f8547b0U, 0x4c3214bbU, ++0x88eda9aeU, 0x2bc850daU, 0x55832404U, 0x04e9eb76U, ++0xbb65b55bU, 0x6a2b1e6bU, 0xe8f68212U, 0xdc9ff13aU, ++0x64f2c0caU, 0x7fba084eU, 0xaef4a37eU, 0x0a3035d7U, ++0xef17edcfU, 0x832ce0e9U, 0x19b130bfU, 0xdb7e9ee7U, ++0xfc96e8a7U, 0xb74593c1U, 0xb0a4fc1cU, 0xf147b2adU, ++0xfe6f109cU, 0x3ab0ad89U, 0x6313af17U, 0x739a2ed4U, ++0xa63d6e92U, 0x23019d36U, 0x02f9f83bU, 0x8f0cc673U, ++0xc52ec185U, 0x1b48c884U, 0x785b6793U, 0x7092aa7fU, ++0x747b4109U, 0x9c8dc31bU, 0x6dca71b6U, 0x36908b13U, ++0x3b41d119U, 0x999554fdU, 0xd6afc4edU, 0x58527e0eU, ++0x9e743b20U, 0x974c8a5cU, 0x7d43f075U, 0xf5ae59dbU, ++0xf0b6ce3dU, 0xd3b7530bU, 0x26190ad0U, 0x39b82922U, + }; + static const u32 Te3[256] = { +-0xe2509bb3U, 0xb4ca0663U, 0xe4a2d485U, 0x6c460221U, +-0x6f3fa83aU, 0x16bd75a6U, 0x4d061013U, 0x60b99c4dU, +-0x6ab44d17U, 0x41f98e7fU, 0x77da8fe2U, 0xec08c9cdU, +-0x0a0dd15aU, 0x0379aa1bU, 0x664bd37bU, 0xe0f757a1U, +-0xa55b5afaU, 0x39a535eaU, 0xa27773c5U, 0x7c0938b1U, +-0x23e7de20U, 0x7128c0d4U, 0x9001f17cU, 0xbdbe7d22U, +-0x804ecbecU, 0x327682b9U, 0x15c4dfbdU, 0xcbba94c9U, +-0x88e4d6a4U, 0x4fa1dc01U, 0x65327960U, 0x82e907feU, +-0xde7e4b74U, 0xe12931a8U, 0x27b25d04U, 0x5068d2e6U, +-0x8d6f3389U, 0x8e169992U, 0x02a7cc12U, 0x29ea0f7aU, +-0x24cbf71fU, 0x42802464U, 0x70f6a6ddU, 0xc43ca0beU, +-0x058be52dU, 0xf4edee15U, 0x2c61ea57U, 0xf533881cU, +-0x74a325f9U, 0x46d5a740U, 0xbc601b2bU, 0xa10ed9deU, +-0xd88c0442U, 0x3484cd8fU, 0x621e505fU, 0x5d492a83U, +-0x1d6ec2f5U, 0x9bd2462fU, 0x8b9d7cbfU, 0x1e1768eeU, +-0x0cff9e6cU, 0x25159116U, 0x49539337U, 0xb3e62f5cU, +-0x072c293fU, 0xd952624bU, 0x68138105U, 0x104f3a90U, +-0xd1f87f03U, 0x44726b52U, 0x3e891cd5U, 0xc069239aU, +-0x958a1451U, 0x5feee691U, 0xeeaf05dfU, 0xf8127079U, +-0xc8c33ed2U, 0xbec7d739U, 0x4027e876U, 0x08aa1d48U, +-0x72516acfU, 0x9a0c2026U, 0x30d14eabU, 0x543d51c2U, +-0x0f863477U, 0xaf568ba0U, 0xd5adfc27U, 0xfee03f4fU, +-0x141ab9b4U, 0xe57cb28cU, 0xf3c1c72aU, 0xc91d58dbU, +-0xef7163d6U, 0xd6d4563cU, 0x45ac0d5bU, 0x488df53eU, +-0x21401232U, 0xa622f0e1U, 0x8fc8ff9bU, 0x972dd843U, +-0xa3a915ccU, 0x6d986428U, 0xf0b86d31U, 0x98abec34U, +-0x28346973U, 0xdd07e16fU, 0x2b4dc368U, 0xdcd98766U, +-0x63c03656U, 0xfb6bda62U, 0x785cbb95U, 0x1fc90ee7U, +-0x6795b572U, 0x55e337cbU, 0xfc47f35dU, 0xf9cc1670U, +-0x8a431ab6U, 0xc3108981U, 0xce3171e4U, 0x266c3b0dU, +-0xc69b6cacU, 0x5e308098U, 0x86bc84daU, 0x435e426dU, +-0x64ec1f69U, 0xb9ebfe06U, 0xab030884U, 0xe38efdbaU, +-0xd35fb311U, 0x00000000U, 0xf794440eU, 0xeafa86fbU, +-0xac2f21bbU, 0x0d21f865U, 0x58c2cfaeU, 0x355aab86U, +-0x2a93a561U, 0x52cf1ef4U, 0x6167fa44U, 0x7afb7787U, +-0xa4853cf3U, 0x591ca9a7U, 0xdfa02d7dU, 0x94547258U, +-0x7982dd9cU, 0x18e527d8U, 0x6ee1ce33U, 0xf64a2207U, +-0xc7450aa5U, 0x8cb15580U, 0xc5e2c6b7U, 0x51b6b4efU, +-0x06f24f36U, 0xcd48dbffU, 0xb2384955U, 0xfab5bc6bU, +-0xb141e34eU, 0x7b25118eU, 0xb514606aU, 0x531178fdU, +-0xd281d518U, 0x8762e2d3U, 0xeb24e0f2U, 0x1a42ebcaU, +-0x3f577adcU, 0xc2ceef88U, 0xaadd6e8dU, 0x9e59a302U, +-0x9d200919U, 0x33a8e4b0U, 0x01de6609U, 0x69cde70cU, +-0xb835980fU, 0x833761f7U, 0xcc96bdf6U, 0xb7b3ac78U, +-0x91df9775U, 0x470bc149U, 0x8190ade5U, 0xe6051897U, +-0xa0d0bfd7U, 0x96f3be4aU, 0xa87aa29fU, 0xe85d4ae9U, +-0x9f87c50bU, 0x2ec62645U, 0x5a6503bcU, 0x5744fbd9U, +-0x11915c99U, 0xa9a4c496U, 0xff3e5946U, 0x2f18404cU, +-0x37fd6794U, 0x387b53e3U, 0x99758a3dU, 0x3c2ed0c7U, +-0x4a2a392cU, 0x4bf45f25U, 0xf21fa123U, 0x4cd8761aU, +-0x569a9dd0U, 0x7dd75eb8U, 0xba92541dU, 0xf1660b38U, +-0x310f28a2U, 0x2dbf8c5eU, 0xb09f8547U, 0xbb4c3214U, +-0xae88eda9U, 0xda2bc850U, 0x04558324U, 0x7604e9ebU, +-0x5bbb65b5U, 0x6b6a2b1eU, 0x12e8f682U, 0x3adc9ff1U, +-0xca64f2c0U, 0x4e7fba08U, 0x7eaef4a3U, 0xd70a3035U, +-0xcfef17edU, 0xe9832ce0U, 0xbf19b130U, 0xe7db7e9eU, +-0xa7fc96e8U, 0xc1b74593U, 0x1cb0a4fcU, 0xadf147b2U, +-0x9cfe6f10U, 0x893ab0adU, 0x176313afU, 0xd4739a2eU, +-0x92a63d6eU, 0x3623019dU, 0x3b02f9f8U, 0x738f0cc6U, +-0x85c52ec1U, 0x841b48c8U, 0x93785b67U, 0x7f7092aaU, +-0x09747b41U, 0x1b9c8dc3U, 0xb66dca71U, 0x1336908bU, +-0x193b41d1U, 0xfd999554U, 0xedd6afc4U, 0x0e58527eU, +-0x209e743bU, 0x5c974c8aU, 0x757d43f0U, 0xdbf5ae59U, +-0x3df0b6ceU, 0x0bd3b753U, 0xd026190aU, 0x2239b829U, ++0xe2509bb3U, 0xb4ca0663U, 0xe4a2d485U, 0x6c460221U, ++0x6f3fa83aU, 0x16bd75a6U, 0x4d061013U, 0x60b99c4dU, ++0x6ab44d17U, 0x41f98e7fU, 0x77da8fe2U, 0xec08c9cdU, ++0x0a0dd15aU, 0x0379aa1bU, 0x664bd37bU, 0xe0f757a1U, ++0xa55b5afaU, 0x39a535eaU, 0xa27773c5U, 0x7c0938b1U, ++0x23e7de20U, 0x7128c0d4U, 0x9001f17cU, 0xbdbe7d22U, ++0x804ecbecU, 0x327682b9U, 0x15c4dfbdU, 0xcbba94c9U, ++0x88e4d6a4U, 0x4fa1dc01U, 0x65327960U, 0x82e907feU, ++0xde7e4b74U, 0xe12931a8U, 0x27b25d04U, 0x5068d2e6U, ++0x8d6f3389U, 0x8e169992U, 0x02a7cc12U, 0x29ea0f7aU, ++0x24cbf71fU, 0x42802464U, 0x70f6a6ddU, 0xc43ca0beU, ++0x058be52dU, 0xf4edee15U, 0x2c61ea57U, 0xf533881cU, ++0x74a325f9U, 0x46d5a740U, 0xbc601b2bU, 0xa10ed9deU, ++0xd88c0442U, 0x3484cd8fU, 0x621e505fU, 0x5d492a83U, ++0x1d6ec2f5U, 0x9bd2462fU, 0x8b9d7cbfU, 0x1e1768eeU, ++0x0cff9e6cU, 0x25159116U, 0x49539337U, 0xb3e62f5cU, ++0x072c293fU, 0xd952624bU, 0x68138105U, 0x104f3a90U, ++0xd1f87f03U, 0x44726b52U, 0x3e891cd5U, 0xc069239aU, ++0x958a1451U, 0x5feee691U, 0xeeaf05dfU, 0xf8127079U, ++0xc8c33ed2U, 0xbec7d739U, 0x4027e876U, 0x08aa1d48U, ++0x72516acfU, 0x9a0c2026U, 0x30d14eabU, 0x543d51c2U, ++0x0f863477U, 0xaf568ba0U, 0xd5adfc27U, 0xfee03f4fU, ++0x141ab9b4U, 0xe57cb28cU, 0xf3c1c72aU, 0xc91d58dbU, ++0xef7163d6U, 0xd6d4563cU, 0x45ac0d5bU, 0x488df53eU, ++0x21401232U, 0xa622f0e1U, 0x8fc8ff9bU, 0x972dd843U, ++0xa3a915ccU, 0x6d986428U, 0xf0b86d31U, 0x98abec34U, ++0x28346973U, 0xdd07e16fU, 0x2b4dc368U, 0xdcd98766U, ++0x63c03656U, 0xfb6bda62U, 0x785cbb95U, 0x1fc90ee7U, ++0x6795b572U, 0x55e337cbU, 0xfc47f35dU, 0xf9cc1670U, ++0x8a431ab6U, 0xc3108981U, 0xce3171e4U, 0x266c3b0dU, ++0xc69b6cacU, 0x5e308098U, 0x86bc84daU, 0x435e426dU, ++0x64ec1f69U, 0xb9ebfe06U, 0xab030884U, 0xe38efdbaU, ++0xd35fb311U, 0x00000000U, 0xf794440eU, 0xeafa86fbU, ++0xac2f21bbU, 0x0d21f865U, 0x58c2cfaeU, 0x355aab86U, ++0x2a93a561U, 0x52cf1ef4U, 0x6167fa44U, 0x7afb7787U, ++0xa4853cf3U, 0x591ca9a7U, 0xdfa02d7dU, 0x94547258U, ++0x7982dd9cU, 0x18e527d8U, 0x6ee1ce33U, 0xf64a2207U, ++0xc7450aa5U, 0x8cb15580U, 0xc5e2c6b7U, 0x51b6b4efU, ++0x06f24f36U, 0xcd48dbffU, 0xb2384955U, 0xfab5bc6bU, ++0xb141e34eU, 0x7b25118eU, 0xb514606aU, 0x531178fdU, ++0xd281d518U, 0x8762e2d3U, 0xeb24e0f2U, 0x1a42ebcaU, ++0x3f577adcU, 0xc2ceef88U, 0xaadd6e8dU, 0x9e59a302U, ++0x9d200919U, 0x33a8e4b0U, 0x01de6609U, 0x69cde70cU, ++0xb835980fU, 0x833761f7U, 0xcc96bdf6U, 0xb7b3ac78U, ++0x91df9775U, 0x470bc149U, 0x8190ade5U, 0xe6051897U, ++0xa0d0bfd7U, 0x96f3be4aU, 0xa87aa29fU, 0xe85d4ae9U, ++0x9f87c50bU, 0x2ec62645U, 0x5a6503bcU, 0x5744fbd9U, ++0x11915c99U, 0xa9a4c496U, 0xff3e5946U, 0x2f18404cU, ++0x37fd6794U, 0x387b53e3U, 0x99758a3dU, 0x3c2ed0c7U, ++0x4a2a392cU, 0x4bf45f25U, 0xf21fa123U, 0x4cd8761aU, ++0x569a9dd0U, 0x7dd75eb8U, 0xba92541dU, 0xf1660b38U, ++0x310f28a2U, 0x2dbf8c5eU, 0xb09f8547U, 0xbb4c3214U, ++0xae88eda9U, 0xda2bc850U, 0x04558324U, 0x7604e9ebU, ++0x5bbb65b5U, 0x6b6a2b1eU, 0x12e8f682U, 0x3adc9ff1U, ++0xca64f2c0U, 0x4e7fba08U, 0x7eaef4a3U, 0xd70a3035U, ++0xcfef17edU, 0xe9832ce0U, 0xbf19b130U, 0xe7db7e9eU, ++0xa7fc96e8U, 0xc1b74593U, 0x1cb0a4fcU, 0xadf147b2U, ++0x9cfe6f10U, 0x893ab0adU, 0x176313afU, 0xd4739a2eU, ++0x92a63d6eU, 0x3623019dU, 0x3b02f9f8U, 0x738f0cc6U, ++0x85c52ec1U, 0x841b48c8U, 0x93785b67U, 0x7f7092aaU, ++0x09747b41U, 0x1b9c8dc3U, 0xb66dca71U, 0x1336908bU, ++0x193b41d1U, 0xfd999554U, 0xedd6afc4U, 0x0e58527eU, ++0x209e743bU, 0x5c974c8aU, 0x757d43f0U, 0xdbf5ae59U, ++0x3df0b6ceU, 0x0bd3b753U, 0xd026190aU, 0x2239b829U, + }; + static const u32 Te4[256] = { +-0x18181818U, 0x23232323U, 0xc6c6c6c6U, 0xe8e8e8e8U, +-0x87878787U, 0xb8b8b8b8U, 0x01010101U, 0x4f4f4f4fU, +-0x36363636U, 0xa6a6a6a6U, 0xd2d2d2d2U, 0xf5f5f5f5U, +-0x79797979U, 0x6f6f6f6fU, 0x91919191U, 0x52525252U, +-0x60606060U, 0xbcbcbcbcU, 0x9b9b9b9bU, 0x8e8e8e8eU, +-0xa3a3a3a3U, 0x0c0c0c0cU, 0x7b7b7b7bU, 0x35353535U, +-0x1d1d1d1dU, 0xe0e0e0e0U, 0xd7d7d7d7U, 0xc2c2c2c2U, +-0x2e2e2e2eU, 0x4b4b4b4bU, 0xfefefefeU, 0x57575757U, +-0x15151515U, 0x77777777U, 0x37373737U, 0xe5e5e5e5U, +-0x9f9f9f9fU, 0xf0f0f0f0U, 0x4a4a4a4aU, 0xdadadadaU, +-0x58585858U, 0xc9c9c9c9U, 0x29292929U, 0x0a0a0a0aU, +-0xb1b1b1b1U, 0xa0a0a0a0U, 0x6b6b6b6bU, 0x85858585U, +-0xbdbdbdbdU, 0x5d5d5d5dU, 0x10101010U, 0xf4f4f4f4U, +-0xcbcbcbcbU, 0x3e3e3e3eU, 0x05050505U, 0x67676767U, +-0xe4e4e4e4U, 0x27272727U, 0x41414141U, 0x8b8b8b8bU, +-0xa7a7a7a7U, 0x7d7d7d7dU, 0x95959595U, 0xd8d8d8d8U, +-0xfbfbfbfbU, 0xeeeeeeeeU, 0x7c7c7c7cU, 0x66666666U, +-0xddddddddU, 0x17171717U, 0x47474747U, 0x9e9e9e9eU, +-0xcacacacaU, 0x2d2d2d2dU, 0xbfbfbfbfU, 0x07070707U, +-0xadadadadU, 0x5a5a5a5aU, 0x83838383U, 0x33333333U, +-0x63636363U, 0x02020202U, 0xaaaaaaaaU, 0x71717171U, +-0xc8c8c8c8U, 0x19191919U, 0x49494949U, 0xd9d9d9d9U, +-0xf2f2f2f2U, 0xe3e3e3e3U, 0x5b5b5b5bU, 0x88888888U, +-0x9a9a9a9aU, 0x26262626U, 0x32323232U, 0xb0b0b0b0U, +-0xe9e9e9e9U, 0x0f0f0f0fU, 0xd5d5d5d5U, 0x80808080U, +-0xbebebebeU, 0xcdcdcdcdU, 0x34343434U, 0x48484848U, +-0xffffffffU, 0x7a7a7a7aU, 0x90909090U, 0x5f5f5f5fU, +-0x20202020U, 0x68686868U, 0x1a1a1a1aU, 0xaeaeaeaeU, +-0xb4b4b4b4U, 0x54545454U, 0x93939393U, 0x22222222U, +-0x64646464U, 0xf1f1f1f1U, 0x73737373U, 0x12121212U, +-0x40404040U, 0x08080808U, 0xc3c3c3c3U, 0xececececU, +-0xdbdbdbdbU, 0xa1a1a1a1U, 0x8d8d8d8dU, 0x3d3d3d3dU, +-0x97979797U, 0x00000000U, 0xcfcfcfcfU, 0x2b2b2b2bU, +-0x76767676U, 0x82828282U, 0xd6d6d6d6U, 0x1b1b1b1bU, +-0xb5b5b5b5U, 0xafafafafU, 0x6a6a6a6aU, 0x50505050U, +-0x45454545U, 0xf3f3f3f3U, 0x30303030U, 0xefefefefU, +-0x3f3f3f3fU, 0x55555555U, 0xa2a2a2a2U, 0xeaeaeaeaU, +-0x65656565U, 0xbabababaU, 0x2f2f2f2fU, 0xc0c0c0c0U, +-0xdedededeU, 0x1c1c1c1cU, 0xfdfdfdfdU, 0x4d4d4d4dU, +-0x92929292U, 0x75757575U, 0x06060606U, 0x8a8a8a8aU, +-0xb2b2b2b2U, 0xe6e6e6e6U, 0x0e0e0e0eU, 0x1f1f1f1fU, +-0x62626262U, 0xd4d4d4d4U, 0xa8a8a8a8U, 0x96969696U, +-0xf9f9f9f9U, 0xc5c5c5c5U, 0x25252525U, 0x59595959U, +-0x84848484U, 0x72727272U, 0x39393939U, 0x4c4c4c4cU, +-0x5e5e5e5eU, 0x78787878U, 0x38383838U, 0x8c8c8c8cU, +-0xd1d1d1d1U, 0xa5a5a5a5U, 0xe2e2e2e2U, 0x61616161U, +-0xb3b3b3b3U, 0x21212121U, 0x9c9c9c9cU, 0x1e1e1e1eU, +-0x43434343U, 0xc7c7c7c7U, 0xfcfcfcfcU, 0x04040404U, +-0x51515151U, 0x99999999U, 0x6d6d6d6dU, 0x0d0d0d0dU, +-0xfafafafaU, 0xdfdfdfdfU, 0x7e7e7e7eU, 0x24242424U, +-0x3b3b3b3bU, 0xababababU, 0xcecececeU, 0x11111111U, +-0x8f8f8f8fU, 0x4e4e4e4eU, 0xb7b7b7b7U, 0xebebebebU, +-0x3c3c3c3cU, 0x81818181U, 0x94949494U, 0xf7f7f7f7U, +-0xb9b9b9b9U, 0x13131313U, 0x2c2c2c2cU, 0xd3d3d3d3U, +-0xe7e7e7e7U, 0x6e6e6e6eU, 0xc4c4c4c4U, 0x03030303U, +-0x56565656U, 0x44444444U, 0x7f7f7f7fU, 0xa9a9a9a9U, +-0x2a2a2a2aU, 0xbbbbbbbbU, 0xc1c1c1c1U, 0x53535353U, +-0xdcdcdcdcU, 0x0b0b0b0bU, 0x9d9d9d9dU, 0x6c6c6c6cU, +-0x31313131U, 0x74747474U, 0xf6f6f6f6U, 0x46464646U, +-0xacacacacU, 0x89898989U, 0x14141414U, 0xe1e1e1e1U, +-0x16161616U, 0x3a3a3a3aU, 0x69696969U, 0x09090909U, +-0x70707070U, 0xb6b6b6b6U, 0xd0d0d0d0U, 0xededededU, +-0xccccccccU, 0x42424242U, 0x98989898U, 0xa4a4a4a4U, +-0x28282828U, 0x5c5c5c5cU, 0xf8f8f8f8U, 0x86868686U, ++0x18181818U, 0x23232323U, 0xc6c6c6c6U, 0xe8e8e8e8U, ++0x87878787U, 0xb8b8b8b8U, 0x01010101U, 0x4f4f4f4fU, ++0x36363636U, 0xa6a6a6a6U, 0xd2d2d2d2U, 0xf5f5f5f5U, ++0x79797979U, 0x6f6f6f6fU, 0x91919191U, 0x52525252U, ++0x60606060U, 0xbcbcbcbcU, 0x9b9b9b9bU, 0x8e8e8e8eU, ++0xa3a3a3a3U, 0x0c0c0c0cU, 0x7b7b7b7bU, 0x35353535U, ++0x1d1d1d1dU, 0xe0e0e0e0U, 0xd7d7d7d7U, 0xc2c2c2c2U, ++0x2e2e2e2eU, 0x4b4b4b4bU, 0xfefefefeU, 0x57575757U, ++0x15151515U, 0x77777777U, 0x37373737U, 0xe5e5e5e5U, ++0x9f9f9f9fU, 0xf0f0f0f0U, 0x4a4a4a4aU, 0xdadadadaU, ++0x58585858U, 0xc9c9c9c9U, 0x29292929U, 0x0a0a0a0aU, ++0xb1b1b1b1U, 0xa0a0a0a0U, 0x6b6b6b6bU, 0x85858585U, ++0xbdbdbdbdU, 0x5d5d5d5dU, 0x10101010U, 0xf4f4f4f4U, ++0xcbcbcbcbU, 0x3e3e3e3eU, 0x05050505U, 0x67676767U, ++0xe4e4e4e4U, 0x27272727U, 0x41414141U, 0x8b8b8b8bU, ++0xa7a7a7a7U, 0x7d7d7d7dU, 0x95959595U, 0xd8d8d8d8U, ++0xfbfbfbfbU, 0xeeeeeeeeU, 0x7c7c7c7cU, 0x66666666U, ++0xddddddddU, 0x17171717U, 0x47474747U, 0x9e9e9e9eU, ++0xcacacacaU, 0x2d2d2d2dU, 0xbfbfbfbfU, 0x07070707U, ++0xadadadadU, 0x5a5a5a5aU, 0x83838383U, 0x33333333U, ++0x63636363U, 0x02020202U, 0xaaaaaaaaU, 0x71717171U, ++0xc8c8c8c8U, 0x19191919U, 0x49494949U, 0xd9d9d9d9U, ++0xf2f2f2f2U, 0xe3e3e3e3U, 0x5b5b5b5bU, 0x88888888U, ++0x9a9a9a9aU, 0x26262626U, 0x32323232U, 0xb0b0b0b0U, ++0xe9e9e9e9U, 0x0f0f0f0fU, 0xd5d5d5d5U, 0x80808080U, ++0xbebebebeU, 0xcdcdcdcdU, 0x34343434U, 0x48484848U, ++0xffffffffU, 0x7a7a7a7aU, 0x90909090U, 0x5f5f5f5fU, ++0x20202020U, 0x68686868U, 0x1a1a1a1aU, 0xaeaeaeaeU, ++0xb4b4b4b4U, 0x54545454U, 0x93939393U, 0x22222222U, ++0x64646464U, 0xf1f1f1f1U, 0x73737373U, 0x12121212U, ++0x40404040U, 0x08080808U, 0xc3c3c3c3U, 0xececececU, ++0xdbdbdbdbU, 0xa1a1a1a1U, 0x8d8d8d8dU, 0x3d3d3d3dU, ++0x97979797U, 0x00000000U, 0xcfcfcfcfU, 0x2b2b2b2bU, ++0x76767676U, 0x82828282U, 0xd6d6d6d6U, 0x1b1b1b1bU, ++0xb5b5b5b5U, 0xafafafafU, 0x6a6a6a6aU, 0x50505050U, ++0x45454545U, 0xf3f3f3f3U, 0x30303030U, 0xefefefefU, ++0x3f3f3f3fU, 0x55555555U, 0xa2a2a2a2U, 0xeaeaeaeaU, ++0x65656565U, 0xbabababaU, 0x2f2f2f2fU, 0xc0c0c0c0U, ++0xdedededeU, 0x1c1c1c1cU, 0xfdfdfdfdU, 0x4d4d4d4dU, ++0x92929292U, 0x75757575U, 0x06060606U, 0x8a8a8a8aU, ++0xb2b2b2b2U, 0xe6e6e6e6U, 0x0e0e0e0eU, 0x1f1f1f1fU, ++0x62626262U, 0xd4d4d4d4U, 0xa8a8a8a8U, 0x96969696U, ++0xf9f9f9f9U, 0xc5c5c5c5U, 0x25252525U, 0x59595959U, ++0x84848484U, 0x72727272U, 0x39393939U, 0x4c4c4c4cU, ++0x5e5e5e5eU, 0x78787878U, 0x38383838U, 0x8c8c8c8cU, ++0xd1d1d1d1U, 0xa5a5a5a5U, 0xe2e2e2e2U, 0x61616161U, ++0xb3b3b3b3U, 0x21212121U, 0x9c9c9c9cU, 0x1e1e1e1eU, ++0x43434343U, 0xc7c7c7c7U, 0xfcfcfcfcU, 0x04040404U, ++0x51515151U, 0x99999999U, 0x6d6d6d6dU, 0x0d0d0d0dU, ++0xfafafafaU, 0xdfdfdfdfU, 0x7e7e7e7eU, 0x24242424U, ++0x3b3b3b3bU, 0xababababU, 0xcecececeU, 0x11111111U, ++0x8f8f8f8fU, 0x4e4e4e4eU, 0xb7b7b7b7U, 0xebebebebU, ++0x3c3c3c3cU, 0x81818181U, 0x94949494U, 0xf7f7f7f7U, ++0xb9b9b9b9U, 0x13131313U, 0x2c2c2c2cU, 0xd3d3d3d3U, ++0xe7e7e7e7U, 0x6e6e6e6eU, 0xc4c4c4c4U, 0x03030303U, ++0x56565656U, 0x44444444U, 0x7f7f7f7fU, 0xa9a9a9a9U, ++0x2a2a2a2aU, 0xbbbbbbbbU, 0xc1c1c1c1U, 0x53535353U, ++0xdcdcdcdcU, 0x0b0b0b0bU, 0x9d9d9d9dU, 0x6c6c6c6cU, ++0x31313131U, 0x74747474U, 0xf6f6f6f6U, 0x46464646U, ++0xacacacacU, 0x89898989U, 0x14141414U, 0xe1e1e1e1U, ++0x16161616U, 0x3a3a3a3aU, 0x69696969U, 0x09090909U, ++0x70707070U, 0xb6b6b6b6U, 0xd0d0d0d0U, 0xededededU, ++0xccccccccU, 0x42424242U, 0x98989898U, 0xa4a4a4a4U, ++0x28282828U, 0x5c5c5c5cU, 0xf8f8f8f8U, 0x86868686U, + }; diff --git a/package/maradns/patches/patch-server_Makefile b/package/maradns/patches/patch-server_Makefile new file mode 100644 index 000000000..96595433b --- /dev/null +++ b/package/maradns/patches/patch-server_Makefile @@ -0,0 +1,28 @@ +--- maradns-1.4.03.orig/server/Makefile 2006-01-02 17:59:33.000000000 +0100 ++++ maradns-1.4.03/server/Makefile 2010-02-06 00:19:48.471836901 +0100 +@@ -1,11 +1,13 @@ +-SOBJECTS=MaraBigHash.o recursive.o timestamp.o read_kvars.o MaraAnyChain.o ++SOBJECTS=MaraBigHash.o recursive.o timestamp.o read_kvars.o MaraAnyChain.o \ ++ udpsuccess.o + JOBJS=../libs/JsStr.o ../libs/JsStrOS.o ../libs/JsStrCP.o + MHOBJS=../libs/MaraHash.o + MJOBJS=../qual/qual_timestamp.o ++POBJ6=../parse/Csv2_rr_wks.o + POBJ5=../parse/Csv2_database.o ../parse/Csv2_rr_txt.o ../parse/Csv2_esc_txt.o + POBJ3=../parse/Csv2_rr_soa.o ../parse/Csv2_rr_aaaa.o ../parse/Csv2_rr_a.o + POBJ2=../parse/Csv2_read.o ../parse/Csv2_main.o ../parse/Csv2_parse.o $(POBJ3) +-POBJ4=../parse/ParseIpAcl.o ../parse/Parse_ipv6.o $(POBJ2) ++POBJ4=../parse/ParseIpAcl.o ../parse/Parse_ipv6.o $(POBJ2) $(POBJ6) + POBJECTS=../parse/ParseMaraRc.o ../parse/ParseCsv1.o $(POBJ4) $(POBJ5) + DOBJECTS=../dns/Queries.o ../dns/Compress.o ../dns/bobbit.o ../dns/Decompress.o + ROBJECTS=../rng/rng-api-fst.o ../rng/rng-alg-fst.o +@@ -46,6 +48,9 @@ timestamp.o: timestamp.c MaraDNS_locale. + MaraAnyChain.o: MaraAnyChain.c + $(CC) -c $(FLAGS) -o MaraAnyChain.o MaraAnyChain.c + ++udpsuccess.o: udpsuccess.c ++ $(CC) -c $(FLAGS) -o udpsuccess.o udpsuccess.c ++ + maradns: MaraDNS.c $(OBJECTS) MaraDNS_locale.h + $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o maradns MaraDNS.c $(OBJECTS) -lpthread + diff --git a/package/maradns/patches/patch-tcp_Makefile b/package/maradns/patches/patch-tcp_Makefile new file mode 100644 index 000000000..cbb673b59 --- /dev/null +++ b/package/maradns/patches/patch-tcp_Makefile @@ -0,0 +1,24 @@ +--- maradns-1.4.03.orig/tcp/Makefile 2005-12-20 11:10:40.000000000 +0100 ++++ maradns-1.4.03/tcp/Makefile 2010-02-06 00:19:48.481829524 +0100 +@@ -2,10 +2,11 @@ JOBJS=../libs/JsStr.o ../libs/JsStrOS.o + MJOBJS=../qual/qual_timestamp.o + MHOBJS=../libs/MaraHash.o + DOBJECTS=../dns/Queries.o ../dns/Compress.o ../dns/bobbit.o ../dns/Decompress.o ++POBJ6=../parse/Csv2_rr_wks.o + POBJ5=../parse/Csv2_database.o ../parse/Csv2_rr_txt.o ../parse/Csv2_esc_txt.o + POBJ3=../parse/Csv2_rr_soa.o ../parse/Csv2_rr_aaaa.o ../parse/Csv2_rr_a.o + POBJ2=../parse/Csv2_read.o ../parse/Csv2_main.o ../parse/Csv2_parse.o $(POBJ3) +-POBJ4=../parse/ParseIpAcl.o ../parse/Parse_ipv6.o $(POBJ2) ++POBJ4=../parse/ParseIpAcl.o ../parse/Parse_ipv6.o $(POBJ2) $(POBJ6) + POBJECTS=../parse/ParseMaraRc.o ../parse/ParseCsv1.o $(POBJ4) $(POBJ5) + OBJECTS=../parse/ParseCsv1.o ../parse/ParseMaraRc.o ../parse/ParseIpAcl.o + SOBJECTS=../server/timestamp.o ../server/MaraBigHash.o ../server/read_kvars.o \ +@@ -16,7 +17,7 @@ OBJECTS=$(JOBJS) $(MHOBJS) $(MJOBJS) $(D + $(TCPOBJS) + EXECS=getzone zoneserver fetchzone + +-FLAGS = -g -Wall $(DEBUG) ++#FLAGS = -g -Wall $(DEBUG) + #FLAGS = -g $(DEBUG) + + all: $(EXECS) diff --git a/package/mc/Makefile b/package/mc/Makefile index 20b232bc1..1b89c5b09 100644 --- a/package/mc/Makefile +++ b/package/mc/Makefile @@ -4,22 +4,23 @@ include ${TOPDIR}/rules.mk PKG_NAME= mc -PKG_VERSION= 4.6.1 +PKG_VERSION= 4.7.0.2 PKG_RELEASE= 1 -PKG_BUILDDEP+= glib ncurses -PKG_MD5SUM= 18b20db6e40480a53bac2870c56fc3c4 +PKG_MD5SUM= f48b2c8dd140aeb36f59d16a662f0779 PKG_DESCR:= norton commander clone PKG_SECTION:= misc -PKG_DEPENDS:= libncurses glib -PKG_URL:= http://www.midnight-commander.org -PKG_SITES= http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/ +PKG_NOPARALLEL:= 1 +PKG_DEPENDS:= glib libncurses +PKG_BUILDDEP+= glib ncurses +PKG_URL:= http://www.midnight-commander.org/ +PKG_SITES= http://openadk.org/distfiles/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,MC,mc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,MC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -CONFIGURE_ARGS+= --disable-charset \ +CONFIGURE_ARGS+= --enable-charset \ + --disable-extcharset \ --disable-background \ --disable-gcc-warnings \ --disable-glibtest \ @@ -36,20 +37,14 @@ CONFIGURE_ARGS+= --disable-charset \ --with-screen=ncurses \ --with-edit CONFIGURE_ENV+= mc_cv_have_zipinfo=yes \ - ac_cv_lib_nsl_t_accept=no \ - ac_cv_lib_nsl_gethostbyname=no \ am_cv_func_iconv=no -BUILD_STYLE= auto -INSTALL_STYLE= auto - -pre-install: - cp ${WRKSRC}/doc/xnc.hlp ${WRKSRC}/doc/mc.hlp post-install: - ${INSTALL_DIR} ${IDIR_MC}/usr/{bin,share/mc} - ${CP} ${WRKINST}/usr/bin/mc ${IDIR_MC}/usr/bin/ - cd ${IDIR_MC}/usr/bin && ln -s mc mcedit && ln -s mc mcview - cd ${WRKINST}/usr/share/mc && ${CP} cedit.menu mc.ext mc.hint \ - mc.lib mc.menu syntax extfs ${IDIR_MC}/usr/share/mc/ + ${INSTALL_DIR} ${IDIR_MC}/etc/mc + ${INSTALL_DIR} ${IDIR_MC}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/mc ${IDIR_MC}/usr/bin/ + cd ${IDIR_MC}/usr/bin && ln -fs mc mcedit && ln -fs mc mcview + cd ${WRKINST}/etc/mc && ${CP} cedit.menu mc.ext \ + mc.lib mc.menu extfs ${IDIR_MC}/etc/mc/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mc/patches/patch-Makefile_in b/package/mc/patches/patch-Makefile_in new file mode 100644 index 000000000..db881370a --- /dev/null +++ b/package/mc/patches/patch-Makefile_in @@ -0,0 +1,11 @@ +--- mc-4.7.0.2.orig/Makefile.in 2010-02-02 16:24:55.000000000 +0100 ++++ mc-4.7.0.2/Makefile.in 2010-02-06 00:46:00.203084693 +0100 +@@ -308,7 +308,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = 1.5 +-SUBDIRS = intl po lib src doc contrib misc ++SUBDIRS = intl po lib src contrib misc + EXTRA_DIST = + dist_noinst_SCRIPTS = build-glib2.sh + dist_noinst_HEADERS = $(top_srcdir)/version.h diff --git a/package/mc/patches/patch-lib_mc_ext_in b/package/mc/patches/patch-lib_mc_ext_in deleted file mode 100644 index 3169ca23a..000000000 --- a/package/mc/patches/patch-lib_mc_ext_in +++ /dev/null @@ -1,92 +0,0 @@ -$Id$ -$MirOS: ports/misc/mc/patches/patch-lib_mc_ext_in,v 1.7 2006/09/28 20:31:52 tg Exp $ ---- mc-4.6.1.orig/lib/mc.ext.in 2005-07-23 16:51:15.000000000 +0000 -+++ mc-4.6.1/lib/mc.ext.in 2007-03-20 13:32:10.000000000 +0000 -@@ -106,6 +106,42 @@ - - ### Archives ### - -+## CPIO -+ -+# .cgz -+shell/.cgz -+ Open=%cd %p#ucpio -+ View=%view{ascii} gzip -dc %f 2>/dev/null | cpio -itv 2>/dev/null -+ -+# .cbz -+shell/.cbz -+ Open=%cd %p#ucpio -+ View=%view{ascii} bzip2 -dc %f 2>/dev/null | cpio -itv 2>/dev/null -+ -+## CPIO (newc) - MirOS extension -+ -+# .ngz -+shell/.ngz -+ Open=%cd %p#ucpio -+ View=%view{ascii} gzip -dc %f 2>/dev/null | cpio -itv 2>/dev/null -+ -+# .nbz -+shell/.nbz -+ Open=%cd %p#ucpio -+ View=%view{ascii} bzip2 -dc %f 2>/dev/null | cpio -itv 2>/dev/null -+ -+# .mcz -+shell/.mcz -+ Open=%cd %p#ucpio -+ View=%view{ascii} gzip -dc %f 2>/dev/null | cpio -itv 2>/dev/null -+ -+## USTAR -+ -+# .tbz -+shell/.tbz -+ Open=%cd %p#utar -+ View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf - -+ - # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z - regex/\.t([gp]?z|ar\.g?[zZ])$ - Open=%cd %p#utar -@@ -135,6 +171,10 @@ regex/\.(tar|TAR)$ - View=%view{ascii} tar tvvf %f - - # lha -+regex/\.[Ll]([Zz][Hh]|[Hh][Aa])$ -+ Open=%cd %p#ulha -+ View=%view{ascii} lha l %f -+ - type/^LHa\ .*archive - Open=%cd %p#ulha - View=%view{ascii} lha l %f -@@ -191,13 +231,20 @@ regex/\.(rpm|spm)$ - Open=%cd %p#rpm - View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f - --# deb -+# deb - Debian packages - regex/\.u?deb$ -- Open=%cd %p#deb -- View=%view{ascii} dpkg-deb -c %f -+# Open=%cd %p#deb -+# View=%view{ascii} dpkg-deb -c %f -+ Open=%cd %p#uar -+ View=%view{ascii} ar p %f control.tar.gz | gzip -d | tar xOf - ./control; echo; ar p %f data.tar.gz | gzip -d | tar tvvf - -+ -+# ipk - like deb, but tgz instead of ar -+shell/.ipk -+ Open=%cd %p#utar -+ View=%view{ascii} gzip -dc %f 2>&- | tar xOf - ./control.tar.gz | gzip -d | tar xOf - ./control; echo; gzip -dc %f 2>&- | tar xOf - ./data.tar.gz | gzip -d | tar tvvf - - - # ISO9660 --regex/\.iso$ -+regex/\.[Ii][Ss][Oo]$ - Open=%cd %p#iso9660 - View=%view{ascii} isoinfo -l -i %f - -@@ -417,7 +464,7 @@ type/^PDF - - # html - regex/\.([hH][tT][mM][lL]?)$ -- Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null -+ Open=lynx -force_html %f - View=%view{ascii} lynx -dump -force_html %f - - # StarOffice 5.2 diff --git a/package/mc/patches/patch-lib_mc_lib b/package/mc/patches/patch-lib_mc_lib deleted file mode 100644 index 51445e0fe..000000000 --- a/package/mc/patches/patch-lib_mc_lib +++ /dev/null @@ -1,378 +0,0 @@ -$Id$ -$MirOS: ports/misc/mc/patches/patch-lib_mc_lib,v 1.9 2007/03/01 23:56:43 tg Exp $ ---- mc-4.6.1.orig/lib/mc.lib 2004-09-10 09:23:44.000000000 +0000 -+++ mc-4.6.1/lib/mc.lib 2007-03-20 13:32:10.000000000 +0000 -@@ -1,8 +1,27 @@ -+# $MirOS: ports/misc/mc/patches/patch-lib_mc_lib,v 1.9 2007/03/01 23:56:43 tg Exp $ -+#- -+# Copyright (c) 2003, 2004, 2005, 2006 -+# Thorsten Glaser -+# -+# Provided that these terms and disclaimer and all copyright notices -+# are retained or reproduced in an accompanying document, permission -+# is granted to deal in this work without restriction, including un- -+# limited rights to use, publicly perform, distribute, sell, modify, -+# merge, give away, or sublicence. -+# -+# This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to -+# the utmost extent permitted by applicable law, neither express nor -+# implied; without malicious intent or gross negligence. In no event -+# may a licensor, author or contributor be held liable for indirect, -+# direct, other damage, loss, or other issues arising in any way out -+# of dealing in the work, even if advised of the possibility of such -+# damage or existence of a defect, except proven that it results out -+# of said person's immediate fault when using the work as intended. -+ - [Special dirs] - list=/afs,/coda,/:,/...,/net,/#smb - - [terminal:console] --insert=\e[2~ - f11=\e[23~ - f12=\e[24~ - f13=\e[25~ -@@ -13,25 +32,25 @@ f17=\e[31~ - f18=\e[32~ - f19=\e[33~ - f20=\e[34~ --kpleft=\eOt --kpright=\eOv --kpup=\eOx -+insert=\e[2~ -+kpasterix=\eOR -+kpdelete=\eOn - kpdown=\eOr --kphome=\eOw - kpend=\eOq -+kpenter=\eOM -+kphome=\eOw -+kpinsert=\eOp -+kpleft=\eOt -+kpminus=\eOS - kpnpage=\eOs --kpppage=\eOy -+kpnumlock=\eOP - kpplus=\eOl --kpminus=\eOS --kpasterix=\eOR --kpinsert=\eOp --kpdelete=\eOn --kpenter=\eOM -+kpppage=\eOy -+kpright=\eOv - kpslash=\eOQ --kpnumlock=\eOP -+kpup=\eOx - - [terminal:linux] --insert=\e[2~ - f11=\e[23~ - f12=\e[24~ - f13=\e[25~ -@@ -42,25 +61,31 @@ f17=\e[31~ - f18=\e[32~ - f19=\e[33~ - f20=\e[34~ --kpleft=\eOt --kpright=\eOv --kpup=\eOx -+insert=\e[2~ -+kpasterix=\eOR -+kpdelete=\eOn - kpdown=\eOr --kphome=\eOw - kpend=\eOq -+kpenter=\eOM -+kphome=\eOw -+kpinsert=\eOp -+kpleft=\eOt -+kpminus=\eOS - kpnpage=\eOs --kpppage=\eOy -+kpnumlock=\eOP - kpplus=\eOl --kpminus=\eOS --kpasterix=\eOR --kpinsert=\eOp --kpdelete=\eOn --kpenter=\eOM -+kpppage=\eOy -+kpright=\eOv - kpslash=\eOQ --kpnumlock=\eOP -+kpup=\eOx - - [terminal:xterm] --insert=\e[2~ -+bs= -+delete=\e[3~ -+end=\eOF -+end=\e[4~ -+end=\e[8~ -+end=\e[F - f11=\e[23~ - f12=\e[24~ - f13=\e[25~ -@@ -71,27 +96,22 @@ f17=\e[31~ - f18=\e[32~ - f19=\e[33~ - f20=\e[34~ --kpleft=\eOt --kpright=\eOv --kpup=\eOx -+home=\eOH -+home=\e[1~ -+home=\e[7~ -+home=\e[H -+insert=\e[2~ -+kpasterix=\eOj - kpdown=\eOr --kphome=\eOw - kpend=\eOq -+kphome=\eOw -+kpleft=\eOt -+kpminus=\eOm - kpnpage=\eOs --kpppage=\eOy - kpplus=\eOk --kpminus=\eOm --kpasterix=\eOj --delete=\e[3~ --bs= --home=\e[1~ --home=\e[7~ --end=\eOF --end=\e[F --end=\e[4~ --end=\e[8~ --home=\eOH --home=\e[H -+kpppage=\eOy -+kpright=\eOv -+kpup=\eOx - pgdn=\e[6~ - pgup=\e[5~ - -@@ -108,14 +128,14 @@ f19=\e[20;2~ - f20=\e[21;2~ - - # Arrows for both keypad modes (application and normal). --up=\e[A --up=\eOA --down=\e[B - down=\eOB --right=\e[C --right=\eOC --left=\e[D -+down=\e[B - left=\eOD -+left=\e[D -+right=\eOC -+right=\e[C -+up=\eOA -+up=\e[A - - [terminal:gnome] - copy=xterm -@@ -126,8 +146,15 @@ copy=xterm - [terminal:xterm-new] - copy=xterm - -+[terminal:xterm-xfree86] -+copy=xterm -+ - [terminal:xterm-color] --insert=\e[2~ -+bs= -+delete=\e[3~ -+end=\eOF -+end=\e[4~ -+end=\e[8~ - f11=\e[23~ - f12=\e[24~ - f13=\e[25~ -@@ -138,29 +165,27 @@ f17=\e[31~ - f18=\e[32~ - f19=\e[33~ - f20=\e[34~ --kpleft=\eOt --kpright=\eOv --kpup=\eOx -+home=\eOH -+home=\e[1~ -+home=\e[7~ -+insert=\e[2~ -+kpasterix=\eOj - kpdown=\eOr --kphome=\eOw - kpend=\eOq -+kphome=\eOw -+kpleft=\eOt -+kpminus=\eOm - kpnpage=\eOs --kpppage=\eOy - kpplus=\eOk --kpminus=\eOm --kpasterix=\eOj --delete=\e[3~ --bs= --home=\e[1~ --home=\e[7~ --home=\eOH --end=\e[4~ --end=\e[8~ --end=\eOF -+kpppage=\eOy -+kpright=\eOv -+kpup=\eOx - pgdn=\e[6~ - pgup=\e[5~ - - [terminal:ibmpc3] -+bs=^h -+end=\e[F - f11=\e[Y - f12=\e[Z - f13=\e[a -@@ -171,11 +196,9 @@ f17=\e[e - f18=\e[f - f19=\e[g - f20=\e[h --bs=^h --end=\e[F --kpplus=\e[+ --kpminus=\e[- - kpasterix=\e[* -+kpminus=\e[- -+kpplus=\e[+ - - [terminal:cons25] - f11=\e[Y -@@ -188,3 +211,127 @@ f17=\e[e - f18=\e[f - f19=\e[g - f20=\e[h -+ -+# Sequences below are used in OpenBSD wscons, also via remote login -+ -+[terminal:vt220] -+bs= -+end=\e[8~ -+f1=\e[11~ -+f2=\e[12~ -+f3=\e[13~ -+f4=\e[14~ -+f5=\e[15~ -+f6=\e[17~ -+f7=\e[18~ -+f8=\e[19~ -+f9=\e[20~ -+f10=\e[21~ -+f11=\e[23~ -+f12=\e[24~ -+home=\e[7~ -+ -+[terminal:wsvt25] -+bs= -+end=\e[8~ -+f1=\e[11~ -+f2=\e[12~ -+f3=\e[13~ -+f4=\e[14~ -+f5=\e[15~ -+f6=\e[17~ -+f7=\e[18~ -+f8=\e[19~ -+f9=\e[20~ -+f10=\e[21~ -+f11=\e[23~ -+f12=\e[24~ -+home=\e[7~ -+ -+[terminal:wsvtg] -+bs= -+end=\e[8~ -+f1=\e[11~ -+f2=\e[12~ -+f3=\e[13~ -+f4=\e[14~ -+f5=\e[15~ -+f6=\e[17~ -+f7=\e[18~ -+f8=\e[19~ -+f9=\e[20~ -+f10=\e[21~ -+f11=\e[23~ -+f12=\e[24~ -+home=\e[7~ -+ -+# Not a real vt100, but NetBSD wscons in vt220 mode with -+# $TERM set to vt100. Except F5-F9, this matches screen. -+ -+[terminal:vt100] -+bs= -+complete=‰ -+delete=\e[3~ -+end=\e[8~ -+f1=\e[11~ -+f2=\e[12~ -+f3=\e[13~ -+f4=\e[14~ -+f5=\e[15~ -+f6=\e[17~ -+f7=\e[18~ -+f8=\e[19~ -+f9=\e[20~ -+f10=\e[21~ -+f11=\e[23~ -+f12=\e[24~ -+home=\e[7~ -+insert=\e[2~ -+pgdn=\e[6~ -+pgup=\e[5~ -+ -+# GNU screen - depending on its environment, here: wsvt25 -+[terminal:screen] -+end=\e[8~ -+f10=\e[20~ -+f1=\e[11~ -+f2=\e[12~ -+f3=\e[13~ -+f4=\e[14~ -+f5=\e[15~ -+f6=\e[15~ -+f7=\e[17~ -+f8=\e[18~ -+f9=\e[19~ -+home=\e[7~ -+ -+# PuTTY -+[terminal:ansi] -+bs=^h -+down=\eOB -+f1=\eOP -+f2=\eOQ -+f3=\eOR -+f4=\eOS -+left=\eOD -+right=\eOC -+up=\eOA -+ -+# Windows 3.1 TELNET.EXE -+# (not really useful. The F-Keys, INS etc. don't work.) -+[terminal:ansi-nt] -+f1=\eOP -+f2=\eOQ -+f3=\eOR -+f4=\eOS -+bs=^h -+up=\e[A -+down=\e[B -+left=\e[D -+right=\e[C -+delete= -+ -+# Microsoft Services for Unix 3.5 (native terminal, xterm see above) -+[terminal:interix] -+home=\e[H -+delete= diff --git a/package/mc/patches/patch-lib_mc_menu b/package/mc/patches/patch-lib_mc_menu deleted file mode 100644 index c29c0a79d..000000000 --- a/package/mc/patches/patch-lib_mc_menu +++ /dev/null @@ -1,17 +0,0 @@ -$Id$ -$MirOS: ports/misc/mc/patches/patch-lib_mc_menu,v 1.9 2007/03/01 23:56:43 tg Exp $ ---- mc-4.6.1.orig/lib/mc.menu 2004-08-17 08:31:16.000000000 +0000 -+++ mc-4.6.1/lib/mc.menu 2007-03-20 13:32:10.000000000 +0000 -@@ -1,4 +1,12 @@ - shell_patterns=0 -++ t r & ! t t -+u Diff file against opposite -+ diff -dupa %f %D/%F 2>&1 | less -+ -+= t d -+U Diff dir against opposite -+ diff -pdu . %D 2>&1 | grep -v "^Only in " | less -+ - + ! t t - @ Do something on the current file - CMD=%{Enter command} diff --git a/package/mc/patches/patch-src_key_c b/package/mc/patches/patch-src_key_c deleted file mode 100644 index 00b504c71..000000000 --- a/package/mc/patches/patch-src_key_c +++ /dev/null @@ -1,13 +0,0 @@ -$Id$ -$MirOS: ports/misc/mc/patches/patch-src_key_c,v 1.1 2006/10/28 22:35:47 tg Exp $ ---- mc-4.6.1.orig/src/key.c 2005-06-08 12:27:19.000000000 +0000 -+++ mc-4.6.1/src/key.c 2007-03-20 13:32:10.000000000 +0000 -@@ -86,7 +86,7 @@ int mou_auto_repeat = 100; - int double_click_speed = 250; - int old_esc_mode = 0; - --int use_8th_bit_as_meta = 0; -+int use_8th_bit_as_meta = 1; - - typedef struct key_def { - char ch; /* Holds the matching char code */ diff --git a/package/mc/patches/patch-src_main_c b/package/mc/patches/patch-src_main_c deleted file mode 100644 index f7b29b3d0..000000000 --- a/package/mc/patches/patch-src_main_c +++ /dev/null @@ -1,13 +0,0 @@ -$Id$ -$MirOS: ports/misc/mc/patches/patch-src_main_c,v 1.6 2006/10/28 22:35:48 tg Exp $ ---- mc-4.6.1.orig/src/main.c 2005-07-23 16:52:02.000000000 +0000 -+++ mc-4.6.1/src/main.c 2007-03-20 13:32:10.000000000 +0000 -@@ -150,7 +150,7 @@ int auto_save_setup = 1; - - #ifndef HAVE_CHARSET - /* If true, allow characters in the range 160-255 */ --int eight_bit_clean = 1; -+int eight_bit_clean = 0; - - /* - * If true, also allow characters in the range 128-159. diff --git a/package/mc/patches/patch-vfs_extfs_iso9660_in b/package/mc/patches/patch-vfs_extfs_iso9660_in deleted file mode 100644 index d515ff0a8..000000000 --- a/package/mc/patches/patch-vfs_extfs_iso9660_in +++ /dev/null @@ -1,31 +0,0 @@ -$Id$ -$MirOS: ports/misc/mc/patches/patch-vfs_extfs_iso9660_in,v 1.1 2006/09/28 20:39:05 tg Exp $ - - This does limit names to the C locale, but skips error messages. - ---- mc-4.6.1.orig/vfs/extfs/iso9660.in 2004-10-29 09:14:38.000000000 +0000 -+++ mc-4.6.1/vfs/extfs/iso9660.in 2007-03-20 13:32:10.000000000 +0000 -@@ -9,15 +9,7 @@ - # tested to comply with isoinfo 2.0's output - - test_iso () { -- CHARSET=`echo "$save_ctype" | sed -n -e 's/.*\.\(.*\)"$/\1/p' | tr '[A-Z]' '[a-z]'` -- if test -n "$CHARSET"; then -- isoinfo -j $CHARSET 2>&1 | grep "Unknown charset" >/dev/null && CHARSET= -- fi -- if test -n "$CHARSET"; then -- JOLIET_OPT="-j $CHARSET -J" -- else - JOLIET_OPT="-J" -- fi - ISOINFO="isoinfo -R" - isoinfo -d -i "$1" | grep "NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT" - } -@@ -65,7 +57,6 @@ mcisofs_copyout () { - $ISOINFO -i "$1" -x "/$2" > "$3" - } - --save_ctype=`locale | grep LC_CTYPE` - LC_ALL=C - - cmd="$1" diff --git a/package/mdadm/Makefile b/package/mdadm/Makefile index 28f61ee6d..217279c9a 100644 --- a/package/mdadm/Makefile +++ b/package/mdadm/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mdadm -PKG_VERSION:= 3.0 -PKG_RELEASE:= 2 -PKG_MD5SUM:= 1eb89885b2b881562fc79ed2f5e1a056 +PKG_VERSION:= 3.1.1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 8bfeea282d21b5ef8e825122fb359457 PKG_DESCR:= tool for managing Linux Software RAID arrays PKG_SECTION:= utils PKG_URL:= http://neil.brown.name/blog/mdadm @@ -16,9 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MDADM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual + XAKE_FLAGS+= CROSS_COMPILE="${TARGET_CROSS}" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_MDADM}/usr/sbin diff --git a/package/mdadm/patches/patch-Makefile b/package/mdadm/patches/patch-Makefile index 79b801c74..cbe429082 100644 --- a/package/mdadm/patches/patch-Makefile +++ b/package/mdadm/patches/patch-Makefile @@ -1,5 +1,14 @@ ---- mdadm-3.0.orig/Makefile 2009-06-02 07:48:29.000000000 +0200 -+++ mdadm-3.0/Makefile 2010-01-16 09:36:14.000000000 +0100 +--- mdadm-3.1.1.orig/Makefile 2009-11-16 23:55:41.000000000 +0100 ++++ mdadm-3.1.1/Makefile 2010-02-06 01:09:39.963074463 +0100 +@@ -42,7 +42,7 @@ KLIBC_GCC = gcc -nostdinc -iwithprefix i + + CC = $(CROSS_COMPILE)gcc + CXFLAGS = -ggdb +-CWFLAGS = -Wall -Werror -Wstrict-prototypes ++CWFLAGS = -Wall -Wstrict-prototypes + ifdef WARN_UNUSED + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O + endif @@ -58,7 +58,8 @@ CONFFILE = $(SYSCONFDIR)/mdadm.conf CONFFILE2 = $(SYSCONFDIR)/mdadm/mdadm.conf MAILCMD =/usr/sbin/sendmail -t @@ -17,8 +26,8 @@ - $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm - $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon + $(INSTALL) -d $(DESTDIR)$(BINDIR) -+ $(INSTALL) $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm -+ $(INSTALL) $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon ++ $(INSTALL) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm ++ $(INSTALL) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon install-static : mdadm.static install-man - $(INSTALL) -D $(STRIP) -m 755 mdadm.static $(DESTDIR)$(BINDIR)/mdadm diff --git a/package/mdadm/patches/patch-platform-intel_c b/package/mdadm/patches/patch-platform-intel_c index 1e6e113a1..3102306e7 100644 --- a/package/mdadm/patches/patch-platform-intel_c +++ b/package/mdadm/patches/patch-platform-intel_c @@ -1,5 +1,5 @@ ---- mdadm-3.0.orig/platform-intel.c 2009-06-02 07:48:29.000000000 +0200 -+++ mdadm-3.0/platform-intel.c 2009-09-02 19:30:09.000000000 +0200 +--- mdadm-3.1.1.orig/platform-intel.c 2009-11-16 23:55:41.000000000 +0100 ++++ mdadm-3.1.1/platform-intel.c 2010-02-06 01:07:51.781825419 +0100 @@ -47,6 +47,7 @@ struct sys_dev *find_driver_devices(cons char path[256]; char link[256]; @@ -18,8 +18,8 @@ + list->path = realpath(path, rpath); list->next = NULL; } - -@@ -198,9 +201,11 @@ const struct imsm_orom *find_imsm_orom(v + closedir(driver_dir); +@@ -203,9 +206,11 @@ const struct imsm_orom *find_imsm_orom(v char *devt_to_devpath(dev_t dev) { char device[40]; diff --git a/package/mgetty/Makefile b/package/mgetty/Makefile index b6b3196f4..55655c637 100644 --- a/package/mgetty/Makefile +++ b/package/mgetty/Makefile @@ -18,6 +18,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MGETTY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + pre-configure: cp ${WRKBUILD}/policy.h-dist ${WRKBUILD}/policy.h echo "#define AUTO_PPP" >> ${WRKBUILD}/policy.h diff --git a/package/miau/Makefile b/package/miau/Makefile index 5ceb9a48e..3d7f474bc 100644 --- a/package/miau/Makefile +++ b/package/miau/Makefile @@ -16,17 +16,15 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MIAU,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-automode \ --enable-releasenick \ --enable-uptime \ --enable-privlog \ --enable-onconnect -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_MIAU}/usr/bin ${IDIR_MIAU}/etc/miau - ${INSTALL_BIN} ${WRKINST}/usr/bin/${PKG_NAME} ${IDIR_MIAU}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/miau ${IDIR_MIAU}/usr/bin/ ${INSTALL_DATA} ./files/miaurc ${IDIR_MIAU}/etc/miau/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/miax/Makefile b/package/miax/Makefile index 0975cf3f3..9117a4c86 100644 --- a/package/miax/Makefile +++ b/package/miax/Makefile @@ -21,7 +21,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MIAX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= CC="${TARGET_CC}" \ OFLAGS="${TCFLAGS}" \ CPPFLAGS="${TCPPFLAGS}" \ diff --git a/package/microperl/Makefile b/package/microperl/Makefile index 2d0555f28..82e54df34 100644 --- a/package/microperl/Makefile +++ b/package/microperl/Makefile @@ -22,7 +22,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MICROPERL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= CC="${TARGET_CC}" OPTIMIZE="${TCFLAGS}" MAKE_FILE:= Makefile.micro diff --git a/package/mini_httpd/Makefile b/package/mini_httpd/Makefile index 3c86442a4..569fd98d7 100644 --- a/package/mini_httpd/Makefile +++ b/package/mini_httpd/Makefile @@ -6,27 +6,31 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mini-httpd PKG_VERSION:= 1.19 PKG_RELEASE:= 10 -ifneq ($(ADK_PACKAGE_MINI_HTTPD_OPENSSL),) -PKG_BUILDDEP+= openssl -endif PKG_MD5SUM:= 7c68293ad265ecfe2edea917912f6f1f PKG_DESCR:= A small HTTP server PKG_SECTION:= net +ifneq ($(ADK_PACKAGE_MINI_HTTPD_OPENSSL),) +PKG_DEPENDS:= libopenssl +PKG_BUILDDEP+= openssl +endif PKG_URL:= http://www.acme.com/software/mini_httpd PKG_SITES:= http://www.acme.com/software/mini_httpd/ PKG_DESCR_1:= htpasswd utility PKG_DESCR_2:= A small HTTP server with SSL support -PKG_DEPENDS_2:= libopenssl DISTFILES:= mini_httpd-${PKG_VERSION}.tar.gz WRKDIST= ${WRKDIR}/mini_httpd-${PKG_VERSION} include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -$(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION})) -$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_2},${PKG_DESCR_2},${PKG_SECTION})) +$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR_1},${PKG_SECTION})) +$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_2},${PKG_SECTION})) + +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual do-build: # with OpenSSL @@ -51,19 +55,23 @@ do-install: # without SSL ifneq (${ADK_PACKAGE_MINI_HTTPD},) ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/etc - ${INSTALL_DATA} ./files/mini_httpd.conf ${IDIR_MINI_HTTPD}/etc/mini_httpd.conf + ${INSTALL_DATA} ./files/mini_httpd.conf \ + ${IDIR_MINI_HTTPD}/etc/mini_httpd.conf ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/usr/sbin ${INSTALL_BIN} ${WRKBUILD}/mini_httpd ${IDIR_MINI_HTTPD}/usr/sbin/ ${INSTALL_DIR} ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/htpasswd ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/htpasswd \ + ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin/ endif # with OpenSSL ifneq (${ADK_PACKAGE_MINI_HTTPD_OPENSSL},) ${INSTALL_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/etc - ${INSTALL_DATA} ./files/mini_httpd-ssl.conf ${IDIR_MINI_HTTPD_OPENSSL}/etc/mini_httpd.conf + ${INSTALL_DATA} ./files/mini_httpd-ssl.conf \ + ${IDIR_MINI_HTTPD_OPENSSL}/etc/mini_httpd.conf install -m0600 ./files/mini_httpd.pem ${IDIR_MINI_HTTPD_OPENSSL}/etc/ ${INSTALL_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/mini_httpd-openssl ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin/mini_httpd + ${INSTALL_BIN} ${WRKBUILD}/mini_httpd-openssl \ + ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin/mini_httpd endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mini_sendmail/Makefile b/package/mini_sendmail/Makefile index 0724048bd..96aa19382 100644 --- a/package/mini_sendmail/Makefile +++ b/package/mini_sendmail/Makefile @@ -19,13 +19,16 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MINI_SENDMAIL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= OFLAGS="${TARGET_CFLAGS}" MAKE_FLAGS+= CC="${TARGET_CC}" do-install: ${INSTALL_DIR} ${IDIR_MINI_SENDMAIL}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/mini_sendmail ${IDIR_MINI_SENDMAIL}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/mini_sendmail \ + ${IDIR_MINI_SENDMAIL}/usr/sbin/ ln -sf mini_sendmail ${IDIR_MINI_SENDMAIL}/usr/sbin/sendmail include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/miredo/Makefile b/package/miredo/Makefile index 8fbe95b48..a9ac0ca8e 100644 --- a/package/miredo/Makefile +++ b/package/miredo/Makefile @@ -6,12 +6,12 @@ include ${TOPDIR}/rules.mk PKG_NAME:= miredo PKG_VERSION:= 1.1.6 PKG_RELEASE:= 1 +PKG_MD5SUM:= bf49c1ddc068746760787d0cf76e40de +PKG_DESCR:= A Teredo client and relay daemon +PKG_SECTION:= net ifeq (${ADK_COMPILE_MIREDO_WITH_UCLIBCXX},y) PKG_BUILDDEP+= uclibc++ endif -PKG_MD5SUM:= bf49c1ddc068746760787d0cf76e40de -PKG_DESCR:= A Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon -PKG_SECTION:= net PKG_URL:= http://www.remlab.net PKG_SITES:= http://www.remlab.net/files/miredo/ @@ -22,7 +22,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MIREDO,miredo,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,MIREDO_SERVER,miredo-server,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +TCFLAGS+= -std=gnu99 CONFIGURE_ENV+= ac_cv_file__proc_self_maps=yes CONFIGURE_ARGS+= --disable-chroot \ --without-Judy \ @@ -30,9 +30,8 @@ CONFIGURE_ARGS+= --disable-chroot \ --enable-teredo-relay \ --enable-teredo-server \ --enable-miredo-user=root -BUILD_STYLE:= auto -INSTALL_STYLE:= auto -XAKE_FLAGS+ CXXLINK="\$${LINK}" \ + +XAKE_FLAGS+= CXXLINK="\$${LINK}" \ ifeq ($(ADK_TARGET_LIB_UCLIBCXX),y) TCXXFLAGS+= -fno-builtin -fno-rtti -nostdinc++ diff --git a/package/mksh/Makefile b/package/mksh/Makefile index 1298e4cfe..f3815462f 100644 --- a/package/mksh/Makefile +++ b/package/mksh/Makefile @@ -26,6 +26,10 @@ ifeq ($(strip ${ADK_PACKAGE_MKSH_FULL}),) TCPPFLAGS+= -DMKSH_SMALL=1 endif +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: cd ${WRKBUILD} && CC='${TARGET_CC}' CFLAGS='${TCFLAGS}' \ CPPFLAGS='${TCPPFLAGS}' LDFLAGS='${TLDFLAGS}' \ diff --git a/package/moc/Makefile b/package/moc/Makefile index 18a255ae1..97b5e8707 100644 --- a/package/moc/Makefile +++ b/package/moc/Makefile @@ -6,27 +6,25 @@ include ${TOPDIR}/rules.mk PKG_NAME:= moc PKG_VERSION:= 2.4.4 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libvorbis curl libmad flac ffmpeg PKG_MD5SUM:= 647c770a5542a4ae5437386807a89796 PKG_DESCR:= console music player PKG_SECTION:= sound -PKG_DEPENDS:= libmad libvorbis libcurl libflac ffmpeg +PKG_DEPENDS:= libmad libvorbis libcurl libflac ffmpeg libiconv libid3tag +PKG_BUILDDEP+= libvorbis curl libmad flac ffmpeg libiconv libid3tag PKG_URL:= http://moc.daper.net PKG_SITES:= ftp://ftp.daper.net/pub/soft/moc/stable/ + DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MOC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-jack \ --without-oss \ --without-musepack \ --without-speex \ --without-sndfile -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_MOC}/usr/bin diff --git a/package/moc/patches/patch-configure b/package/moc/patches/patch-configure new file mode 100644 index 000000000..0968574d6 --- /dev/null +++ b/package/moc/patches/patch-configure @@ -0,0 +1,20 @@ +--- moc-2.4.4.orig/configure 2009-01-04 09:28:51.000000000 +0100 ++++ moc-2.4.4/configure 2010-02-06 01:22:38.464334671 +0100 +@@ -13910,7 +13910,7 @@ DECODER_PLUGIN_DIR=decoder_plugins + PLUGIN_LDFLAGS='-module -avoid-version' + + +-OS=`uname 2>/dev/null` ++OS=Linux + + case "$OS" in + Linux) +@@ -13929,7 +13929,7 @@ _ACEOF + ;; + esac + +-LDFLAGS="$LDFLAGS -export-dynamic" ++LDFLAGS="$LDFLAGS" + + { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 + echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } diff --git a/package/monit/Makefile b/package/monit/Makefile index 80a6caa0a..f5d334734 100644 --- a/package/monit/Makefile +++ b/package/monit/Makefile @@ -6,20 +6,19 @@ include ${TOPDIR}/rules.mk PKG_NAME:= monit PKG_VERSION:= 5.0.3 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= dae7859ec10551fc941daeae60dee9d3 PKG_DESCR:= An utility for system services monitoring PKG_SECTION:= admin PKG_DEPENDS:= libpthread +ifeq ($(ADK_COMPILE_MONIT_WITH_SSL),y) +PKG_DEPENDS:= libopenssl +PKG_BUILDDEP+= openssl +endif PKG_URL:= http://mmonit.com/monit PKG_SITES:= http://www.tildeslash.com/monit/dist/ include ${TOPDIR}/mk/package.mk -ifeq ($(ADK_COMPILE_MONIT_WITH_SSL),y) -PKG_DEPENDS+= libopenssl -endif - $(eval $(call PKG_template,MONIT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) ifeq ($(ADK_COMPILE_MONIT_WITH_SSL),y) @@ -28,11 +27,6 @@ else CONFIGURE_ARGS+= --without-ssl endif -CONFIGURE_STYLE:= gnu -CONFIGURE_ENV+= ac_cv_lib_nsl_inet_addr=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_MONIT}/etc install -m0600 ${WRKBUILD}/monitrc ${IDIR_MONIT}/etc/ diff --git a/package/motion/Makefile b/package/motion/Makefile index c3a49e3be..a7a9f1bb5 100644 --- a/package/motion/Makefile +++ b/package/motion/Makefile @@ -6,13 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= motion PKG_VERSION:= 3.2.11 PKG_RELEASE:= 1 -ifneq ($(ADK_PACKAGE_MOTION),) -PKG_BUILDDEP+= jpeg -endif PKG_MD5SUM:= 3a26c00f3250eacf6fa93c7a7e0249d9 PKG_DESCR:= Webcam motion sensing and logging PKG_SECTION:= multimedia PKG_DEPENDS:= libjpeg libpthread +PKG_BUILDDEP+= jpeg PKG_URL:= http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=motion/} @@ -20,14 +18,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MOTION,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-ffmpeg \ --without-jpeg-mmx \ --without-optimizecpu \ --without-mysql \ --without-pgsql -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_MOTION}/usr/bin diff --git a/package/mpd/Makefile b/package/mpd/Makefile index 57918dd15..71fa1fe7e 100644 --- a/package/mpd/Makefile +++ b/package/mpd/Makefile @@ -12,42 +12,55 @@ PKG_SECTION:= net PKG_DEPENDS:= glib libstdcxx PKG_BUILDDEP+= glib ifneq ($(ADK_PACKAGE_MPD_WITH_ALSA),) +PKG_DEPENDS+= alsa-lib PKG_BUILDDEP+= alsa-lib endif ifneq ($(ADK_PACKAGE_MPD_WITH_MP3),) +PKG_DEPENDS+= libid3tag libmad PKG_BUILDDEP+= libid3tag libmad endif ifneq ($(ADK_PACKAGE_MPD_WITH_MP4),) +PKG_DEPENDS+= libfaad2 PKG_BUILDDEP+= faad2 endif ifneq ($(ADK_PACKAGE_MPD_WITH_OGG),) +PKG_DEPENDS+= libvorbis libogg PKG_BUILDDEP+= libvorbis endif ifneq ($(ADK_PACKAGE_MPD_WITH_TREMOR),) +PKG_DEPENDS+= libvorbisidec PKG_BUILDDEP+= libvorbisidec endif ifneq ($(ADK_PACKAGE_MPD_WITH_FLAC),) +PKG_DEPENDS+= libflac PKG_BUILDDEP+= flac endif ifneq ($(ADK_PACKAGE_MPD_WITH_WAV),) +PKG_DEPENDS+= libaudiofile PKG_BUILDDEP+= libaudiofile endif ifneq ($(ADK_PACKAGE_MPD_WITH_SHOUT),) +PKG_DEPENDS+= libshout liblame libvorbis PKG_BUILDDEP+= lame libvorbis libshout endif ifneq ($(ADK_PACKAGE_MPD_WITH_CURL),) +PKG_DEPENDS+= libcurl PKG_BUILDDEP+= curl endif ifneq ($(ADK_PACKAGE_MPD_WITH_MMS),) +PKG_DEPENDS+= libmms PKG_BUILDDEP+= libmms endif ifneq ($(ADK_PACKAGE_MPD_WITH_FFMPEG),) +PKG_DEPENDS+= ffmpeg PKG_BUILDDEP+= ffmpeg endif PKG_URL:= http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=musicpd/} -PKG_FLAVOURS:= WITH_ALSA WITH_MP3 WITH_MP4 WITH_TREMOR WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG WITH_SHOUT WITH_CURL +PKG_FLAVOURS:= WITH_ALSA WITH_MP3 WITH_MP4 WITH_TREMOR \ + WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG \ + WITH_SHOUT WITH_CURL PKGFD_WITH_ALSA:= enable ALSA output PKGFD_WITH_MP3:= enable MP3 support PKGFD_WITH_MP4:= enable MP4 support @@ -62,60 +75,28 @@ PKGFD_WITH_CURL:= enable CURL support include ${TOPDIR}/mk/package.mk -ifneq (${ADK_PACKAGE_MPD_WITH_ALSA},) -PKG_DEPENDS+= alsa-lib -endif - -ifneq (${ADK_PACKAGE_MPD_WITH_MP3},) -PKG_DEPENDS+= libid3tag libmad -endif - -ifneq (${ADK_PACKAGE_MPD_WITH_MP4},) -PKG_DEPENDS+= libfaad2 -endif - -ifneq (${ADK_PACKAGE_MPD_WITH_OGG},) -PKG_DEPENDS+= libvorbis libogg -endif - -ifneq (${ADK_PACKAGE_MPD_WITH_TREMOR},) -PKG_DEPENDS+= libvorbisidec -endif - -ifneq (${ADK_PACKAGE_MPD_WITH_FLAC},) -PKG_DEPENDS+= libflac -endif - ifneq (${ADK_PACKAGE_MPD_WITH_WAV},) -PKG_DEPENDS+= libaudiofile endif ifneq (${ADK_PACKAGE_MPD_WITH_SHOUT},) -PKG_DEPENDS+= libshout liblame libvorbisenc endif ifneq (${ADK_PACKAGE_MPD_WITH_CURL},) -PKG_DEPENDS+= libcurl endif ifneq (${ADK_PACKAGE_MPD_WITH_MMS},) -PKG_DEPENDS+= libmms endif ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},) -PKG_DEPENDS+= ffmpeg endif $(eval $(call PKG_template,MPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu autotool -BUILD_STYLE:= auto -INSTALL_STYLE:= auto -XAKE_FLAGS+= MPD_CFLAGS='-D_GNU_SOURCE' +AUTOTOOL_STYLE:= autotool -CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no -CONFIGURE_ARGS+= \ - --disable-httpd-output \ +TCFLAGS+= -std=gnu99 +XAKE_FLAGS+= MPD_CFLAGS='-D_GNU_SOURCE' +CONFIGURE_ARGS+= --disable-httpd-output \ --disable-ao \ --disable-jack \ --disable-fifo \ diff --git a/package/mpfr/Makefile b/package/mpfr/Makefile index 6c95863b3..77f2c1d6a 100644 --- a/package/mpfr/Makefile +++ b/package/mpfr/Makefile @@ -12,12 +12,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MPFR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: ${INSTALL_DIR} ${IDIR_MPFR}/usr/lib - ${CP} ${WRKINST}/usr/lib/libmpfr.so.* ${IDIR_MPFR}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libmpfr.so* ${IDIR_MPFR}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mplayer/Makefile b/package/mplayer/Makefile index 3c75f5712..a5a612bac 100644 --- a/package/mplayer/Makefile +++ b/package/mplayer/Makefile @@ -9,9 +9,11 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 416fa6a247987305d74572d03dc6dde7 PKG_DESCR:= popular video player PKG_SECTION:= video -PKG_DEPENDS:= alsa-lib libjpeg libfaad2 libmad libncurses libogg libpng libpthread libvorbis +PKG_DEPENDS:= alsa-lib libjpeg libfaad2 libmad libncurses +PKG_DEPENDS+= libogg libpng libpthread libvorbis PKG_DEPENDS+= libx11 libxau libxdmcp libxext libxv zlib -PKG_BUILDDEP+= alsa-lib libmad libvorbis faad2 ncurses zlib libX11 libXv libpng libXext +PKG_BUILDDEP+= alsa-lib libmad libvorbis faad2 ncurses zlib +PKG_BUILDDEP+= libX11 libXv libpng libXext PKG_URL:= http://www.mplayerhq.hu PKG_SITES:= http://openadk.org/distfiles/ @@ -21,8 +23,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MPLAYER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual ifeq (${ADK_LINUX_X86_ALIX1C},y) CONFIGURE_CPU_OPTS:= \ @@ -44,7 +45,7 @@ CONFIGURE_CPU_OPTS:= \ --disable-3dnow endif -ifneq ($(ADK_DEBUG),) +ifeq ($(ADK_DEBUG),y) CONFIGURE_DEBUG=--enable-debug endif diff --git a/package/mrd6/Makefile b/package/mrd6/Makefile index bec5f0903..d495ff10d 100644 --- a/package/mrd6/Makefile +++ b/package/mrd6/Makefile @@ -6,10 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mrd6 PKG_VERSION:= 0.9.6 PKG_RELEASE:= 1 -PKG_CXX:= MRD6 PKG_MD5SUM:= 93ada53bb414b9d622f80a717bc2694b PKG_DESCR:= IPv6 multicast routing daemon PKG_SECTION:= net +PKG_CXX:= MRD6 PKG_DEPENDS:= kmod-ipv6 PKG_SITES:= http://www.openadk.org/distfiles/ @@ -19,14 +19,14 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MRD6,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual + ifeq (${ADK_COMPILE_MRD6_WITH_UCLIBCXX},y) -TCXXFLAGS+= -fno-builtin -nostdinc++ -nodefaultlibs -I${STAGING_DIR}/usr/include/uClibc++ +TCXXFLAGS+= -fno-builtin -nostdinc++ -nodefaultlibs \ + -I${STAGING_DIR}/usr/include/uClibc++ TLDFLAGS+= -nodefaultlibs -luClibc++ -shared endif - XAKE_FLAGS+= EXTRA_FLAGS="${TCFLAGS}" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_MRD6}/usr/sbin ${IDIR_MRD6}/etc diff --git a/package/mt-daapd/Makefile b/package/mt-daapd/Makefile index 531b93311..ce223bc89 100644 --- a/package/mt-daapd/Makefile +++ b/package/mt-daapd/Makefile @@ -4,10 +4,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mt-daapd -PKG_VERSION:= 0.2.4 -PKG_RELEASE:= 10 -PKG_MD5SUM:= 2e1cdbe6b94ef153e915806f80a28dca -PKG_DESCR:= a multi-threaded DAAP (Digital Audio Access Protocol) daemon +PKG_VERSION:= 0.2.4.1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 8117141e8a88bfab54fe98b6bbd5cb3a +PKG_DESCR:= a multi-threaded DAAP daemon PKG_SECTION:= net PKG_DEPENDS:= libgdbm libid3tag libpthread PKG_BUILDDEP+= gdbm libid3tag @@ -18,7 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MT_DAAPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu # uClibc setpgrp does not take arguments CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes CONFIGURE_ARGS+= --enable-mdns \ @@ -27,14 +26,15 @@ CONFIGURE_ARGS+= --enable-mdns \ --with-gdbm-includes="${STAGING_DIR}/usr/include" \ --with-gdbm-libs="${STAGING_DIR}/usr/lib" \ --without-static-libs -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_MT_DAAPD}/etc ${IDIR_MT_DAAPD}/usr/{share,sbin} - ${INSTALL_DATA} ${WRKBUILD}/contrib/mt-daapd.conf ${IDIR_MT_DAAPD}/etc/ - ${INSTALL_DATA} ${WRKBUILD}/contrib/mt-daapd.playlist ${IDIR_MT_DAAPD}/etc/ + ${INSTALL_DATA} ${WRKBUILD}/contrib/mt-daapd.conf \ + ${IDIR_MT_DAAPD}/etc/ + ${INSTALL_DATA} ${WRKBUILD}/contrib/mt-daapd.playlist \ + ${IDIR_MT_DAAPD}/etc/ ${CP} ${WRKINST}/usr/share/mt-daapd ${IDIR_MT_DAAPD}/usr/share/ - ${INSTALL_BIN} ${WRKINST}/usr/sbin/mt-daapd ${IDIR_MT_DAAPD}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/mt-daapd \ + ${IDIR_MT_DAAPD}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mtd/Makefile b/package/mtd/Makefile index 92acee50f..800d69f3e 100644 --- a/package/mtd/Makefile +++ b/package/mtd/Makefile @@ -11,7 +11,6 @@ PKG_SECTION:= base PKG_TARGET_DEPENDS:= ag241 foxboard -WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION} NO_DISTFILES:= 1 include ${TOPDIR}/mk/package.mk @@ -20,14 +19,13 @@ $(eval $(call PKG_template,MTD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_D PKGDFLT_MTD= y +CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual do-build: - mkdir -p ${WRKBUILD} - ${CP} ./src/* ${WRKBUILD} - ${TARGET_CC} ${TCPPFLAGS} ${TCFLAGS} -o ${WRKBUILD}/mtd \ - ${WRKBUILD}/mtd.c + ${TARGET_CC} -Wall ${TCPPFLAGS} ${TCFLAGS} \ + -o ${WRKBUILD}/mtd ${WRKBUILD}/mtd.c do-install: ${INSTALL_DIR} ${IDIR_MTD}/sbin diff --git a/package/mtr/Makefile b/package/mtr/Makefile index 3147750b2..4c901d8e7 100644 --- a/package/mtr/Makefile +++ b/package/mtr/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mtr PKG_VERSION:= 0.75 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses PKG_MD5SUM:= 23baca52d0922c2ecba7eba05317868c PKG_DESCR:= ncurses traceroute/ping tool PKG_SECTION:= net PKG_DEPENDS:= libncurses +PKG_BUILDDEP+= ncurses PKG_URL:= http://www.bitwizard.nl/mtr PKG_SITES:= ftp://ftp.bitwizard.nl/mtr/ @@ -18,11 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MTR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE+= gnu CONFIGURE_ENV+= ac_cv_lib_resolv_res_mkquery=yes CONFIGURE_ARGS+= --without-gtk -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_MTR}/usr/sbin diff --git a/package/mutt/Makefile b/package/mutt/Makefile index 89d85d7c6..f68fc657e 100644 --- a/package/mutt/Makefile +++ b/package/mutt/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mutt PKG_VERSION:= 1.5.20 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses openssl PKG_MD5SUM:= 027cdd9959203de0c3c64149a7ee351c PKG_DESCR:= Mail text client PKG_SECTION:= text PKG_DEPENDS:= libncurses libopenssl +PKG_BUILDDEP+= ncurses openssl PKG_URL:= http://www.mutt.org PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=mutt/} @@ -18,21 +18,18 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MUTT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --includedir=${WRKBUILD}/. \ --oldincludedir=${WRKBUILD}/. \ --with-homespool="~/Maildir" \ --enable-pop \ --enable-imap \ --with-ssl -BUILD_STYLE:= auto -MAKE_FLAGS+= CC="${TARGET_CC}" -do-install: +post-install: ${INSTALL_DIR} ${IDIR_MUTT}/usr/bin - ${INSTALL_BIN} ${WRKBUILD}/mutt ${IDIR_MUTT}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/mutt ${IDIR_MUTT}/usr/bin/ ifeq (${ADK_PACKAGE_GPG},y) - ${INSTALL_BIN} ${WRKBUILD}/pgpewrap ${IDIR_MUTT}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/pgpewrap ${IDIR_MUTT}/usr/bin/ endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mysql/Makefile b/package/mysql/Makefile index c3731953e..b1a9eb3ac 100644 --- a/package/mysql/Makefile +++ b/package/mysql/Makefile @@ -20,7 +20,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + CONFIGURE_ENV+= OPTIMIZE_CFLAGS="${TARGET_CFLAGS}" \ OPTIMIZE_CXXFLAGS="${TARGET_CFLAGS}" \ ac_cv_lib_nsl_gethostbyname_r=no \ diff --git a/package/nand/Makefile b/package/nand/Makefile index c453e6a82..0f24fab25 100644 --- a/package/nand/Makefile +++ b/package/nand/Makefile @@ -11,7 +11,6 @@ PKG_SECTION:= base PKG_TARGET_DEPENDS:= rb532 -WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION} NO_DISTFILES:= 1 include ${TOPDIR}/mk/package.mk @@ -20,6 +19,7 @@ $(eval $(call PKG_template,NAND,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_ PKGDFLT_NAND= y +CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual diff --git a/package/nano/Makefile b/package/nano/Makefile index a4dcc2290..088ad4ca5 100644 --- a/package/nano/Makefile +++ b/package/nano/Makefile @@ -6,20 +6,20 @@ include ${TOPDIR}/rules.mk PKG_NAME:= nano PKG_VERSION:= 2.0.9 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses PKG_MD5SUM:= 2be94dc43fb60fff4626a2401a977220 PKG_DESCR:= An enhanced clone of the Pico text editor PKG_SECTION:= admin PKG_DEPENDS:= libncurses +PKG_BUILDDEP+= ncurses PKG_URL:= http://www.nano-editor.org PKG_SITES:= http://www.nano-editor.org/dist/v2.0/ + PKG_FLAVOURS:= TINY include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,NANO,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_header_regex_h=no CONFIGURE_ARGS+= --enable-nanorc \ --disable-glibtest \ @@ -35,13 +35,7 @@ CONFIGURE_ARGS+= --disable-browser \ --disable-speller \ --disable-operatingdir \ --enable-multibuffer -ifneq (${ADK_UNICODE},) -CONFIGURE_ARGS+= --enable-utf8 endif -endif - -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_NANO}/usr/bin diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile index cd41f0f92..50b1eaaa5 100644 --- a/package/ncurses/Makefile +++ b/package/ncurses/Makefile @@ -17,7 +17,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBNCURSES,libncurses,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBNCURSES_DEV,libncurses-dev,${PKG_VERSION}-${PKG_RELEASE},libncurses,${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +SUB_INSTALLS-y:= +SUB_INSTALLS-m:= +SUB_INSTALLS-${ADK_PACKAGE_LIBNCURSES_DEV}+= libncurses-dev-install + CONFIGURE_ENV+= ac_cv_linux_vers=2 CONFIGURE_ARGS+= --without-cxx \ --without-cxx-binding \ @@ -39,8 +42,6 @@ CONFIGURE_ARGS+= --without-cxx \ --without-rcs-ids \ --enable-const \ --enable-echo -BUILD_STYLE:= auto -INSTALL_STYLE:= auto ALL_TARGET:= libs INSTALL_TARGET:= install.libs install.data @@ -58,7 +59,7 @@ pre-configure: ${MAKE} -C ${WRKBUILD}/include ${MAKE} -C ${WRKBUILD}/progs -post-install: +post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} # this is installed as libncurses - make libcurses a "link" rm -f ${WRKINST}/usr/lib/libcurses.so* echo 'GROUP(-lncurses)' >${WRKINST}/usr/lib/libcurses.so @@ -74,6 +75,8 @@ post-install: ${INSTALL_DATA} ${WRKINST}/usr/share/terminfo/*/$$f \ ${IDIR_LIBNCURSES}/usr/share/terminfo/$${f:0:1}/$$f; \ done + +libncurses-dev-install: ${INSTALL_DIR} ${IDIR_LIBNCURSES_DEV}/usr/include ${CP} ${WRKINST}/usr/include/*.h ${IDIR_LIBNCURSES_DEV}/usr/include diff --git a/package/ndisc/Makefile b/package/ndisc/Makefile index 4cdefc38e..e191474b2 100644 --- a/package/ndisc/Makefile +++ b/package/ndisc/Makefile @@ -20,9 +20,6 @@ $(eval $(call PKG_template,NDISC6,ndisc6,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEP $(eval $(call PKG_template,RDISC6,rdisc6,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,TCPTRACEROUTE6,tcptraceroute6,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto MAKE_FLAGS+= CC="${TARGET_CC}" post-install: @@ -31,6 +28,7 @@ post-install: ${INSTALL_DIR} ${IDIR_RDISC6}/usr/bin ${INSTALL_BIN} ${WRKINST}//usr/bin/rdisc6 ${IDIR_RDISC6}/usr/bin/ ${INSTALL_DIR} ${IDIR_TCPTRACEROUTE6}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/tcptraceroute6 ${IDIR_TCPTRACEROUTE6}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/tcptraceroute6 \ + ${IDIR_TCPTRACEROUTE6}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ndisc/extra/rdnssd/strverscmp.c b/package/ndisc/extra/rdnssd/strverscmp.c deleted file mode 100644 index 6276bca0f..000000000 --- a/package/ndisc/extra/rdnssd/strverscmp.c +++ /dev/null @@ -1,131 +0,0 @@ -/* 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/package/ndisc/src/rdnssd/strverscmp.c b/package/ndisc/src/rdnssd/strverscmp.c new file mode 100644 index 000000000..6276bca0f --- /dev/null +++ b/package/ndisc/src/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/package/neon/Makefile b/package/neon/Makefile index b284df38b..350dcd8b1 100644 --- a/package/neon/Makefile +++ b/package/neon/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME= neon PKG_VERSION= 0.28.4 PKG_RELEASE= 1 -PKG_BUILDDEP+= libpthread libxml2 openssl zlib PKG_MD5SUM= 6c3b94362af743d046e198e9fcbe4a85 PKG_DESCR:= HTTP and WebDAV library PKG_SECTION:= libs PKG_DEPENDS:= libpthread libxml2 libopenssl zlib +PKG_BUILDDEP+= libpthread libxml2 openssl zlib PKG_UTL:= http://webdav.org/neon PKG_SITES= http://webdav.org/neon/ @@ -18,15 +18,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,NEON,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-ssl=openssl \ --without-gssapi \ --with-libxml2 -BUILD_STYLE= auto -INSTALL_STYLE= auto confprog post-install: ${INSTALL_DIR} ${IDIR_NEON}/usr/lib - $(CP) ${WRKINST}/usr/lib/lib*.so.* ${IDIR_NEON}/usr/lib + $(CP) ${WRKINST}/usr/lib/lib*.so* ${IDIR_NEON}/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/net-snmp/Makefile b/package/net-snmp/Makefile index ffa2c7950..4b454fb69 100644 --- a/package/net-snmp/Makefile +++ b/package/net-snmp/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= net-snmp PKG_VERSION:= 5.5 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libelf PKG_MD5SUM:= 5b2551e7bd024fbbee84dca22a5f13a1 PKG_DESCR:= SNMP Agent PKG_SECTION:= net PKG_DEPENDS:= libnetsnmp libelf +PKG_BUILDDEP+= libelf PKG_NOPARALLEL:= 1 PKG_URL:= http://www.net-snmp.org PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=net-snmp/} @@ -32,7 +32,6 @@ SNMP_TRANSPORTS_INCLUDED= UDP TCP Callback Unix SNMP_TRANSPORTS_EXCLUDED= TCPIPv6 UDPIPv6 Alias TLDFLAGS+= -pthread -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-logfile=/var/log/snmpd.log \ --with-persistent-directory=/usr/lib/snmp/ \ --with-default-snmp-version=3 \ @@ -54,8 +53,6 @@ CONFIGURE_ARGS+= --with-logfile=/var/log/snmpd.log \ --without-rpm \ --without-zlib -BUILD_STYLE:= auto -INSTALL_STYLE:= auto FAKE_FLAGS+= INSTALL_PREFIX="${WRKINST}" post-install: diff --git a/package/netperf/Makefile b/package/netperf/Makefile index 9dac7fbd4..c5966bb45 100644 --- a/package/netperf/Makefile +++ b/package/netperf/Makefile @@ -19,9 +19,6 @@ $(eval $(call PKG_template,NETPERF,${PKG_NAME},${PKG_VERSION}${PKG_RELEASE},${PK # uClibc setpgrp does not take arguments CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_NETPERF}/usr/bin diff --git a/package/netstat-nat/Makefile b/package/netstat-nat/Makefile index 2f1ee958f..2fa7d5543 100644 --- a/package/netstat-nat/Makefile +++ b/package/netstat-nat/Makefile @@ -16,12 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,NETSTAT_NAT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_NETSTAT_NAT}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/netstat-nat ${IDIR_NETSTAT_NAT}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/netstat-nat \ + ${IDIR_NETSTAT_NAT}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/nfs-utils/Makefile b/package/nfs-utils/Makefile index 7bdc87085..78017c615 100644 --- a/package/nfs-utils/Makefile +++ b/package/nfs-utils/Makefile @@ -36,8 +36,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,NFS_UTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -#TCPPFLAGS+= -I${LINUX_DIR}/include - ifeq ($(ADK_PACKAGE_NFS_UTILS_WITH_KERBEROS),y) CONFIGURE_ARGS+= --enable-nfsv4 \ --with-krb5=${STAGING_DIR}/usr/ \ @@ -60,10 +58,6 @@ CONFIGURE_ENV+= knfsd_cv_bsd_signals=no \ CONFIGURE_ARGS+= --without-tcp-wrappers \ --disable-uuid -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_NFS_UTILS}/usr/sbin ${IDIR_NFS_UTILS}/etc ${INSTALL_DATA} ./files/rpc ${IDIR_NFS_UTILS}/etc diff --git a/package/nmap/Makefile b/package/nmap/Makefile index 8716879cd..22e84125b 100644 --- a/package/nmap/Makefile +++ b/package/nmap/Makefile @@ -27,7 +27,6 @@ CONFIGURE_ENV+= CXXFLAGS="-fno-threadsafe-statics -fno-builtin -fno-rtti -nostd -I${STAGING_DIR}/usr/include/uClibc++" \ LIBS="-nodefaultlibs -luClibc++ -lgcc -lm" endif -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-openssl \ --without-zenmap \ --without-ndiff \ @@ -35,8 +34,6 @@ CONFIGURE_ARGS+= --without-openssl \ --with-libdnet="${STAGING_DIR}/usr" \ --with-libpcap="${STAGING_DIR}/usr" \ --with-libpcre="${STAGING_DIR}/usr" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_NMAP}/usr/share/nmap diff --git a/package/nmap/extra/sctp.h b/package/nmap/extra/sctp.h deleted file mode 100644 index 2c24bfb53..000000000 --- a/package/nmap/extra/sctp.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Stream Control Transmission Protocol (RFC 2960). - * - * Copyright (c) 2008 Daniel Roethlisberger - * Copyright (c) 2000 Dug Song - * - */ - -#ifndef SCTP_H -#define SCTP_H - -#define SCTP_HDR_LEN 12 - -struct sctp_hdr { - uint16_t sh_sport; /* source port */ - uint16_t sh_dport; /* destination port */ - uint32_t sh_vtag; /* sctp verification tag */ - uint32_t sh_sum; /* sctp checksum */ -}; - -#define SCTP_PORT_MAX 65535 - -#define sctp_pack_hdr(hdr, sport, dport, vtag) do { \ - struct sctp_hdr *sctp_pack_p = (struct sctp_hdr *)(hdr); \ - sctp_pack_p->sh_sport = htons(sport); \ - sctp_pack_p->sh_dport = htons(dport); \ - sctp_pack_p->sh_vtag = htonl(vtag); \ -} while (0) - -struct sctp_chunkhdr { - uint8_t sch_type; /* chunk type */ - uint8_t sch_flags; /* chunk flags */ - uint16_t sch_length; /* chunk length */ -}; - -/* chunk types */ -#define SCTP_DATA 0x00 -#define SCTP_INIT 0x01 -#define SCTP_INIT_ACK 0x02 -#define SCTP_SACK 0x03 -#define SCTP_HEARTBEAT 0x04 -#define SCTP_HEARTBEAT_ACK 0x05 -#define SCTP_ABORT 0x06 -#define SCTP_SHUTDOWN 0x07 -#define SCTP_SHUTDOWN_ACK 0x08 -#define SCTP_ERROR 0x09 -#define SCTP_COOKIE_ECHO 0x0a -#define SCTP_COOKIE_ACK 0x0b -#define SCTP_ECNE 0x0c -#define SCTP_CWR 0x0d -#define SCTP_SHUTDOWN_COMPLETE 0x0e -#define SCTP_AUTH 0x0f /* RFC 4895 */ -#define SCTP_ASCONF_ACK 0x80 /* RFC 5061 */ -#define SCTP_PKTDROP 0x81 /* draft-stewart-sctp-pktdrprep-08 */ -#define SCTP_PAD 0x84 /* RFC 4820 */ -#define SCTP_FORWARD_TSN 0xc0 /* RFC 3758 */ -#define SCTP_ASCONF 0xc1 /* RFC 5061 */ - -/* chunk types bitmask flags */ -#define SCTP_TYPEFLAG_REPORT 1 -#define SCTP_TYPEFLAG_SKIP 2 - -#define sctp_pack_chunkhdr(hdr, type, flags, length) do { \ - struct sctp_chunkhdr *sctp_pack_chp = (struct sctp_chunkhdr *)(hdr);\ - sctp_pack_chp->sch_type = type; \ - sctp_pack_chp->sch_flags = flags; \ - sctp_pack_chp->sch_length = htons(length); \ -} while (0) - -struct sctp_chunkhdr_init { - struct sctp_chunkhdr chunkhdr; - - int32_t schi_itag; /* Initiate Tag */ - int32_t schi_arwnd; /* Advertised Receiver Window Credit */ - int16_t schi_nos; /* Number of Outbound Streams */ - int16_t schi_nis; /* Number of Inbound Streams */ - int32_t schi_itsn; /* Initial TSN */ -}; - -#define sctp_pack_chunkhdr_init(hdr, type, flags, length, itag, \ - arwnd, nos, nis, itsn) do { \ - struct sctp_chunkhdr_init *sctp_pack_chip = (struct sctp_chunkhdr_init *)(hdr);\ - sctp_pack_chunkhdr(sctp_pack_chip, type, flags, length);\ - sctp_pack_chip->schi_itag = htonl(itag); \ - sctp_pack_chip->schi_arwnd = htonl(arwnd); \ - sctp_pack_chip->schi_nos = htons(nos); \ - sctp_pack_chip->schi_nis = htons(nis); \ - sctp_pack_chip->schi_itsn = htonl(itsn); \ -} while (0) - -/* - * COOKIE ECHO chunk - */ -struct sctp_chunkhdr_cookie_echo { - struct sctp_chunkhdr chunkhdr; - - /* empty */ -}; - -#define sctp_pack_chunkhdr_cookie_echo(hdr, type, flags, length) do { \ - struct sctp_chunkhdr_cookie_echo *sctp_pack_chip = \ - (struct sctp_chunkhdr_cookie_echo *)(hdr); \ - sctp_pack_chunkhdr(sctp_pack_chip, type, flags, length); \ -} while (0) - -#endif /* SCTP_H */ - - - diff --git a/package/nmap/src/sctp.h b/package/nmap/src/sctp.h new file mode 100644 index 000000000..2c24bfb53 --- /dev/null +++ b/package/nmap/src/sctp.h @@ -0,0 +1,109 @@ +/* + * Stream Control Transmission Protocol (RFC 2960). + * + * Copyright (c) 2008 Daniel Roethlisberger + * Copyright (c) 2000 Dug Song + * + */ + +#ifndef SCTP_H +#define SCTP_H + +#define SCTP_HDR_LEN 12 + +struct sctp_hdr { + uint16_t sh_sport; /* source port */ + uint16_t sh_dport; /* destination port */ + uint32_t sh_vtag; /* sctp verification tag */ + uint32_t sh_sum; /* sctp checksum */ +}; + +#define SCTP_PORT_MAX 65535 + +#define sctp_pack_hdr(hdr, sport, dport, vtag) do { \ + struct sctp_hdr *sctp_pack_p = (struct sctp_hdr *)(hdr); \ + sctp_pack_p->sh_sport = htons(sport); \ + sctp_pack_p->sh_dport = htons(dport); \ + sctp_pack_p->sh_vtag = htonl(vtag); \ +} while (0) + +struct sctp_chunkhdr { + uint8_t sch_type; /* chunk type */ + uint8_t sch_flags; /* chunk flags */ + uint16_t sch_length; /* chunk length */ +}; + +/* chunk types */ +#define SCTP_DATA 0x00 +#define SCTP_INIT 0x01 +#define SCTP_INIT_ACK 0x02 +#define SCTP_SACK 0x03 +#define SCTP_HEARTBEAT 0x04 +#define SCTP_HEARTBEAT_ACK 0x05 +#define SCTP_ABORT 0x06 +#define SCTP_SHUTDOWN 0x07 +#define SCTP_SHUTDOWN_ACK 0x08 +#define SCTP_ERROR 0x09 +#define SCTP_COOKIE_ECHO 0x0a +#define SCTP_COOKIE_ACK 0x0b +#define SCTP_ECNE 0x0c +#define SCTP_CWR 0x0d +#define SCTP_SHUTDOWN_COMPLETE 0x0e +#define SCTP_AUTH 0x0f /* RFC 4895 */ +#define SCTP_ASCONF_ACK 0x80 /* RFC 5061 */ +#define SCTP_PKTDROP 0x81 /* draft-stewart-sctp-pktdrprep-08 */ +#define SCTP_PAD 0x84 /* RFC 4820 */ +#define SCTP_FORWARD_TSN 0xc0 /* RFC 3758 */ +#define SCTP_ASCONF 0xc1 /* RFC 5061 */ + +/* chunk types bitmask flags */ +#define SCTP_TYPEFLAG_REPORT 1 +#define SCTP_TYPEFLAG_SKIP 2 + +#define sctp_pack_chunkhdr(hdr, type, flags, length) do { \ + struct sctp_chunkhdr *sctp_pack_chp = (struct sctp_chunkhdr *)(hdr);\ + sctp_pack_chp->sch_type = type; \ + sctp_pack_chp->sch_flags = flags; \ + sctp_pack_chp->sch_length = htons(length); \ +} while (0) + +struct sctp_chunkhdr_init { + struct sctp_chunkhdr chunkhdr; + + int32_t schi_itag; /* Initiate Tag */ + int32_t schi_arwnd; /* Advertised Receiver Window Credit */ + int16_t schi_nos; /* Number of Outbound Streams */ + int16_t schi_nis; /* Number of Inbound Streams */ + int32_t schi_itsn; /* Initial TSN */ +}; + +#define sctp_pack_chunkhdr_init(hdr, type, flags, length, itag, \ + arwnd, nos, nis, itsn) do { \ + struct sctp_chunkhdr_init *sctp_pack_chip = (struct sctp_chunkhdr_init *)(hdr);\ + sctp_pack_chunkhdr(sctp_pack_chip, type, flags, length);\ + sctp_pack_chip->schi_itag = htonl(itag); \ + sctp_pack_chip->schi_arwnd = htonl(arwnd); \ + sctp_pack_chip->schi_nos = htons(nos); \ + sctp_pack_chip->schi_nis = htons(nis); \ + sctp_pack_chip->schi_itsn = htonl(itsn); \ +} while (0) + +/* + * COOKIE ECHO chunk + */ +struct sctp_chunkhdr_cookie_echo { + struct sctp_chunkhdr chunkhdr; + + /* empty */ +}; + +#define sctp_pack_chunkhdr_cookie_echo(hdr, type, flags, length) do { \ + struct sctp_chunkhdr_cookie_echo *sctp_pack_chip = \ + (struct sctp_chunkhdr_cookie_echo *)(hdr); \ + sctp_pack_chunkhdr(sctp_pack_chip, type, flags, length); \ +} while (0) + +#endif /* SCTP_H */ + + + diff --git a/package/nspr/Makefile b/package/nspr/Makefile index f06b9564a..4a5fe323b 100644 --- a/package/nspr/Makefile +++ b/package/nspr/Makefile @@ -21,9 +21,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,NSPR,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIGURE_ENV+= HOST_CC="${HOSTCC}" HOST_CFLAGS="${HOSTCFLAGS}" -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_NSPR)/usr/lib diff --git a/package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in b/package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in new file mode 100644 index 000000000..40d15376f --- /dev/null +++ b/package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in @@ -0,0 +1,11 @@ +--- nspr-4.8.2.orig/mozilla/nsprpub/config/Makefile.in 2009-03-03 23:04:23.000000000 +0100 ++++ nspr-4.8.2/mozilla/nsprpub/config/Makefile.in 2010-02-06 02:01:27.321836181 +0100 +@@ -145,7 +145,7 @@ endif + + $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX) + @$(MAKE_OBJDIR) +- $(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@ ++ $(CC_FOR_BUILD) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@ + + install:: nspr.m4 + $(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal diff --git a/package/nss/Makefile b/package/nss/Makefile index f84afc8ab..842bfdeb6 100644 --- a/package/nss/Makefile +++ b/package/nss/Makefile @@ -6,10 +6,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:= nss PKG_VERSION:= 3.12.4 PKG_RELEASE:= 2 -PKG_BUILDDEP+= nspr zlib PKG_MD5SUM:= 1ee3ed9c1900079319bd1de51388d856 PKG_DESCR:= Network Security Services (NSS) library PKG_SECTION:= libs +PKG_BUILDDEP+= nspr zlib PKG_NOPARALLEL:= 1 PKG_URL:= http://www.mozilla.org/projects/security/pki/nss/ PKG_SITES:= https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_4_RTM/src/ @@ -22,6 +22,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,NSS,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual + ifeq ($(ADK_LINUX_64),y) TCFLAGS+= -DUSE_64 MAKE_FLAGS+= USE_64=1 @@ -32,8 +34,6 @@ TCPPFLAGS+= -I${STAGING_DIR}/usr/include/nspr TCFLAGS+= -I${STAGING_DIR}/usr/include/nspr TLDFLAGS:= '' -BUILD_STYLE:= auto -INSTALL_STYLE:= auto MAKE_FLAGS+= SOURCE_MD_DIR=${WRKDIST}/dist DIST=${WRKDIST}/dist \ ARCHFLAG="${TCFLAGS} ${TCPPFLAGS} -ldl" ALL_TARGET:= build_coreconf all @@ -41,8 +41,10 @@ XAKE_FLAGS+= OS_TEST=${ARCH} NSS_DISABLE_DBM=1 OS_TARGET=Linux OS_RELEASE=2.6 post-install: $(INSTALL_DIR) $(IDIR_NSS)/usr/lib - ${INSTALL_DATA} ${WRKDIST}/dist/lib/lib{ssl3,smime3,nss3,nssutil3}.so $(IDIR_NSS)/usr/lib + ${INSTALL_DATA} ${WRKDIST}/dist/lib/lib{ssl3,smime3,nss3,nssutil3}.so \ + $(IDIR_NSS)/usr/lib ${INSTALL_DIR} ${STAGING_DIR}/usr/include/nss - ${INSTALL_DATA} ${WRKDIST}/mozilla/dist/public/nss/* ${STAGING_DIR}/usr/include/nss + ${INSTALL_DATA} ${WRKDIST}/mozilla/dist/public/nss/* \ + ${STAGING_DIR}/usr/include/nss include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ntfs-3g/Makefile b/package/ntfs-3g/Makefile index f1a7be0c0..72d418e56 100644 --- a/package/ntfs-3g/Makefile +++ b/package/ntfs-3g/Makefile @@ -21,9 +21,6 @@ $(eval $(call PKG_template,NTFS_3G,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${P CONFIGURE_ARGS+= --disable-ldconfig \ --disable-library -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_NTFS_3G}/bin diff --git a/package/ntpclient/Makefile b/package/ntpclient/Makefile index 12187c7b9..8e0a6242d 100644 --- a/package/ntpclient/Makefile +++ b/package/ntpclient/Makefile @@ -17,9 +17,11 @@ WRKDIST= ${WRKDIR}/${PKG_NAME}-2007 include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,NTPCLIENT,ntpclient,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,NTPCLIENT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual -BUILD_STYLE:= auto MAKE_FLAGS+= CC='${TARGET_CC}' CFLAGS='${TCFLAGS}' ALL_TARGET:= diff --git a/package/nut/Makefile b/package/nut/Makefile index 1239402b9..e06a5784f 100644 --- a/package/nut/Makefile +++ b/package/nut/Makefile @@ -79,7 +79,6 @@ INSTALL_DRIVERS_tmp+= snmp-ups endif INSTALL_DRIVERS=$(shell echo ${INSTALL_DRIVERS_tmp} | tr ' ' ',') -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-linux-hiddev=${LINUX_DIR}/include/linux/hiddev.h \ --without-cgi \ --with-drivers=${INSTALL_DRIVERS} \ @@ -92,9 +91,7 @@ CONFIGURE_ENV+= CPPFLAGS="${TCPPFLAGS} ${TLDFLAGS}" MAKE_FLAGS+= SSL_CFLAGS="${TCPPFLAGS}" SSL_LDFLAGS="${TLDFLAGS} -lssl -lcrypto" endif -BUILD_STYLE:= auto ALL_TARGET:= all -INSTALL_STYLE:= auto INSTALL_TARGET:= install ifneq (${ADK_PACKAGE_NUT_USB},) diff --git a/package/obexftp/Makefile b/package/obexftp/Makefile index c9d7c9a82..cebeee004 100644 --- a/package/obexftp/Makefile +++ b/package/obexftp/Makefile @@ -6,17 +6,18 @@ include ${TOPDIR}/rules.mk PKG_NAME:= obexftp PKG_VERSION:= 0.23 PKG_RELEASE:= 2 -PKG_BUILDDEP+= openobex libiconv PKG_MD5SUM:= f20762061b68bc921e80be4aebc349eb PKG_DESCR:= bluetooth ftp application PKG_SECTION:= bluetooth PKG_DEPENDS:= openobex libiconv +PKG_BUILDDEP+= openobex libiconv PKG_URL:= http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=openobex/} +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 + PKG_DESCR_LIB:= obexftp library PKG_SECTION_LIB:= libs -DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 ifeq ($(ADK_STATIC),y) PKG_OPTS:= libmix @@ -31,7 +32,6 @@ ifeq ($(ADK_STATIC),y) XAKE_FLAGS+= STATIC_CFLAGS=-all-static endif -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= OPENOBEX_CFLAGS="-I${STAGING_DIR}/usr/include" \ OPENOBEX_LIBS="-L${STAGING_DIR}/usr/lib \ -lopenobex -lbluetooth -liconv" @@ -39,8 +39,6 @@ CONFIGURE_ARGS+= --disable-perl \ --disable-ruby \ --disable-tcl \ --disable-python -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_OBEXFTP}/usr/bin diff --git a/package/olsrd/Makefile b/package/olsrd/Makefile index bb416c1ff..04923eaff 100644 --- a/package/olsrd/Makefile +++ b/package/olsrd/Makefile @@ -36,6 +36,10 @@ $(eval $(call PKG_mod_template,OLSRD_MOD_HTTPINFO,httpinfo)) $(eval $(call PKG_mod_template,OLSRD_MOD_NAMESERVICE,nameservice)) $(eval $(call PKG_mod_template,OLSRD_MOD_TAS,tas)) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + TCFLAGS+= -fPIC do-build: diff --git a/package/opencdk/Makefile b/package/opencdk/Makefile index bd01b5187..8c2ef472e 100644 --- a/package/opencdk/Makefile +++ b/package/opencdk/Makefile @@ -20,10 +20,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBOPENCDK,libopencdk,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-libgcrypt-prefix='${STAGING_DIR}/usr' -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBOPENCDK}/usr/lib diff --git a/package/openct/Makefile b/package/openct/Makefile index d110e5c02..48a23bac1 100644 --- a/package/openct/Makefile +++ b/package/openct/Makefile @@ -18,10 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,OPENCT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_OPENCT}/etc ${IDIR_OPENCT}/usr/bin ${INSTALL_DIR} ${IDIR_OPENCT}/usr/sbin ${IDIR_OPENCT}/usr/lib @@ -36,5 +32,4 @@ post-install: ${INSTALL_DATA} ${WRKBUILD}/etc/openct.conf \ ${IDIR_OPENCT}/etc - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/openldap/Makefile b/package/openldap/Makefile index f2a42debb..db05887d0 100644 --- a/package/openldap/Makefile +++ b/package/openldap/Makefile @@ -4,18 +4,15 @@ include ${TOPDIR}/rules.mk PKG_NAME:= openldap -PKG_VERSION:= 2.4.19 +PKG_VERSION:= 2.4.21 PKG_RELEASE:= 1 -PKG_BUILDDEP+= cyrus-sasl openssl libdb -PKG_MD5SUM:= 4a6dab2711fcf141f19bb680bc335887 +PKG_MD5SUM:= e7128c57b2bacd940e8906057c94ff26 PKG_DESCR:= OpenLDAP client libraries PKG_SECTION:= libs PKG_DEPENDS:= libopenssl libsasl2 +PKG_BUILDDEP+= cyrus-sasl openssl libdb PKG_URL:= http://www.openldap.org -PKG_SITES:= 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_SITES:= ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ PKG_DESCR_1:= OpenLDAP utilities PKG_DEPENDS_1:= libopenldap @@ -33,21 +30,25 @@ $(eval $(call PKG_template,OPENLDAP_UTILS,openldap-utils,${PKG_VERSION}-${PKG_RE $(eval $(call PKG_template,OPENLDAP_SLAPD,openldap-slapd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_2},${PKG_DESCR_2},${PKG_SECTION_2})) PKG_CONFIGURE_OPTIONS+= \ - --enable-slapd \ - --enable-bdb \ - --disable-hdb \ - --disable-relay \ - --enable-dynamic \ - --enable-syslog \ - --enable-local \ - --disable-syncprov \ - --disable-slurpd \ - --without-gssapi \ - --without-fetch \ - --with-cyrus-sasl \ - --with-threads \ - --with-tls \ - --with-yielding_select="yes" \ + --enable-slapd \ + --enable-bdb \ + --disable-hdb \ + --disable-relay \ + --enable-dynamic \ + --enable-syslog \ + --enable-local \ + --disable-syncprov \ + --disable-slurpd \ + --without-gssapi \ + --without-fetch \ + --with-cyrus-sasl \ + --with-threads \ + --with-tls \ + --with-yielding_select="yes" \ + +CONFIGURE_ENV+= ac_cv_func_memcmp_working=yes +CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTIONS} +XAKE_FLAGS+= STRIP="" CPPFLAGS="-D_GNU_SOURCE" pre-configure: (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \ @@ -66,18 +67,13 @@ pre-configure: ${MAKE} -C ${WRKBUILD}/libraries/liblutil clean ${MAKE} -C ${WRKBUILD}/libraries/liblunicode clean -CONFIGURE_STYLE:= gnu -CONFIGURE_ENV+= ac_cv_func_memcmp_working=yes -CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTIONS} -BUILD_STYLE:= auto -INSTALL_STYLE:= auto -XAKE_FLAGS+= STRIP="" CPPFLAGS="-D_GNU_SOURCE" - post-install: ${INSTALL_DIR} ${IDIR_LIBOPENLDAP}/etc/openldap - ${CP} ${WRKINST}/etc/openldap/ldap.conf ${IDIR_LIBOPENLDAP}/etc/openldap/ + ${CP} ${WRKINST}/etc/openldap/ldap.conf \ + ${IDIR_LIBOPENLDAP}/etc/openldap/ ${INSTALL_DIR} ${IDIR_LIBOPENLDAP}/usr/lib/ - ${CP} ${WRKINST}/usr/lib/lib{lber,ldap}*.so.* ${IDIR_LIBOPENLDAP}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/lib{lber,ldap}*.so* \ + ${IDIR_LIBOPENLDAP}/usr/lib/ ${INSTALL_DIR} ${IDIR_OPENLDAP_UTILS}/usr/bin ${CP} ${WRKINST}/usr/bin/ldap* ${IDIR_OPENLDAP_UTILS}/usr/bin/ ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/etc/openldap/schema diff --git a/package/openntpd/Makefile b/package/openntpd/Makefile index 5c8cf0fd5..328559f3a 100644 --- a/package/openntpd/Makefile +++ b/package/openntpd/Makefile @@ -19,10 +19,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,OPENNTPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +INSTALL_STYLE:= manual + CONFIGURE_ARGS+= --with-privsep-user=ntp \ --with-adjtimex -BUILD_STYLE:= auto do-install: ${INSTALL_DIR} ${IDIR_OPENNTPD}/etc diff --git a/package/openntpd/extra/openbsd-compat/port-linux.c b/package/openntpd/extra/openbsd-compat/port-linux.c deleted file mode 100644 index f210d4a6d..000000000 --- a/package/openntpd/extra/openbsd-compat/port-linux.c +++ /dev/null @@ -1,107 +0,0 @@ -/* $Id: port-linux.c 1793 2007-01-28 20:55:08Z tg $ */ - -/* part of the adjtime-linux patch */ - -/* - * 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/package/openntpd/src/openbsd-compat/port-linux.c b/package/openntpd/src/openbsd-compat/port-linux.c new file mode 100644 index 000000000..f210d4a6d --- /dev/null +++ b/package/openntpd/src/openbsd-compat/port-linux.c @@ -0,0 +1,107 @@ +/* $Id: port-linux.c 1793 2007-01-28 20:55:08Z tg $ */ + +/* part of the adjtime-linux patch */ + +/* + * 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/package/openobex/Makefile b/package/openobex/Makefile index 96a82afa8..19a2cf399 100644 --- a/package/openobex/Makefile +++ b/package/openobex/Makefile @@ -6,10 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= openobex PKG_VERSION:= 1.5 PKG_RELEASE:= 1 -PKG_BUILDDEP+= bluez PKG_MD5SUM:= 0d83dc86445a46a1b9750107ba7ab65c PKG_DESCR:= implementation of the Object Exchange (OBEX) protocol PKG_SECTION:= bluetooth +PKG_BUILDDEP+= bluez PKG_URL:= http://dev.zuckschwerdt.org/openobex/wiki/WikiStart PKG_SITES:= ${MASTER_SITE_KERNEL:=bluetooth/} @@ -21,10 +21,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,OPENOBEX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_OPENOBEX}/usr/lib ${CP} ${WRKINST}/usr/lib/libopenobex.so* ${IDIR_OPENOBEX}/usr/lib/ diff --git a/package/opensc/Makefile b/package/opensc/Makefile index cac67d7c7..702a38751 100644 --- a/package/opensc/Makefile +++ b/package/opensc/Makefile @@ -16,17 +16,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,OPENSC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_OPENSC}/usr/lib - ${CP} ${WRKINST}/usr/lib/libopensc.so.* \ + ${CP} ${WRKINST}/usr/lib/libopensc.so* \ ${IDIR_OPENSC}/usr/lib - ${CP} ${WRKINST}/usr/lib/libpkcs15init.so.* \ + ${CP} ${WRKINST}/usr/lib/libpkcs15init.so* \ ${IDIR_OPENSC}/usr/lib - ${CP} ${WRKINST}/usr/lib/libscconf.so.* \ + ${CP} ${WRKINST}/usr/lib/libscconf.so* \ ${IDIR_OPENSC}/usr/lib ${CP} ${WRKINST}/usr/lib/opensc-pkcs11.so \ ${IDIR_OPENSC}/usr/lib diff --git a/package/opensips/Makefile b/package/opensips/Makefile index dd48a61de..fa0218885 100644 --- a/package/opensips/Makefile +++ b/package/opensips/Makefile @@ -6,10 +6,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:= opensips PKG_VERSION:= 1.5.1 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= 87c6fe40c143775d6a1be1beb75c3eb2 PKG_DESCR:= a high-performance, configurable, free SIP server PKG_SECTION:= net +PKG_BUILDDEP+= openssl PKG_MULTI:= 1 PKG_VARIANT:= tls PKG_URL:= http://opensips.org @@ -85,6 +85,10 @@ OPENSIPS_MODULES:= sl tm rr maxfwd usrloc registrar db_text textops exec mi_fifo OPENSIPS_MODULE_FILES:= $(foreach module,$(OPENSIPS_MODULES),modules/$(module)/$(module).so) OPENSIPS_MODULES:= $(patsubst %,modules/%,$(OPENSIPS_MODULES)) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: $(MAKE) -C $(WRKBUILD) \ prefix=/ \ @@ -105,7 +109,8 @@ do-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${INSTALL_DIR} $(IDIR_OPENSIPS)/usr/lib/opensips/modules $(CP) $(WRKBUILD)/$(PKG_NAME) $(IDIR_OPENSIPS)/usr/sbin/ (cd $(WRKBUILD);\ - $(CP) $(OPENSIPS_MODULE_FILES) $(IDIR_OPENSIPS)/usr/lib/opensips/modules/; \ + $(CP) $(OPENSIPS_MODULE_FILES) \ + $(IDIR_OPENSIPS)/usr/lib/opensips/modules/; \ ) $(CP) ./files/opensips.cfg $(IDIR_OPENSIPS)/etc/opensips/ diff --git a/package/opensips/files/opensips.cfg b/package/opensips/files/opensips.cfg index e94262ebe..dbc14024d 100644 --- a/package/opensips/files/opensips.cfg +++ b/package/opensips/files/opensips.cfg @@ -1,7 +1,7 @@ # # # simple quick-start config script -# Please refer to the Core CookBook at http://www.openser.org/dokuwiki/doku.php +# Please refer to the Core CookBook at http://www.opensips.org/dokuwiki/doku.php # for a explanation of possible statements, functions and parameters. # @@ -26,14 +26,14 @@ port=5060 #tls_verify_client = 1 #tls_require_client_certificate = 0 #tls_method = TLSv1 -#tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem" -#tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem" -#tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem" +#tls_certificate = "/usr/local/etc/opensips/tls/user/user-cert.pem" +#tls_private_key = "/usr/local/etc/opensips/tls/user/user-privkey.pem" +#tls_ca_list = "/usr/local/etc/opensips/tls/user/user-calist.pem" # ------------------ module loading ---------------------------------- #set module path -mpath="/usr/lib/openser/modules/" +mpath="/usr/lib/opensips/modules/" # Uncomment this if you want to use SQL database #loadmodule "mysql.so" @@ -56,7 +56,7 @@ loadmodule "mi_fifo.so" # -- mi_fifo params -- -modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo") +modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") # -- usrloc params -- @@ -135,8 +135,8 @@ route{ if (method=="REGISTER") { # Uncomment this if you want to use digest authentication - #if (!www_authorize("openser.org", "subscriber")) { - # www_challenge("openser.org", "0"); + #if (!www_authorize("opensips.org", "subscriber")) { + # www_challenge("opensips.org", "0"); # exit; #}; diff --git a/package/openssh/Makefile b/package/openssh/Makefile index 29fd6a055..016923b23 100644 --- a/package/openssh/Makefile +++ b/package/openssh/Makefile @@ -44,7 +44,6 @@ CONFIGURE_ARGS+= --with-kerberos5="${STAGING_DIR}/usr" else CONFIGURE_ARGS+= --without-kerberos5 endif -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= LD='${TARGET_CC}' \ ac_cv_func_setlogin=no \ ac_cv_lib_nsl_yp_match=no @@ -63,8 +62,6 @@ CONFIGURE_ARGS+= --disable-strip \ --with-privsep-user=sshd \ --with-privsep-path=/var/run/sshd \ --with-ssl-dir="${STAGING_DIR}/usr" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/etc/ssh diff --git a/package/openssl-pkcs11/Makefile b/package/openssl-pkcs11/Makefile index 13d869e36..ce523c517 100644 --- a/package/openssl-pkcs11/Makefile +++ b/package/openssl-pkcs11/Makefile @@ -6,10 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= openssl-pkcs11 PKG_VERSION:= 0.1.5 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libp11 PKG_MD5SUM:= 840af6e54dc21445c54f74e15005ba4d PKG_DESCR:= pkcs11 engine for openssl PKG_SECTION:= crypto +PKG_BUILDDEP+= libp11 PKG_URL:= http://www.opensc-project.org/engine_pkcs11 PKG_SITES:= http://www.opensc-project.org/files/engine_pkcs11/ @@ -20,11 +20,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,OPENSSL_PKCS11,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= cross_compiling=yes CONFIGURE_ARGS+= --with-openssl="${STAGING_DIR}/usr" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_OPENSSL_PKCS11}/usr/lib/engines diff --git a/package/openssl/Makefile b/package/openssl/Makefile index 587abbd6e..319deda11 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -13,9 +13,6 @@ PKG_DEPENDS:= zlib PKG_BUILDDEP+= zlib PKG_URL:= http://www.openssl.org PKG_SITES:= http://www.openssl.org/source/ \ - ftp://ftp.funet.fi/pub/crypt/cryptography/libs/openssl/source/ \ - ftp://ftp.webmonster.de/pub/openssl/source/ \ - ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ PKG_DESCR_UTIL:= OpenSSL (Secure Socket Layer) command line tool PKG_SECTION_UTIL:= admin @@ -28,8 +25,13 @@ $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},$ $(eval $(call PKG_template,LIBOPENSSL_DEV,libopenssl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_DEV},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_UTIL},${PKG_DESCR_UTIL},${PKG_SECTION_UTIL})) +SUB_INSTALLS-y:= +SUB_INSTALLS-m:= +SUB_INSTALLS-${ADK_PACKAGE_LIBOPENSSL_DEV}+= libopenssl-dev-install + +CONFIG_STYLE:= manual BUILD_STYLE:= manual -INSTALL_STYLE:= auto + INSTALL_TARGET:= install_sw FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST} @@ -64,7 +66,7 @@ do-build: OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \ all build-shared -post-install: +post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib ${CP} ${WRKINST}/usr/lib/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so* @@ -73,6 +75,8 @@ post-install: ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private} ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/ chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private + +libopenssl-dev-install: ${INSTALL_DIR} ${IDIR_LIBOPENSSL_DEV}/usr/include ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBOPENSSL_DEV}/usr/include diff --git a/package/openswan/Makefile b/package/openswan/Makefile index ef58ca96f..41906e4d7 100644 --- a/package/openswan/Makefile +++ b/package/openswan/Makefile @@ -27,15 +27,14 @@ $(eval $(call PKG_template,OPENSWAN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ #XAKE_FLAGS+= USE_KLIPS=true USE_NETKEY=false #endif +CONFIG_STYLE:= manual + XAKE_FLAGS+= KERNELSRC="${LINUX_DIR}" \ IPSECDIR="/usr/lib/ipsec" \ INC_USRLOCAL="/usr" \ MODPROBE="insmod" \ OSDEP="linux" \ BUILDENV="linux" - -BUILD_STYLE:= auto -INSTALL_STYLE:= auto ALL_TARGET:= programs post-install: @@ -43,7 +42,7 @@ post-install: ${INSTALL_DIR} ${IDIR_OPENSWAN}/usr/libexec/ipsec ${INSTALL_DIR} ${IDIR_OPENSWAN}/etc/ipsec.d ${INSTALL_DIR} ${IDIR_OPENSWAN}/usr/sbin - ${CP} ${WRKINST}/etc/ipsec.conf ${IDIR_OPENSWAN}/etc/ + ${INSTALL_DATA} ${WRKINST}/etc/ipsec.conf ${IDIR_OPENSWAN}/etc/ ${CP} ${WRKINST}/etc/ipsec.d/* ${IDIR_OPENSWAN}/etc/ipsec.d ${CP} ${WRKINST}/usr/lib/ipsec/* ${IDIR_OPENSWAN}/usr/lib/ipsec ${CP} ${WRKINST}/usr/libexec/ipsec/* ${IDIR_OPENSWAN}/usr/libexec/ipsec diff --git a/package/openvpn/Makefile b/package/openvpn/Makefile index e4fbce369..e8af513fe 100644 --- a/package/openvpn/Makefile +++ b/package/openvpn/Makefile @@ -6,29 +6,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:= openvpn PKG_VERSION:= 2.1.0 PKG_RELEASE:= 1 -ifeq ($(ADK_PACKAGE_LIBOPENSSL),y) -PKG_BUILDDEP+= openssl -endif -ifeq ($(ADK_PACKAGE_OPENVPN_LZO),y) -PKG_BUILDDEP+= liblzo -endif PKG_MD5SUM:= 452a83326ae198cf961e9ae02539c8fb PKG_DESCR:= Open Source VPN solution using SSL PKG_SECTION:= net PKG_DEPENDS:= kmod-tun -PKG_URL:= http://openvpn.net -PKG_SITES:= http://openvpn.net/release/ \ - ${MASTER_SITE_SOURCEFORGE:=openvpn/} - -include $(TOPDIR)/mk/package.mk - ifeq ($(ADK_COMPILE_OPENVPN_WITH_OPENSSL),y) PKG_DEPENDS+= libopenssl +PKG_BUILDDEP+= openssl endif - ifneq ($(ADK_COMPILE_OPENVPN_WITH_LZO),y) PKG_DEPENDS+= liblzo +PKG_BUILDDEP+= liblzo endif +PKG_URL:= http://openvpn.net +PKG_SITES:= http://openvpn.net/release/ \ + ${MASTER_SITE_SOURCEFORGE:=openvpn/} + +include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,OPENVPN,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,OPENVPN_EASY_RSA,openvpn-easy-rsa,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) @@ -44,7 +38,6 @@ endif ifneq ($(ADK_COMPILE_OPENVPN_WITH_SERVER),y) DISABLE_SERVER:=--disable-server endif - ifneq ($(ADK_COMPILE_OPENVPN_WITH_HTTP),y) DISABLE_HTTP:=--disable-http endif @@ -55,7 +48,6 @@ ifeq ($(ADK_COMPILE_OPENVPN_WITH_SMALL),y) ENABLE_SMALL:=--enable-small endif -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-pthread \ --disable-plugins \ --disable-management \ @@ -70,8 +62,6 @@ CONFIGURE_ARGS+= --disable-pthread \ $(DISABLE_HTTP) \ $(ENABLE_PASSWORD_SAVE) \ $(ENABLE_SMALL) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: # main package @@ -79,12 +69,15 @@ post-install: ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/ $(CP) ./files/openvpn.conf $(IDIR_OPENVPN)/etc/openvpn/ # subpackage easy-rsa - ${INSTALL_DIR} $(IDIR_OPENVPN_EASY_RSA)/usr/sbin $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys + ${INSTALL_DIR} $(IDIR_OPENVPN_EASY_RSA)/usr/sbin \ + $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys touch $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys/index.txt $(CP) ./files/serial $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys $(CP) $(WRKBUILD)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} \ $(IDIR_OPENVPN_EASY_RSA)/usr/sbin - ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/openssl.cnf $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf - ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/vars $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars + ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/openssl.cnf \ + $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf + ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/vars \ + $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/oprofile/Makefile b/package/oprofile/Makefile index 2f19a4fc0..9acd481af 100644 --- a/package/oprofile/Makefile +++ b/package/oprofile/Makefile @@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:= oprofile PKG_VERSION:= 0.9.4 PKG_RELEASE:= 1 -PKG_BUILDDEP+= popt PKG_MD5SUM:= 82b059379895cf125261d7d773465915 PKG_DESCR:= system-wide profiles PKG_SECTION:= utils PKG_DEPENDS:= libpopt +PKG_BUILDDEP+= popt PKG_URL:= http://oprofile.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=oprofile/} @@ -21,10 +21,7 @@ $(eval $(call PKG_template,OPROFILE,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${ TLDFLAGS+= -shared TCFLAGS+= -fPIC TCXXFLAGS+= -fPIC -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-kernel-support --with-linux=${LINUX_DIR} -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: $(INSTALL_DIR) $(IDIR_OPROFILE)/usr/bin diff --git a/package/osiris/Makefile b/package/osiris/Makefile index e7dcd3c1c..b7cb1ebc7 100644 --- a/package/osiris/Makefile +++ b/package/osiris/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= osiris PKG_VERSION:= 4.2.3 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= 1951c7dc0fe729af9ffaf58910340d12 PKG_DESCR:= Host Integrity Monitoring System (scanning agent) PKG_SECTION:= admin PKG_DEPENDS:= libopenssl libpthread +PKG_BUILDDEP+= openssl PKG_URL:= http://osiris.shmoo.com PKG_SITES:= http://osiris.shmoo.com/data/ @@ -18,15 +18,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,OSIRISD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_openssldir="${STAGING_DIR}/usr" \ ac_cv_have_accrights_in_msghdr=no \ ac_cv_have_control_in_msghdr=yes CONFIGURE_ARGS+= --with-osiris-user=root \ --with-root-dir=/var/lib/osiris \ --with-readline=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto XAKE_FLAGS+= ar=${TARGET_CROSS}ar \ INTERACTIVE=0 TCFLAGS+= -DOPENSSL_NO_RIPEMD diff --git a/package/owfs/Makefile b/package/owfs/Makefile index 9be07eabb..d4be63f91 100644 --- a/package/owfs/Makefile +++ b/package/owfs/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= owfs PKG_VERSION:= 2.5p2 PKG_RELEASE:= 1 PKG_MD5SUM:= 842170565e8893001a4e78e675322144 -PKG_DESCR:= A tool to access 1-wire devices through a fuse mounted fs +PKG_DESCR:= A tool to access 1-wire devices PKG_SECTION:= admin PKG_URL:= http://owfs.org PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=owfs/} @@ -16,7 +16,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,OWFS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +INSTALL_STYLE:= manual + CONFIGURE_ENV+= BUILD_CC=${TARGET_CC} \ LD_EXTRALIBS="" \ ac_cv_linux_vers=2 \ @@ -27,13 +28,13 @@ CONFIGURE_ARGS+= --enable-owfs \ --disable-owftpd \ --disable-owcapi \ --disable-owserver -BUILD_STYLE:= auto ALL_TARGET:= do-install: ${INSTALL_DIR} ${IDIR_OWFS}/usr/{bin,lib} ${INSTALL_BIN} ${WRKBUILD}/module/owlib/src/c/.libs/libow.so.0.0.0 \ ${IDIR_OWFS}/usr/lib/ - ${INSTALL_BIN} ${WRKBUILD}/module/owfs/src/c/.libs/owfs ${IDIR_OWFS}/usr/bin/owfs + ${INSTALL_BIN} ${WRKBUILD}/module/owfs/src/c/.libs/owfs \ + ${IDIR_OWFS}/usr/bin/owfs include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/p910nd/Makefile b/package/p910nd/Makefile index bbf315e2f..433f7dbe7 100644 --- a/package/p910nd/Makefile +++ b/package/p910nd/Makefile @@ -18,7 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,P910ND,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= ${TARGET_CONFIGURE_OPTS} \ CFLAGS="${TARGET_CFLAGS} -DLOCKFILE_DIR=\"\\\"/tmp\\\"\"" ALL_TARGET:= diff --git a/package/p910nd/files/p910nd.init b/package/p910nd/files/p910nd.init index 5107579bc..20e872c42 100644 --- a/package/p910nd/files/p910nd.init +++ b/package/p910nd/files/p910nd.init @@ -14,7 +14,7 @@ start) p910nd $p910nd_flags ;; stop) - pkill p910nd + pkill p9100d ;; restart) sh $0 stop diff --git a/package/palantir/Makefile b/package/palantir/Makefile index e3c1e1130..c6286f70d 100644 --- a/package/palantir/Makefile +++ b/package/palantir/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= palantir PKG_VERSION:= 2.7 PKG_RELEASE:= 1 -PKG_BUILDDEP+= jpeg PKG_MD5SUM:= 3a5b1fb340857f6d8e357bf39b77583e PKG_DESCR:= A multichannel interactive streaming solution PKG_SECTION:= net PKG_DEPENDS:= libjpeg libpthread +PKG_BUILDDEP+= jpeg PKG_URL:= http://www.fastpath.it/products/palantir PKG_SITES:= http://www.fastpath.it/products/palantir/pub/ @@ -20,6 +20,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PALANTIR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: mkdir -p ${WRKINST}/usr ${MAKE} -C ${WRKBUILD}/server/libgsm \ diff --git a/package/pango/Makefile b/package/pango/Makefile index e6272d4f9..f974c73c5 100644 --- a/package/pango/Makefile +++ b/package/pango/Makefile @@ -20,10 +20,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PANGO,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_PANGO}/usr/lib ${CP} ${WRKINST}/usr/lib/libpango*.so* ${IDIR_PANGO}/usr/lib diff --git a/package/parprouted/Makefile b/package/parprouted/Makefile index d1200520a..8771625ad 100644 --- a/package/parprouted/Makefile +++ b/package/parprouted/Makefile @@ -17,7 +17,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PARPROUTED,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= CC="${TARGET_CC}" \ CFLAGS="${TCFLAGS}" \ LDFLAGS="" diff --git a/package/parted/Makefile b/package/parted/Makefile index 6323c875c..03df2e270 100644 --- a/package/parted/Makefile +++ b/package/parted/Makefile @@ -18,10 +18,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,PARTED,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} $(IDIR_PARTED)/usr/sbin $(IDIR_PARTED)/usr/lib ${CP} $(WRKINST)/usr/lib/libparted*so* $(IDIR_PARTED)/usr/lib diff --git a/package/patch/Makefile b/package/patch/Makefile index 80a608f0d..b5bf8b955 100644 --- a/package/patch/Makefile +++ b/package/patch/Makefile @@ -14,11 +14,7 @@ PKG_SITES:= ${MASTER_SITE_GNU:=patch/} include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,PATCH,patch,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto +$(eval $(call PKG_template,PATCH,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) post-install: $(INSTALL_DIR) $(IDIR_PATCH)/usr/bin diff --git a/package/pciutils/Makefile b/package/pciutils/Makefile index 23994bb29..816c58356 100644 --- a/package/pciutils/Makefile +++ b/package/pciutils/Makefile @@ -6,10 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= pciutils PKG_VERSION:= 3.0.3 PKG_RELEASE:= 1 -PKG_BUILDDEP+= zlib PKG_MD5SUM:= d07da501bb11e6af40acd036536c2e9a PKG_DESCR:= PCI Utilities PKG_SECTION:= sys +PKG_DEPENDS:= zlib +PKG_BUILDDEP+= zlib PKG_URL:= http://www.kernel.org/pub/software/utils/pciutils PKG_SITES:= http://www.kernel.org/pub/software/utils/pciutils/ \ ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/ @@ -18,7 +19,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PCIUTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= CC="${TARGET_CC}" \ CFLAGS="${TCFLAGS}" \ IDSDIR="/usr/share" \ diff --git a/package/pcre/Makefile b/package/pcre/Makefile index 9a412090e..db1b57920 100644 --- a/package/pcre/Makefile +++ b/package/pcre/Makefile @@ -16,10 +16,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBPCRE,libpcre,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-cpp -BUILD_STYLE:= auto -INSTALL_STYLE:= auto XAKE_FLAGS+= ${TARGET_CONFIGURE_OPTS} CFLAGS='${TCFLAGS}' post-install: diff --git a/package/pdnsd/Makefile b/package/pdnsd/Makefile index aea5877f9..36b4896b7 100644 --- a/package/pdnsd/Makefile +++ b/package/pdnsd/Makefile @@ -19,10 +19,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,PDNSD,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_PDNSD)/etc ${INSTALL_DATA} ./files/pdnsd.conf ${IDIR_PDNSD}/etc/ diff --git a/package/perl/Makefile b/package/perl/Makefile index d5eea8ba8..3c997da78 100644 --- a/package/perl/Makefile +++ b/package/perl/Makefile @@ -21,7 +21,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PERL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual pre-configure: (cd ${WRKBUILD}; ./Configure -des -Dcc=gcc); diff --git a/package/php/Makefile b/package/php/Makefile index e8db1255f..34281b4ac 100644 --- a/package/php/Makefile +++ b/package/php/Makefile @@ -182,11 +182,11 @@ $(eval $(call PKG_mod_template,PHP_MOD_SOCKETS,sockets)) $(eval $(call PKG_mod_template,PHP_MOD_SQLITE,pdo)) $(eval $(call PKG_mod_template,PHP_MOD_XML,xml)) +INSTALL_STYLE:= manual + TLDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql CONFIGURE_ENV+= LIBS="-ldl" -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= $(PKG_CONFIGURE_OPTS) -BUILD_STYLE:= auto do-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${INSTALL_DIR} $(IDIR_PHP_CLI)/etc @@ -196,6 +196,7 @@ do-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${INSTALL_DIR} $(IDIR_PHP_FASTCGI)/etc ${INSTALL_DATA} ./files/php.ini $(IDIR_PHP_FASTCGI)/etc/ ${INSTALL_DIR} $(IDIR_PHP_FASTCGI)/usr/sbin - ${INSTALL_BIN} $(WRKBUILD)/sapi/cgi/php-cgi $(IDIR_PHP_FASTCGI)/usr/sbin/php + ${INSTALL_BIN} $(WRKBUILD)/sapi/cgi/php-cgi \ + $(IDIR_PHP_FASTCGI)/usr/sbin/php include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/picocom/Makefile b/package/picocom/Makefile index 2b7fe906f..8fc72b85c 100644 --- a/package/picocom/Makefile +++ b/package/picocom/Makefile @@ -16,7 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PICOCOM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + ALL_TARGET:= picocom do-install: diff --git a/package/pipacs/Makefile b/package/pipacs/Makefile index 95379106f..06348bafd 100644 --- a/package/pipacs/Makefile +++ b/package/pipacs/Makefile @@ -8,21 +8,18 @@ PKG_RELEASE:= 2 PKG_DESCR:= an UNIX socket accounting/wiewer program PKG_SECTION:= net -WRKDIST= ${WRKDIR}/${PKG_NAME} NO_DISTFILES:= 1 include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PIPACS,${PKG_NAME},${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= CFLAGS="${TCFLAGS} ${TCPPFLAGS}" \ ${TARGET_CONFIGURE_OPTS} -do-configure: - mkdir -p ${WRKBUILD} - ${CP} ./src/* ${WRKBUILD} - do-install: ${INSTALL_DIR} ${IDIR_PIPACS}/usr/bin ${INSTALL_BIN} ${WRKBUILD}/pipacs ${IDIR_PIPACS}/usr/bin diff --git a/package/pixman/Makefile b/package/pixman/Makefile index 1f58aad45..247baab73 100644 --- a/package/pixman/Makefile +++ b/package/pixman/Makefile @@ -19,10 +19,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,PIXMAN,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_PIXMAN}/usr/lib ${CP} ${WRKINST}/usr/lib/libpixman-1.so* ${IDIR_PIXMAN}/usr/lib/ diff --git a/package/pmacct/Makefile b/package/pmacct/Makefile index ac7aa9249..c48e92d81 100644 --- a/package/pmacct/Makefile +++ b/package/pmacct/Makefile @@ -6,6 +6,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:= pmacct PKG_VERSION:= 0.11.6 PKG_RELEASE:= 1 +PKG_MD5SUM:= e0f3bcba9a73b7a70bbf5a303cd22f77 +PKG_DESCR:= IP accounting daemons +PKG_SECTION:= net +PKG_DEPENDS:= libpcap PKG_BUILDDEP+= libpcap ifneq ($(ADK_COMPILE_PMACCT_MYSQL),) PKG_BUILDDEP+= mysql @@ -16,10 +20,6 @@ endif ifneq ($(ADK_COMPILE_PMACCT_SQLITE),) PKG_BUILDDEP+= sqlite endif -PKG_MD5SUM:= e0f3bcba9a73b7a70bbf5a303cd22f77 -PKG_DESCR:= IP accounting daemons -PKG_SECTION:= net -PKG_DEPENDS:= libpcap PKG_URL:= http://www.pmacct.net PKG_SITES:= http://www.pmacct.net/ @@ -32,10 +32,6 @@ $(eval $(call PKG_template,PMACCT_CLIENT,pmacct-client,$(PKG_VERSION)-${PKG_RELE CONFIGURE_ENV+= --with-pcap-includes="$(STAGING_DIR)/usr/include" \ --with-pcap-libs="$(STAGING_DIR)/usr/lib" -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} $(IDIR_SFACCTD)/usr/sbin diff --git a/package/popt/Makefile b/package/popt/Makefile index 6645d5c0e..0e3a0362b 100644 --- a/package/popt/Makefile +++ b/package/popt/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= popt PKG_VERSION:= 1.15 PKG_RELEASE:= 2 -PKG_BUILDDEP+= libiconv PKG_MD5SUM:= c61ef795fa450eb692602a661ec8d7f1 PKG_DESCR:= a command line option parsing library PKG_SECTION:= libs PKG_DEPENDS:= libiconv +PKG_BUILDDEP+= libiconv PKG_URL:= http://rpm5.org PKG_SITES:= http://rpm5.org/files/popt/ @@ -18,13 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBPOPT,libpopt,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -#CONFIGURE_ENV+= am_cv_func_iconv=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LIBPOPT}/usr/lib - ${CP} ${WRKINST}/usr/lib/libpopt.so.* ${IDIR_LIBPOPT}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libpopt.so* ${IDIR_LIBPOPT}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/portmap/Makefile b/package/portmap/Makefile index 85faa8d2f..229143a6e 100644 --- a/package/portmap/Makefile +++ b/package/portmap/Makefile @@ -6,12 +6,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= portmap PKG_VERSION:= 6.0 PKG_RELEASE:= 1 -ifneq ($(strip ${ADK_PACKAGE_PORTMAP_LIBWRAP}),) -PKG_BUILDDEP+= tcp_wrappers -endif PKG_MD5SUM:= ac108ab68bf0f34477f8317791aaf1ff PKG_DESCR:= RPC portmapper PKG_SECTION:= net +ifneq ($(strip ${ADK_PACKAGE_PORTMAP_LIBWRAP}),) +PKG_DEPENDS:= libwrap +PKG_BUILDDEP+= tcp_wrappers +endif PKG_URL:= http://neil.brown.name/portmap PKG_SITES:= http://neil.brown.name/portmap/ @@ -20,12 +21,11 @@ WRKDIST= ${WRKDIR}/${PKG_NAME}_${PKG_VERSION} include ${TOPDIR}/mk/package.mk -ifneq ($(strip ${ADK_PACKAGE_PORTMAP_LIBWRAP}),) -PKG_DEPENDS:= libwrap -endif - $(eval $(call PKG_template,PORTMAP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + ifneq ($(strip ${ADK_PACKAGE_PORTMAP_LIBWRAP}),) MAKE_FLAGS+= WRAP_LIB='-L${STAGING_DIR}/usr/lib -lwrap' else @@ -33,7 +33,6 @@ MAKE_FLAGS+= NO_TCP_WRAPPER=1 endif TCPPFLAGS+= -DDAEMON_UID=20 -DDAEMON_GID=20 TCFLAGS+= -fPIC -BUILD_STYLE:= auto MAKE_FLAGS+= ${TARGET_CONFIGURE_OPTS} \ CFLAGS='${TCFLAGS}' diff --git a/package/portsentry/Makefile b/package/portsentry/Makefile index 351438d72..baab74672 100644 --- a/package/portsentry/Makefile +++ b/package/portsentry/Makefile @@ -18,7 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PORTSENTRY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + ALL_TARGET:= linux MAKE_FLAGS+= CC="${TARGET_CC}" CFLAGS="${TCFLAGS}" diff --git a/package/postgresql/Makefile b/package/postgresql/Makefile index d06cca865..3f89ddf1c 100644 --- a/package/postgresql/Makefile +++ b/package/postgresql/Makefile @@ -6,10 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= postgresql PKG_VERSION:= 8.3.7 PKG_RELEASE:= 1 -PKG_BUILDDEP+= zlib PKG_MD5SUM:= 6e36f3b4dd27ae0c352376ea9f843de2 PKG_DESCR:= PostgreSQL database library PKG_SECTION:= libs +PKG_BUILDDEP+= zlib PKG_URL:= http://www.postgresql.org PKG_SITES:= ftp://ftp7.de.postgresql.org/pub/ftp.postgresql.org/source/v${PKG_VERSION}/ \ ftp://ftp8.de.postgresql.org/pub/ftp.postgresql.org/source/v${PKG_VERSION}/ \ @@ -20,7 +20,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBPQ,libpq,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + PKG_CONFIGURE_ARGS:=\ --disable-integer-datetimes \ --without-java \ diff --git a/package/ppp/Makefile b/package/ppp/Makefile index 09327b6ea..2d38f6a96 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -25,11 +25,7 @@ $(eval $(call PKG_template,PPP_MOD_PPPDUMP,ppp-mod-pppdump,${PKG_VERSION}-${PKG_ $(eval $(call PKG_template,PPP_MOD_PPPSTATS,ppp-mod-pppstats,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,PPP_MOD_PPPUMTS,ppp-mod-pppumts,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= UNAME_S="Linux" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - XAKE_FLAGS+= CC="${TARGET_CC}" \ COPTS="${TCFLAGS}" \ HAVE_INET6="1" \ @@ -70,10 +66,10 @@ post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} $(INSTALL_BIN) ./files/ppp.pre-up \ ${IDIR_PPP}/etc/network/if-pre-up.d/ppp - mod-radius-install: ${INSTALL_DIR} ${IDIR_PPP_MOD_RADIUS}/etc/radiusclient - ${CP} ${WRKBUILD}/pppd/plugins/radius/etc/* ${IDIR_PPP_MOD_RADIUS}/etc/radiusclient + ${CP} ${WRKBUILD}/pppd/plugins/radius/etc/* \ + ${IDIR_PPP_MOD_RADIUS}/etc/radiusclient rm ${IDIR_PPP_MOD_RADIUS}/etc/radiusclient/radiusclient.conf.in ${INSTALL_DIR} ${IDIR_PPP_MOD_RADIUS}/usr/lib/pppd/$(PKG_VERSION) ${INSTALL_BIN} $(WRKINST)/usr/lib/pppd/$(PKG_VERSION)/radius.so \ diff --git a/package/pptp/Makefile b/package/pptp/Makefile index 523711887..6c1700a15 100644 --- a/package/pptp/Makefile +++ b/package/pptp/Makefile @@ -16,7 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PPTP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= CC="${TARGET_CC}" \ CFLAGS="${TARGET_CFLAGS}" diff --git a/package/pptpd/Makefile b/package/pptpd/Makefile index 463c2ac5c..01e1147c0 100644 --- a/package/pptpd/Makefile +++ b/package/pptpd/Makefile @@ -17,9 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PPTPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto TCFLAGS+= -DSBINDIR=\\\"/usr/sbin\\\" FAKE_FLAGS+= INSTALL="install" diff --git a/package/privoxy/Makefile b/package/privoxy/Makefile index 985ac546e..013392066 100644 --- a/package/privoxy/Makefile +++ b/package/privoxy/Makefile @@ -23,17 +23,14 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PRIVOXY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TLDFLAGS+= -pthread -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-editor \ --disable-jar-files \ --sysconfdir=/etc/privoxy # uClibc setpgrp does not take arguments CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes \ ac_cv_lib_nsl_gethostbyname=no -BUILD_STYLE:= auto MAKE_FLAGS+= SPECIAL_CFLAGS='${TLDFLAGS}' MAKE_FILE:= GNUmakefile -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_PRIVOXY}/usr/sbin ${IDIR_PRIVOXY}/etc/privoxy diff --git a/package/privoxy/extra/config.h.in b/package/privoxy/extra/config.h.in deleted file mode 100644 index 124f61ba1..000000000 --- a/package/privoxy/extra/config.h.in +++ /dev/null @@ -1,664 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader 2.61-MirPorts-0. */ -#ifndef CONFIG_H_INCLUDED -#define CONFIG_H_INCLUDED -/********************************************************************* - * - * File : $Source: /cvsroot/ijbswa/current/acconfig.h,v $ - * - * Purpose : This file should be the first thing included in every - * .c file. (Before even system headers). It contains - * #define statements for various features. It was - * introduced because the compile command line started - * getting ludicrously long with feature defines. - * - * Copyright : Written by and Copyright (C) 2001 the SourceForge - * Privoxy team. http://www.privoxy.org/ - * - * Based on the Internet Junkbuster originally written - * by and Copyright (C) 1997 Anonymous Coders and - * Junkbusters Corporation. http://www.junkbusters.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. - * - * The GNU General Public License should be included with - * this file. If not, you can view it at - * http://www.gnu.org/copyleft/gpl.html - * or write to the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Revisions : - * $Log: acconfig.h,v $ - * Revision 1.27.2.4 2003/12/17 16:34:40 oes - * Cosmetics - * - * Revision 1.27.2.3 2003/03/27 16:03:19 oes - * Another shot at Bug #707467 - * - * Revision 1.27.2.2 2003/03/21 14:39:12 oes - * Presumably fixed Bug #707467 by defining unix ifdef __unix__ - * - * Revision 1.27.2.1 2002/08/10 11:22:31 oes - * - Add two AC_DEFINEs that indicate if the pcre*.h headers - * are located in a pcre/ subdir to the include path. - * - * Revision 1.27 2002/04/25 19:13:57 morcego - * Removed RPM release number declaration on configure.in - * Changed makefile to use given value for RPM_PACKAGEV when on uploading - * targets (will produce an error, explaining who to do it, if no value - * if provided). - * - * Revision 1.26 2002/04/11 11:00:21 oes - * Applied Moritz' fix for socklen_t on Solaris - * - * Revision 1.25 2002/04/06 20:38:01 jongfoster - * Renaming VC++ versions of config.h - * - * Revision 1.24 2002/04/04 00:36:36 gliptak - * always use pcre for matching - * - * Revision 1.23 2002/04/03 22:28:03 gliptak - * Removed references to gnu_regex - * - * Revision 1.22 2002/03/26 22:29:54 swa - * we have a new homepage! - * - * Revision 1.21 2002/03/24 14:31:08 swa - * remove more crappy files. set RPM - * release version correctly. - * - * Revision 1.20 2002/03/24 13:46:44 swa - * name change related issue. - * - * Revision 1.19 2002/03/24 13:25:42 swa - * name change related issues - * - * Revision 1.18 2002/03/08 16:40:28 oes - * Added FEATURE_NO_GIFS - * - * Revision 1.17 2002/03/04 17:52:44 oes - * Deleted PID_FILE_PATH - * - * Revision 1.16 2002/01/10 12:36:18 oes - * Moved HAVE_*_R to acconfig.h, where they belong. - * - * Revision 1.15 2001/12/30 14:07:31 steudten - * - Add signal handling (unix) - * - Add SIGHUP handler (unix) - * - Add creation of pidfile (unix) - * - Add action 'top' in rc file (RH) - * - Add entry 'SIGNALS' to manpage - * - Add exit message to logfile (unix) - * - * Revision 1.14 2001/10/23 21:24:09 jongfoster - * Support for FEATURE_CGI_EDIT_ACTIONS - * - * Revision 1.13 2001/10/07 15:30:41 oes - * Removed FEATURE_DENY_GZIP - * - * Revision 1.12 2001/09/13 19:56:37 jongfoster - * Reverting to revision 1.10 - previous checking was majorly broken. - * - * Revision 1.10 2001/07/30 22:08:36 jongfoster - * Tidying up #defines: - * - All feature #defines are now of the form FEATURE_xxx - * - Permanently turned off WIN_GUI_EDIT - * - Permanently turned on WEBDAV and SPLIT_PROXY_ARGS - * - * Revision 1.9 2001/07/29 19:08:52 jongfoster - * Changing _CONFIG_H to CONFIG_H_INCLUDED. - * Also added protection against using a MinGW32 or CygWin version of - * config.h from within MS Visual C++ - * - * Revision 1.8 2001/07/29 17:09:17 jongfoster - * Major changes to build system in order to fix these bugs: - * - pthreads under Linux was broken - changed -lpthread to -pthread - * - Compiling in MinGW32 mode under CygWin now correctly detects - * which shared libraries are available - * - Solaris support (?) (Not tested under Solaris yet) - * - * Revision 1.7 2001/07/25 22:53:59 jongfoster - * Will #error if pthreads is enabled under BeOs - * - * Revision 1.6 2001/07/15 17:54:29 jongfoster - * Renaming #define STATIC to STATIC_PCRE - * Adding new #define FEATURE_PTHREAD that will be used to enable - * POSIX threads support. - * - * Revision 1.5 2001/07/13 13:48:37 oes - * - (Fix:) Copied CODE_STATUS #define from config.h.in - * - split REGEX #define into REGEX_GNU and REGEX_PCRE - * and removed PCRE. - * (REGEX = REGEX_GNU || REGEX_PCRE per project.h) - * - Moved STATIC (for pcre) here from Makefile.in - * - Introduced STATIC_PCRS #define to allow for dynaimc linking with - * libpcrs - * - Removed PCRS #define, since pcrs is now needed for CGI anyway - * - * Revision 1.4 2001/05/29 09:50:24 jongfoster - * Unified blocklist/imagelist/permissionslist. - * File format is still under discussion, but the internal changes - * are (mostly) done. - * - * Also modified interceptor behaviour: - * - We now intercept all URLs beginning with one of the following - * prefixes (and *only* these prefixes): - * * http://i.j.b/ - * * http://ijbswa.sf.net/config/ - * * http://ijbswa.sourceforge.net/config/ - * - New interceptors "home page" - go to http://i.j.b/ to see it. - * - Internal changes so that intercepted and fast redirect pages - * are not replaced with an image. - * - Interceptors now have the option to send a binary page direct - * to the client. (i.e. ijb-send-banner uses this) - * - Implemented show-url-info interceptor. (Which is why I needed - * the above interceptors changes - a typical URL is - * "http://i.j.b/show-url-info?url=www.somesite.com/banner.gif". - * The previous mechanism would not have intercepted that, and - * if it had been intercepted then it then it would have replaced - * it with an image.) - * - * Revision 1.3 2001/05/26 01:26:34 jongfoster - * New #define, WIN_GUI_EDIT, enables the (embryonic) Win32 GUI editor. - * This #define cannot be set from ./configure - there's no point, it - * doesn't work yet. See feature request # 425722 - * - * Revision 1.2 2001/05/22 17:43:35 oes - * - * - Enabled filtering banners by size rather than URL - * by adding patterns that replace all standard banner - * sizes with the "Junkbuster" gif to the re_filterfile - * - * - Enabled filtering WebBugs by providing a pattern - * which kills all 1x1 images - * - * - Added support for PCRE_UNGREEDY behaviour to pcrs, - * which is selected by the (nonstandard and therefore - * capital) letter 'U' in the option string. - * It causes the quantifiers to be ungreedy by default. - * Appending a ? turns back to greedy (!). - * - * - Added a new interceptor ijb-send-banner, which - * sends back the "Junkbuster" gif. Without imagelist or - * MSIE detection support, or if tinygif = 1, or the - * URL isn't recognized as an imageurl, a lame HTML - * explanation is sent instead. - * - * - Added new feature, which permits blocking remote - * script redirects and firing back a local redirect - * to the browser. - * The feature is conditionally compiled, i.e. it - * can be disabled with --disable-fast-redirects, - * plus it must be activated by a "fast-redirects" - * line in the config file, has its own log level - * and of course wants to be displayed by show-proxy-args - * Note: Boy, all the #ifdefs in 1001 locations and - * all the fumbling with configure.in and acconfig.h - * were *way* more work than the feature itself :-( - * - * - Because a generic redirect template was needed for - * this, tinygif = 3 now uses the same. - * - * - Moved GIFs, and other static HTTP response templates - * to project.h - * - * - Many minor fixes - * - * - Removed some >400 CRs again (Jon, you really worked - * a lot! ;-) - * - * Revision 1.1.1.1 2001/05/15 13:58:45 oes - * Initial import of version 2.9.3 source tree - * - * - *********************************************************************/ - - -/* - * Version number - Major (X._._) - */ -#undef VERSION_MAJOR - -/* - * Version number - Minor (_.X._) - */ -#undef VERSION_MINOR - -/* - * Version number - Point (_._.X) - */ -#undef VERSION_POINT - -/* - * Version number, as a string - */ -#undef VERSION - -/* - * Status of the code: "alpha", "beta" or "stable". - */ -#undef CODE_STATUS - -/* - * Should pcre be statically built in instead of linkling with libpcre? - * (This is determined by configure depending on the availiability of - * libpcre and user preferences). The name is ugly, but pcre needs it. - * Don't bother to change this here! Use configure instead. - */ -#undef STATIC_PCRE - -/* - * Should pcrs be statically built in instead of linkling with libpcrs? - * (This is determined by configure depending on the availiability of - * libpcrs and user preferences). - * Don't bother to change this here! Use configure instead. - */ -#undef STATIC_PCRS - -/* - * Allows the use of an ACL to control access to the proxy by IP address. - */ -#undef FEATURE_ACL - -/* - * Enables the web-based configuration (actionsfile) editor. If you - * have a shared proxy, you might want to turn this off. - */ -#undef FEATURE_CGI_EDIT_ACTIONS - -/* - * Allows the use of jar files to capture cookies. - */ -#undef FEATURE_COOKIE_JAR - -/* - * Locally redirect remote script-redirect URLs - */ -#undef FEATURE_FAST_REDIRECTS - -/* - * Bypass filtering for 1 page only - */ -#undef FEATURE_FORCE_LOAD - -/* - * Allow blocking using images as well as HTML. - * If you do not define this then everything is blocked as HTML. - * - * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE. - */ -#undef FEATURE_IMAGE_BLOCKING - -/* - * Detect image requests automatically for MSIE. Will fall back to - * other image-detection methods (i.e. "+image" permission) for other - * browsers. - * - * You must also define FEATURE_IMAGE_BLOCKING to use this feature. - * - * It detects the following header pair as an image request: - * - * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) - * Accept: * / * - * - * And the following as a HTML request: - * - * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) - * Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, * / * - * - * And no, I haven't got that backwards - IE is being wierd. - * - * Known limitations: - * 1) If you press shift-reload on a blocked HTML page, you get - * the image "blocked" page, not the HTML "blocked" page. - * 2) Once an image "blocked" page has been sent, viewing it - * in it's own browser window *should* bring up the HTML - * "blocked" page, but it doesn't. You need to clear the - * browser cache to get the HTML version again. - * - * These limitations are due to IE making inconsistent choices - * about which "Accept:" header to send. - */ -#undef FEATURE_IMAGE_DETECT_MSIE - -/* - * Kills JavaScript popups - window.open, onunload, etc. - */ -#undef FEATURE_KILL_POPUPS - -/* - * Use PNG instead of GIF for built-in images - */ -#undef FEATURE_NO_GIFS - -/* - * Use POSIX threads instead of native threads. - */ -#undef FEATURE_PTHREAD - -/* - * Enables statistics function. - */ -#undef FEATURE_STATISTICS - -/* - * Allow Privoxy to be "disabled" so it is just a normal non-blocking - * non-anonymizing proxy. This is useful if you're trying to access a - * blocked or broken site - just change the setting in the config file, - * or use the handy "Disable" menu option in the Windows GUI. - */ -#undef FEATURE_TOGGLE - -/* - * Allows the use of trust files. - */ -#undef FEATURE_TRUST - -/* - * Defined on Solaris only. Makes the system libraries thread safe. - */ -#undef _REENTRANT - -/* - * Defined on Solaris only. Without this, many important functions are not - * defined in the system headers. - */ -#undef __EXTENSIONS__ - -/* - * Defined always. - * FIXME: Don't know what it does or why we need it. - * (presumably something to do with MultiThreading?) - */ -#undef __MT__ - -/* If the (nonstandard and thread-safe) function gethostbyname_r - * is available, select which signature to use - */ -#undef HAVE_GETHOSTBYNAME_R_6_ARGS -#undef HAVE_GETHOSTBYNAME_R_5_ARGS -#undef HAVE_GETHOSTBYNAME_R_3_ARGS - -/* If the (nonstandard and thread-safe) function gethostbyaddr_r - * is available, select which signature to use - */ -#undef HAVE_GETHOSTBYADDR_R_8_ARGS -#undef HAVE_GETHOSTBYADDR_R_7_ARGS -#undef HAVE_GETHOSTBYADDR_R_5_ARGS - -/* Defined if you have gmtime_r and localtime_r with a signature - * of (struct time *, struct tm *) - */ -#undef HAVE_GMTIME_R -#undef HAVE_LOCALTIME_R - -/* Define to 'int' if doesn't have it. - */ -#undef socklen_t - -/* Define if pcre.h must be included as - */ -#undef PCRE_H_IN_SUBDIR - -/* Define if pcreposix.h must be included as - */ -#undef PCREPOSIX_H_IN_SUBDIR - - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Define to 1 if you have the `atexit' function. */ -#undef HAVE_ATEXIT - -/* Define to 1 if you have the `bcopy' function. */ -#undef HAVE_BCOPY - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_DIRENT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define to 1 if you have the `gethostbyaddr' function. */ -#undef HAVE_GETHOSTBYADDR - -/* Define to 1 if you have the `gethostbyname' function. */ -#undef HAVE_GETHOSTBYNAME - -/* Define to 1 if you have the `inet_ntoa' function. */ -#undef HAVE_INET_NTOA - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define to 1 if you have the `memchr' function. */ -#undef HAVE_MEMCHR - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#undef HAVE_NDIR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OS_H - -/* Define to 1 if you have the `regcomp' function. */ -#undef HAVE_REGCOMP - -/* Define to 1 if you have the `select' function. */ -#undef HAVE_SELECT - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the `socket' function. */ -#undef HAVE_SOCKET - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - -/* Define to 1 if you have the `strftime' function. */ -#undef HAVE_STRFTIME - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strstr' function. */ -#undef HAVE_STRSTR - -/* Define to 1 if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - -/* 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_IOCTL_H - -/* 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. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIMEB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - -/* Define to 1 if the `setpgrp' function takes no argument. */ -#undef SETPGRP_VOID - -/* The size of `char *', as computed by sizeof. */ -#undef SIZEOF_CHAR_P - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* Define to 'int' if doesn't have it. */ -#undef socklen_t - -/* - * Defined always. - * FIXME: Don't know what it does or why we need it. - * (presumably something to do with ANSI Standard C?) - */ -#ifndef __STDC__ -#define __STDC__ 1 -#endif /* ndef __STDC__ */ - -/* - * Need to set up this define only for the Pthreads library for - * Win32, available from http://sources.redhat.com/pthreads-win32/ - */ -#if defined(FEATURE_PTHREAD) && defined(_WIN32) -#define __CLEANUP_C -#endif /* defined(FEATURE_PTHREAD) && defined(_WIN32) */ - -/* - * BEOS does not currently support POSIX threads. - * This *should* be detected by ./configure, but let's be sure. - */ -#if defined(FEATURE_PTHREAD) && defined(__BEOS__) -#error BEOS does not support pthread - please run ./configure again with "--disable-pthread" - -#endif /* defined(FEATURE_PTHREAD) && defined(__BEOS__) */ - -/* - * On OpenBSD and maybe also FreeBSD, gcc doesn't define the cpp - * symbol unix; it defines __unix__ and sometimes not even that: - */ -#if ( defined(__unix__) || defined(__NetBSD__) ) && !defined(unix) -#define unix 1 -#endif - -/* - * It's too easy to accidentally use a Cygwin or MinGW32 version of config.h - * under VC++, and it usually gives many wierd error messages. Let's make - * the error messages understandable, by bailing out now. - */ -#ifdef _MSC_VER -#error For MS VC++, please use vc_config_winthreads.h or vc_config_pthreads.h. You can usually do this by selecting the "Build", "Clean" menu option. -#endif /* def _MSC_VER */ - -#endif /* CONFIG_H_INCLUDED */ diff --git a/package/privoxy/extra/configure b/package/privoxy/extra/configure deleted file mode 100644 index f4e92ba8d..000000000 --- a/package/privoxy/extra/configure +++ /dev/null @@ -1,11272 +0,0 @@ -#! /bin/sh -# From configure.in Revision: 1.68.2.19 . -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61-MirPorts-0. -# -# 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= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="jcc.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# 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 -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -VERSION_MAJOR -VERSION_MINOR -VERSION_POINT -CODE_STATUS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -LN_S -SET_MAKE -AWK -GDB -BGROUPS -ID -USER -GROUP -WIN_ONLY -WDUMP -DB2HTML -RPMBIN -RPM_BASE -JADEBIN -MAN2HTML -DOC_STATUS -JADECAT -DKPREFIX -GREP -EGREP -PTHREAD_ONLY -SOCKET_LIB -AMIGAOS_ONLY -STATIC_PCRE_ONLY -STATIC_PCRS_ONLY -SPECIAL_CFLAGS -PTHREAD_LIB -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# 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}' -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 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 \`..'] - -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/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-mingw32 Use mingw32 for a Windows GUI - --disable-pthread Don't use POSIX threads (pthreads) - --disable-toggle Don't support temporary disable - --disable-force Don't allow single-page disable - --disable-fast-redirects Don't support fast redirects - --disable-killpopup Never block popups - --disable-stats Don't keep statistics - --enable-ie-images Enable a quick but not always reliable auto-detect whether requests from - MS Internet Explorer are for an image or not. - --disable-image-blocking Don't try to figure out whether a request is - for an image or HTML - assume HTML. - --disable-acl-files Prevents the use of ACL files to control access to - the proxy by IP address. - --disable-trust-files Prevents the use of trust files. - --disable-jar-files Prevents the use of jar files to capture cookies. - --disable-editor Prevents the use of the web-based actions file - editor and web-based temporary disable setting. - --enable-no-gifs Use politically correct PNG format instead of GIF - for built-in images. May not work with all browsers. - --disable-dynamic-pcre Use the built-in, static pcre, even if - libpcre is available - --disable-dynamic-pcrs Use the built-in, static pcrs, even if - libpcrs is available - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-docbook=yes|no|directory - Enable docbook documentation creation - (default = yes, for gnu and linux) - --with-db2html= - Set the location of the docbook to html converter - (default = search) - --with-debug Enable debug mode - --with-user=privoxy Set user under which privoxy will run - --with-group=privoxy Set group for privoxy - -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 - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -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 -configure -generated by GNU Autoconf 2.61-MirPorts-0 - -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 $as_me, which was -generated by GNU Autoconf 2.61-MirPorts-0. 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 - - - -if test ! -f config.h.in; then - echo "You need to run autoheader first. " - echo -n "Shall I do this for you now? (y/n) " - read answer - if test "$answer" != "y"; then - exit 1 - else - autoheader - fi -fi - -ac_config_headers="$ac_config_headers config.h" - -ac_aux_dir= -for ac_dir in $GNUSYSTEM_AUX_DIR "$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. - - -# 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 -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; }; } -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; }; } - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$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; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - 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; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$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; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -dodk=auto -DKPREFIX=none - -# Check whether --with-docbook was given. -if test "${with_docbook+set}" = set; then - withval=$with_docbook; case "$with_docbook" in -yes) dodk=yes;; -no) dodk=no;; -*) - dodk=yes - DKPREFIX=$withval - ;; -esac - -fi - -DB2HTML=false - -# Check whether --with-db2html was given. -if test "${with_db2html+set}" = set; then - withval=$with_db2html; DB2HTML=$withval - -fi - - - -VERSION_MAJOR=3 -VERSION_MINOR=0 -VERSION_POINT=3 -CODE_STATUS="stable" - - - - - - - - -cat >>confdefs.h <<_ACEOF -#define VERSION_MAJOR ${VERSION_MAJOR} -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define VERSION_MINOR ${VERSION_MINOR} -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define VERSION_POINT ${VERSION_POINT} -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_POINT}" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define CODE_STATUS "${CODE_STATUS}" -_ACEOF - - - -if test "X$CFLAGS" = "X"; then - CFLAGS=" " -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { 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 - break 2 - fi -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; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { 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 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { 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 - - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ 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 { 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 - break 2 - fi -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; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { 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 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ 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 { 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 - break 2 - fi -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; } -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.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ 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 { 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 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { 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 - - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (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" -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); } - -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[^ ]*//'` -# -# 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. -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_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - 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' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ 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 -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 - -# 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 -# 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 - *\"* | *\`* | *\\*) 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 - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check 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" -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); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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; }; } -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 { (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>&5 - ac_status=$? - 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_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 { (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_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - 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` -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 -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 -/* end confdefs.h. */ - -int -main () -{ - - ; - 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_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 -/* end confdefs.h. */ - -int -main () -{ - - ; - 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 - - 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 -/* end confdefs.h. */ - -int -main () -{ - - ; - 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_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; } -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 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 -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 -/* 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 -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - 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_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 -rm -f conftest.$ac_ext -CC=$ac_save_CC - -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; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}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; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#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 - - # 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 -/* 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 - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#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 - - # 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 -/* 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 - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# 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="$SHELL $ac_install_sh" - fi -fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } -fi - -{ 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 - -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 - - -# Extract the first word of "gdb", so it can be a program name with args. -set dummy gdb; 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_GDB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$GDB"; then - ac_cv_prog_GDB="$GDB" # 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_GDB="yes" - 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_prog_GDB" && ac_cv_prog_GDB="no" -fi -fi -GDB=$ac_cv_prog_GDB -if test -n "$GDB"; then - { echo "$as_me:$LINENO: result: $GDB" >&5 -echo "${ECHO_T}$GDB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -# Extract the first word of "groups", so it can be a program name with args. -set dummy groups; 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_BGROUPS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $BGROUPS in - [\\/]* | ?:[\\/]*) - ac_cv_path_BGROUPS="$BGROUPS" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="/bin:/usr/bin:/usr/local/bin" -for as_dir in $as_dummy -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_BGROUPS="$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_BGROUPS" && ac_cv_path_BGROUPS="no" - ;; -esac -fi -BGROUPS=$ac_cv_path_BGROUPS -if test -n "$BGROUPS"; then - { echo "$as_me:$LINENO: result: $BGROUPS" >&5 -echo "${ECHO_T}$BGROUPS" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -# Extract the first word of "id", so it can be a program name with args. -set dummy id; 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_ID+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ID in - [\\/]* | ?:[\\/]*) - ac_cv_path_ID="$ID" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="/bin:/usr/bin:/usr/local/bin" -for as_dir in $as_dummy -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_ID="$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_ID" && ac_cv_path_ID="no" - ;; -esac -fi -ID=$ac_cv_path_ID -if test -n "$ID"; then - { echo "$as_me:$LINENO: result: $ID" >&5 -echo "${ECHO_T}$ID" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - - - - - -# Check whether --with-debug was given. -if test "${with_debug+set}" = set; then - withval=$with_debug; - if test "x$withval" != "xno" ; then - if test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - if test "$GDB"; then - CFLAGS="$CFLAGS -ggdb" - else - CFLAGS="$CFLAGS -g" - fi - CFLAGS="$CFLAGS -Wshadow -Wconversion" - else - CFLAGS="$CFLAGS -g" - fi - fi - fi - -else - - if test "X$CFLAGS" = "X "; then # if CFLAGS were unset (see above) - if test "$GCC" = yes; then - CFLAGS="-O2" - fi - fi - - -fi - - - - -if true test "$EMXOS2" = yes; then - echo "Skipping user and group validity stuff."; - -else - - $ID privoxy >/dev/null 2>/dev/null - if test $? -ne 0 ; then - { echo "$as_me:$LINENO: WARNING: There is no user 'privoxy' on this system" >&5 -echo "$as_me: WARNING: There is no user 'privoxy' on this system" >&2;} - fi - { echo "$as_me:$LINENO: checking for user" >&5 -echo $ECHO_N "checking for user... $ECHO_C" >&6; } - -# Check whether --with-user was given. -if test "${with_user+set}" = set; then - withval=$with_user; - if test "x$withval" != "xyes"; then - if test $ID = no ; then - { { echo "$as_me:$LINENO: error: There is no 'id' program on this system" >&5 -echo "$as_me: error: There is no 'id' program on this system" >&2;} - { (exit 1); exit 1; }; } - else - { echo "$as_me:$LINENO: result: $with_user" >&5 -echo "${ECHO_T}$with_user" >&6; } - $ID $with_user 2>/dev/null >/dev/null - if test $? -eq 0 ; then - USER=$with_user; - else - { { echo "$as_me:$LINENO: error: There is no user '$with_user' on this system" >&5 -echo "$as_me: error: There is no user '$with_user' on this system" >&2;} - { (exit 1); exit 1; }; } - fi - fi - else - { { echo "$as_me:$LINENO: error: We need a user if you give me this parameter" >&5 -echo "$as_me: error: We need a user if you give me this parameter" >&2;} - { (exit 1); exit 1; }; } - fi - -else - - if test $ID = no ; then - { { echo "$as_me:$LINENO: error: There is no 'id' programm on this system" >&5 -echo "$as_me: error: There is no 'id' programm on this system" >&2;} - { (exit 1); exit 1; }; } - else - { echo "$as_me:$LINENO: result: none specified" >&5 -echo "${ECHO_T}none specified" >&6; } - USER=$with_user - fi - - -fi - - - - { echo "$as_me:$LINENO: checking for group" >&5 -echo $ECHO_N "checking for group... $ECHO_C" >&6; } - -# Check whether --with-group was given. -if test "${with_group+set}" = set; then - withval=$with_group; - if test "x$withval" != "xyes"; then - if test $BGROUPS = no ; then - { { echo "$as_me:$LINENO: error: There is no 'groups' program on this system" >&5 -echo "$as_me: error: There is no 'groups' program on this system" >&2;} - { (exit 1); exit 1; }; } - else - { echo "$as_me:$LINENO: result: $with_group" >&5 -echo "${ECHO_T}$with_group" >&6; } - $BGROUPS $USER >/dev/null - if test $? -eq 0 ; then - # FIXME: this fails if valid group, but not first group - # listed. - if test "$with_group" != "`$BGROUPS $USER | sed 's/.*: //' 2>/dev/null |$AWK '{print $1}'`" ; then - { { echo "$as_me:$LINENO: error: The given value '$withval' does not match group entry" >&5 -echo "$as_me: error: The given value '$withval' does not match group entry" >&2;} - { (exit 1); exit 1; }; } - else - GROUP=$with_group; - fi - else - { { echo "$as_me:$LINENO: error: There is no group entry for user '$USER'" >&5 -echo "$as_me: error: There is no group entry for user '$USER'" >&2;} - { (exit 1); exit 1; }; } - fi - fi - else - { { echo "$as_me:$LINENO: error: We need a group if you give me this parameter" >&5 -echo "$as_me: error: We need a group if you give me this parameter" >&2;} - { (exit 1); exit 1; }; } - fi - -else - - if test $BGROUPS = no ; then - { { echo "$as_me:$LINENO: error: There is no 'groups' programm on this system" >&5 -echo "$as_me: error: There is no 'groups' programm on this system" >&2;} - { (exit 1); exit 1; }; } - else - { echo "$as_me:$LINENO: result: none specified" >&5 -echo "${ECHO_T}none specified" >&6; } - GROUP=$with_group; - fi - - -fi - - - -fi - -if test "$GCC"; then - CFLAGS="-pipe $CFLAGS" -fi - - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - 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; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$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; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -case $host_os in - *mingw32* ) MINGW32=yes;; - * ) MINGW32=no;; -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 -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; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$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; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -case $host_os in - *cygwin* ) CYGWIN=yes;; - * ) CYGWIN=no;; -esac - - -if test "$MINGW32" = "yes"; then - target_type=mingw -else - if test "$CYGWIN" = "yes"; then - target_type=cygwin - else - target_type=unix - fi -fi - -if test $dodk = auto; then - dodk=no - if test $target_type = unix; then - case "$host_os" in - linux* | gnu*) - dodk=yes - ;; - esac - fi -fi - - -# Check whether --enable-mingw32 was given. -if test "${enable_mingw32+set}" = set; then - enableval=$enable_mingw32; if test $enableval = yes; then - target_type=mingw -fi -fi - - -if test $target_type = mingw; then - WIN_ONLY= - SPECIAL_CFLAGS="-mwindows -mno-cygwin" - PTHREAD_LIB=-lpthreadGC - echo "Using mingw32 (Win32 GUI)" -else - WIN_ONLY=# - if test $target_type = cygwin; then - SPECIAL_CFLAGS="-mno-win32" - PTHREAD_LIB= - echo "Using Cygnus (Win32 command line)" - else - SPECIAL_CFLAGS= - PTHREAD_LIB=-lpthread - fi -fi - - -if test $dodk != no; then - for ac_prog in w3m lynx links -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_WDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$WDUMP"; then - ac_cv_prog_WDUMP="$WDUMP" # 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_WDUMP="$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 -WDUMP=$ac_cv_prog_WDUMP -if test -n "$WDUMP"; then - { echo "$as_me:$LINENO: result: $WDUMP" >&5 -echo "${ECHO_T}$WDUMP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$WDUMP" && break -done -test -n "$WDUMP" || WDUMP="false" - - if test "$WDUMP" = false; then - { echo "$as_me:$LINENO: WARNING: You need some kind of text browser to build documentation \(w3m, lynx and links are supported\)" >&5 -echo "$as_me: WARNING: You need some kind of text browser to build documentation \(w3m, lynx and links are supported\)" >&2;} - fi - if test $DB2HTML = false; then - DB2HTML="" - for ac_prog in db2html docbook2html -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_DB2HTML+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DB2HTML"; then - ac_cv_prog_DB2HTML="$DB2HTML" # 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_DB2HTML="$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 -DB2HTML=$ac_cv_prog_DB2HTML -if test -n "$DB2HTML"; then - { echo "$as_me:$LINENO: result: $DB2HTML" >&5 -echo "${ECHO_T}$DB2HTML" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$DB2HTML" && break -done -test -n "$DB2HTML" || DB2HTML="false" - - fi -fi - - - -for ac_prog in rpm -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_RPMBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RPMBIN"; then - ac_cv_prog_RPMBIN="$RPMBIN" # 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_RPMBIN="$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 -RPMBIN=$ac_cv_prog_RPMBIN -if test -n "$RPMBIN"; then - { echo "$as_me:$LINENO: result: $RPMBIN" >&5 -echo "${ECHO_T}$RPMBIN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$RPMBIN" && break -done -test -n "$RPMBIN" || RPMBIN="false" - -if test $RPMBIN != false; then - RPM_BASE=`rpm --eval "%{_topdir}"` - if test "$RPM_BASE" = ""; then - RPM_BASE=/usr/src/redhat - fi -fi - - -for ac_prog in jade openjade -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_JADEBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$JADEBIN"; then - ac_cv_prog_JADEBIN="$JADEBIN" # 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_JADEBIN="$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 -JADEBIN=$ac_cv_prog_JADEBIN -if test -n "$JADEBIN"; then - { echo "$as_me:$LINENO: result: $JADEBIN" >&5 -echo "${ECHO_T}$JADEBIN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$JADEBIN" && break -done -test -n "$JADEBIN" || JADEBIN="false" - - - -for ac_prog in man2html -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_MAN2HTML+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$MAN2HTML"; then - ac_cv_prog_MAN2HTML="$MAN2HTML" # 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_MAN2HTML="$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 -MAN2HTML=$ac_cv_prog_MAN2HTML -if test -n "$MAN2HTML"; then - { echo "$as_me:$LINENO: result: $MAN2HTML" >&5 -echo "${ECHO_T}$MAN2HTML" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$MAN2HTML" && break -done -test -n "$MAN2HTML" || MAN2HTML="false" - - - -DOC_STATUS=p-not-stable -if test $CODE_STATUS = stable; then - DOC_STATUS="p-stable" -fi - - -JADECAT="" -if test $dodk = yes; then - if test $DKPREFIX = none; then - for i in /usr/share/sgml/docbook/dsssl-stylesheets \ - /usr/share/sgml/docbkdsl /usr/share/sgml/docbook-dsssl \ - /usr/local/share/sgml/docbook/dsssl/modular \ - /usr/share/sgml/docbook/stylesheet/dsssl/modular/ \ - ; do - { echo "$as_me:$LINENO: checking for $i" >&5 -echo $ECHO_N "checking for $i... $ECHO_C" >&6; } - if test -f $i/html/docbook.dsl; then - echo "yes" - DKPREFIX=$i - break - else - echo "no" - fi - done -# where are the catalogs? - for i in /usr/share/sgml/CATALOG.docbk30 \ - /usr/share/sgml/CATALOG.docbk31 \ - /usr/share/sgml/CATALOG.docbk31 \ - /usr/local/share/sgml/docbook/3.0/docbook.cat \ - /usr/local/share/sgml/docbook/3.1/docbook.cat \ - /usr/share/sgml/docbook/dtd/3.1/docbook.cat \ - ; do - { echo "$as_me:$LINENO: checking for $i" >&5 -echo $ECHO_N "checking for $i... $ECHO_C" >&6; } - if test -f $i; then - echo "yes" - JADECAT="$JADECAT -c $i" - else - echo "no" - fi - done - fi -fi - - - -old_CFLAGS_nospecial=$CFLAGS -CFLAGS="$CFLAGS $SPECIAL_CFLAGS" - -# Hack to force AutoConf to use the CFLAGS we just set -ac_cpp='$CPP $CPPFLAGS $SPECIAL_CFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' - - - - - -{ 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 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"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" - "$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` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -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 - -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; } - 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 -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 - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"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" - "$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` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -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 - -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; } - EGREP="$ac_cv_path_EGREP" - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - 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_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f 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 -/* 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 - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#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 - -# 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 - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -if test "${ac_cv_header_pthread_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking pthread.h usability" >&5 -echo $ECHO_N "checking pthread.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_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 pthread.h presence" >&5 -echo $ECHO_N "checking pthread.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: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pthread_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } - -fi -if test $ac_cv_header_pthread_h = yes; then - have_pthread=yes -else - have_pthread=no -fi - - - -# Check whether --enable-pthread was given. -if test "${enable_pthread+set}" = set; then - enableval=$enable_pthread; if test $enableval = no; then - # Disable pthreads - have_pthread=no -fi -fi - - -if test $have_pthread = yes; then - PTHREAD_ONLY= - cat >>confdefs.h <<\_ACEOF -#define FEATURE_PTHREAD 1 -_ACEOF - - echo Using POSIX threads - if test "$GCC" = "yes"; then - # Set a GCC specific switch: - if test "$target_type" = "unix"; then - ac_jgf_save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -pthread" - 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 () -{ -void *p = pthread_create; - ; - 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 - - # This compiler switch makes GCC on Linux thread-safe - # However, it's not supported on most other OS. - PTHREAD_LIB= - SPECIAL_CFLAGS="-pthread" - -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 - CFLAGS=$ac_jgf_save_CFLAGS - fi - fi -else - PTHREAD_ONLY=# - echo Using native threads -fi - - - - - -{ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $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 gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - 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_lib_nsl_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no -fi - -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_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } -if test $ac_cv_lib_nsl_gethostbyname = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - -fi - - -{ echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } -if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - mirsave_CPPFLAGS=$CPPFLAGS -CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyaddr_r to an innocuous variant, in case declares gethostbyaddr_r. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyaddr_r innocuous_gethostbyaddr_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyaddr_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyaddr_r - -/* 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 gethostbyaddr_r (); -/* 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_gethostbyaddr_r || defined __stub___gethostbyaddr_r -choke me -#endif - -int -main () -{ -return gethostbyaddr_r (); - ; - 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_gethostbyaddr_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyaddr_r=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_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } -CPPFLAGS=$mirsave_CPPFLAGS -if test $ac_cv_func_gethostbyaddr_r = yes; then - - { echo "$as_me:$LINENO: checking signature of gethostbyaddr_r" >&5 -echo $ECHO_N "checking signature of gethostbyaddr_r... $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 - -int -main () -{ - - struct hostent *h, *hp; - char *a, *b; - int l, bl, t, e; - (void) gethostbyaddr_r(a, l, t, h, b, bl, &hp, &e) - - ; - 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 - - cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYADDR_R_8_ARGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: 8 args" >&5 -echo "${ECHO_T}8 args" >&6; } - -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 () -{ - - struct hostent *h; - char *a, *b; - int l, bl, t, e; - (void) gethostbyaddr_r(a, l, t, h, b, bl, &e) - - ; - 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 - - cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYADDR_R_7_ARGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: 7 args" >&5 -echo "${ECHO_T}7 args" >&6; } - -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 () -{ - - struct hostent_data *d; - struct hostent *h; - char a, - int l, t; - (void) gethostbyaddr_r(a, l, t, h, d) - - ; - 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 - - cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYADDR_R_5_ARGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: 5 args" >&5 -echo "${ECHO_T}5 args" >&6; } - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: unrecognised" >&5 -echo "${ECHO_T}unrecognised" >&6; } - -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 - -else - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - - -{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } -if test "${ac_cv_func_gethostbyname_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - mirsave_CPPFLAGS=$CPPFLAGS -CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname_r to an innocuous variant, in case declares gethostbyname_r. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyname_r innocuous_gethostbyname_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyname_r - -/* 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 gethostbyname_r (); -/* 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_gethostbyname_r || defined __stub___gethostbyname_r -choke me -#endif - -int -main () -{ -return gethostbyname_r (); - ; - 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_gethostbyname_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyname_r=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_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } -CPPFLAGS=$mirsave_CPPFLAGS -if test $ac_cv_func_gethostbyname_r = yes; then - - { echo "$as_me:$LINENO: checking signature of gethostbyname_r" >&5 -echo $ECHO_N "checking signature of gethostbyname_r... $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 - -int -main () -{ - - struct hostent *h, *r; - char *n, *b; - int bl, e; - (void) gethostbyname_r(n, h, b, bl, &r, &e) - - ; - 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 - - cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYNAME_R_6_ARGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: 6 args" >&5 -echo "${ECHO_T}6 args" >&6; } - -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 () -{ - - struct hostent *h; - char *n, *b; - int bl, e; - (void) gethostbyname_r(n, h, b, bl, &e) - - ; - 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 - - cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYNAME_R_5_ARGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: 5 args" >&5 -echo "${ECHO_T}5 args" >&6; } - -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 () -{ - - struct hostent_data *d; - struct hostent *h; - char *n, - (void) gethostbyname_r(n, h, d) - - ; - 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 - - cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYNAME_R_3_ARGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: 3 args" >&5 -echo "${ECHO_T}3 args" >&6; } - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: unrecognised" >&5 -echo "${ECHO_T}unrecognised" >&6; } - -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 - -else - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - - -{ echo "$as_me:$LINENO: checking for gmtime_r" >&5 -echo $ECHO_N "checking for gmtime_r... $ECHO_C" >&6; } -if test "${ac_cv_func_gmtime_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - mirsave_CPPFLAGS=$CPPFLAGS -CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gmtime_r to an innocuous variant, in case declares gmtime_r. - For example, HP-UX 11i declares gettimeofday. */ -#define gmtime_r innocuous_gmtime_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gmtime_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gmtime_r - -/* 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 gmtime_r (); -/* 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_gmtime_r || defined __stub___gmtime_r -choke me -#endif - -int -main () -{ -return gmtime_r (); - ; - 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_gmtime_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gmtime_r=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_gmtime_r" >&5 -echo "${ECHO_T}$ac_cv_func_gmtime_r" >&6; } -CPPFLAGS=$mirsave_CPPFLAGS -if test $ac_cv_func_gmtime_r = yes; then - - { echo "$as_me:$LINENO: checking signature of gmtime_r" >&5 -echo $ECHO_N "checking signature of gmtime_r... $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 - -int -main () -{ - - struct time *t; - struct tm *tm; - (void) gmtime_r(t, tm) - - ; - 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 - - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } - cat >>confdefs.h <<\_ACEOF -#define HAVE_GMTIME_R 1 -_ACEOF - - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: unrecognised" >&5 -echo "${ECHO_T}unrecognised" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -else - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - - -{ echo "$as_me:$LINENO: checking for localtime_r" >&5 -echo $ECHO_N "checking for localtime_r... $ECHO_C" >&6; } -if test "${ac_cv_func_localtime_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - mirsave_CPPFLAGS=$CPPFLAGS -CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define localtime_r to an innocuous variant, in case declares localtime_r. - For example, HP-UX 11i declares gettimeofday. */ -#define localtime_r innocuous_localtime_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char localtime_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef localtime_r - -/* 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 localtime_r (); -/* 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_localtime_r || defined __stub___localtime_r -choke me -#endif - -int -main () -{ -return localtime_r (); - ; - 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_localtime_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_localtime_r=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_localtime_r" >&5 -echo "${ECHO_T}$ac_cv_func_localtime_r" >&6; } -CPPFLAGS=$mirsave_CPPFLAGS -if test $ac_cv_func_localtime_r = yes; then - - { echo "$as_me:$LINENO: checking signature of localtime_r" >&5 -echo $ECHO_N "checking signature of localtime_r... $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 - -int -main () -{ - - struct time *t; - struct tm *tm; - (void) localtime_r(t, tm) - - ; - 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 - - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } - cat >>confdefs.h <<\_ACEOF -#define HAVE_LOCALTIME_R 1 -_ACEOF - - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: unrecognised" >&5 -echo "${ECHO_T}unrecognised" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -else - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - - - - -SOCKET_LIB= - -case "$host" in -*-solaris*) SOCKET_LIB="-lsocket -lnsl" - cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF - - if test "$GCC" = "yes"; then - # Set a GCC specific switch: - # This compiler switch makes Solaris thread-safe - PTHREAD_LIB= - SPECIAL_CFLAGS="-pthreads" - else - # What do we do without GCC? Guess this: - SPECIAL_CFLAGS="-D_REENTRANT" - fi -;; -esac - - - - -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "socklen_t" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define socklen_t int -_ACEOF - -fi -rm -f conftest* - - - - -case "$host" in -*-os2-emx*) SOCKET_LIB=-lsocket -;; -esac - - - - -case "$host" in -*-apple-darwin*) SPECIAL_CFLAGS="-Dunix -DOSX_DARWIN" -;; -esac - - -case "$host" in -*-openbsd*) SPECIAL_CFLAGS="$SPECIAL_CFLAGS -Dunix" -;; -esac - - -AMIGAOS_ONLY=# - -case "$host" in -*-amigaos) AMIGAOS_ONLY= -;; -esac - - - - - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - 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_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f 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 -/* 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 - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#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 - - - - - - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -echo $ECHO_N "checking for $ac_hdr that defines DIR... $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. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -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 - 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 - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$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 opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - 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_search_opendir=$ac_res -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 - if test "${ac_cv_search_opendir+set}" = set; then - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then - : -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$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 opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - 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_search_opendir=$ac_res -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 - if test "${ac_cv_search_opendir+set}" = set; then - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then - : -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -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_c_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no -fi - -rm -f 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; } -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - 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_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -if test $ac_cv_type_size_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef pid_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - 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_type_pid_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } -if test $ac_cv_type_pid_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } -if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -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_header_time=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } -if test "${ac_cv_struct_tm+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 -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - 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_struct_tm=time.h -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_struct_tm=sys/time.h -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -cat >>confdefs.h <<\_ACEOF -#define TM_IN_SYS_TIME 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6; } -if test "${ac_cv_type_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef int ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - 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_type_int=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_int=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6; } - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef int ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef int ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef int ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef int ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 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_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef int ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') if test "$ac_cv_type_int" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_int=0 - fi ;; -esac -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 - typedef int ac__type_sizeof_; -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_int" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_int=0 - fi -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -{ echo "$as_me:$LINENO: checking for char *" >&5 -echo $ECHO_N "checking for char *... $ECHO_C" >&6; } -if test "${ac_cv_type_char_p+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 -typedef char * ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - 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_type_char_p=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_char_p=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5 -echo "${ECHO_T}$ac_cv_type_char_p" >&6; } - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of char *" >&5 -echo $ECHO_N "checking size of char *... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_char_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef char * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef char * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef char * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef char * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 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_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef char * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_char_p=$ac_lo;; -'') if test "$ac_cv_type_char_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (char *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_char_p=0 - fi ;; -esac -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 - typedef char * ac__type_sizeof_; -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_char_p=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_char_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (char *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_char_p=0 - fi -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p -_ACEOF - - -{ echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6; } -if test "${ac_cv_type_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef long ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - 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_type_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6; } - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 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_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_long=0 - fi ;; -esac -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 - typedef long ac__type_sizeof_; -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_long=0 - fi -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - -{ echo "$as_me:$LINENO: checking for long long" >&5 -echo $ECHO_N "checking for long long... $ECHO_C" >&6; } -if test "${ac_cv_type_long_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef long long ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - 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_type_long_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long_long=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_long_long" >&6; } - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 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_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') if test "$ac_cv_type_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_long_long=0 - fi ;; -esac -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 - typedef long long ac__type_sizeof_; -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_long_long=0 - fi -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - 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_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of size_t" >&5 -echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef size_t ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef size_t ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef size_t ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef size_t ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 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_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef size_t ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 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_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_size_t=$ac_lo;; -'') if test "$ac_cv_type_size_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_size_t=0 - fi ;; -esac -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 - typedef size_t ac__type_sizeof_; -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_size_t=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_size_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_size_t=0 - fi -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t -_ACEOF - - - - - - - - - - - - - - - - - - - - -for ac_header in OS.h arpa/inet.h errno.h fcntl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h sys/wait.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 -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;} - - ;; -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 - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - -for ac_func in strerror bcopy memmove -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 - mirsave_CPPFLAGS=$CPPFLAGS -CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" -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" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -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; } -CPPFLAGS=$mirsave_CPPFLAGS -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -if test $ac_cv_c_compiler_gnu = yes; then - { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 -echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 -echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - -{ echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 -echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6; } -if test "${ac_cv_func_setpgrp_void+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 -echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -/* If this system has a BSD-style setpgrp which takes arguments, - setpgrp(1, 1) will fail with ESRCH and return -1, in that case - exit successfully. */ - return setpgrp (1,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 - ac_cv_func_setpgrp_void=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_setpgrp_void=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_setpgrp_void" >&5 -echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6; } -if test $ac_cv_func_setpgrp_void = yes; then - -cat >>confdefs.h <<\_ACEOF -#define SETPGRP_VOID 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } -if test "${ac_cv_type_signal+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 -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 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 "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_type_signal=int -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_signal=void -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - - - - - - - - - - - - - - - - - - - - -for ac_func in atexit getcwd gethostbyaddr gethostbyname inet_ntoa localtime_r memchr memmove memset regcomp select setlocale socket strchr strdup strerror strftime strstr strtoul -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - mirsave_CPPFLAGS=$CPPFLAGS -CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" -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" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -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; } -CPPFLAGS=$mirsave_CPPFLAGS -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - -{ echo "$as_me:$LINENO: checking for pcre_compile in -lpcre" >&5 -echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6; } -if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpcre $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 pcre_compile (); -int -main () -{ -return pcre_compile (); - ; - 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_lib_pcre_pcre_compile=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pcre_pcre_compile=no -fi - -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_pcre_pcre_compile" >&5 -echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6; } -if test $ac_cv_lib_pcre_pcre_compile = yes; then - - if test "${ac_cv_header_pcre_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pcre.h" >&5 -echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcre_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcre_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking pcre.h usability" >&5 -echo $ECHO_N "checking pcre.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_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 pcre.h presence" >&5 -echo $ECHO_N "checking pcre.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: pcre.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pcre.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pcre.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pcre.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pcre.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pcre.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pcre.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pcre.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pcre.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pcre.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for pcre.h" >&5 -echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcre_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pcre_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcre_h" >&6; } - -fi -if test $ac_cv_header_pcre_h = yes; then - - 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pcre_fullinfo" >/dev/null 2>&1; then - have_pcre=yes -else - { echo "$as_me:$LINENO: WARNING: pcre old version installed" >&5 -echo "$as_me: WARNING: pcre old version installed" >&2;}; have_pcre=no -fi -rm -f conftest* - - -else - - if test "${ac_cv_header_pcre_pcre_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pcre/pcre.h" >&5 -echo $ECHO_N "checking for pcre/pcre.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcre_pcre_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_pcre_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcre_pcre_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking pcre/pcre.h usability" >&5 -echo $ECHO_N "checking pcre/pcre.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_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 pcre/pcre.h presence" >&5 -echo $ECHO_N "checking pcre/pcre.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: pcre/pcre.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pcre/pcre.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pcre/pcre.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pcre/pcre.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pcre/pcre.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pcre/pcre.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pcre/pcre.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pcre/pcre.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pcre/pcre.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for pcre/pcre.h" >&5 -echo $ECHO_N "checking for pcre/pcre.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcre_pcre_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pcre_pcre_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_pcre_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcre_pcre_h" >&6; } - -fi -if test $ac_cv_header_pcre_pcre_h = yes; then - - 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pcre_fullinfo" >/dev/null 2>&1; then - have_pcre=yes; cat >>confdefs.h <<\_ACEOF -#define PCRE_H_IN_SUBDIR 1 -_ACEOF - -else - { echo "$as_me:$LINENO: WARNING: pcre old version installed" >&5 -echo "$as_me: WARNING: pcre old version installed" >&2;}; have_pcre=no -fi -rm -f conftest* - - -else - have_pcre=no -fi - - - -fi - - - -else - have_pcre=no -fi - - -{ echo "$as_me:$LINENO: checking for regcomp in -lpcreposix" >&5 -echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6; } -if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpcreposix -lpcre $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 regcomp (); -int -main () -{ -return regcomp (); - ; - 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_lib_pcreposix_regcomp=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pcreposix_regcomp=no -fi - -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_pcreposix_regcomp" >&5 -echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6; } -if test $ac_cv_lib_pcreposix_regcomp = yes; then - - if test "${ac_cv_header_pcreposix_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pcreposix.h" >&5 -echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcreposix_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcreposix_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking pcreposix.h usability" >&5 -echo $ECHO_N "checking pcreposix.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_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 pcreposix.h presence" >&5 -echo $ECHO_N "checking pcreposix.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: pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pcreposix.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pcreposix.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pcreposix.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pcreposix.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pcreposix.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pcreposix.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pcreposix.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pcreposix.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pcreposix.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pcreposix.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pcreposix.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pcreposix.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pcreposix.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pcreposix.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for pcreposix.h" >&5 -echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcreposix_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pcreposix_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcreposix_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6; } - -fi -if test $ac_cv_header_pcreposix_h = yes; then - - 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pcreposix_regerror" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: WARNING: pcreposix old version installed" >&5 -echo "$as_me: WARNING: pcreposix old version installed" >&2;}; have_pcreposix=no -else - have_pcreposix=yes -fi -rm -f conftest* - - -else - - if test "${ac_cv_header_pcre_pcreposix_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pcre/pcreposix.h" >&5 -echo $ECHO_N "checking for pcre/pcreposix.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcre_pcreposix_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_pcreposix_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcre_pcreposix_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking pcre/pcreposix.h usability" >&5 -echo $ECHO_N "checking pcre/pcreposix.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_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 pcre/pcreposix.h presence" >&5 -echo $ECHO_N "checking pcre/pcreposix.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: pcre/pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pcre/pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pcre/pcreposix.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pcre/pcreposix.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pcre/pcreposix.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pcre/pcreposix.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pcre/pcreposix.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pcre/pcreposix.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pcre/pcreposix.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for pcre/pcreposix.h" >&5 -echo $ECHO_N "checking for pcre/pcreposix.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcre_pcreposix_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pcre_pcreposix_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_pcreposix_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcre_pcreposix_h" >&6; } - -fi -if test $ac_cv_header_pcre_pcreposix_h = yes; then - - 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pcreposix_regerror" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: WARNING: pcreposix old version installed" >&5 -echo "$as_me: WARNING: pcreposix old version installed" >&2;}; have_pcreposix=no -else - have_pcreposix=yes; cat >>confdefs.h <<\_ACEOF -#define PCREPOSIX_H_IN_SUBDIR 1 -_ACEOF - -fi -rm -f conftest* - - -else - have_pcreposix=no -fi - - - -fi - - - -else - have_pcreposix=no -fi - - -{ echo "$as_me:$LINENO: checking for pcrs_compile in -lpcrs" >&5 -echo $ECHO_N "checking for pcrs_compile in -lpcrs... $ECHO_C" >&6; } -if test "${ac_cv_lib_pcrs_pcrs_compile+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpcrs -lpcre $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 pcrs_compile (); -int -main () -{ -return pcrs_compile (); - ; - 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_lib_pcrs_pcrs_compile=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pcrs_pcrs_compile=no -fi - -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_pcrs_pcrs_compile" >&5 -echo "${ECHO_T}$ac_cv_lib_pcrs_pcrs_compile" >&6; } -if test $ac_cv_lib_pcrs_pcrs_compile = yes; then - if test "${ac_cv_header_pcrs_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pcrs.h" >&5 -echo $ECHO_N "checking for pcrs.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcrs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcrs_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcrs_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking pcrs.h usability" >&5 -echo $ECHO_N "checking pcrs.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_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 pcrs.h presence" >&5 -echo $ECHO_N "checking pcrs.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: pcrs.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pcrs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pcrs.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pcrs.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pcrs.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pcrs.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pcrs.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pcrs.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pcrs.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pcrs.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pcrs.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pcrs.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pcrs.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pcrs.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pcrs.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pcrs.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for pcrs.h" >&5 -echo $ECHO_N "checking for pcrs.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pcrs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pcrs_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pcrs_h" >&5 -echo "${ECHO_T}$ac_cv_header_pcrs_h" >&6; } - -fi -if test $ac_cv_header_pcrs_h = yes; then - have_pcrs=yes -else - have_pcrs=no -fi - - -else - have_pcrs=no -fi - - - -cat >>confdefs.h <<\_ACEOF -#define __MT__ 1 -_ACEOF - - - -# Check whether --enable-toggle was given. -if test "${enable_toggle+set}" = set; then - enableval=$enable_toggle; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_TOGGLE 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_TOGGLE 1 -_ACEOF - -fi - - -# Check whether --enable-force was given. -if test "${enable_force+set}" = set; then - enableval=$enable_force; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_FORCE_LOAD 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_FORCE_LOAD 1 -_ACEOF - -fi - - -# Check whether --enable-fast-redirects was given. -if test "${enable_fast_redirects+set}" = set; then - enableval=$enable_fast_redirects; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_FAST_REDIRECTS 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_FAST_REDIRECTS 1 -_ACEOF - -fi - - -# Check whether --enable-killpopup was given. -if test "${enable_killpopup+set}" = set; then - enableval=$enable_killpopup; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_KILL_POPUPS 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_KILL_POPUPS 1 -_ACEOF - -fi - - -# Check whether --enable-stats was given. -if test "${enable_stats+set}" = set; then - enableval=$enable_stats; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_STATISTICS 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_STATISTICS 1 -_ACEOF - -fi - - -# Check whether --enable-ie-images was given. -if test "${enable_ie_images+set}" = set; then - enableval=$enable_ie_images; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_IMAGE_DETECT_MSIE 1 -_ACEOF - -fi -fi - - -# Check whether --enable-image-blocking was given. -if test "${enable_image_blocking+set}" = set; then - enableval=$enable_image_blocking; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_IMAGE_BLOCKING 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_IMAGE_BLOCKING 1 -_ACEOF - -fi - - -# Check whether --enable-acl-files was given. -if test "${enable_acl_files+set}" = set; then - enableval=$enable_acl_files; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_ACL 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_ACL 1 -_ACEOF - -fi - - -# Check whether --enable-trust-files was given. -if test "${enable_trust_files+set}" = set; then - enableval=$enable_trust_files; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_TRUST 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_TRUST 1 -_ACEOF - -fi - - -# Check whether --enable-jar-files was given. -if test "${enable_jar_files+set}" = set; then - enableval=$enable_jar_files; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_COOKIE_JAR 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_COOKIE_JAR 1 -_ACEOF - -fi - - -# Check whether --enable-editor was given. -if test "${enable_editor+set}" = set; then - enableval=$enable_editor; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_CGI_EDIT_ACTIONS 1 -_ACEOF - -fi -else - cat >>confdefs.h <<\_ACEOF -#define FEATURE_CGI_EDIT_ACTIONS 1 -_ACEOF - -fi - - -# Check whether --enable-no-gifs was given. -if test "${enable_no_gifs+set}" = set; then - enableval=$enable_no_gifs; if test $enableval = yes; then - cat >>confdefs.h <<\_ACEOF -#define FEATURE_NO_GIFS 1 -_ACEOF - -fi -fi - - - - -# Check whether --enable-dynamic-pcre was given. -if test "${enable_dynamic_pcre+set}" = set; then - enableval=$enable_dynamic_pcre; if test $enableval = "no"; then have_pcre=no; fi -fi - - -# Check whether --enable-dynamic-pcrs was given. -if test "${enable_dynamic_pcrs+set}" = set; then - enableval=$enable_dynamic_pcrs; if test $enableval = "no"; then have_pcrs=no; fi -fi - - - -# If we have libpcre and either we also have pcreposix or -# we don't need pcreposix, then link pcre dynamically; else -# build it and link statically -# -if test $have_pcre = "yes"; then - echo "using libpcre" - pcre_dyn=yes - STATIC_PCRE_ONLY=# - LIBS="$LIBS -lpcre -lpcreposix" -else - echo "using built-in static pcre" - pcre_dyn=no - cat >>confdefs.h <<\_ACEOF -#define STATIC_PCRE 1 -_ACEOF - - STATIC_PCRE_ONLY= -fi - -# If we have libpcrs and pcre is linked dynamically -# then also link pcrs dynamically, else build and link -# pcrs statically -# -if test $have_pcrs = "yes" -a $pcre_dyn = "yes"; then - echo "using libpcrs" - STATIC_PCRS_ONLY=# - LIBS="$LIBS -lpcrs" -else - echo "using built-in static pcrs" - cat >>confdefs.h <<\_ACEOF -#define STATIC_PCRS 1 -_ACEOF - - STATIC_PCRS_ONLY= -fi - - - - - -CFLAGS=$old_CFLAGS_nospecial - - - - -ac_config_files="$ac_config_files GNUmakefile doc/source/ldp.dsl" - -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}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_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 $as_me, which was -generated by GNU Autoconf 2.61-MirPorts-0. 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" -config_headers="$ac_config_headers" - -_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 - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.61-MirPorts-0, - 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' -_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;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$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; }; };; - --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 - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;; - "doc/source/ldp.dsl") CONFIG_FILES="$CONFIG_FILES doc/source/ldp.dsl" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason 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 -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 -VERSION_MAJOR!$VERSION_MAJOR$ac_delim -VERSION_MINOR!$VERSION_MINOR$ac_delim -VERSION_POINT!$VERSION_POINT$ac_delim -CODE_STATUS!$CODE_STATUS$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 -CPP!$CPP$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -LN_S!$LN_S$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -AWK!$AWK$ac_delim -GDB!$GDB$ac_delim -BGROUPS!$BGROUPS$ac_delim -ID!$ID$ac_delim -USER!$USER$ac_delim -GROUP!$GROUP$ac_delim -WIN_ONLY!$WIN_ONLY$ac_delim -WDUMP!$WDUMP$ac_delim -DB2HTML!$DB2HTML$ac_delim -RPMBIN!$RPMBIN$ac_delim -RPM_BASE!$RPM_BASE$ac_delim -JADEBIN!$JADEBIN$ac_delim -MAN2HTML!$MAN2HTML$ac_delim -DOC_STATUS!$DOC_STATUS$ac_delim -JADECAT!$JADECAT$ac_delim -DKPREFIX!$DKPREFIX$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -PTHREAD_ONLY!$PTHREAD_ONLY$ac_delim -SOCKET_LIB!$SOCKET_LIB$ac_delim -AMIGAOS_ONLY!$AMIGAOS_ONLY$ac_delim -STATIC_PCRE_ONLY!$STATIC_PCRE_ONLY$ac_delim -STATIC_PCRS_ONLY!$STATIC_PCRS_ONLY$ac_delim -SPECIAL_CFLAGS!$SPECIAL_CFLAGS$ac_delim -PTHREAD_LIB!$PTHREAD_LIB$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` = 89; 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 :H $CONFIG_HEADERS -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 -_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 -$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 - ;; - :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;} - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out12" - ;; - - - 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/package/privoxy/src/config.h.in b/package/privoxy/src/config.h.in new file mode 100644 index 000000000..124f61ba1 --- /dev/null +++ b/package/privoxy/src/config.h.in @@ -0,0 +1,664 @@ +/* config.h.in. Generated from configure.in by autoheader 2.61-MirPorts-0. */ +#ifndef CONFIG_H_INCLUDED +#define CONFIG_H_INCLUDED +/********************************************************************* + * + * File : $Source: /cvsroot/ijbswa/current/acconfig.h,v $ + * + * Purpose : This file should be the first thing included in every + * .c file. (Before even system headers). It contains + * #define statements for various features. It was + * introduced because the compile command line started + * getting ludicrously long with feature defines. + * + * Copyright : Written by and Copyright (C) 2001 the SourceForge + * Privoxy team. http://www.privoxy.org/ + * + * Based on the Internet Junkbuster originally written + * by and Copyright (C) 1997 Anonymous Coders and + * Junkbusters Corporation. http://www.junkbusters.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. + * + * The GNU General Public License should be included with + * this file. If not, you can view it at + * http://www.gnu.org/copyleft/gpl.html + * or write to the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revisions : + * $Log: acconfig.h,v $ + * Revision 1.27.2.4 2003/12/17 16:34:40 oes + * Cosmetics + * + * Revision 1.27.2.3 2003/03/27 16:03:19 oes + * Another shot at Bug #707467 + * + * Revision 1.27.2.2 2003/03/21 14:39:12 oes + * Presumably fixed Bug #707467 by defining unix ifdef __unix__ + * + * Revision 1.27.2.1 2002/08/10 11:22:31 oes + * - Add two AC_DEFINEs that indicate if the pcre*.h headers + * are located in a pcre/ subdir to the include path. + * + * Revision 1.27 2002/04/25 19:13:57 morcego + * Removed RPM release number declaration on configure.in + * Changed makefile to use given value for RPM_PACKAGEV when on uploading + * targets (will produce an error, explaining who to do it, if no value + * if provided). + * + * Revision 1.26 2002/04/11 11:00:21 oes + * Applied Moritz' fix for socklen_t on Solaris + * + * Revision 1.25 2002/04/06 20:38:01 jongfoster + * Renaming VC++ versions of config.h + * + * Revision 1.24 2002/04/04 00:36:36 gliptak + * always use pcre for matching + * + * Revision 1.23 2002/04/03 22:28:03 gliptak + * Removed references to gnu_regex + * + * Revision 1.22 2002/03/26 22:29:54 swa + * we have a new homepage! + * + * Revision 1.21 2002/03/24 14:31:08 swa + * remove more crappy files. set RPM + * release version correctly. + * + * Revision 1.20 2002/03/24 13:46:44 swa + * name change related issue. + * + * Revision 1.19 2002/03/24 13:25:42 swa + * name change related issues + * + * Revision 1.18 2002/03/08 16:40:28 oes + * Added FEATURE_NO_GIFS + * + * Revision 1.17 2002/03/04 17:52:44 oes + * Deleted PID_FILE_PATH + * + * Revision 1.16 2002/01/10 12:36:18 oes + * Moved HAVE_*_R to acconfig.h, where they belong. + * + * Revision 1.15 2001/12/30 14:07:31 steudten + * - Add signal handling (unix) + * - Add SIGHUP handler (unix) + * - Add creation of pidfile (unix) + * - Add action 'top' in rc file (RH) + * - Add entry 'SIGNALS' to manpage + * - Add exit message to logfile (unix) + * + * Revision 1.14 2001/10/23 21:24:09 jongfoster + * Support for FEATURE_CGI_EDIT_ACTIONS + * + * Revision 1.13 2001/10/07 15:30:41 oes + * Removed FEATURE_DENY_GZIP + * + * Revision 1.12 2001/09/13 19:56:37 jongfoster + * Reverting to revision 1.10 - previous checking was majorly broken. + * + * Revision 1.10 2001/07/30 22:08:36 jongfoster + * Tidying up #defines: + * - All feature #defines are now of the form FEATURE_xxx + * - Permanently turned off WIN_GUI_EDIT + * - Permanently turned on WEBDAV and SPLIT_PROXY_ARGS + * + * Revision 1.9 2001/07/29 19:08:52 jongfoster + * Changing _CONFIG_H to CONFIG_H_INCLUDED. + * Also added protection against using a MinGW32 or CygWin version of + * config.h from within MS Visual C++ + * + * Revision 1.8 2001/07/29 17:09:17 jongfoster + * Major changes to build system in order to fix these bugs: + * - pthreads under Linux was broken - changed -lpthread to -pthread + * - Compiling in MinGW32 mode under CygWin now correctly detects + * which shared libraries are available + * - Solaris support (?) (Not tested under Solaris yet) + * + * Revision 1.7 2001/07/25 22:53:59 jongfoster + * Will #error if pthreads is enabled under BeOs + * + * Revision 1.6 2001/07/15 17:54:29 jongfoster + * Renaming #define STATIC to STATIC_PCRE + * Adding new #define FEATURE_PTHREAD that will be used to enable + * POSIX threads support. + * + * Revision 1.5 2001/07/13 13:48:37 oes + * - (Fix:) Copied CODE_STATUS #define from config.h.in + * - split REGEX #define into REGEX_GNU and REGEX_PCRE + * and removed PCRE. + * (REGEX = REGEX_GNU || REGEX_PCRE per project.h) + * - Moved STATIC (for pcre) here from Makefile.in + * - Introduced STATIC_PCRS #define to allow for dynaimc linking with + * libpcrs + * - Removed PCRS #define, since pcrs is now needed for CGI anyway + * + * Revision 1.4 2001/05/29 09:50:24 jongfoster + * Unified blocklist/imagelist/permissionslist. + * File format is still under discussion, but the internal changes + * are (mostly) done. + * + * Also modified interceptor behaviour: + * - We now intercept all URLs beginning with one of the following + * prefixes (and *only* these prefixes): + * * http://i.j.b/ + * * http://ijbswa.sf.net/config/ + * * http://ijbswa.sourceforge.net/config/ + * - New interceptors "home page" - go to http://i.j.b/ to see it. + * - Internal changes so that intercepted and fast redirect pages + * are not replaced with an image. + * - Interceptors now have the option to send a binary page direct + * to the client. (i.e. ijb-send-banner uses this) + * - Implemented show-url-info interceptor. (Which is why I needed + * the above interceptors changes - a typical URL is + * "http://i.j.b/show-url-info?url=www.somesite.com/banner.gif". + * The previous mechanism would not have intercepted that, and + * if it had been intercepted then it then it would have replaced + * it with an image.) + * + * Revision 1.3 2001/05/26 01:26:34 jongfoster + * New #define, WIN_GUI_EDIT, enables the (embryonic) Win32 GUI editor. + * This #define cannot be set from ./configure - there's no point, it + * doesn't work yet. See feature request # 425722 + * + * Revision 1.2 2001/05/22 17:43:35 oes + * + * - Enabled filtering banners by size rather than URL + * by adding patterns that replace all standard banner + * sizes with the "Junkbuster" gif to the re_filterfile + * + * - Enabled filtering WebBugs by providing a pattern + * which kills all 1x1 images + * + * - Added support for PCRE_UNGREEDY behaviour to pcrs, + * which is selected by the (nonstandard and therefore + * capital) letter 'U' in the option string. + * It causes the quantifiers to be ungreedy by default. + * Appending a ? turns back to greedy (!). + * + * - Added a new interceptor ijb-send-banner, which + * sends back the "Junkbuster" gif. Without imagelist or + * MSIE detection support, or if tinygif = 1, or the + * URL isn't recognized as an imageurl, a lame HTML + * explanation is sent instead. + * + * - Added new feature, which permits blocking remote + * script redirects and firing back a local redirect + * to the browser. + * The feature is conditionally compiled, i.e. it + * can be disabled with --disable-fast-redirects, + * plus it must be activated by a "fast-redirects" + * line in the config file, has its own log level + * and of course wants to be displayed by show-proxy-args + * Note: Boy, all the #ifdefs in 1001 locations and + * all the fumbling with configure.in and acconfig.h + * were *way* more work than the feature itself :-( + * + * - Because a generic redirect template was needed for + * this, tinygif = 3 now uses the same. + * + * - Moved GIFs, and other static HTTP response templates + * to project.h + * + * - Many minor fixes + * + * - Removed some >400 CRs again (Jon, you really worked + * a lot! ;-) + * + * Revision 1.1.1.1 2001/05/15 13:58:45 oes + * Initial import of version 2.9.3 source tree + * + * + *********************************************************************/ + + +/* + * Version number - Major (X._._) + */ +#undef VERSION_MAJOR + +/* + * Version number - Minor (_.X._) + */ +#undef VERSION_MINOR + +/* + * Version number - Point (_._.X) + */ +#undef VERSION_POINT + +/* + * Version number, as a string + */ +#undef VERSION + +/* + * Status of the code: "alpha", "beta" or "stable". + */ +#undef CODE_STATUS + +/* + * Should pcre be statically built in instead of linkling with libpcre? + * (This is determined by configure depending on the availiability of + * libpcre and user preferences). The name is ugly, but pcre needs it. + * Don't bother to change this here! Use configure instead. + */ +#undef STATIC_PCRE + +/* + * Should pcrs be statically built in instead of linkling with libpcrs? + * (This is determined by configure depending on the availiability of + * libpcrs and user preferences). + * Don't bother to change this here! Use configure instead. + */ +#undef STATIC_PCRS + +/* + * Allows the use of an ACL to control access to the proxy by IP address. + */ +#undef FEATURE_ACL + +/* + * Enables the web-based configuration (actionsfile) editor. If you + * have a shared proxy, you might want to turn this off. + */ +#undef FEATURE_CGI_EDIT_ACTIONS + +/* + * Allows the use of jar files to capture cookies. + */ +#undef FEATURE_COOKIE_JAR + +/* + * Locally redirect remote script-redirect URLs + */ +#undef FEATURE_FAST_REDIRECTS + +/* + * Bypass filtering for 1 page only + */ +#undef FEATURE_FORCE_LOAD + +/* + * Allow blocking using images as well as HTML. + * If you do not define this then everything is blocked as HTML. + * + * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE. + */ +#undef FEATURE_IMAGE_BLOCKING + +/* + * Detect image requests automatically for MSIE. Will fall back to + * other image-detection methods (i.e. "+image" permission) for other + * browsers. + * + * You must also define FEATURE_IMAGE_BLOCKING to use this feature. + * + * It detects the following header pair as an image request: + * + * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) + * Accept: * / * + * + * And the following as a HTML request: + * + * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) + * Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, * / * + * + * And no, I haven't got that backwards - IE is being wierd. + * + * Known limitations: + * 1) If you press shift-reload on a blocked HTML page, you get + * the image "blocked" page, not the HTML "blocked" page. + * 2) Once an image "blocked" page has been sent, viewing it + * in it's own browser window *should* bring up the HTML + * "blocked" page, but it doesn't. You need to clear the + * browser cache to get the HTML version again. + * + * These limitations are due to IE making inconsistent choices + * about which "Accept:" header to send. + */ +#undef FEATURE_IMAGE_DETECT_MSIE + +/* + * Kills JavaScript popups - window.open, onunload, etc. + */ +#undef FEATURE_KILL_POPUPS + +/* + * Use PNG instead of GIF for built-in images + */ +#undef FEATURE_NO_GIFS + +/* + * Use POSIX threads instead of native threads. + */ +#undef FEATURE_PTHREAD + +/* + * Enables statistics function. + */ +#undef FEATURE_STATISTICS + +/* + * Allow Privoxy to be "disabled" so it is just a normal non-blocking + * non-anonymizing proxy. This is useful if you're trying to access a + * blocked or broken site - just change the setting in the config file, + * or use the handy "Disable" menu option in the Windows GUI. + */ +#undef FEATURE_TOGGLE + +/* + * Allows the use of trust files. + */ +#undef FEATURE_TRUST + +/* + * Defined on Solaris only. Makes the system libraries thread safe. + */ +#undef _REENTRANT + +/* + * Defined on Solaris only. Without this, many important functions are not + * defined in the system headers. + */ +#undef __EXTENSIONS__ + +/* + * Defined always. + * FIXME: Don't know what it does or why we need it. + * (presumably something to do with MultiThreading?) + */ +#undef __MT__ + +/* If the (nonstandard and thread-safe) function gethostbyname_r + * is available, select which signature to use + */ +#undef HAVE_GETHOSTBYNAME_R_6_ARGS +#undef HAVE_GETHOSTBYNAME_R_5_ARGS +#undef HAVE_GETHOSTBYNAME_R_3_ARGS + +/* If the (nonstandard and thread-safe) function gethostbyaddr_r + * is available, select which signature to use + */ +#undef HAVE_GETHOSTBYADDR_R_8_ARGS +#undef HAVE_GETHOSTBYADDR_R_7_ARGS +#undef HAVE_GETHOSTBYADDR_R_5_ARGS + +/* Defined if you have gmtime_r and localtime_r with a signature + * of (struct time *, struct tm *) + */ +#undef HAVE_GMTIME_R +#undef HAVE_LOCALTIME_R + +/* Define to 'int' if doesn't have it. + */ +#undef socklen_t + +/* Define if pcre.h must be included as + */ +#undef PCRE_H_IN_SUBDIR + +/* Define if pcreposix.h must be included as + */ +#undef PCREPOSIX_H_IN_SUBDIR + + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define to 1 if you have the `atexit' function. */ +#undef HAVE_ATEXIT + +/* Define to 1 if you have the `bcopy' function. */ +#undef HAVE_BCOPY + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define to 1 if you have the `gethostbyaddr' function. */ +#undef HAVE_GETHOSTBYADDR + +/* Define to 1 if you have the `gethostbyname' function. */ +#undef HAVE_GETHOSTBYNAME + +/* Define to 1 if you have the `inet_ntoa' function. */ +#undef HAVE_INET_NTOA + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if you have the `localtime_r' function. */ +#undef HAVE_LOCALTIME_R + +/* Define to 1 if you have the `memchr' function. */ +#undef HAVE_MEMCHR + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OS_H + +/* Define to 1 if you have the `regcomp' function. */ +#undef HAVE_REGCOMP + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDDEF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the `strftime' function. */ +#undef HAVE_STRFTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + +/* 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_IOCTL_H + +/* 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. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMEB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to 1 if the `setpgrp' function takes no argument. */ +#undef SETPGRP_VOID + +/* The size of `char *', as computed by sizeof. */ +#undef SIZEOF_CHAR_P + +/* The size of `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `long long', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG + +/* The size of `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to 'int' if doesn't have it. */ +#undef socklen_t + +/* + * Defined always. + * FIXME: Don't know what it does or why we need it. + * (presumably something to do with ANSI Standard C?) + */ +#ifndef __STDC__ +#define __STDC__ 1 +#endif /* ndef __STDC__ */ + +/* + * Need to set up this define only for the Pthreads library for + * Win32, available from http://sources.redhat.com/pthreads-win32/ + */ +#if defined(FEATURE_PTHREAD) && defined(_WIN32) +#define __CLEANUP_C +#endif /* defined(FEATURE_PTHREAD) && defined(_WIN32) */ + +/* + * BEOS does not currently support POSIX threads. + * This *should* be detected by ./configure, but let's be sure. + */ +#if defined(FEATURE_PTHREAD) && defined(__BEOS__) +#error BEOS does not support pthread - please run ./configure again with "--disable-pthread" + +#endif /* defined(FEATURE_PTHREAD) && defined(__BEOS__) */ + +/* + * On OpenBSD and maybe also FreeBSD, gcc doesn't define the cpp + * symbol unix; it defines __unix__ and sometimes not even that: + */ +#if ( defined(__unix__) || defined(__NetBSD__) ) && !defined(unix) +#define unix 1 +#endif + +/* + * It's too easy to accidentally use a Cygwin or MinGW32 version of config.h + * under VC++, and it usually gives many wierd error messages. Let's make + * the error messages understandable, by bailing out now. + */ +#ifdef _MSC_VER +#error For MS VC++, please use vc_config_winthreads.h or vc_config_pthreads.h. You can usually do this by selecting the "Build", "Clean" menu option. +#endif /* def _MSC_VER */ + +#endif /* CONFIG_H_INCLUDED */ diff --git a/package/privoxy/src/configure b/package/privoxy/src/configure new file mode 100644 index 000000000..f4e92ba8d --- /dev/null +++ b/package/privoxy/src/configure @@ -0,0 +1,11272 @@ +#! /bin/sh +# From configure.in Revision: 1.68.2.19 . +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61-MirPorts-0. +# +# 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= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="jcc.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# 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 +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +VERSION_MAJOR +VERSION_MINOR +VERSION_POINT +CODE_STATUS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +LN_S +SET_MAKE +AWK +GDB +BGROUPS +ID +USER +GROUP +WIN_ONLY +WDUMP +DB2HTML +RPMBIN +RPM_BASE +JADEBIN +MAN2HTML +DOC_STATUS +JADECAT +DKPREFIX +GREP +EGREP +PTHREAD_ONLY +SOCKET_LIB +AMIGAOS_ONLY +STATIC_PCRE_ONLY +STATIC_PCRS_ONLY +SPECIAL_CFLAGS +PTHREAD_LIB +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# 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}' +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 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 \`..'] + +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/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-mingw32 Use mingw32 for a Windows GUI + --disable-pthread Don't use POSIX threads (pthreads) + --disable-toggle Don't support temporary disable + --disable-force Don't allow single-page disable + --disable-fast-redirects Don't support fast redirects + --disable-killpopup Never block popups + --disable-stats Don't keep statistics + --enable-ie-images Enable a quick but not always reliable auto-detect whether requests from + MS Internet Explorer are for an image or not. + --disable-image-blocking Don't try to figure out whether a request is + for an image or HTML - assume HTML. + --disable-acl-files Prevents the use of ACL files to control access to + the proxy by IP address. + --disable-trust-files Prevents the use of trust files. + --disable-jar-files Prevents the use of jar files to capture cookies. + --disable-editor Prevents the use of the web-based actions file + editor and web-based temporary disable setting. + --enable-no-gifs Use politically correct PNG format instead of GIF + for built-in images. May not work with all browsers. + --disable-dynamic-pcre Use the built-in, static pcre, even if + libpcre is available + --disable-dynamic-pcrs Use the built-in, static pcrs, even if + libpcrs is available + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-docbook=yes|no|directory + Enable docbook documentation creation + (default = yes, for gnu and linux) + --with-db2html= + Set the location of the docbook to html converter + (default = search) + --with-debug Enable debug mode + --with-user=privoxy Set user under which privoxy will run + --with-group=privoxy Set group for privoxy + +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 + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +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 +configure +generated by GNU Autoconf 2.61-MirPorts-0 + +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 $as_me, which was +generated by GNU Autoconf 2.61-MirPorts-0. 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 + + + +if test ! -f config.h.in; then + echo "You need to run autoheader first. " + echo -n "Shall I do this for you now? (y/n) " + read answer + if test "$answer" != "y"; then + exit 1 + else + autoheader + fi +fi + +ac_config_headers="$ac_config_headers config.h" + +ac_aux_dir= +for ac_dir in $GNUSYSTEM_AUX_DIR "$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. + + +# 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 +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; }; } +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; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$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; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$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; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +dodk=auto +DKPREFIX=none + +# Check whether --with-docbook was given. +if test "${with_docbook+set}" = set; then + withval=$with_docbook; case "$with_docbook" in +yes) dodk=yes;; +no) dodk=no;; +*) + dodk=yes + DKPREFIX=$withval + ;; +esac + +fi + +DB2HTML=false + +# Check whether --with-db2html was given. +if test "${with_db2html+set}" = set; then + withval=$with_db2html; DB2HTML=$withval + +fi + + + +VERSION_MAJOR=3 +VERSION_MINOR=0 +VERSION_POINT=3 +CODE_STATUS="stable" + + + + + + + + +cat >>confdefs.h <<_ACEOF +#define VERSION_MAJOR ${VERSION_MAJOR} +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define VERSION_MINOR ${VERSION_MINOR} +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define VERSION_POINT ${VERSION_POINT} +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_POINT}" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define CODE_STATUS "${CODE_STATUS}" +_ACEOF + + + +if test "X$CFLAGS" = "X"; then + CFLAGS=" " +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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 + break 2 + fi +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; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { 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 + + if test "x$ac_ct_CC" = x; then + CC="" + 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 + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ 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 { 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 + break 2 + fi +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; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ 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 { 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 + break 2 + fi +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; } +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.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ 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 { 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 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { 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 + + if test "x$ac_ct_CC" = x; then + CC="" + 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 + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (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" +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); } + +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[^ ]*//'` +# +# 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. +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_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + 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' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ 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 +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 + +# 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 +# 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 + *\"* | *\`* | *\\*) 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 + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check 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" +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); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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; }; } +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 { (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>&5 + ac_status=$? + 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_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 { (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_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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` +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 +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 +/* end confdefs.h. */ + +int +main () +{ + + ; + 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_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 +/* end confdefs.h. */ + +int +main () +{ + + ; + 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 + + 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 +/* end confdefs.h. */ + +int +main () +{ + + ; + 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_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; } +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 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 +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 +/* 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 -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + 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_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 +rm -f conftest.$ac_ext +CC=$ac_save_CC + +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; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}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; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#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 + + # 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 +/* 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 + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#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 + + # 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 +/* 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 + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# 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="$SHELL $ac_install_sh" + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ 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 + +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 + + +# Extract the first word of "gdb", so it can be a program name with args. +set dummy gdb; 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_GDB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$GDB"; then + ac_cv_prog_GDB="$GDB" # 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_GDB="yes" + 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_prog_GDB" && ac_cv_prog_GDB="no" +fi +fi +GDB=$ac_cv_prog_GDB +if test -n "$GDB"; then + { echo "$as_me:$LINENO: result: $GDB" >&5 +echo "${ECHO_T}$GDB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "groups", so it can be a program name with args. +set dummy groups; 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_BGROUPS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $BGROUPS in + [\\/]* | ?:[\\/]*) + ac_cv_path_BGROUPS="$BGROUPS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="/bin:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +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_BGROUPS="$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_BGROUPS" && ac_cv_path_BGROUPS="no" + ;; +esac +fi +BGROUPS=$ac_cv_path_BGROUPS +if test -n "$BGROUPS"; then + { echo "$as_me:$LINENO: result: $BGROUPS" >&5 +echo "${ECHO_T}$BGROUPS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "id", so it can be a program name with args. +set dummy id; 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_ID+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ID in + [\\/]* | ?:[\\/]*) + ac_cv_path_ID="$ID" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="/bin:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +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_ID="$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_ID" && ac_cv_path_ID="no" + ;; +esac +fi +ID=$ac_cv_path_ID +if test -n "$ID"; then + { echo "$as_me:$LINENO: result: $ID" >&5 +echo "${ECHO_T}$ID" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + + + + +# Check whether --with-debug was given. +if test "${with_debug+set}" = set; then + withval=$with_debug; + if test "x$withval" != "xno" ; then + if test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + if test "$GDB"; then + CFLAGS="$CFLAGS -ggdb" + else + CFLAGS="$CFLAGS -g" + fi + CFLAGS="$CFLAGS -Wshadow -Wconversion" + else + CFLAGS="$CFLAGS -g" + fi + fi + fi + +else + + if test "X$CFLAGS" = "X "; then # if CFLAGS were unset (see above) + if test "$GCC" = yes; then + CFLAGS="-O2" + fi + fi + + +fi + + + + +if true test "$EMXOS2" = yes; then + echo "Skipping user and group validity stuff."; + +else + + $ID privoxy >/dev/null 2>/dev/null + if test $? -ne 0 ; then + { echo "$as_me:$LINENO: WARNING: There is no user 'privoxy' on this system" >&5 +echo "$as_me: WARNING: There is no user 'privoxy' on this system" >&2;} + fi + { echo "$as_me:$LINENO: checking for user" >&5 +echo $ECHO_N "checking for user... $ECHO_C" >&6; } + +# Check whether --with-user was given. +if test "${with_user+set}" = set; then + withval=$with_user; + if test "x$withval" != "xyes"; then + if test $ID = no ; then + { { echo "$as_me:$LINENO: error: There is no 'id' program on this system" >&5 +echo "$as_me: error: There is no 'id' program on this system" >&2;} + { (exit 1); exit 1; }; } + else + { echo "$as_me:$LINENO: result: $with_user" >&5 +echo "${ECHO_T}$with_user" >&6; } + $ID $with_user 2>/dev/null >/dev/null + if test $? -eq 0 ; then + USER=$with_user; + else + { { echo "$as_me:$LINENO: error: There is no user '$with_user' on this system" >&5 +echo "$as_me: error: There is no user '$with_user' on this system" >&2;} + { (exit 1); exit 1; }; } + fi + fi + else + { { echo "$as_me:$LINENO: error: We need a user if you give me this parameter" >&5 +echo "$as_me: error: We need a user if you give me this parameter" >&2;} + { (exit 1); exit 1; }; } + fi + +else + + if test $ID = no ; then + { { echo "$as_me:$LINENO: error: There is no 'id' programm on this system" >&5 +echo "$as_me: error: There is no 'id' programm on this system" >&2;} + { (exit 1); exit 1; }; } + else + { echo "$as_me:$LINENO: result: none specified" >&5 +echo "${ECHO_T}none specified" >&6; } + USER=$with_user + fi + + +fi + + + + { echo "$as_me:$LINENO: checking for group" >&5 +echo $ECHO_N "checking for group... $ECHO_C" >&6; } + +# Check whether --with-group was given. +if test "${with_group+set}" = set; then + withval=$with_group; + if test "x$withval" != "xyes"; then + if test $BGROUPS = no ; then + { { echo "$as_me:$LINENO: error: There is no 'groups' program on this system" >&5 +echo "$as_me: error: There is no 'groups' program on this system" >&2;} + { (exit 1); exit 1; }; } + else + { echo "$as_me:$LINENO: result: $with_group" >&5 +echo "${ECHO_T}$with_group" >&6; } + $BGROUPS $USER >/dev/null + if test $? -eq 0 ; then + # FIXME: this fails if valid group, but not first group + # listed. + if test "$with_group" != "`$BGROUPS $USER | sed 's/.*: //' 2>/dev/null |$AWK '{print $1}'`" ; then + { { echo "$as_me:$LINENO: error: The given value '$withval' does not match group entry" >&5 +echo "$as_me: error: The given value '$withval' does not match group entry" >&2;} + { (exit 1); exit 1; }; } + else + GROUP=$with_group; + fi + else + { { echo "$as_me:$LINENO: error: There is no group entry for user '$USER'" >&5 +echo "$as_me: error: There is no group entry for user '$USER'" >&2;} + { (exit 1); exit 1; }; } + fi + fi + else + { { echo "$as_me:$LINENO: error: We need a group if you give me this parameter" >&5 +echo "$as_me: error: We need a group if you give me this parameter" >&2;} + { (exit 1); exit 1; }; } + fi + +else + + if test $BGROUPS = no ; then + { { echo "$as_me:$LINENO: error: There is no 'groups' programm on this system" >&5 +echo "$as_me: error: There is no 'groups' programm on this system" >&2;} + { (exit 1); exit 1; }; } + else + { echo "$as_me:$LINENO: result: none specified" >&5 +echo "${ECHO_T}none specified" >&6; } + GROUP=$with_group; + fi + + +fi + + + +fi + +if test "$GCC"; then + CFLAGS="-pipe $CFLAGS" +fi + + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$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; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +case $host_os in + *mingw32* ) MINGW32=yes;; + * ) MINGW32=no;; +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 +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; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$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; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +case $host_os in + *cygwin* ) CYGWIN=yes;; + * ) CYGWIN=no;; +esac + + +if test "$MINGW32" = "yes"; then + target_type=mingw +else + if test "$CYGWIN" = "yes"; then + target_type=cygwin + else + target_type=unix + fi +fi + +if test $dodk = auto; then + dodk=no + if test $target_type = unix; then + case "$host_os" in + linux* | gnu*) + dodk=yes + ;; + esac + fi +fi + + +# Check whether --enable-mingw32 was given. +if test "${enable_mingw32+set}" = set; then + enableval=$enable_mingw32; if test $enableval = yes; then + target_type=mingw +fi +fi + + +if test $target_type = mingw; then + WIN_ONLY= + SPECIAL_CFLAGS="-mwindows -mno-cygwin" + PTHREAD_LIB=-lpthreadGC + echo "Using mingw32 (Win32 GUI)" +else + WIN_ONLY=# + if test $target_type = cygwin; then + SPECIAL_CFLAGS="-mno-win32" + PTHREAD_LIB= + echo "Using Cygnus (Win32 command line)" + else + SPECIAL_CFLAGS= + PTHREAD_LIB=-lpthread + fi +fi + + +if test $dodk != no; then + for ac_prog in w3m lynx links +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_WDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$WDUMP"; then + ac_cv_prog_WDUMP="$WDUMP" # 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_WDUMP="$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 +WDUMP=$ac_cv_prog_WDUMP +if test -n "$WDUMP"; then + { echo "$as_me:$LINENO: result: $WDUMP" >&5 +echo "${ECHO_T}$WDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$WDUMP" && break +done +test -n "$WDUMP" || WDUMP="false" + + if test "$WDUMP" = false; then + { echo "$as_me:$LINENO: WARNING: You need some kind of text browser to build documentation \(w3m, lynx and links are supported\)" >&5 +echo "$as_me: WARNING: You need some kind of text browser to build documentation \(w3m, lynx and links are supported\)" >&2;} + fi + if test $DB2HTML = false; then + DB2HTML="" + for ac_prog in db2html docbook2html +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_DB2HTML+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DB2HTML"; then + ac_cv_prog_DB2HTML="$DB2HTML" # 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_DB2HTML="$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 +DB2HTML=$ac_cv_prog_DB2HTML +if test -n "$DB2HTML"; then + { echo "$as_me:$LINENO: result: $DB2HTML" >&5 +echo "${ECHO_T}$DB2HTML" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$DB2HTML" && break +done +test -n "$DB2HTML" || DB2HTML="false" + + fi +fi + + + +for ac_prog in rpm +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_RPMBIN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RPMBIN"; then + ac_cv_prog_RPMBIN="$RPMBIN" # 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_RPMBIN="$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 +RPMBIN=$ac_cv_prog_RPMBIN +if test -n "$RPMBIN"; then + { echo "$as_me:$LINENO: result: $RPMBIN" >&5 +echo "${ECHO_T}$RPMBIN" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$RPMBIN" && break +done +test -n "$RPMBIN" || RPMBIN="false" + +if test $RPMBIN != false; then + RPM_BASE=`rpm --eval "%{_topdir}"` + if test "$RPM_BASE" = ""; then + RPM_BASE=/usr/src/redhat + fi +fi + + +for ac_prog in jade openjade +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_JADEBIN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JADEBIN"; then + ac_cv_prog_JADEBIN="$JADEBIN" # 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_JADEBIN="$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 +JADEBIN=$ac_cv_prog_JADEBIN +if test -n "$JADEBIN"; then + { echo "$as_me:$LINENO: result: $JADEBIN" >&5 +echo "${ECHO_T}$JADEBIN" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$JADEBIN" && break +done +test -n "$JADEBIN" || JADEBIN="false" + + + +for ac_prog in man2html +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_MAN2HTML+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$MAN2HTML"; then + ac_cv_prog_MAN2HTML="$MAN2HTML" # 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_MAN2HTML="$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 +MAN2HTML=$ac_cv_prog_MAN2HTML +if test -n "$MAN2HTML"; then + { echo "$as_me:$LINENO: result: $MAN2HTML" >&5 +echo "${ECHO_T}$MAN2HTML" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$MAN2HTML" && break +done +test -n "$MAN2HTML" || MAN2HTML="false" + + + +DOC_STATUS=p-not-stable +if test $CODE_STATUS = stable; then + DOC_STATUS="p-stable" +fi + + +JADECAT="" +if test $dodk = yes; then + if test $DKPREFIX = none; then + for i in /usr/share/sgml/docbook/dsssl-stylesheets \ + /usr/share/sgml/docbkdsl /usr/share/sgml/docbook-dsssl \ + /usr/local/share/sgml/docbook/dsssl/modular \ + /usr/share/sgml/docbook/stylesheet/dsssl/modular/ \ + ; do + { echo "$as_me:$LINENO: checking for $i" >&5 +echo $ECHO_N "checking for $i... $ECHO_C" >&6; } + if test -f $i/html/docbook.dsl; then + echo "yes" + DKPREFIX=$i + break + else + echo "no" + fi + done +# where are the catalogs? + for i in /usr/share/sgml/CATALOG.docbk30 \ + /usr/share/sgml/CATALOG.docbk31 \ + /usr/share/sgml/CATALOG.docbk31 \ + /usr/local/share/sgml/docbook/3.0/docbook.cat \ + /usr/local/share/sgml/docbook/3.1/docbook.cat \ + /usr/share/sgml/docbook/dtd/3.1/docbook.cat \ + ; do + { echo "$as_me:$LINENO: checking for $i" >&5 +echo $ECHO_N "checking for $i... $ECHO_C" >&6; } + if test -f $i; then + echo "yes" + JADECAT="$JADECAT -c $i" + else + echo "no" + fi + done + fi +fi + + + +old_CFLAGS_nospecial=$CFLAGS +CFLAGS="$CFLAGS $SPECIAL_CFLAGS" + +# Hack to force AutoConf to use the CFLAGS we just set +ac_cpp='$CPP $CPPFLAGS $SPECIAL_CFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + + + + + +{ 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 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"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" + "$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` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +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 + +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; } + 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 +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 + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"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" + "$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` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +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 + +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; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + 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_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f 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 +/* 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 + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#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 + +# 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 + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "${ac_cv_header_pthread_h+set}" = set; then + { echo "$as_me:$LINENO: checking for pthread.h" >&5 +echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pthread_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking pthread.h usability" >&5 +echo $ECHO_N "checking pthread.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_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 pthread.h presence" >&5 +echo $ECHO_N "checking pthread.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: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for pthread.h" >&5 +echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pthread_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pthread_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } + +fi +if test $ac_cv_header_pthread_h = yes; then + have_pthread=yes +else + have_pthread=no +fi + + + +# Check whether --enable-pthread was given. +if test "${enable_pthread+set}" = set; then + enableval=$enable_pthread; if test $enableval = no; then + # Disable pthreads + have_pthread=no +fi +fi + + +if test $have_pthread = yes; then + PTHREAD_ONLY= + cat >>confdefs.h <<\_ACEOF +#define FEATURE_PTHREAD 1 +_ACEOF + + echo Using POSIX threads + if test "$GCC" = "yes"; then + # Set a GCC specific switch: + if test "$target_type" = "unix"; then + ac_jgf_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -pthread" + 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 () +{ +void *p = pthread_create; + ; + 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 + + # This compiler switch makes GCC on Linux thread-safe + # However, it's not supported on most other OS. + PTHREAD_LIB= + SPECIAL_CFLAGS="-pthread" + +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 + CFLAGS=$ac_jgf_save_CFLAGS + fi + fi +else + PTHREAD_ONLY=# + echo Using native threads +fi + + + + + +{ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + 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_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no +fi + +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_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +if test $ac_cv_lib_nsl_gethostbyname = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" + +fi + + +{ echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } +if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + mirsave_CPPFLAGS=$CPPFLAGS +CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyaddr_r to an innocuous variant, in case declares gethostbyaddr_r. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyaddr_r innocuous_gethostbyaddr_r + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyaddr_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyaddr_r + +/* 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 gethostbyaddr_r (); +/* 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_gethostbyaddr_r || defined __stub___gethostbyaddr_r +choke me +#endif + +int +main () +{ +return gethostbyaddr_r (); + ; + 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_gethostbyaddr_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyaddr_r=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_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +CPPFLAGS=$mirsave_CPPFLAGS +if test $ac_cv_func_gethostbyaddr_r = yes; then + + { echo "$as_me:$LINENO: checking signature of gethostbyaddr_r" >&5 +echo $ECHO_N "checking signature of gethostbyaddr_r... $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 + +int +main () +{ + + struct hostent *h, *hp; + char *a, *b; + int l, bl, t, e; + (void) gethostbyaddr_r(a, l, t, h, b, bl, &hp, &e) + + ; + 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 + + cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_8_ARGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: 8 args" >&5 +echo "${ECHO_T}8 args" >&6; } + +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 () +{ + + struct hostent *h; + char *a, *b; + int l, bl, t, e; + (void) gethostbyaddr_r(a, l, t, h, b, bl, &e) + + ; + 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 + + cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_7_ARGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: 7 args" >&5 +echo "${ECHO_T}7 args" >&6; } + +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 () +{ + + struct hostent_data *d; + struct hostent *h; + char a, + int l, t; + (void) gethostbyaddr_r(a, l, t, h, d) + + ; + 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 + + cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_5_ARGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: 5 args" >&5 +echo "${ECHO_T}5 args" >&6; } + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: unrecognised" >&5 +echo "${ECHO_T}unrecognised" >&6; } + +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 + +else + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + + +{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } +if test "${ac_cv_func_gethostbyname_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + mirsave_CPPFLAGS=$CPPFLAGS +CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname_r to an innocuous variant, in case declares gethostbyname_r. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname_r innocuous_gethostbyname_r + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname_r + +/* 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 gethostbyname_r (); +/* 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_gethostbyname_r || defined __stub___gethostbyname_r +choke me +#endif + +int +main () +{ +return gethostbyname_r (); + ; + 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_gethostbyname_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyname_r=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_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +CPPFLAGS=$mirsave_CPPFLAGS +if test $ac_cv_func_gethostbyname_r = yes; then + + { echo "$as_me:$LINENO: checking signature of gethostbyname_r" >&5 +echo $ECHO_N "checking signature of gethostbyname_r... $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 + +int +main () +{ + + struct hostent *h, *r; + char *n, *b; + int bl, e; + (void) gethostbyname_r(n, h, b, bl, &r, &e) + + ; + 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 + + cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_6_ARGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: 6 args" >&5 +echo "${ECHO_T}6 args" >&6; } + +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 () +{ + + struct hostent *h; + char *n, *b; + int bl, e; + (void) gethostbyname_r(n, h, b, bl, &e) + + ; + 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 + + cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_5_ARGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: 5 args" >&5 +echo "${ECHO_T}5 args" >&6; } + +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 () +{ + + struct hostent_data *d; + struct hostent *h; + char *n, + (void) gethostbyname_r(n, h, d) + + ; + 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 + + cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_3_ARGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: 3 args" >&5 +echo "${ECHO_T}3 args" >&6; } + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: unrecognised" >&5 +echo "${ECHO_T}unrecognised" >&6; } + +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 + +else + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + + +{ echo "$as_me:$LINENO: checking for gmtime_r" >&5 +echo $ECHO_N "checking for gmtime_r... $ECHO_C" >&6; } +if test "${ac_cv_func_gmtime_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + mirsave_CPPFLAGS=$CPPFLAGS +CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gmtime_r to an innocuous variant, in case declares gmtime_r. + For example, HP-UX 11i declares gettimeofday. */ +#define gmtime_r innocuous_gmtime_r + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gmtime_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gmtime_r + +/* 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 gmtime_r (); +/* 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_gmtime_r || defined __stub___gmtime_r +choke me +#endif + +int +main () +{ +return gmtime_r (); + ; + 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_gmtime_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gmtime_r=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_gmtime_r" >&5 +echo "${ECHO_T}$ac_cv_func_gmtime_r" >&6; } +CPPFLAGS=$mirsave_CPPFLAGS +if test $ac_cv_func_gmtime_r = yes; then + + { echo "$as_me:$LINENO: checking signature of gmtime_r" >&5 +echo $ECHO_N "checking signature of gmtime_r... $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 + +int +main () +{ + + struct time *t; + struct tm *tm; + (void) gmtime_r(t, tm) + + ; + 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 + + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } + cat >>confdefs.h <<\_ACEOF +#define HAVE_GMTIME_R 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: unrecognised" >&5 +echo "${ECHO_T}unrecognised" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +else + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + + +{ echo "$as_me:$LINENO: checking for localtime_r" >&5 +echo $ECHO_N "checking for localtime_r... $ECHO_C" >&6; } +if test "${ac_cv_func_localtime_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + mirsave_CPPFLAGS=$CPPFLAGS +CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define localtime_r to an innocuous variant, in case declares localtime_r. + For example, HP-UX 11i declares gettimeofday. */ +#define localtime_r innocuous_localtime_r + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char localtime_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef localtime_r + +/* 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 localtime_r (); +/* 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_localtime_r || defined __stub___localtime_r +choke me +#endif + +int +main () +{ +return localtime_r (); + ; + 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_localtime_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_localtime_r=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_localtime_r" >&5 +echo "${ECHO_T}$ac_cv_func_localtime_r" >&6; } +CPPFLAGS=$mirsave_CPPFLAGS +if test $ac_cv_func_localtime_r = yes; then + + { echo "$as_me:$LINENO: checking signature of localtime_r" >&5 +echo $ECHO_N "checking signature of localtime_r... $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 + +int +main () +{ + + struct time *t; + struct tm *tm; + (void) localtime_r(t, tm) + + ; + 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 + + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } + cat >>confdefs.h <<\_ACEOF +#define HAVE_LOCALTIME_R 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: unrecognised" >&5 +echo "${ECHO_T}unrecognised" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +else + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + + + + +SOCKET_LIB= + +case "$host" in +*-solaris*) SOCKET_LIB="-lsocket -lnsl" + cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + if test "$GCC" = "yes"; then + # Set a GCC specific switch: + # This compiler switch makes Solaris thread-safe + PTHREAD_LIB= + SPECIAL_CFLAGS="-pthreads" + else + # What do we do without GCC? Guess this: + SPECIAL_CFLAGS="-D_REENTRANT" + fi +;; +esac + + + + +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "socklen_t" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define socklen_t int +_ACEOF + +fi +rm -f conftest* + + + + +case "$host" in +*-os2-emx*) SOCKET_LIB=-lsocket +;; +esac + + + + +case "$host" in +*-apple-darwin*) SPECIAL_CFLAGS="-Dunix -DOSX_DARWIN" +;; +esac + + +case "$host" in +*-openbsd*) SPECIAL_CFLAGS="$SPECIAL_CFLAGS -Dunix" +;; +esac + + +AMIGAOS_ONLY=# + +case "$host" in +*-amigaos) AMIGAOS_ONLY= +;; +esac + + + + + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + 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_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f 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 +/* 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 + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#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 + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $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. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +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 + 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 + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$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 opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + 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_search_opendir=$ac_res +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 + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$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 opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + 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_search_opendir=$ac_res +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 + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +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_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f 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; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + 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_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef pid_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + 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_type_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_pid_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +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_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +if test "${ac_cv_struct_tm+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 +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + 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_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_tm=sys/time.h +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6; } +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + 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_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 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_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +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 + typedef int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for char *" >&5 +echo $ECHO_N "checking for char *... $ECHO_C" >&6; } +if test "${ac_cv_type_char_p+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 +typedef char * ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + 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_type_char_p=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_char_p=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5 +echo "${ECHO_T}$ac_cv_type_char_p" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of char *" >&5 +echo $ECHO_N "checking size of char *... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_char_p+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef char * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef char * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef char * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef char * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 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_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef char * ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_char_p=$ac_lo;; +'') if test "$ac_cv_type_char_p" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_char_p=0 + fi ;; +esac +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 + typedef char * ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_char_p=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_char_p" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_char_p=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5 +echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p +_ACEOF + + +{ echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6; } +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + 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_type_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 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_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long=$ac_lo;; +'') if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi ;; +esac +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 + typedef long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +{ echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6; } +if test "${ac_cv_type_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + 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_type_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of long long" >&5 +echo $ECHO_N "checking size of long long... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 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_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') if test "$ac_cv_type_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long=0 + fi ;; +esac +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 + typedef long long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + 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_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of size_t" >&5 +echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 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_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef size_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi ;; +esac +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 + typedef size_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_size_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + + + + + + + + + + + + + + + + + + + +for ac_header in OS.h arpa/inet.h errno.h fcntl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h sys/wait.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 +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;} + + ;; +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 + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_func in strerror bcopy memmove +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 + mirsave_CPPFLAGS=$CPPFLAGS +CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" +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" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +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; } +CPPFLAGS=$mirsave_CPPFLAGS +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test $ac_cv_c_compiler_gnu = yes; then + { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; } +if test "${ac_cv_prog_gcc_traditional+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + +{ echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 +echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6; } +if test "${ac_cv_func_setpgrp_void+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 +echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +/* If this system has a BSD-style setpgrp which takes arguments, + setpgrp(1, 1) will fail with ESRCH and return -1, in that case + exit successfully. */ + return setpgrp (1,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 + ac_cv_func_setpgrp_void=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_setpgrp_void=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_setpgrp_void" >&5 +echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6; } +if test $ac_cv_func_setpgrp_void = yes; then + +cat >>confdefs.h <<\_ACEOF +#define SETPGRP_VOID 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +if test "${ac_cv_type_signal+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 +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 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 "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_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + + + + + + + + + + + + + + + + + + + +for ac_func in atexit getcwd gethostbyaddr gethostbyname inet_ntoa localtime_r memchr memmove memset regcomp select setlocale socket strchr strdup strerror strftime strstr strtoul +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + mirsave_CPPFLAGS=$CPPFLAGS +CPPFLAGS="-D_MIRMAKE_H $CPPFLAGS" +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" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +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; } +CPPFLAGS=$mirsave_CPPFLAGS +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +{ echo "$as_me:$LINENO: checking for pcre_compile in -lpcre" >&5 +echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6; } +if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpcre $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 pcre_compile (); +int +main () +{ +return pcre_compile (); + ; + 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_lib_pcre_pcre_compile=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pcre_pcre_compile=no +fi + +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_pcre_pcre_compile" >&5 +echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6; } +if test $ac_cv_lib_pcre_pcre_compile = yes; then + + if test "${ac_cv_header_pcre_h+set}" = set; then + { echo "$as_me:$LINENO: checking for pcre.h" >&5 +echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcre_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcre_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking pcre.h usability" >&5 +echo $ECHO_N "checking pcre.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_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 pcre.h presence" >&5 +echo $ECHO_N "checking pcre.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: pcre.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pcre.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: pcre.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: pcre.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pcre.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pcre.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: pcre.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: pcre.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pcre.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: pcre.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for pcre.h" >&5 +echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcre_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pcre_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcre_h" >&6; } + +fi +if test $ac_cv_header_pcre_h = yes; then + + 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pcre_fullinfo" >/dev/null 2>&1; then + have_pcre=yes +else + { echo "$as_me:$LINENO: WARNING: pcre old version installed" >&5 +echo "$as_me: WARNING: pcre old version installed" >&2;}; have_pcre=no +fi +rm -f conftest* + + +else + + if test "${ac_cv_header_pcre_pcre_h+set}" = set; then + { echo "$as_me:$LINENO: checking for pcre/pcre.h" >&5 +echo $ECHO_N "checking for pcre/pcre.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcre_pcre_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_pcre_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcre_pcre_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking pcre/pcre.h usability" >&5 +echo $ECHO_N "checking pcre/pcre.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_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 pcre/pcre.h presence" >&5 +echo $ECHO_N "checking pcre/pcre.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: pcre/pcre.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pcre/pcre.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: pcre/pcre.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pcre/pcre.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pcre/pcre.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: pcre/pcre.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: pcre/pcre.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pcre/pcre.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcre.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: pcre/pcre.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for pcre/pcre.h" >&5 +echo $ECHO_N "checking for pcre/pcre.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcre_pcre_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pcre_pcre_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_pcre_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcre_pcre_h" >&6; } + +fi +if test $ac_cv_header_pcre_pcre_h = yes; then + + 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pcre_fullinfo" >/dev/null 2>&1; then + have_pcre=yes; cat >>confdefs.h <<\_ACEOF +#define PCRE_H_IN_SUBDIR 1 +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: pcre old version installed" >&5 +echo "$as_me: WARNING: pcre old version installed" >&2;}; have_pcre=no +fi +rm -f conftest* + + +else + have_pcre=no +fi + + + +fi + + + +else + have_pcre=no +fi + + +{ echo "$as_me:$LINENO: checking for regcomp in -lpcreposix" >&5 +echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6; } +if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpcreposix -lpcre $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 regcomp (); +int +main () +{ +return regcomp (); + ; + 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_lib_pcreposix_regcomp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pcreposix_regcomp=no +fi + +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_pcreposix_regcomp" >&5 +echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6; } +if test $ac_cv_lib_pcreposix_regcomp = yes; then + + if test "${ac_cv_header_pcreposix_h+set}" = set; then + { echo "$as_me:$LINENO: checking for pcreposix.h" >&5 +echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcreposix_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcreposix_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking pcreposix.h usability" >&5 +echo $ECHO_N "checking pcreposix.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_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 pcreposix.h presence" >&5 +echo $ECHO_N "checking pcreposix.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: pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pcreposix.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: pcreposix.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: pcreposix.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pcreposix.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pcreposix.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pcreposix.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pcreposix.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: pcreposix.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: pcreposix.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: pcreposix.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: pcreposix.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pcreposix.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: pcreposix.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: pcreposix.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for pcreposix.h" >&5 +echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcreposix_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pcreposix_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcreposix_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6; } + +fi +if test $ac_cv_header_pcreposix_h = yes; then + + 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pcreposix_regerror" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: WARNING: pcreposix old version installed" >&5 +echo "$as_me: WARNING: pcreposix old version installed" >&2;}; have_pcreposix=no +else + have_pcreposix=yes +fi +rm -f conftest* + + +else + + if test "${ac_cv_header_pcre_pcreposix_h+set}" = set; then + { echo "$as_me:$LINENO: checking for pcre/pcreposix.h" >&5 +echo $ECHO_N "checking for pcre/pcreposix.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcre_pcreposix_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_pcreposix_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcre_pcreposix_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking pcre/pcreposix.h usability" >&5 +echo $ECHO_N "checking pcre/pcreposix.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_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 pcre/pcreposix.h presence" >&5 +echo $ECHO_N "checking pcre/pcreposix.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: pcre/pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pcre/pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: pcre/pcreposix.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pcre/pcreposix.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pcre/pcreposix.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: pcre/pcreposix.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: pcre/pcreposix.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pcre/pcreposix.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: pcre/pcreposix.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: pcre/pcreposix.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for pcre/pcreposix.h" >&5 +echo $ECHO_N "checking for pcre/pcreposix.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcre_pcreposix_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pcre_pcreposix_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcre_pcreposix_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcre_pcreposix_h" >&6; } + +fi +if test $ac_cv_header_pcre_pcreposix_h = yes; then + + 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pcreposix_regerror" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: WARNING: pcreposix old version installed" >&5 +echo "$as_me: WARNING: pcreposix old version installed" >&2;}; have_pcreposix=no +else + have_pcreposix=yes; cat >>confdefs.h <<\_ACEOF +#define PCREPOSIX_H_IN_SUBDIR 1 +_ACEOF + +fi +rm -f conftest* + + +else + have_pcreposix=no +fi + + + +fi + + + +else + have_pcreposix=no +fi + + +{ echo "$as_me:$LINENO: checking for pcrs_compile in -lpcrs" >&5 +echo $ECHO_N "checking for pcrs_compile in -lpcrs... $ECHO_C" >&6; } +if test "${ac_cv_lib_pcrs_pcrs_compile+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpcrs -lpcre $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 pcrs_compile (); +int +main () +{ +return pcrs_compile (); + ; + 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_lib_pcrs_pcrs_compile=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pcrs_pcrs_compile=no +fi + +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_pcrs_pcrs_compile" >&5 +echo "${ECHO_T}$ac_cv_lib_pcrs_pcrs_compile" >&6; } +if test $ac_cv_lib_pcrs_pcrs_compile = yes; then + if test "${ac_cv_header_pcrs_h+set}" = set; then + { echo "$as_me:$LINENO: checking for pcrs.h" >&5 +echo $ECHO_N "checking for pcrs.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcrs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcrs_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcrs_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking pcrs.h usability" >&5 +echo $ECHO_N "checking pcrs.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_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 pcrs.h presence" >&5 +echo $ECHO_N "checking pcrs.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: pcrs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pcrs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pcrs.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: pcrs.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: pcrs.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pcrs.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pcrs.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pcrs.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pcrs.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: pcrs.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: pcrs.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: pcrs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: pcrs.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pcrs.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: pcrs.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: pcrs.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for pcrs.h" >&5 +echo $ECHO_N "checking for pcrs.h... $ECHO_C" >&6; } +if test "${ac_cv_header_pcrs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pcrs_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_pcrs_h" >&5 +echo "${ECHO_T}$ac_cv_header_pcrs_h" >&6; } + +fi +if test $ac_cv_header_pcrs_h = yes; then + have_pcrs=yes +else + have_pcrs=no +fi + + +else + have_pcrs=no +fi + + + +cat >>confdefs.h <<\_ACEOF +#define __MT__ 1 +_ACEOF + + + +# Check whether --enable-toggle was given. +if test "${enable_toggle+set}" = set; then + enableval=$enable_toggle; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_TOGGLE 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_TOGGLE 1 +_ACEOF + +fi + + +# Check whether --enable-force was given. +if test "${enable_force+set}" = set; then + enableval=$enable_force; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_FORCE_LOAD 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_FORCE_LOAD 1 +_ACEOF + +fi + + +# Check whether --enable-fast-redirects was given. +if test "${enable_fast_redirects+set}" = set; then + enableval=$enable_fast_redirects; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_FAST_REDIRECTS 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_FAST_REDIRECTS 1 +_ACEOF + +fi + + +# Check whether --enable-killpopup was given. +if test "${enable_killpopup+set}" = set; then + enableval=$enable_killpopup; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_KILL_POPUPS 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_KILL_POPUPS 1 +_ACEOF + +fi + + +# Check whether --enable-stats was given. +if test "${enable_stats+set}" = set; then + enableval=$enable_stats; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_STATISTICS 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_STATISTICS 1 +_ACEOF + +fi + + +# Check whether --enable-ie-images was given. +if test "${enable_ie_images+set}" = set; then + enableval=$enable_ie_images; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_IMAGE_DETECT_MSIE 1 +_ACEOF + +fi +fi + + +# Check whether --enable-image-blocking was given. +if test "${enable_image_blocking+set}" = set; then + enableval=$enable_image_blocking; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_IMAGE_BLOCKING 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_IMAGE_BLOCKING 1 +_ACEOF + +fi + + +# Check whether --enable-acl-files was given. +if test "${enable_acl_files+set}" = set; then + enableval=$enable_acl_files; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_ACL 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_ACL 1 +_ACEOF + +fi + + +# Check whether --enable-trust-files was given. +if test "${enable_trust_files+set}" = set; then + enableval=$enable_trust_files; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_TRUST 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_TRUST 1 +_ACEOF + +fi + + +# Check whether --enable-jar-files was given. +if test "${enable_jar_files+set}" = set; then + enableval=$enable_jar_files; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_COOKIE_JAR 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_COOKIE_JAR 1 +_ACEOF + +fi + + +# Check whether --enable-editor was given. +if test "${enable_editor+set}" = set; then + enableval=$enable_editor; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_CGI_EDIT_ACTIONS 1 +_ACEOF + +fi +else + cat >>confdefs.h <<\_ACEOF +#define FEATURE_CGI_EDIT_ACTIONS 1 +_ACEOF + +fi + + +# Check whether --enable-no-gifs was given. +if test "${enable_no_gifs+set}" = set; then + enableval=$enable_no_gifs; if test $enableval = yes; then + cat >>confdefs.h <<\_ACEOF +#define FEATURE_NO_GIFS 1 +_ACEOF + +fi +fi + + + + +# Check whether --enable-dynamic-pcre was given. +if test "${enable_dynamic_pcre+set}" = set; then + enableval=$enable_dynamic_pcre; if test $enableval = "no"; then have_pcre=no; fi +fi + + +# Check whether --enable-dynamic-pcrs was given. +if test "${enable_dynamic_pcrs+set}" = set; then + enableval=$enable_dynamic_pcrs; if test $enableval = "no"; then have_pcrs=no; fi +fi + + + +# If we have libpcre and either we also have pcreposix or +# we don't need pcreposix, then link pcre dynamically; else +# build it and link statically +# +if test $have_pcre = "yes"; then + echo "using libpcre" + pcre_dyn=yes + STATIC_PCRE_ONLY=# + LIBS="$LIBS -lpcre -lpcreposix" +else + echo "using built-in static pcre" + pcre_dyn=no + cat >>confdefs.h <<\_ACEOF +#define STATIC_PCRE 1 +_ACEOF + + STATIC_PCRE_ONLY= +fi + +# If we have libpcrs and pcre is linked dynamically +# then also link pcrs dynamically, else build and link +# pcrs statically +# +if test $have_pcrs = "yes" -a $pcre_dyn = "yes"; then + echo "using libpcrs" + STATIC_PCRS_ONLY=# + LIBS="$LIBS -lpcrs" +else + echo "using built-in static pcrs" + cat >>confdefs.h <<\_ACEOF +#define STATIC_PCRS 1 +_ACEOF + + STATIC_PCRS_ONLY= +fi + + + + + +CFLAGS=$old_CFLAGS_nospecial + + + + +ac_config_files="$ac_config_files GNUmakefile doc/source/ldp.dsl" + +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}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_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 $as_me, which was +generated by GNU Autoconf 2.61-MirPorts-0. 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" +config_headers="$ac_config_headers" + +_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 + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.61-MirPorts-0, + 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' +_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;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$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; }; };; + --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 + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;; + "doc/source/ldp.dsl") CONFIG_FILES="$CONFIG_FILES doc/source/ldp.dsl" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason 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 +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 +VERSION_MAJOR!$VERSION_MAJOR$ac_delim +VERSION_MINOR!$VERSION_MINOR$ac_delim +VERSION_POINT!$VERSION_POINT$ac_delim +CODE_STATUS!$CODE_STATUS$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 +CPP!$CPP$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +LN_S!$LN_S$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +AWK!$AWK$ac_delim +GDB!$GDB$ac_delim +BGROUPS!$BGROUPS$ac_delim +ID!$ID$ac_delim +USER!$USER$ac_delim +GROUP!$GROUP$ac_delim +WIN_ONLY!$WIN_ONLY$ac_delim +WDUMP!$WDUMP$ac_delim +DB2HTML!$DB2HTML$ac_delim +RPMBIN!$RPMBIN$ac_delim +RPM_BASE!$RPM_BASE$ac_delim +JADEBIN!$JADEBIN$ac_delim +MAN2HTML!$MAN2HTML$ac_delim +DOC_STATUS!$DOC_STATUS$ac_delim +JADECAT!$JADECAT$ac_delim +DKPREFIX!$DKPREFIX$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +PTHREAD_ONLY!$PTHREAD_ONLY$ac_delim +SOCKET_LIB!$SOCKET_LIB$ac_delim +AMIGAOS_ONLY!$AMIGAOS_ONLY$ac_delim +STATIC_PCRE_ONLY!$STATIC_PCRE_ONLY$ac_delim +STATIC_PCRS_ONLY!$STATIC_PCRS_ONLY$ac_delim +SPECIAL_CFLAGS!$SPECIAL_CFLAGS$ac_delim +PTHREAD_LIB!$PTHREAD_LIB$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` = 89; 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 :H $CONFIG_HEADERS +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 +_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 +$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 + ;; + :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;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" + ;; + + + 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/package/procmail/Makefile b/package/procmail/Makefile index ead1496f0..f8c3d2542 100644 --- a/package/procmail/Makefile +++ b/package/procmail/Makefile @@ -16,6 +16,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PROCMAIL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + TCFLAGS+= -DPROCMAIL do-build: diff --git a/package/procmail/extra/Makefile.new b/package/procmail/extra/Makefile.new deleted file mode 100644 index 3f8ed3ab2..000000000 --- a/package/procmail/extra/Makefile.new +++ /dev/null @@ -1,19 +0,0 @@ -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/package/procmail/src/Makefile.new b/package/procmail/src/Makefile.new new file mode 100644 index 000000000..3f8ed3ab2 --- /dev/null +++ b/package/procmail/src/Makefile.new @@ -0,0 +1,19 @@ +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/package/procps/Makefile b/package/procps/Makefile index a917a7009..3e4a90250 100644 --- a/package/procps/Makefile +++ b/package/procps/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= procps PKG_VERSION:= 3.2.7 PKG_RELEASE:= 4 -PKG_BUILDDEP+= ncurses PKG_MD5SUM:= f490bca772b16472962c7b9f23b1e97d PKG_DESCR:= The /proc file system utilities PKG_SECTION:= utils PKG_DEPENDS:= libncurses +PKG_BUILDDEP+= ncurses PKG_URL:= http://procps.sourceforge.net PKG_SITES:= http://procps.sourceforge.net/ @@ -18,8 +18,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PROCPS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual post-install: ${INSTALL_DIR} ${IDIR_PROCPS}/{bin,sbin,usr/bin} diff --git a/package/proftpd/Makefile b/package/proftpd/Makefile index 4dcd04eca..d74ff9e35 100644 --- a/package/proftpd/Makefile +++ b/package/proftpd/Makefile @@ -9,6 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 4918908fcae9e591ba84c66edff73410 PKG_DESCR:= An advanced and very configurable FTP server PKG_SECTION:= utils +PKG_NOPARALLEL:= 1 PKG_URL:= http://www.proftpd.org/ PKG_SITES:= ftp://ftp.proftpd.org/distrib/source/ @@ -16,12 +17,9 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,PROFTPD,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-cap CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes \ ac_cv_func_setgrent_void=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_PROFTPD)/etc diff --git a/package/ptunnel/Makefile b/package/ptunnel/Makefile index 9389aa5bc..4018ffac8 100644 --- a/package/ptunnel/Makefile +++ b/package/ptunnel/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ptunnel PKG_VERSION:= 0.61 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap PKG_MD5SUM:= b45f73875f2af48f101816672f83a5fe PKG_DESCR:= Tunnel TCP connections over ICMP packets PKG_SECTION:= net PKG_DEPENDS:= libpcap libpthread +PKG_BUILDDEP+= libpcap PKG_URL:= http://www.cti.ecp.fr/~beauxir5/ptunnel/ PKG_SITES:= http://www.cti.ecp.fr/~beauxir5/ptunnel/ @@ -18,12 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PTUNNEL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= BUILD_CC="${TARGET_CC}" \ ac_cv_linux_vers=2 \ td_cv_buggygetaddrinfo="no" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_PTUNNEL}/usr/sbin diff --git a/package/python/Makefile b/package/python/Makefile index 7d087dd1d..7c313dcad 100644 --- a/package/python/Makefile +++ b/package/python/Makefile @@ -25,14 +25,10 @@ MAKE_ENV+= OPT="$(TARGET_CFLAGS)" \ HOSTPYTHON=./hostpython \ HOSTPGEN=./Parser/hostpgen \ PYTHON_DISABLE_MODULES="$(DISMOD)" - -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= OPT="$(TARGET_CFLAGS)" CONFIGURE_ARGS:= --with-threads \ --with-system-ffi \ --without-cxx-main -BUILD_STYLE:= auto -INSTALL_STYLE:= auto pre-configure: (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \ diff --git a/package/quagga/Makefile b/package/quagga/Makefile index 0f57fb919..1c6e43862 100644 --- a/package/quagga/Makefile +++ b/package/quagga/Makefile @@ -34,7 +34,6 @@ $(eval $(call PKG_template,QUAGGA_RIPNGD,quagga-ripngd,${PKG_VERSION}-${PKG_RELE $(eval $(call PKG_template,QUAGGA_RIPD,quagga-ripd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_5},${PKG_SECTION})) $(eval $(call PKG_template,QUAGGA_VTYSH,quagga-vtysh,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_6},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= quagga_cv_ipforward_method="proc" CONFIGURE_ARGS+= --localstatedir=/var/run/quagga \ --sysconfdir=/etc/quagga \ @@ -43,8 +42,6 @@ CONFIGURE_ARGS+= --localstatedir=/var/run/quagga \ --enable-group=quagga \ --disable-pie \ --enable-multipath=8 -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_QUAGGA}/usr/{lib,sbin} diff --git a/package/raddump/Makefile b/package/raddump/Makefile index 9a84d3bd6..d681a2f7c 100755 --- a/package/raddump/Makefile +++ b/package/raddump/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= raddump PKG_VERSION:= 0.3.1 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl libpcap PKG_MD5SUM:= f8c29c67141ea78bb6ae8b97d5149480 PKG_DESCR:= interprets captured RADIUS packets PKG_SECTION:= net PKG_DEPENDS:= libpcap libopenssl +PKG_BUILDDEP+= openssl libpcap PKG_URL:= http://sourceforge.net/projects/raddump PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=raddump/} @@ -18,9 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RADDUMP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_RADDUMP}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/raddump ${IDIR_RADDUMP}/usr/bin diff --git a/package/radvd/Makefile b/package/radvd/Makefile index 0cfab4506..9ac4deffc 100644 --- a/package/radvd/Makefile +++ b/package/radvd/Makefile @@ -20,12 +20,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RADVD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-configfile=/etc/radvd.conf \ --with-logfile=/var/log/radvd.log \ --with-pidfile=/var/run/radvd.pid -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_RADVD}/etc ${IDIR_RADVD}/usr/sbin diff --git a/package/randrproto/Makefile b/package/randrproto/Makefile index ec7da9684..fd022fe54 100644 --- a/package/randrproto/Makefile +++ b/package/randrproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 15266124b9e2dfcfb25ce6cba24cdd66 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/rarpd/Makefile b/package/rarpd/Makefile index b7805f693..a4faf0e57 100644 --- a/package/rarpd/Makefile +++ b/package/rarpd/Makefile @@ -17,12 +17,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RARPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-libnet="${STAGING_DIR}/usr" \ --with-pcap="${STAGING_DIR}/usr" TCFLAGS+= -DNEW_LIBNET_INTERFACE -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_RARPD}/usr/sbin diff --git a/package/rdate/Makefile b/package/rdate/Makefile index f35a8e851..fa5bde688 100644 --- a/package/rdate/Makefile +++ b/package/rdate/Makefile @@ -17,11 +17,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RDATE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual + MAKE_FILE= GNUmakefile -BUILD_STYLE= auto -do-install: +post-install: ${INSTALL_DIR} ${IDIR_RDATE}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/rdate ${IDIR_RDATE}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/rdate ${IDIR_RDATE}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/rdate/patches/patch-GNUmakefile b/package/rdate/patches/patch-GNUmakefile new file mode 100644 index 000000000..2cea98ffa --- /dev/null +++ b/package/rdate/patches/patch-GNUmakefile @@ -0,0 +1,12 @@ +--- rdate.orig/GNUmakefile 2007-08-16 12:45:06.000000000 +0200 ++++ rdate/GNUmakefile 2010-02-06 02:36:00.723431141 +0100 +@@ -15,8 +15,7 @@ CPPFLAGS+= -D'__RCSID(x)=static const ch + all: rdate + + install: +- install -c -s -m 555 rdate ${DESTDIR}${BINDIR}/ +- install -c -m 444 rdate.8 ${DESTDIR}${MANDIR}/man8/ ++ install -c -m 755 rdate ${DESTDIR}${BINDIR}/ + + clean: + -rm -f rdate *.o diff --git a/package/readline/Makefile b/package/readline/Makefile index 68f68cbea..644a87271 100644 --- a/package/readline/Makefile +++ b/package/readline/Makefile @@ -6,21 +6,18 @@ include ${TOPDIR}/rules.mk PKG_NAME:= readline PKG_VERSION:= 5.2 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses PKG_MD5SUM:= e39331f32ad14009b9ff49cc10c5e751 PKG_DESCR:= Command line editing library PKG_SECTION:= libs PKG_DEPENDS:= libncurses +PKG_BUILDDEP+= ncurses PKG_SITES:= ${MASTER_SITE_GNU:=readline/} include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBREADLINE,libreadline,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-curses -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBREADLINE}/usr/lib diff --git a/package/reaim/Makefile b/package/reaim/Makefile index 7b55eeed4..2d0633235 100644 --- a/package/reaim/Makefile +++ b/package/reaim/Makefile @@ -17,8 +17,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,REAIM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual post-install: ${INSTALL_DIR} ${IDIR_REAIM}/usr/sbin diff --git a/package/renderproto/Makefile b/package/renderproto/Makefile index afb008a2f..f2a7beae7 100644 --- a/package/renderproto/Makefile +++ b/package/renderproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 57216f25b9a5edc561b83a7484cb17e8 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/resourceproto/Makefile b/package/resourceproto/Makefile index 768c8d332..770d1b203 100644 --- a/package/resourceproto/Makefile +++ b/package/resourceproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 587333b4995a3e11ebe4c8ba2742efaf PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/rng-tools/Makefile b/package/rng-tools/Makefile index 6e0769681..126de7f48 100644 --- a/package/rng-tools/Makefile +++ b/package/rng-tools/Makefile @@ -18,10 +18,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,RNG_TOOLS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_RNG_TOOLS)/usr/sbin $(INSTALL_BIN) $(WRKINST)/usr/sbin/rngd $(IDIR_RNG_TOOLS)/usr/sbin diff --git a/package/rp-pppoe/Makefile b/package/rp-pppoe/Makefile index c79f76869..a507e4a39 100644 --- a/package/rp-pppoe/Makefile +++ b/package/rp-pppoe/Makefile @@ -22,19 +22,18 @@ $(eval $(call PKG_template,PPPOE_RELAY,pppoe-relay,${PKG_VERSION}-${PKG_RELEASE} $(eval $(call PKG_template,PPPOE_SERVER,pppoe-server,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,PPPOE_SNIFF,pppoe-sniff,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_func_setvbuf_reversed=no \ ac_cv_sizeof_unsigned_short=2 \ ac_cv_sizeof_unsigned_int=4 \ ac_cv_sizeof_unsigned_long=4 \ ac_cv_linux_kernel_pppoe=yes \ ac_cv_pack_bitfields_reversed=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: - ${INSTALL_DIR} ${IDIR_PPPOE_CLIENT}/etc/ppp ${IDIR_PPPOE_CLIENT}/usr/sbin - ${INSTALL_DATA} ${WRKINST}/etc/ppp/pppoe.conf ${IDIR_PPPOE_CLIENT}/etc/ppp + ${INSTALL_DIR} ${IDIR_PPPOE_CLIENT}/etc/ppp \ + ${IDIR_PPPOE_CLIENT}/usr/sbin + ${INSTALL_DATA} ${WRKINST}/etc/ppp/pppoe.conf \ + ${IDIR_PPPOE_CLIENT}/etc/ppp ${CP} ${WRKINST}/usr/sbin/pppoe ${IDIR_PPPOE_CLIENT}/usr/sbin/ ${CP} ${WRKINST}/usr/sbin/pppoe-connect ${IDIR_PPPOE_CLIENT}/usr/sbin/ ${CP} ${WRKINST}/usr/sbin/pppoe-start ${IDIR_PPPOE_CLIENT}/usr/sbin/ @@ -42,11 +41,16 @@ post-install: ${CP} ${WRKINST}/usr/sbin/pppoe-status ${IDIR_PPPOE_CLIENT}/usr/sbin/ ${CP} ${WRKINST}/usr/sbin/pppoe-setup ${IDIR_PPPOE_CLIENT}/usr/sbin/ ${INSTALL_DIR} ${IDIR_PPPOE_RELAY}/usr/sbin - ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-relay ${IDIR_PPPOE_RELAY}/usr/sbin/ - ${INSTALL_DIR} ${IDIR_PPPOE_SERVER}/etc/ppp ${IDIR_PPPOE_SERVER}/usr/sbin - ${INSTALL_DATA} ${WRKINST}/etc/ppp/pppoe-server-options ${IDIR_PPPOE_SERVER}/etc/ppp/ - ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-server ${IDIR_PPPOE_SERVER}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-relay \ + ${IDIR_PPPOE_RELAY}/usr/sbin/ + ${INSTALL_DIR} ${IDIR_PPPOE_SERVER}/etc/ppp \ + ${IDIR_PPPOE_SERVER}/usr/sbin + ${INSTALL_DATA} ${WRKINST}/etc/ppp/pppoe-server-options \ + ${IDIR_PPPOE_SERVER}/etc/ppp/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-server \ + ${IDIR_PPPOE_SERVER}/usr/sbin/ ${INSTALL_DIR} ${IDIR_PPPOE_SNIFF}/usr/sbin - ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-sniff ${IDIR_PPPOE_SNIFF}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-sniff \ + ${IDIR_PPPOE_SNIFF}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/rpcbind/Makefile b/package/rpcbind/Makefile index 6afd4b8bd..ee939d08d 100644 --- a/package/rpcbind/Makefile +++ b/package/rpcbind/Makefile @@ -21,10 +21,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,RPCBIND,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TCFLAGS+= -I${STAGING_DIR}/usr/include/tirpc -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-libwrap -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_RPCBIND)/usr/bin diff --git a/package/rpcbind/patches/patch-config_h_in b/package/rpcbind/patches/patch-config_h_in new file mode 100644 index 000000000..0eeab0c48 --- /dev/null +++ b/package/rpcbind/patches/patch-config_h_in @@ -0,0 +1,12 @@ +--- rpcbind-0.2.0.orig/config.h.in 2009-05-29 18:37:50.000000000 +0200 ++++ rpcbind-0.2.0/config.h.in 2010-02-06 01:51:38.000000000 +0100 +@@ -96,6 +96,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 + diff --git a/package/rpcbind/patches/patch-src_rpcbind_c b/package/rpcbind/patches/patch-src_rpcbind_c new file mode 100644 index 000000000..358bdc0c0 --- /dev/null +++ b/package/rpcbind/patches/patch-src_rpcbind_c @@ -0,0 +1,14 @@ +--- rpcbind-0.2.0.orig/src/rpcbind.c 2009-05-29 15:38:22.000000000 +0200 ++++ rpcbind-0.2.0/src/rpcbind.c 2010-02-06 01:54:03.194325296 +0100 +@@ -67,7 +67,11 @@ + #include + #include + #include ++#if defined(__UCLIBC__) ++#define __nss_configure_lookup(x,y) ++#else + #include ++#endif + #include "config.h" + #include "rpcbind.h" + diff --git a/package/rpcbind/patches/patch-src_security_c b/package/rpcbind/patches/patch-src_security_c new file mode 100644 index 000000000..d7a5582d9 --- /dev/null +++ b/package/rpcbind/patches/patch-src_security_c @@ -0,0 +1,41 @@ +--- rpcbind-0.2.0.orig/src/security.c 2009-05-29 15:38:22.000000000 +0200 ++++ rpcbind-0.2.0/src/security.c 2010-02-06 01:55:37.383094004 +0100 +@@ -20,12 +20,38 @@ + /* + * XXX for special case checks in check_callit. + */ ++#if defined(__UCLIBC__) ++ ++#define MOUNTPROC_MNT 1 ++#define MOUNTPROC_UMNT 3 ++ ++#define NFS_PROGRAM 100003 ++#define YPPROG 100004 ++#define MOUNTPROG 100005 ++#define YPBINDPROG 100007 ++#define YPPASSWDPROG 100009 ++#define RQUOTAPROG 100011 ++ ++#define YPPROC_NULL 0 ++#define YPPROC_DOMAIN 1 ++#define YPPROC_DOMAIN_NONACK 2 ++#define YPPROC_MATCH 3 ++#define YPPROC_FIRST 4 ++#define YPPROC_NEXT 5 ++#define YPPROC_XFR 6 ++#define YPPROC_CLEAR 7 ++#define YPPROC_ALL 8 ++ ++#define YPBINDPROC_SETDOM 2 ++ ++#else + #include + #include + #include + #include + #include + #include ++#endif + + #include "rpcbind.h" + diff --git a/package/rpm/Makefile b/package/rpm/Makefile index 49c7f8339..fa931b5ba 100644 --- a/package/rpm/Makefile +++ b/package/rpm/Makefile @@ -23,11 +23,8 @@ $(eval $(call PKG_template,RPM,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_D TCPPFLAGS+= -I${STAGING_DIR}/usr/include/nspr \ -I${STAGING_DIR}/usr/include/nss -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS:= --with-external-db \ --without-lua -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_RPM)/usr/bin $(IDIR_RPM)/usr/lib diff --git a/package/rrdcollect/Makefile b/package/rrdcollect/Makefile index 78c67ebab..8a73aa105 100644 --- a/package/rrdcollect/Makefile +++ b/package/rrdcollect/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= rrdcollect PKG_VERSION:= 0.2.3 PKG_RELEASE:= 8 -PKG_BUILDDEP+= rrdtool PKG_MD5SUM:= 5e4305c612bc3cccbaf802c275c81a11 PKG_DESCR:= Round-Robin Database (RRD) collecting daemon PKG_SECTION:= admin PKG_DEPENDS:= librrd +PKG_BUILDDEP+= rrdtool PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=rrdcollect/} ifneq (${ADK_PACKAGE_LIBRRD},) @@ -22,27 +22,27 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RRDCOLLECT,rrdcollect,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,RRDCOLLECT_EXAMPLE,rrdcollect-example,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -CONFIGURE_ENV+= LIBS="${RRDTOOL_LIBS} -lz" ac_cv_func_malloc_0_nonnull=yes +CONFIGURE_ENV+= LIBS="${RRDTOOL_LIBS} -lz" \ + ac_cv_func_malloc_0_nonnull=yes CONFIGURE_ARGS+= --enable-exec \ --without-rrdtool \ --with-librrd \ --without-libpcre \ --without-libpcap TCFLAGS+= -DSOCKET_COMM -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_RRDCOLLECT}/usr/sbin - ${INSTALL_BIN} ${WRKINST}/usr/sbin/rrdcollect ${IDIR_RRDCOLLECT}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/rrdcollect \ + ${IDIR_RRDCOLLECT}/usr/sbin/ ${INSTALL_DIR} ${IDIR_RRDCOLLECT_EXAMPLE}/etc ${INSTALL_DATA} ./files/rrd.conf ./files/rrdcollect.conf \ ${IDIR_RRDCOLLECT_EXAMPLE}/etc/ ${INSTALL_DIR} ${IDIR_RRDCOLLECT_EXAMPLE}/usr/bin ${INSTALL_BIN} ./files/rrd.sh ${IDIR_RRDCOLLECT_EXAMPLE}/usr/bin/ ${INSTALL_DIR} ${IDIR_RRDCOLLECT_EXAMPLE}/www/cgi-bin - ln -sf /var/lib/rrdcollect/rrd.cgi ${IDIR_RRDCOLLECT_EXAMPLE}/www/cgi-bin/rrd.cgi + ln -sf /var/lib/rrdcollect/rrd.cgi \ + ${IDIR_RRDCOLLECT_EXAMPLE}/www/cgi-bin/rrd.cgi ln -sf /var/lib/rrdcollect/img ${IDIR_RRDCOLLECT_EXAMPLE}/www/img include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/rrdtool/Makefile b/package/rrdtool/Makefile index 6c729367e..268a108ff 100644 --- a/package/rrdtool/Makefile +++ b/package/rrdtool/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= rrdtool PKG_VERSION:= 1.2.30 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libxml2 cgilib freetype libart libpng PKG_MD5SUM:= 19b24f7184a8dbf7b48c1bbb565ad9fb PKG_DESCR:= Round Robin Database (RRD) management library and tools PKG_SECTION:= libs PKG_DEPENDS:= libart libfreetype libpng zlib +PKG_BUILDDEP+= libxml2 cgilib freetype libart libpng PKG_SITES:= http://oss.oetiker.ch/rrdtool/pub/ include ${TOPDIR}/mk/package.mk @@ -19,7 +19,6 @@ $(eval $(call PKG_template,LIBRRD,librrd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEP $(eval $(call PKG_template,RRDCGI,rrdcgi,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,RRDTOOL,rrdtool,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= rd_cv_ieee_works=yes CONFIGURE_ARGS+= --enable-rrdcgi \ --disable-mmap \ @@ -30,8 +29,6 @@ CONFIGURE_ARGS+= --enable-rrdcgi \ --without-x \ --with-rrd-default-font=/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf TCPPFLAGS+= -I${STAGING_DIR}/usr/include/freetype2 -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_RRDTOOL}/usr/bin diff --git a/package/rrs/Makefile b/package/rrs/Makefile index 6f45be506..077943b5a 100644 --- a/package/rrs/Makefile +++ b/package/rrs/Makefile @@ -6,14 +6,14 @@ include ${TOPDIR}/rules.mk PKG_NAME:= rrs PKG_VERSION:= 1.70 PKG_RELEASE:= 2 -PKG_BUILDDEP+= zlib +PKG_MD5SUM:= b400d03c0e39e3e78a7327ba78f789f0 +PKG_DESCR:= A reverse (connecting) remote shell, with SSL support. +PKG_SECTION:= net PKG_CXX:= RRS +PKG_BUILDDEP+= zlib ifneq ($(ADK_PACKAGE_RRS),) PKG_BUILDDEP+= openssl endif -PKG_MD5SUM:= b400d03c0e39e3e78a7327ba78f789f0 -PKG_DESCR:= A reverse (connecting) remote shell, with SSL support. -PKG_SECTION:= net PKG_URL:= http://www.cycom.se/dl/rrs PKG_SITES:= http://www.cycom.se/uploads/36/19/ @@ -31,6 +31,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RRS,rrs,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,RRS_NOSSL,rrs-nossl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_NOSSL},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + ifeq ($(ADK_COMPILE_RRS_WITH_UCLIBCXX),y) PKG_FLAGS=-fno-builtin -fno-rtti -nostdinc++ -fPIC PKG_LDFLAGS=-nodefaultlibs -luClibc++ -lc -lm @@ -39,7 +43,7 @@ PKG_FLAGS=-fPIC PKG_LDFLAGS=-shared endif -do-configure: +do-build: ifneq (${ADK_PACKAGE_RRS},) ${MAKE} -C ${WRKBUILD} \ CC="${TARGET_CC}" \ diff --git a/package/rsync/Makefile b/package/rsync/Makefile index b34584534..2b804f534 100644 --- a/package/rsync/Makefile +++ b/package/rsync/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= rsync PKG_VERSION:= 3.0.6 PKG_RELEASE:= 1 -PKG_BUILDDEP+= popt PKG_MD5SUM:= e9865d093a18e4668b9d31b635dc8e99 PKG_DESCR:= utility that provides fast incremental file transfer PKG_SECTION:= net PKG_DEPENDS:= libpopt +PKG_BUILDDEP+= popt PKG_URL:= http://rsync.samba.org PKG_SITES:= http://rsync.samba.org/ftp/rsync/ @@ -18,10 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RSYNC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_RSYNC}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/rsync ${IDIR_RSYNC}/usr/bin diff --git a/package/rtorrent/Makefile b/package/rtorrent/Makefile index a36c187b3..e7829d172 100644 --- a/package/rtorrent/Makefile +++ b/package/rtorrent/Makefile @@ -6,29 +6,18 @@ include ${TOPDIR}/rules.mk PKG_NAME:= rtorrent PKG_VERSION:= 0.8.5 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses libtorrent curl PKG_MD5SUM:= e701095e1824b7e512a17000f4c0a783 PKG_DESCR:= console torrent application PKG_SECTION:= net PKG_DEPENDS:= libncurses libtorrent libcurl +PKG_BUILDDEP+= ncurses libtorrent curl PKG_URL:= http://libtorrent.rakshasa.no PKG_SITES:= http://libtorrent.rakshasa.no/downloads/ -#PKG_CXX:= RTORRENT include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RTORRENT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -#ifeq ($(ADK_COMPILE_RTORRENT_WITH_UCLIBCXX),y) -#CONFIGURE_ENV+= CXXFLAGS="-fno-builtin -fno-rtti -nostdinc++ \ -# -I${STAGING_DIR}/usr/include/uClibc++" \ -# LIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc" -#endif - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_RTORRENT}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/rtorrent ${IDIR_RTORRENT}/usr/bin diff --git a/package/ruby/Makefile b/package/ruby/Makefile index 4bda5691e..35835b9b3 100644 --- a/package/ruby/Makefile +++ b/package/ruby/Makefile @@ -4,11 +4,12 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ruby -PKG_VERSION:= 1.9.1-p243 +PKG_VERSION:= 1.9.1-p378 PKG_RELEASE:= 1 -PKG_MD5SUM:= 515bfd965814e718c0943abf3dde5494 +PKG_MD5SUM:= 9fc5941bda150ac0a33b299e1e53654c PKG_DESCR:= interpreter for the ruby language PKG_SECTION:= net +PKG_NOPARALLEL:= 1 PKG_URL:= http://www.ruby-lang.org PKG_SITES:= ftp://ftp.ruby-lang.org/pub/ruby/1.9/ @@ -18,18 +19,15 @@ $(eval $(call PKG_template,RUBY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_ MAKE_FILE:= GNUmakefile XAKE_FLAGS+= optflags='' debugflags='' -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-wide-getaddrinfo # uClibc setpgrp does not take arguments CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto INSTALL_TARGET:= install-nodoc # Enable some ruby extension / options post-configure: #echo "option nodynamic" >> ${WRKBUILD}/ext/Setup - echo "socket" >> ${WRKBUILD}/ext/Setup + #echo "socket" >> ${WRKBUILD}/ext/Setup post-install: rm ${WRKINST}/usr/lib/*.a diff --git a/package/rxvt-unicode/Makefile b/package/rxvt-unicode/Makefile index e6ac62eb3..0ddc09efe 100644 --- a/package/rxvt-unicode/Makefile +++ b/package/rxvt-unicode/Makefile @@ -20,11 +20,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,RXVT_UNICODE,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-perl \ --disable-utmp -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_RXVT_UNICODE)/usr/bin diff --git a/package/samba/Makefile b/package/samba/Makefile index 69ccdef14..e953e2253 100644 --- a/package/samba/Makefile +++ b/package/samba/Makefile @@ -4,14 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= samba -PKG_VERSION:= 3.4.3 +PKG_VERSION:= 3.4.5 PKG_RELEASE:= 1 -PKG_MD5SUM:= 322379680c12057f57685652a35a6b05 +PKG_MD5SUM:= 8e8a484782f2b7716b6c6bd9a7d2bf71 PKG_DESCR:= NetBIOS/SMB file and print server PKG_SECTION:= net PKG_URL:= http://www.samba.org -PKG_SITES:= ftp://se.samba.org/pub/samba/stable/ \ - ftp://ftp.easynet.be/samba/stable/ +PKG_SITES:= http://samba.org/samba/ftp/stable/ WRKSRC= ${WRKDIST}/source3 @@ -22,7 +21,6 @@ $(eval $(call PKG_template,SAMBA_CLIENT,samba-client,${PKG_VERSION}-${PKG_RELEAS $(eval $(call PKG_template,SAMBA_PASSWD,samba-passwd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TLDFLAGS+= -Wl,-rpath -Wl,/usr/lib/samba - CONFIGURE_ENV+= samba_cv_CC_NEGATIVE_ENUM_VALUES=no \ samba_cv_USE_SETRESUID=no \ ac_cv_lib_ext_nsl_connect=no \ @@ -44,10 +42,6 @@ CONFIGURE_ARGS+= --libdir=/usr/lib/samba \ --without-cluster-support \ --without-sendfile-support -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_SAMBA}/etc/samba ${IDIR_SAMBA}/usr/sbin ${INSTALL_DIR} ${IDIR_SAMBA}/usr/lib/samba/{charset,vfs} diff --git a/package/sane-backends/Makefile b/package/sane-backends/Makefile index abb31e847..4433e34ad 100644 --- a/package/sane-backends/Makefile +++ b/package/sane-backends/Makefile @@ -154,12 +154,9 @@ $(eval $(call PKG_mod_template,SANE_BACKEND_UMAX_PP,umax_pp)) $(eval $(call PKG_mod_template,SANE_BACKEND_UMAX,umax)) CONFIGURE_ENV+= ac_cv_func_ioperm=no -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-translations \ --without-gphoto2 \ --enable-libusb -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${INSTALL_DIR} ${IDIR_SANE_BACKENDS}/etc/sane.d diff --git a/package/sangam-atm/Makefile b/package/sangam-atm/Makefile index 52cb218fe..4277fb7c7 100644 --- a/package/sangam-atm/Makefile +++ b/package/sangam-atm/Makefile @@ -19,8 +19,9 @@ include ${TOPDIR}/mk/kernel-vars.mk $(eval $(call PKG_template,KMOD_SANGAM_ATM,kmod-sangam-atm,${KERNEL_VERSION}+${PKG_VERSION}-${ADK_TARGET}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= manual -INSTALL_STYLE:= manual +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual do-build: $(MAKE) ${KERNEL_MAKE_OPTS} LDFLAGS="" SUBDIRS="${WRKBUILD}" modules diff --git a/package/scanlogd/Makefile b/package/scanlogd/Makefile index 9d06cfc3d..b21bfa94e 100644 --- a/package/scanlogd/Makefile +++ b/package/scanlogd/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= scanlogd PKG_VERSION:= 2.2.6 PKG_RELEASE:= 8 -PKG_BUILDDEP+= libpcap libnids libnet PKG_MD5SUM:= 7b8187ea718ebe47f22805b921b909ab PKG_DESCR:= Portscan logger PKG_SECTION:= net PKG_DEPENDS:= libpcap libnet libnids +PKG_BUILDDEP+= libpcap libnids libnet PKG_URL:= http://www.openwall.com/scanlogd PKG_SITES:= http://www.openwall.com/scanlogd/ \ ftp://ftp.wiretapped.net/pub/openwall/ \ @@ -20,8 +20,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SCANLOGD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -MAKE_FLAGS+= CC="${TARGET_CC}" LD="${TARGET_CC}" CFLAGS="-c ${TARGET_CFLAGS}" \ +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + +MAKE_FLAGS+= CC="${TARGET_CC}" LD="${TARGET_CC}" \ + CFLAGS="-c ${TARGET_CFLAGS}" \ LDFLAGS= \ PCAP_H="-I${STAGING_DIR}/usr/include" \ NIDS_H="-I${STAGING_DIR}/usr/include" \ diff --git a/package/screen/Makefile b/package/screen/Makefile index 01451b900..1f7b023f2 100644 --- a/package/screen/Makefile +++ b/package/screen/Makefile @@ -18,13 +18,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SCREEN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= $(foreach flag,rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime,ac_cv_func_${flag}=yes) CONFIGURE_ARGS+= --with-sys-screenrc=/etc/screenrc -BUILD_STYLE:= auto -do-install: +post-install: ${INSTALL_DIR} ${IDIR_SCREEN}/usr/bin - ${INSTALL_BIN} ${WRKBUILD}/screen ${IDIR_SCREEN}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/screen ${IDIR_SCREEN}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/scrnsaverproto/Makefile b/package/scrnsaverproto/Makefile index 5171f2f62..19496f2c5 100644 --- a/package/scrnsaverproto/Makefile +++ b/package/scrnsaverproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 0ed88bdd6945ba207c4f734af48e7e25 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/scsi-spin/Makefile b/package/scsi-spin/Makefile index f8a551b9b..a7abd2b9a 100644 --- a/package/scsi-spin/Makefile +++ b/package/scsi-spin/Makefile @@ -11,14 +11,18 @@ PKG_DESCR:= Utility to spin down scsi disks PKG_SECTION:= misc NO_DISTFILES:= 1 -WRKDIST= ${WRKDIR}/scsi-spin include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SCSI_SPIN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: - ${TARGET_CC} ${TARGET_CFLAGS} -o ${WRKBUILD}/scsi-spin files/scsi-spin.c + ${TARGET_CC} -Wall ${TCPPFLAGS} ${TCFLAGS} -o ${WRKBUILD}/scsi-spin \ + ${WRKBUILD}/scsi-spin.c do-install: ${INSTALL_DIR} ${IDIR_SCSI_SPIN}/usr/sbin diff --git a/package/scsi-spin/files/scsi-spin.c b/package/scsi-spin/files/scsi-spin.c deleted file mode 100644 index 443934c78..000000000 --- a/package/scsi-spin/files/scsi-spin.c +++ /dev/null @@ -1,420 +0,0 @@ -/* - File: scsi-spin.c - - A simple program to manually spin up and down a scsi device. - - Copyright 1998 Rob Browning - Copyright 2001 Eric Delaunay - - This source is covered by the terms the GNU Public License. - - Some of the original code came from - The Linux SCSI programming HOWTO - Heiko Eifeldt heiko@colossus.escape.de - v1.5, 7 May 1996 - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \ - ((M) >= SCSI_DISK1_MAJOR && \ - (M) <= SCSI_DISK7_MAJOR) || \ - ((M) >= SCSI_DISK8_MAJOR && \ - (M) <= SCSI_DISK15_MAJOR)) - -#define SCSI_BLK_MAJOR(M) \ - (SCSI_DISK_MAJOR(M) || \ - (M) == SCSI_CDROM_MAJOR) - -/* define USE_SG_IO to send commands using scsi generic interface - */ -#define USE_SG_IO - -#ifdef USE_SG_IO -int opt_oldioctl = 0; -int opt_verbose = 0; - -const char* SENSE_KEY_STR[16] = { - "NO SENSE", - "RECOVERED ERROR", - "NOT READY", - "MEDIUM ERROR", - "HARDWARE ERROR", - "ILLEGAL REQUEST", - "UNIT ATTENTION", - "DATA PROJECT", - "BLANK CHECK", - "VENDOR-SPECIFIC", - "COPY ARBORTED", - "ABORTED COMMAND", - "EQUAL", - "VOLUME OVERFLOW", - "MISCOMPARED", - "RESERVED" -}; - -/* process a complete SCSI cmd. Use the generic SCSI interface. */ -static int handle_SCSI_cmd(const int fd, - const unsigned cmd_len, /* command length */ - unsigned char *cmd, /* command buffer */ - const unsigned in_size, /* input data size */ - const unsigned out_size, /* output data size */ - unsigned char *io_buff, /* i/o buffer */ - unsigned sense_size, /* sense buf length */ - unsigned char* sense_buff, /* sense buffer */ - const unsigned timeout /* timeout in s */ - ) { - ssize_t status = 0; - int k, err; - sg_io_hdr_t sg_hdr; - unsigned char sense[16]; - - /* safety checks */ - if (!cmd_len) return -1; /* need a cmd_len != 0 */ - if (in_size > 0 && io_buff == NULL) return -1; /* need an input buffer != NULL */ - /* generic SCSI device header construction */ - memset(&sg_hdr, 0, sizeof(sg_hdr)); - sg_hdr.interface_id = 'S'; - sg_hdr.dxfer_direction = SG_DXFER_NONE; - sg_hdr.cmd_len = cmd_len; - sg_hdr.cmdp = cmd; - sg_hdr.dxfer_len = in_size; - sg_hdr.dxferp = io_buff; - sg_hdr.timeout = (timeout ? timeout : 2)*1000; /* timeout in ms */ - if (sense_buff == NULL) { - sense_buff = sense; - sense_size = sizeof(sense); - } - sg_hdr.mx_sb_len = sense_size; - sg_hdr.sbp = sense_buff; - - if (opt_verbose > 1) { - fprintf( stderr, " cmd = " ); - for( k = 0 ; k < cmd_len ; k++ ) - fprintf( stderr, " %02x", cmd[k] ); - fputc( '\n', stderr ); - } - /* send command */ - status = ioctl( fd, SG_IO, &sg_hdr ); - if (status < 0 || sg_hdr.masked_status == CHECK_CONDITION) { - /* some error happened */ - fprintf( stderr, "SG_IO: status = 0x%x cmd = 0x%x\n", - sg_hdr.status, cmd[0] ); - if (opt_verbose > 0) { - fprintf( stderr, " sense = " ); - for( k = 0 ; k < sg_hdr.sb_len_wr ; k++ ) - fprintf( stderr, " %02x", sense_buff[k] ); - fputc( '\n', stderr ); - err = sense_buff[0] & 0x7f; - if (err == 0x70 || err == 0x71) { - fprintf( stderr, " (%s)\n", SENSE_KEY_STR[sense_buff[2] & 0xf] ); - } - } - perror(""); - } - return status; /* 0 means no error */ -} -#endif - -static void -scsi_spin(const int fd, const int desired_state, const int load_eject, const int wait) { -#ifdef USE_SG_IO - if (! opt_oldioctl) { - unsigned char cmdblk [6] = - { START_STOP, /* command */ - (wait ? 0 : 1), /* lun(3 bits)/reserved(4 bits)/immed(1 bit) */ - 0, /* reserved */ - 0, /* reserved */ - (load_eject ? 2 : 0) - | (desired_state ? 1 : 0), /* reserved(6)/LoEj(1)/Start(1)*/ - 0 };/* reserved/flag/link */ - - if (handle_SCSI_cmd(fd, sizeof(cmdblk), cmdblk, 0, 0, NULL, 0, NULL, wait)) { - fprintf( stderr, "start/stop failed\n" ); - exit(2); - } - return; - } -#endif - int ret; - if (desired_state != 0) - ret = ioctl( fd, SCSI_IOCTL_START_UNIT ); - else - ret = ioctl( fd, SCSI_IOCTL_STOP_UNIT ); - if (ret < 0) - perror( "scsi_spin: ioctl" ); -} - -static void -scsi_lock(const int fd, const int door_lock) { -#ifdef USE_SG_IO - if (! opt_oldioctl) { - unsigned char cmdblk [6] = - { ALLOW_MEDIUM_REMOVAL, /* command */ - 0, /* lun(3 bits)/reserved(5 bits) */ - 0, /* reserved */ - 0, /* reserved */ - (door_lock ? 1 : 0), /* reserved(7)/Prevent(1)*/ - 0 };/* control */ - - if (handle_SCSI_cmd(fd, sizeof(cmdblk), cmdblk, 0, 0, NULL, 0, NULL, 2)) { - fprintf( stderr, "lock/unlock failed\n" ); - exit(2); - } - return; - } -#endif - int ret; - if (door_lock != 0) - ret = ioctl( fd, SCSI_IOCTL_DOORLOCK ); - else - ret = ioctl( fd, SCSI_IOCTL_DOORUNLOCK ); - if (ret < 0) - perror( "scsi_lock: ioctl" ); -} - -/* -- [ED] -- - * Check if the device has some of its partitions mounted. - * The check is done by comparison between device major and minor numbers so it - * even works when the device name of the mount point is not the same of the - * one passed to scsi-spin (for example, scsidev creates device aliases under - * /dev/scsi). - */ -static int -is_mounted( const char* device, int use_proc, int devmaj, int devmin ) -{ - struct mntent *mnt; - struct stat devstat; - int mounted = 0; - struct { - __uint32_t dev_id; - __uint32_t host_unique_id; - } scsi_dev_id, scsi_id; - FILE *mtab; - char *mtabfile = use_proc ? "/proc/mounts" : "/etc/mtab"; - - if (devmaj == SCSI_GENERIC_MAJOR) { - /* scsi-spin device arg is /dev/sgN */ - int fd = open( device, O_RDONLY ); - if (fd >= 0) { - int ret = ioctl( fd, SCSI_IOCTL_GET_IDLUN, &scsi_dev_id ); - close( fd ); - if (ret < 0) - return -1; - } - } - /*printf("devid=%x\n",scsi_dev_id.dev_id);*/ - - mtab = setmntent( mtabfile, "r" ); - if (mtab == NULL) - return -1; - - while ((mnt = getmntent( mtab )) != 0) { - char * mdev = mnt->mnt_fsname; - if (stat( mdev, &devstat ) == 0) { - int maj = major(devstat.st_rdev); - int min = minor(devstat.st_rdev); - if (SCSI_DISK_MAJOR(maj) && SCSI_DISK_MAJOR(devmaj)) { - if (maj == devmaj && (min & ~15) == (devmin & ~15)) { - mounted = 1; - break; - } - } - else if (devmaj == SCSI_GENERIC_MAJOR && SCSI_BLK_MAJOR(maj)) { - /* scsi-spin device arg is /dev/sgN */ - int fd = open( mdev, O_RDONLY ); - if (fd >= 0) { - int ret = ioctl( fd, SCSI_IOCTL_GET_IDLUN, &scsi_id ); - close( fd ); - /*printf("id=%x\n",scsi_id.dev_id);*/ - if (ret == 0 && scsi_id.dev_id == scsi_dev_id.dev_id) { - /* same SCSI ID => same device */ - mounted = 1; - break; - } - } - } - else if (maj == SCSI_CDROM_MAJOR && maj == devmaj && min == devmin) { - mounted = 1; - break; - } - } - } - - endmntent( mtab ); - return mounted; -} - -static void -usage() -{ - static char usage_string[] = - "usage: scsi-spin {-u,-d} [-nfpe] device\n" - " -u, --up spin up device.\n" - " -d, --down spin down device.\n" - " -v, --verbose[=n] verbose mode (1: normal, 2: debug).\n" -#ifdef SG_IO - " -e, --loej load (-u) or eject (-d) removable medium.\n" - " -w, --wait=[n] wait the spin up/down operation to be completed\n" - " (n is the number of seconds to timeout).\n" - " -I, --oldioctl use legacy ioctl instead of SG I/O (-e,-w ignored).\n" -#endif - " -l, --lock prevent medium removal.\n" - " -L, --unlock allow medium removal.\n" - " -n, --noact do nothing but check if the device is in use.\n" - " -f, --force force spinning up/down even if the device is in use.\n" - " -p, --proc use /proc/mounts instead of /etc/mtab to do the check.\n" - " device is one of /dev/sd[a-z], /dev/scd[0-9]* or /dev/sg[0-9]*.\n"; - - fputs(usage_string, stderr); -} - -int -main(int argc, char *argv[]) -{ - int result = 0; - int fd; - int opt_up = 0; - int opt_down = 0; - int opt_loej = 0; - int opt_wait = 0; - int opt_force = 0; - int opt_noact = 0; - int opt_proc = 0; - int opt_lock = 0; - int opt_unlock = 0; - struct option cmd_line_opts[] = { - {"verbose", 2, NULL, 'v'}, - {"up", 0, NULL, 'u'}, - {"down", 0, NULL, 'd'}, -#ifdef SG_IO - {"loej", 0, NULL, 'e'}, - {"wait", 2, NULL, 'w'}, - {"oldioctl", 0, NULL, 'I'}, -#endif - {"lock", 0, NULL, 'l'}, - {"unlock", 0, NULL, 'L'}, - {"force", 0, NULL, 'f'}, - {"noact", 0, NULL, 'n'}, - {"proc", 0, NULL, 'p'}, - {0, 0, 0, 0}, - }; - char* endptr = ""; - char* device; - struct stat devstat; - - char c; - while((c = getopt_long(argc, argv, "vudewlLfnp", cmd_line_opts, NULL)) != EOF) { - switch (c) { - case 'v': opt_verbose = optarg ? strtol(optarg, &endptr, 10) : opt_verbose+1; - if (*endptr) goto error; - break; - case 'u': opt_up = 1; break; - case 'd': opt_down = 1; break; -#ifdef SG_IO - case 'e': opt_loej = 1; break; - case 'w': opt_wait = optarg ? strtol(optarg, &endptr, 10) : opt_wait+1; - if (*endptr) goto error; - break; - case 'I': opt_oldioctl = 1; break; -#endif - case 'f': opt_force = 1; break; - case 'l': opt_lock = 1; break; - case 'L': opt_unlock = 1; break; - case 'n': opt_noact = 1; break; - case 'p': opt_proc = 1; break; - default: -error: - usage(); - exit(1); - } - } - - if(opt_up && opt_down) { - fputs("scsi-spin: specified both --up and --down. " - "Is this some kind of test?\n", stderr); - exit(1); - } - if(opt_lock && opt_unlock) { - fputs("scsi-spin: specified both --lock and --unlock. " - "Is this some kind of test?\n", stderr); - exit(1); - } - if (opt_oldioctl && (opt_wait || opt_loej)) { - fputs("scsi-spin: -e or -w not working in old ioctl mode.\n", stderr); - exit(1); - } - if(!(opt_up || opt_down || opt_lock || opt_unlock)) { - fputs("scsi-spin: must specify --up, --down, --lock or --unlock at least.\n", stderr); - exit(1); - } - - if(optind != (argc - 1)) { - usage(); - exit(1); - } - - device = argv[optind]; - - if(stat(device, &devstat) == -1) { - fprintf(stderr, "scsi-spin [stat]: %s: %s\n", device, strerror(errno)); - result = 1; - } - - if (is_mounted( device, opt_proc, major(devstat.st_rdev), minor(devstat.st_rdev) )) { - if (! opt_force) { - fprintf( stderr, "scsi-spin: device already in use (mounted partition)\n" ); - exit(1); - } - else { - fprintf( stderr, "scsi-spin [warning]: device is mounted but --force is passed\n" ); - } - } - - /* first try to open the device r/w */ - fd = open(device, O_RDWR); - if (fd < 0) { - /* if it's fail, then try ro */ - fd = open(device, O_RDONLY); - if (fd < 0) { - fprintf(stderr, "scsi-spin [open]: %s: %s\n", device, strerror(errno)); - exit(1); - } - } - - if ((S_ISBLK(devstat.st_mode) && - SCSI_BLK_MAJOR(major(devstat.st_rdev))) || - (S_ISCHR(devstat.st_mode) && - major(devstat.st_rdev) == SCSI_GENERIC_MAJOR)) - { - if (! opt_noact) { - if (opt_lock || opt_unlock) - scsi_lock(fd, opt_lock); - if (opt_up || opt_down) - scsi_spin(fd, opt_up, opt_loej, opt_wait); - } - } - else { - fprintf(stderr, "scsi-spin: %s is not a disk or generic SCSI device.\n", device); - result = 1; - } - - close(fd); - return result; -} diff --git a/package/scsi-spin/src/scsi-spin.c b/package/scsi-spin/src/scsi-spin.c new file mode 100644 index 000000000..443934c78 --- /dev/null +++ b/package/scsi-spin/src/scsi-spin.c @@ -0,0 +1,420 @@ +/* + File: scsi-spin.c + + A simple program to manually spin up and down a scsi device. + + Copyright 1998 Rob Browning + Copyright 2001 Eric Delaunay + + This source is covered by the terms the GNU Public License. + + Some of the original code came from + The Linux SCSI programming HOWTO + Heiko Eifeldt heiko@colossus.escape.de + v1.5, 7 May 1996 + +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \ + ((M) >= SCSI_DISK1_MAJOR && \ + (M) <= SCSI_DISK7_MAJOR) || \ + ((M) >= SCSI_DISK8_MAJOR && \ + (M) <= SCSI_DISK15_MAJOR)) + +#define SCSI_BLK_MAJOR(M) \ + (SCSI_DISK_MAJOR(M) || \ + (M) == SCSI_CDROM_MAJOR) + +/* define USE_SG_IO to send commands using scsi generic interface + */ +#define USE_SG_IO + +#ifdef USE_SG_IO +int opt_oldioctl = 0; +int opt_verbose = 0; + +const char* SENSE_KEY_STR[16] = { + "NO SENSE", + "RECOVERED ERROR", + "NOT READY", + "MEDIUM ERROR", + "HARDWARE ERROR", + "ILLEGAL REQUEST", + "UNIT ATTENTION", + "DATA PROJECT", + "BLANK CHECK", + "VENDOR-SPECIFIC", + "COPY ARBORTED", + "ABORTED COMMAND", + "EQUAL", + "VOLUME OVERFLOW", + "MISCOMPARED", + "RESERVED" +}; + +/* process a complete SCSI cmd. Use the generic SCSI interface. */ +static int handle_SCSI_cmd(const int fd, + const unsigned cmd_len, /* command length */ + unsigned char *cmd, /* command buffer */ + const unsigned in_size, /* input data size */ + const unsigned out_size, /* output data size */ + unsigned char *io_buff, /* i/o buffer */ + unsigned sense_size, /* sense buf length */ + unsigned char* sense_buff, /* sense buffer */ + const unsigned timeout /* timeout in s */ + ) { + ssize_t status = 0; + int k, err; + sg_io_hdr_t sg_hdr; + unsigned char sense[16]; + + /* safety checks */ + if (!cmd_len) return -1; /* need a cmd_len != 0 */ + if (in_size > 0 && io_buff == NULL) return -1; /* need an input buffer != NULL */ + /* generic SCSI device header construction */ + memset(&sg_hdr, 0, sizeof(sg_hdr)); + sg_hdr.interface_id = 'S'; + sg_hdr.dxfer_direction = SG_DXFER_NONE; + sg_hdr.cmd_len = cmd_len; + sg_hdr.cmdp = cmd; + sg_hdr.dxfer_len = in_size; + sg_hdr.dxferp = io_buff; + sg_hdr.timeout = (timeout ? timeout : 2)*1000; /* timeout in ms */ + if (sense_buff == NULL) { + sense_buff = sense; + sense_size = sizeof(sense); + } + sg_hdr.mx_sb_len = sense_size; + sg_hdr.sbp = sense_buff; + + if (opt_verbose > 1) { + fprintf( stderr, " cmd = " ); + for( k = 0 ; k < cmd_len ; k++ ) + fprintf( stderr, " %02x", cmd[k] ); + fputc( '\n', stderr ); + } + /* send command */ + status = ioctl( fd, SG_IO, &sg_hdr ); + if (status < 0 || sg_hdr.masked_status == CHECK_CONDITION) { + /* some error happened */ + fprintf( stderr, "SG_IO: status = 0x%x cmd = 0x%x\n", + sg_hdr.status, cmd[0] ); + if (opt_verbose > 0) { + fprintf( stderr, " sense = " ); + for( k = 0 ; k < sg_hdr.sb_len_wr ; k++ ) + fprintf( stderr, " %02x", sense_buff[k] ); + fputc( '\n', stderr ); + err = sense_buff[0] & 0x7f; + if (err == 0x70 || err == 0x71) { + fprintf( stderr, " (%s)\n", SENSE_KEY_STR[sense_buff[2] & 0xf] ); + } + } + perror(""); + } + return status; /* 0 means no error */ +} +#endif + +static void +scsi_spin(const int fd, const int desired_state, const int load_eject, const int wait) { +#ifdef USE_SG_IO + if (! opt_oldioctl) { + unsigned char cmdblk [6] = + { START_STOP, /* command */ + (wait ? 0 : 1), /* lun(3 bits)/reserved(4 bits)/immed(1 bit) */ + 0, /* reserved */ + 0, /* reserved */ + (load_eject ? 2 : 0) + | (desired_state ? 1 : 0), /* reserved(6)/LoEj(1)/Start(1)*/ + 0 };/* reserved/flag/link */ + + if (handle_SCSI_cmd(fd, sizeof(cmdblk), cmdblk, 0, 0, NULL, 0, NULL, wait)) { + fprintf( stderr, "start/stop failed\n" ); + exit(2); + } + return; + } +#endif + int ret; + if (desired_state != 0) + ret = ioctl( fd, SCSI_IOCTL_START_UNIT ); + else + ret = ioctl( fd, SCSI_IOCTL_STOP_UNIT ); + if (ret < 0) + perror( "scsi_spin: ioctl" ); +} + +static void +scsi_lock(const int fd, const int door_lock) { +#ifdef USE_SG_IO + if (! opt_oldioctl) { + unsigned char cmdblk [6] = + { ALLOW_MEDIUM_REMOVAL, /* command */ + 0, /* lun(3 bits)/reserved(5 bits) */ + 0, /* reserved */ + 0, /* reserved */ + (door_lock ? 1 : 0), /* reserved(7)/Prevent(1)*/ + 0 };/* control */ + + if (handle_SCSI_cmd(fd, sizeof(cmdblk), cmdblk, 0, 0, NULL, 0, NULL, 2)) { + fprintf( stderr, "lock/unlock failed\n" ); + exit(2); + } + return; + } +#endif + int ret; + if (door_lock != 0) + ret = ioctl( fd, SCSI_IOCTL_DOORLOCK ); + else + ret = ioctl( fd, SCSI_IOCTL_DOORUNLOCK ); + if (ret < 0) + perror( "scsi_lock: ioctl" ); +} + +/* -- [ED] -- + * Check if the device has some of its partitions mounted. + * The check is done by comparison between device major and minor numbers so it + * even works when the device name of the mount point is not the same of the + * one passed to scsi-spin (for example, scsidev creates device aliases under + * /dev/scsi). + */ +static int +is_mounted( const char* device, int use_proc, int devmaj, int devmin ) +{ + struct mntent *mnt; + struct stat devstat; + int mounted = 0; + struct { + __uint32_t dev_id; + __uint32_t host_unique_id; + } scsi_dev_id, scsi_id; + FILE *mtab; + char *mtabfile = use_proc ? "/proc/mounts" : "/etc/mtab"; + + if (devmaj == SCSI_GENERIC_MAJOR) { + /* scsi-spin device arg is /dev/sgN */ + int fd = open( device, O_RDONLY ); + if (fd >= 0) { + int ret = ioctl( fd, SCSI_IOCTL_GET_IDLUN, &scsi_dev_id ); + close( fd ); + if (ret < 0) + return -1; + } + } + /*printf("devid=%x\n",scsi_dev_id.dev_id);*/ + + mtab = setmntent( mtabfile, "r" ); + if (mtab == NULL) + return -1; + + while ((mnt = getmntent( mtab )) != 0) { + char * mdev = mnt->mnt_fsname; + if (stat( mdev, &devstat ) == 0) { + int maj = major(devstat.st_rdev); + int min = minor(devstat.st_rdev); + if (SCSI_DISK_MAJOR(maj) && SCSI_DISK_MAJOR(devmaj)) { + if (maj == devmaj && (min & ~15) == (devmin & ~15)) { + mounted = 1; + break; + } + } + else if (devmaj == SCSI_GENERIC_MAJOR && SCSI_BLK_MAJOR(maj)) { + /* scsi-spin device arg is /dev/sgN */ + int fd = open( mdev, O_RDONLY ); + if (fd >= 0) { + int ret = ioctl( fd, SCSI_IOCTL_GET_IDLUN, &scsi_id ); + close( fd ); + /*printf("id=%x\n",scsi_id.dev_id);*/ + if (ret == 0 && scsi_id.dev_id == scsi_dev_id.dev_id) { + /* same SCSI ID => same device */ + mounted = 1; + break; + } + } + } + else if (maj == SCSI_CDROM_MAJOR && maj == devmaj && min == devmin) { + mounted = 1; + break; + } + } + } + + endmntent( mtab ); + return mounted; +} + +static void +usage() +{ + static char usage_string[] = + "usage: scsi-spin {-u,-d} [-nfpe] device\n" + " -u, --up spin up device.\n" + " -d, --down spin down device.\n" + " -v, --verbose[=n] verbose mode (1: normal, 2: debug).\n" +#ifdef SG_IO + " -e, --loej load (-u) or eject (-d) removable medium.\n" + " -w, --wait=[n] wait the spin up/down operation to be completed\n" + " (n is the number of seconds to timeout).\n" + " -I, --oldioctl use legacy ioctl instead of SG I/O (-e,-w ignored).\n" +#endif + " -l, --lock prevent medium removal.\n" + " -L, --unlock allow medium removal.\n" + " -n, --noact do nothing but check if the device is in use.\n" + " -f, --force force spinning up/down even if the device is in use.\n" + " -p, --proc use /proc/mounts instead of /etc/mtab to do the check.\n" + " device is one of /dev/sd[a-z], /dev/scd[0-9]* or /dev/sg[0-9]*.\n"; + + fputs(usage_string, stderr); +} + +int +main(int argc, char *argv[]) +{ + int result = 0; + int fd; + int opt_up = 0; + int opt_down = 0; + int opt_loej = 0; + int opt_wait = 0; + int opt_force = 0; + int opt_noact = 0; + int opt_proc = 0; + int opt_lock = 0; + int opt_unlock = 0; + struct option cmd_line_opts[] = { + {"verbose", 2, NULL, 'v'}, + {"up", 0, NULL, 'u'}, + {"down", 0, NULL, 'd'}, +#ifdef SG_IO + {"loej", 0, NULL, 'e'}, + {"wait", 2, NULL, 'w'}, + {"oldioctl", 0, NULL, 'I'}, +#endif + {"lock", 0, NULL, 'l'}, + {"unlock", 0, NULL, 'L'}, + {"force", 0, NULL, 'f'}, + {"noact", 0, NULL, 'n'}, + {"proc", 0, NULL, 'p'}, + {0, 0, 0, 0}, + }; + char* endptr = ""; + char* device; + struct stat devstat; + + char c; + while((c = getopt_long(argc, argv, "vudewlLfnp", cmd_line_opts, NULL)) != EOF) { + switch (c) { + case 'v': opt_verbose = optarg ? strtol(optarg, &endptr, 10) : opt_verbose+1; + if (*endptr) goto error; + break; + case 'u': opt_up = 1; break; + case 'd': opt_down = 1; break; +#ifdef SG_IO + case 'e': opt_loej = 1; break; + case 'w': opt_wait = optarg ? strtol(optarg, &endptr, 10) : opt_wait+1; + if (*endptr) goto error; + break; + case 'I': opt_oldioctl = 1; break; +#endif + case 'f': opt_force = 1; break; + case 'l': opt_lock = 1; break; + case 'L': opt_unlock = 1; break; + case 'n': opt_noact = 1; break; + case 'p': opt_proc = 1; break; + default: +error: + usage(); + exit(1); + } + } + + if(opt_up && opt_down) { + fputs("scsi-spin: specified both --up and --down. " + "Is this some kind of test?\n", stderr); + exit(1); + } + if(opt_lock && opt_unlock) { + fputs("scsi-spin: specified both --lock and --unlock. " + "Is this some kind of test?\n", stderr); + exit(1); + } + if (opt_oldioctl && (opt_wait || opt_loej)) { + fputs("scsi-spin: -e or -w not working in old ioctl mode.\n", stderr); + exit(1); + } + if(!(opt_up || opt_down || opt_lock || opt_unlock)) { + fputs("scsi-spin: must specify --up, --down, --lock or --unlock at least.\n", stderr); + exit(1); + } + + if(optind != (argc - 1)) { + usage(); + exit(1); + } + + device = argv[optind]; + + if(stat(device, &devstat) == -1) { + fprintf(stderr, "scsi-spin [stat]: %s: %s\n", device, strerror(errno)); + result = 1; + } + + if (is_mounted( device, opt_proc, major(devstat.st_rdev), minor(devstat.st_rdev) )) { + if (! opt_force) { + fprintf( stderr, "scsi-spin: device already in use (mounted partition)\n" ); + exit(1); + } + else { + fprintf( stderr, "scsi-spin [warning]: device is mounted but --force is passed\n" ); + } + } + + /* first try to open the device r/w */ + fd = open(device, O_RDWR); + if (fd < 0) { + /* if it's fail, then try ro */ + fd = open(device, O_RDONLY); + if (fd < 0) { + fprintf(stderr, "scsi-spin [open]: %s: %s\n", device, strerror(errno)); + exit(1); + } + } + + if ((S_ISBLK(devstat.st_mode) && + SCSI_BLK_MAJOR(major(devstat.st_rdev))) || + (S_ISCHR(devstat.st_mode) && + major(devstat.st_rdev) == SCSI_GENERIC_MAJOR)) + { + if (! opt_noact) { + if (opt_lock || opt_unlock) + scsi_lock(fd, opt_lock); + if (opt_up || opt_down) + scsi_spin(fd, opt_up, opt_loej, opt_wait); + } + } + else { + fprintf(stderr, "scsi-spin: %s is not a disk or generic SCSI device.\n", device); + result = 1; + } + + close(fd); + return result; +} diff --git a/package/sdl-image/Makefile b/package/sdl-image/Makefile index d7cd7a2e7..ce8cf9cc9 100644 --- a/package/sdl-image/Makefile +++ b/package/sdl-image/Makefile @@ -26,13 +26,10 @@ SUB_INSTALLS-y:= SUB_INSTALLS-m:= SUB_INSTALLS-${ADK_PACKAGE_LIBSDL_IMAGE_DEV}+= libsdl-image-dev-install -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-png \ --enable-jpg \ --enable-bmp \ --enable-tif -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} $(INSTALL_DIR) $(IDIR_LIBSDL_IMAGE)/usr/lib diff --git a/package/sdl/Makefile b/package/sdl/Makefile index f5f9ff6aa..fa0e0be8d 100644 --- a/package/sdl/Makefile +++ b/package/sdl/Makefile @@ -26,7 +26,6 @@ SUB_INSTALLS-y:= SUB_INSTALLS-m:= SUB_INSTALLS-${ADK_PACKAGE_LIBSDL_DEV}+= libsdl-dev-install -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-esd \ --disable-oss \ --enable-alsa \ @@ -35,8 +34,6 @@ CONFIGURE_ARGS+= --disable-esd \ --disable-video-opengl \ --enable-input-tslib \ --with-x -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} $(INSTALL_DIR) $(IDIR_LIBSDL)/usr/lib diff --git a/package/ser2net/Makefile b/package/ser2net/Makefile index 53053d818..3be9a24b7 100644 --- a/package/ser2net/Makefile +++ b/package/ser2net/Makefile @@ -15,10 +15,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SER2NET,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_lib_nsl_main=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_SER2NET}/etc ${IDIR_SER2NET}/usr/sbin diff --git a/package/serdisplib/Makefile b/package/serdisplib/Makefile index e49d1e224..85d680f8b 100644 --- a/package/serdisplib/Makefile +++ b/package/serdisplib/Makefile @@ -6,10 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= serdisplib PKG_VERSION:= 1.97.8 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libgd libusb PKG_MD5SUM:= 2aa91c43d01d2dfc9fbc1116e3063ae1 PKG_DESCR:= display drivers (serial, parallel, USB) PKG_SECTION:= misc +PKG_BUILDDEP+= libgd libusb PKG_URL:= http://serdisplib.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=serdisplib/} @@ -17,10 +17,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SERDISPLIB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +INSTALL_STYLE:= manual + CONFIGURE_ENV+= PACKAGE_VERSION_MAJOR=1 PACKAGE_VERSION_MINOR=97 -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-libusb -BUILD_STYLE:= auto TCFLAGS+= ${TCPPFLAGS} do-install: diff --git a/package/setpwc/Makefile b/package/setpwc/Makefile index 12e685bd5..4814b9aec 100644 --- a/package/setpwc/Makefile +++ b/package/setpwc/Makefile @@ -18,8 +18,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SETPWC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: - ${TARGET_CC} ${TARGET_CFLAGS} -DVERSION=\"${PKG_VERSION}\" -o ${WRKBUILD}/setpwc ${WRKBUILD}/setpwc.c + ${TARGET_CC} -Wall ${TCFLAGS} -DVERSION=\"${PKG_VERSION}\" \ + -o ${WRKBUILD}/setpwc ${WRKBUILD}/setpwc.c do-install: ${INSTALL_DIR} ${IDIR_SETPWC}/usr/bin diff --git a/package/setserial/Makefile b/package/setserial/Makefile index 47e179329..b106d11a0 100644 --- a/package/setserial/Makefile +++ b/package/setserial/Makefile @@ -15,8 +15,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SETSERIAL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_SETSERIAL}/usr/sbin diff --git a/package/shat/Makefile b/package/shat/Makefile index b9ab7096a..164280e51 100644 --- a/package/shat/Makefile +++ b/package/shat/Makefile @@ -15,6 +15,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SHAT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: ${MAKE} -C ${WRKBUILD}/src \ CC="${TARGET_CC}" LD=${TARGET_CROSS}ld \ diff --git a/package/shorewall-common/Makefile b/package/shorewall-common/Makefile index 44ddbfffe..bfa99f834 100644 --- a/package/shorewall-common/Makefile +++ b/package/shorewall-common/Makefile @@ -19,9 +19,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SHOREWALL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -do-install: - PREFIX="${WRKINST}" ${WRKBUILD}/install.sh -n +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual +do-build: + PREFIX="${WRKINST}" ${WRKBUILD}/install.sh -n # remove configfiles folder ${RM} -R ${WRKINST}/usr/share/shorewall/configfiles @@ -35,22 +38,34 @@ ifeq ($(ADK_PACKAGE_SHOREWALL_STRIPSHARED),y) gzip -9 ${WRKINST}/usr/share/shorewall/*.template endif -post-install: +do-install: ${INSTALL_DIR} ${IDIR_SHOREWALL}/etc/shorewall ${INSTALL_DIR} ${IDIR_SHOREWALL}/usr/share/shorewall ${INSTALL_DIR} ${IDIR_SHOREWALL}/sbin - ${INSTALL_DATA} ${WRKINST}/etc/shorewall/* ${IDIR_SHOREWALL}/etc/shorewall/ - ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/actions.std ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/configpath ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/modules ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/rfc1918 ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/version ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/action.* ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/macro.* ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/lib.* ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/firewall ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/functions ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/wait4ifup ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_DATA} ${WRKINST}/etc/shorewall/* \ + ${IDIR_SHOREWALL}/etc/shorewall/ + ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/actions.std \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/configpath \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/modules \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/rfc1918 \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/version \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/action.* \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/macro.* \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/lib.* \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/firewall \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/functions \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ + ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/wait4ifup \ + ${IDIR_SHOREWALL}/usr/share/shorewall/ ${INSTALL_BIN} ${WRKINST}/sbin/shorewall ${IDIR_SHOREWALL}/sbin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/shorewall-shell/Makefile b/package/shorewall-shell/Makefile index c5d1bfb0c..21971a807 100644 --- a/package/shorewall-shell/Makefile +++ b/package/shorewall-shell/Makefile @@ -18,18 +18,26 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SHOREWALL_SHELL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -do-install: +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + +do-build: PREFIX="${WRKINST}" ${WRKBUILD}/install.sh -n ifeq ($(ADK_PACKAGE_SHOREWALL_STRIPSHARED),y) ${BASH} ./files/downstrip ${WRKINST}/usr/share/${PKG_NAME} endif -post-install: +do-install: ${INSTALL_DIR} ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME} - ${INSTALL_DATA} ${WRKINST}/usr/share/${PKG_NAME}/version ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME}/ - ${INSTALL_DATA} ${WRKINST}/usr/share/${PKG_NAME}/lib.* ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME}/ - ${INSTALL_DATA} ${WRKINST}/usr/share/${PKG_NAME}/prog.* ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME}/ - ${INSTALL_BIN} ${WRKINST}/usr/share/${PKG_NAME}/compiler ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME}/ + ${INSTALL_DATA} ${WRKINST}/usr/share/${PKG_NAME}/version \ + ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME}/ + ${INSTALL_DATA} ${WRKINST}/usr/share/${PKG_NAME}/lib.* \ + ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME}/ + ${INSTALL_DATA} ${WRKINST}/usr/share/${PKG_NAME}/prog.* \ + ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME}/ + ${INSTALL_BIN} ${WRKINST}/usr/share/${PKG_NAME}/compiler \ + ${IDIR_SHOREWALL_SHELL}/usr/share/${PKG_NAME}/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/siproxd/Makefile b/package/siproxd/Makefile index 8443ec888..3fbf8040e 100644 --- a/package/siproxd/Makefile +++ b/package/siproxd/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= siproxd PKG_VERSION:= 0.7.1 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libosip2 PKG_MD5SUM:= 45e5a44803181e2bf3361d562060c904 PKG_DESCR:= a SIP (Session Initiation Protocol) proxy PKG_SECTION:= net PKG_DEPENDS:= libosip2 libpthread +PKG_BUILDDEP+= libosip2 PKG_URL:= http://siproxd.sourceforge.net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=siproxd/} @@ -18,13 +18,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SIPROXD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_SIPROXD}/usr/sbin ${IDIR_SIPROXD}/etc - ${INSTALL_DATA} ${WRKINST}/etc/siproxd.conf.example ${IDIR_SIPROXD}/etc/siproxd.conf + ${INSTALL_DATA} ${WRKINST}/etc/siproxd.conf.example \ + ${IDIR_SIPROXD}/etc/siproxd.conf ${INSTALL_DATA} ${WRKINST}/etc/siproxd_passwd.cfg ${IDIR_SIPROXD}/etc/ ${INSTALL_BIN} ${WRKINST}/usr/sbin/siproxd ${IDIR_SIPROXD}/usr/sbin/ diff --git a/package/sipsak/Makefile b/package/sipsak/Makefile index 2249c2cf5..0e6b9d292 100644 --- a/package/sipsak/Makefile +++ b/package/sipsak/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= sipsak PKG_VERSION:= 0.9.6 PKG_RELEASE:= 2 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= c4eb8e282902e75f4f040f09ea9d99d5 PKG_DESCR:= a SIP stress and diagnostics utility PKG_SECTION:= net PKG_DEPENDS:= libopenssl +PKG_BUILDDEP+= openssl PKG_URL:= http://sipsak.org PKG_SITES:= http://download.berlios.de/sipsak/ \ http://ftp.iptel.org/pub/sipsak/ @@ -19,10 +19,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SIPSAK,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-gnutls -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_SIPSAK}/usr/bin diff --git a/package/sispmctl/Makefile b/package/sispmctl/Makefile index c65a3a0c0..8c6600089 100644 --- a/package/sispmctl/Makefile +++ b/package/sispmctl/Makefile @@ -18,10 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SISPMCTL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_SISPMCTL}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/sispmctl ${IDIR_SISPMCTL}/usr/bin diff --git a/package/snort/Makefile b/package/snort/Makefile index 6d1f9c134..4f9cee83e 100644 --- a/package/snort/Makefile +++ b/package/snort/Makefile @@ -19,7 +19,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SNORT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-flexresp \ --with-libnet-includes="${STAGING_DIR}/usr/include" \ --with-libnet-libraries="${STAGING_DIR}/usr/lib" \ @@ -30,8 +29,6 @@ CONFIGURE_ARGS+= --disable-flexresp \ --without-mysql \ --without-postgresql \ --disable-inline -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_SNORT}/usr/bin @@ -39,11 +36,16 @@ post-install: ${INSTALL_DATA} ${WRKBUILD}/etc/snort.conf ${IDIR_SNORT}/etc/snort/ ${INSTALL_DATA} ${WRKBUILD}/etc/classification.config \ ${IDIR_SNORT}/etc/snort/ - ${INSTALL_DATA} ${WRKBUILD}/etc/gen-msg.map ${IDIR_SNORT}/etc/snort/ - ${INSTALL_DATA} ${WRKBUILD}/etc/reference.config ${IDIR_SNORT}/etc/snort/ - ${INSTALL_DATA} ${WRKBUILD}/etc/sid-msg.map ${IDIR_SNORT}/etc/snort/ - ${INSTALL_DATA} ${WRKBUILD}/etc/threshold.conf ${IDIR_SNORT}/etc/snort/ - ${INSTALL_DATA} ${WRKBUILD}/etc/unicode.map ${IDIR_SNORT}/etc/snort/ + ${INSTALL_DATA} ${WRKBUILD}/etc/gen-msg.map \ + ${IDIR_SNORT}/etc/snort/ + ${INSTALL_DATA} ${WRKBUILD}/etc/reference.config \ + ${IDIR_SNORT}/etc/snort/ + ${INSTALL_DATA} ${WRKBUILD}/etc/sid-msg.map \ + ${IDIR_SNORT}/etc/snort/ + ${INSTALL_DATA} ${WRKBUILD}/etc/threshold.conf \ + ${IDIR_SNORT}/etc/snort/ + ${INSTALL_DATA} ${WRKBUILD}/etc/unicode.map \ + ${IDIR_SNORT}/etc/snort/ ${INSTALL_BIN} ${WRKINST}/usr/bin/snort ${IDIR_SNORT}/usr/bin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/socat/Makefile b/package/socat/Makefile index 5ca41edc1..b264096f4 100644 --- a/package/socat/Makefile +++ b/package/socat/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= socat PKG_VERSION:= 1.7.0.0 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= 82967132b5a8ca4d07e54370fdcb2662 PKG_DESCR:= A multipurpose relay (SOcket CAT) PKG_SECTION:= net PKG_DEPENDS:= libpthread libopenssl +PKG_BUILDDEP+= openssl PKG_URL:= http://www.dest-unreach.org/socat PKG_SITES:= http://www.dest-unreach.org/socat/download/ @@ -18,15 +18,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SOCAT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= sc_cv_termios_ispeed="no" \ sc_cv_sys_crdly_shift=9 \ sc_cv_sys_tabdly_shift=11 \ sc_cv_sys_csize_shift=4 CONFIGURE_ARGS+= --disable-libwrap \ --disable-readline -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_SOCAT}/usr/bin diff --git a/package/speex/Makefile b/package/speex/Makefile index 56dfb2d14..a345b1a97 100644 --- a/package/speex/Makefile +++ b/package/speex/Makefile @@ -16,14 +16,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSPEEX,libspeex,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-ogg --disable-oggtest --enable-fixed-point -BUILD_STYLE:= auto -INSTALL_STYLE:= auto XAKE_FLAGS+= bin_PROGRAMS="" post-install: ${INSTALL_DIR} ${IDIR_LIBSPEEX}/usr/lib - ${CP} ${WRKINST}/usr/lib/libspeex.so.* ${IDIR_LIBSPEEX}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libspeex.so* ${IDIR_LIBSPEEX}/usr/lib/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/sqlite/Makefile b/package/sqlite/Makefile index bd2825e71..97d0a7535 100644 --- a/package/sqlite/Makefile +++ b/package/sqlite/Makefile @@ -6,10 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= sqlite PKG_VERSION:= 3.6.20 PKG_RELEASE:= 1 -PKG_BUILDDEP+= ncurses readline PKG_MD5SUM:= 0faf8fc8ccff5297513c6532b2b4ce23 PKG_DESCR:= Self-contained, embeddable, zero-configuration SQL database PKG_SECTION:= libs +PKG_BUILDDEP+= ncurses readline PKG_URL:= http://www.sqlite.org PKG_SITES:= http://www.sqlite.org/ @@ -18,7 +18,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSQLITE,libsqlite,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,SQLITE_CLI,sqlite-cli,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= config_BUILD_CC="${HOSTCC}" \ config_BUILD_CFLAGS="${HOSTCFLAGS}" \ config_TARGET_CC="${TARGET_CC}" \ @@ -29,8 +28,6 @@ MAKE_FLAGS+= LIBPTHREAD=-lm CONFIGURE_ARGS+= --disable-tcl \ --without-tcl \ --disable-amalgamation -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_LIBSQLITE}/usr/lib diff --git a/package/sqlite/extra/sqlite3.h b/package/sqlite/extra/sqlite3.h deleted file mode 100644 index fc015b08e..000000000 --- a/package/sqlite/extra/sqlite3.h +++ /dev/null @@ -1,5772 +0,0 @@ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the SQLite library -** presents to client programs. If a C-function, structure, datatype, -** or constant definition does not appear in this file, then it is -** not a published API of SQLite, is subject to change without -** notice, and should not be referenced by programs that use SQLite. -** -** Some of the definitions that are in this file are marked as -** "experimental". Experimental interfaces are normally new -** features recently added to SQLite. We do not anticipate changes -** to experimental interfaces but reserve the right to make minor changes -** if experience from use "in the wild" suggest such changes are prudent. -** -** The official C-language API documentation for SQLite is derived -** from comments in this file. This file is the authoritative source -** on how SQLite interfaces are suppose to operate. -** -** The name of this file under configuration management is "sqlite.h.in". -** The makefile makes some minor changes to this file (such as inserting -** the version number) and changes its name to "sqlite3.h" as -** part of the build process. -*/ -#ifndef _SQLITE3_H_ -#define _SQLITE3_H_ -#include /* Needed for the definition of va_list */ - -/* -** Make sure we can call this stuff from C++. -*/ -#ifdef __cplusplus -extern "C" { -#endif - - -/* -** Add the ability to override 'extern' -*/ -#ifndef SQLITE_EXTERN -# define SQLITE_EXTERN extern -#endif - -#ifndef SQLITE_API -# define SQLITE_API -#endif - - -/* -** These no-op macros are used in front of interfaces to mark those -** interfaces as either deprecated or experimental. New applications -** should not use deprecated interfaces - they are support for backwards -** compatibility only. Application writers should be aware that -** experimental interfaces are subject to change in point releases. -** -** These macros used to resolve to various kinds of compiler magic that -** would generate warning messages when they were used. But that -** compiler magic ended up generating such a flurry of bug reports -** that we have taken it all out and gone back to using simple -** noop macros. -*/ -#define SQLITE_DEPRECATED -#define SQLITE_EXPERIMENTAL - -/* -** Ensure these symbols were not defined by some previous header file. -*/ -#ifdef SQLITE_VERSION -# undef SQLITE_VERSION -#endif -#ifdef SQLITE_VERSION_NUMBER -# undef SQLITE_VERSION_NUMBER -#endif - -/* -** CAPI3REF: Compile-Time Library Version Numbers {H10010} -** -** The SQLITE_VERSION and SQLITE_VERSION_NUMBER #defines in -** the sqlite3.h file specify the version of SQLite with which -** that header file is associated. -** -** The "version" of SQLite is a string of the form "W.X.Y" or "W.X.Y.Z". -** The W value is major version number and is always 3 in SQLite3. -** The W value only changes when backwards compatibility is -** broken and we intend to never break backwards compatibility. -** The X value is the minor version number and only changes when -** there are major feature enhancements that are forwards compatible -** but not backwards compatible. -** The Y value is the release number and is incremented with -** each release but resets back to 0 whenever X is incremented. -** The Z value only appears on branch releases. -** -** The SQLITE_VERSION_NUMBER is an integer that is computed as -** follows: -** -**
-** SQLITE_VERSION_NUMBER = W*1000000 + X*1000 + Y
-** 
-** -** Since version 3.6.18, SQLite source code has been stored in the -** fossil configuration management -** system. The SQLITE_SOURCE_ID -** macro is a string which identifies a particular check-in of SQLite -** within its configuration management system. The string contains the -** date and time of the check-in (UTC) and an SHA1 hash of the entire -** source tree. -** -** See also: [sqlite3_libversion()], -** [sqlite3_libversion_number()], [sqlite3_sourceid()], -** [sqlite_version()] and [sqlite_source_id()]. -** -** Requirements: [H10011] [H10014] -*/ -#define SQLITE_VERSION "3.6.20" -#define SQLITE_VERSION_NUMBER 3006020 -#define SQLITE_SOURCE_ID "2009-11-04 13:30:02 eb7a544fe49d1626bacecfe53ddc03fe082e3243" - -/* -** CAPI3REF: Run-Time Library Version Numbers {H10020} -** KEYWORDS: sqlite3_version -** -** These interfaces provide the same information as the [SQLITE_VERSION], -** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] #defines in the header, -** but are associated with the library instead of the header file. Cautious -** programmers might include assert() statements in their application to -** verify that values returned by these interfaces match the macros in -** the header, and thus insure that the application is -** compiled with matching library and header files. -** -**
-** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
-** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
-** assert( strcmp(sqlite3_libversion,SQLITE_VERSION)==0 );
-** 
-** -** The sqlite3_libversion() function returns the same information as is -** in the sqlite3_version[] string constant. The function is provided -** for use in DLLs since DLL users usually do not have direct access to string -** constants within the DLL. Similarly, the sqlite3_sourceid() function -** returns the same information as is in the [SQLITE_SOURCE_ID] #define of -** the header file. -** -** See also: [sqlite_version()] and [sqlite_source_id()]. -** -** Requirements: [H10021] [H10022] [H10023] -*/ -SQLITE_API SQLITE_EXTERN const char sqlite3_version[]; -SQLITE_API const char *sqlite3_libversion(void); -SQLITE_API const char *sqlite3_sourceid(void); -SQLITE_API int sqlite3_libversion_number(void); - -/* -** CAPI3REF: Test To See If The Library Is Threadsafe {H10100} -** -** SQLite can be compiled with or without mutexes. When -** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes -** are enabled and SQLite is threadsafe. When the -** [SQLITE_THREADSAFE] macro is 0, -** the mutexes are omitted. Without the mutexes, it is not safe -** to use SQLite concurrently from more than one thread. -** -** Enabling mutexes incurs a measurable performance penalty. -** So if speed is of utmost importance, it makes sense to disable -** the mutexes. But for maximum safety, mutexes should be enabled. -** The default behavior is for mutexes to be enabled. -** -** This interface can be used by an application to make sure that the -** version of SQLite that it is linking against was compiled with -** the desired setting of the [SQLITE_THREADSAFE] macro. -** -** This interface only reports on the compile-time mutex setting -** of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with -** SQLITE_THREADSAFE=1 then mutexes are enabled by default but -** can be fully or partially disabled using a call to [sqlite3_config()] -** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD], -** or [SQLITE_CONFIG_MUTEX]. The return value of this function shows -** only the default compile-time setting, not any run-time changes -** to that setting. -** -** See the [threading mode] documentation for additional information. -** -** Requirements: [H10101] [H10102] -*/ -SQLITE_API int sqlite3_threadsafe(void); - -/* -** CAPI3REF: Database Connection Handle {H12000} -** KEYWORDS: {database connection} {database connections} -** -** Each open SQLite database is represented by a pointer to an instance of -** the opaque structure named "sqlite3". It is useful to think of an sqlite3 -** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and -** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] -** is its destructor. There are many other interfaces (such as -** [sqlite3_prepare_v2()], [sqlite3_create_function()], and -** [sqlite3_busy_timeout()] to name but three) that are methods on an -** sqlite3 object. -*/ -typedef struct sqlite3 sqlite3; - -/* -** CAPI3REF: 64-Bit Integer Types {H10200} -** KEYWORDS: sqlite_int64 sqlite_uint64 -** -** Because there is no cross-platform way to specify 64-bit integer types -** SQLite includes typedefs for 64-bit signed and unsigned integers. -** -** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions. -** The sqlite_int64 and sqlite_uint64 types are supported for backwards -** compatibility only. -** -** Requirements: [H10201] [H10202] -*/ -#ifdef SQLITE_INT64_TYPE - typedef SQLITE_INT64_TYPE sqlite_int64; - typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; -#elif defined(_MSC_VER) || defined(__BORLANDC__) - typedef __int64 sqlite_int64; - typedef unsigned __int64 sqlite_uint64; -#else - typedef long long int sqlite_int64; - typedef unsigned long long int sqlite_uint64; -#endif -typedef sqlite_int64 sqlite3_int64; -typedef sqlite_uint64 sqlite3_uint64; - -/* -** If compiling for a processor that lacks floating point support, -** substitute integer for floating-point. -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# define double sqlite3_int64 -#endif - -/* -** CAPI3REF: Closing A Database Connection {H12010} -** -** This routine is the destructor for the [sqlite3] object. -** -** Applications must [sqlite3_finalize | finalize] all [prepared statements] -** and [sqlite3_blob_close | close] all [BLOB handles] associated with -** the [sqlite3] object prior to attempting to close the object. -** -** If [sqlite3_close()] is invoked while a transaction is open, -** the transaction is automatically rolled back. -** -** The C parameter to [sqlite3_close(C)] must be either a NULL -** pointer or an [sqlite3] object pointer obtained -** from [sqlite3_open()], [sqlite3_open16()], or -** [sqlite3_open_v2()], and not previously closed. -** -** Requirements: -** [H12011] [H12012] [H12013] [H12014] [H12015] [H12019] -*/ -SQLITE_API int sqlite3_close(sqlite3 *); - -/* -** The type for a callback function. -** This is legacy and deprecated. It is included for historical -** compatibility and is not documented. -*/ -typedef int (*sqlite3_callback)(void*,int,char**, char**); - -/* -** CAPI3REF: One-Step Query Execution Interface {H12100} -** -** The sqlite3_exec() interface is a convenient way of running one or more -** SQL statements without having to write a lot of C code. The UTF-8 encoded -** SQL statements are passed in as the second parameter to sqlite3_exec(). -** The statements are evaluated one by one until either an error or -** an interrupt is encountered, or until they are all done. The 3rd parameter -** is an optional callback that is invoked once for each row of any query -** results produced by the SQL statements. The 5th parameter tells where -** to write any error messages. -** -** The error message passed back through the 5th parameter is held -** in memory obtained from [sqlite3_malloc()]. To avoid a memory leak, -** the calling application should call [sqlite3_free()] on any error -** message returned through the 5th parameter when it has finished using -** the error message. -** -** If the SQL statement in the 2nd parameter is NULL or an empty string -** or a string containing only whitespace and comments, then no SQL -** statements are evaluated and the database is not changed. -** -** The sqlite3_exec() interface is implemented in terms of -** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()]. -** The sqlite3_exec() routine does nothing to the database that cannot be done -** by [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()]. -** -** The first parameter to [sqlite3_exec()] must be an valid and open -** [database connection]. -** -** The database connection must not be closed while -** [sqlite3_exec()] is running. -** -** The calling function should use [sqlite3_free()] to free -** the memory that *errmsg is left pointing at once the error -** message is no longer needed. -** -** The SQL statement text in the 2nd parameter to [sqlite3_exec()] -** must remain unchanged while [sqlite3_exec()] is running. -** -** Requirements: -** [H12101] [H12102] [H12104] [H12105] [H12107] [H12110] [H12113] [H12116] -** [H12119] [H12122] [H12125] [H12131] [H12134] [H12137] [H12138] -*/ -SQLITE_API int sqlite3_exec( - sqlite3*, /* An open database */ - const char *sql, /* SQL to be evaluated */ - int (*callback)(void*,int,char**,char**), /* Callback function */ - void *, /* 1st argument to callback */ - char **errmsg /* Error msg written here */ -); - -/* -** CAPI3REF: Result Codes {H10210} -** KEYWORDS: SQLITE_OK {error code} {error codes} -** KEYWORDS: {result code} {result codes} -** -** Many SQLite functions return an integer result code from the set shown -** here in order to indicates success or failure. -** -** New error codes may be added in future versions of SQLite. -** -** See also: [SQLITE_IOERR_READ | extended result codes] -*/ -#define SQLITE_OK 0 /* Successful result */ -/* beginning-of-error-codes */ -#define SQLITE_ERROR 1 /* SQL error or missing database */ -#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */ -#define SQLITE_PERM 3 /* Access permission denied */ -#define SQLITE_ABORT 4 /* Callback routine requested an abort */ -#define SQLITE_BUSY 5 /* The database file is locked */ -#define SQLITE_LOCKED 6 /* A table in the database is locked */ -#define SQLITE_NOMEM 7 /* A malloc() failed */ -#define SQLITE_READONLY 8 /* Attempt to write a readonly database */ -#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ -#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ -#define SQLITE_CORRUPT 11 /* The database disk image is malformed */ -#define SQLITE_NOTFOUND 12 /* NOT USED. Table or record not found */ -#define SQLITE_FULL 13 /* Insertion failed because database is full */ -#define SQLITE_CANTOPEN 14 /* Unable to open the database file */ -#define SQLITE_PROTOCOL 15 /* NOT USED. Database lock protocol error */ -#define SQLITE_EMPTY 16 /* Database is empty */ -#define SQLITE_SCHEMA 17 /* The database schema changed */ -#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ -#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ -#define SQLITE_MISMATCH 20 /* Data type mismatch */ -#define SQLITE_MISUSE 21 /* Library used incorrectly */ -#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */ -#define SQLITE_AUTH 23 /* Authorization denied */ -#define SQLITE_FORMAT 24 /* Auxiliary database format error */ -#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ -#define SQLITE_NOTADB 26 /* File opened that is not a database file */ -#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ -#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ -/* end-of-error-codes */ - -/* -** CAPI3REF: Extended Result Codes {H10220} -** KEYWORDS: {extended error code} {extended error codes} -** KEYWORDS: {extended result code} {extended result codes} -** -** In its default configuration, SQLite API routines return one of 26 integer -** [SQLITE_OK | result codes]. However, experience has shown that many of -** these result codes are too coarse-grained. They do not provide as -** much information about problems as programmers might like. In an effort to -** address this, newer versions of SQLite (version 3.3.8 and later) include -** support for additional result codes that provide more detailed information -** about errors. The extended result codes are enabled or disabled -** on a per database connection basis using the -** [sqlite3_extended_result_codes()] API. -** -** Some of the available extended result codes are listed here. -** One may expect the number of extended result codes will be expand -** over time. Software that uses extended result codes should expect -** to see new result codes in future releases of SQLite. -** -** The SQLITE_OK result code will never be extended. It will always -** be exactly zero. -*/ -#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8)) -#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8)) -#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8)) -#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8)) -#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8)) -#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8)) -#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8)) -#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8)) -#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8)) -#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8)) -#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8)) -#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8)) -#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8)) -#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8)) -#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8)) -#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8)) -#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8)) -#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8) ) - -/* -** CAPI3REF: Flags For File Open Operations {H10230} -** -** These bit values are intended for use in the -** 3rd parameter to the [sqlite3_open_v2()] interface and -** in the 4th parameter to the xOpen method of the -** [sqlite3_vfs] object. -*/ -#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */ -#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ -#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ -#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ -#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ -#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */ -#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */ -#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */ -#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */ -#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */ - -/* -** CAPI3REF: Device Characteristics {H10240} -** -** The xDeviceCapabilities method of the [sqlite3_io_methods] -** object returns an integer which is a vector of the these -** bit values expressing I/O characteristics of the mass storage -** device that holds the file that the [sqlite3_io_methods] -** refers to. -** -** The SQLITE_IOCAP_ATOMIC property means that all writes of -** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values -** mean that writes of blocks that are nnn bytes in size and -** are aligned to an address which is an integer multiple of -** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means -** that when data is appended to a file, the data is appended -** first then the size of the file is extended, never the other -** way around. The SQLITE_IOCAP_SEQUENTIAL property means that -** information is written to disk in the same order as calls -** to xWrite(). -*/ -#define SQLITE_IOCAP_ATOMIC 0x00000001 -#define SQLITE_IOCAP_ATOMIC512 0x00000002 -#define SQLITE_IOCAP_ATOMIC1K 0x00000004 -#define SQLITE_IOCAP_ATOMIC2K 0x00000008 -#define SQLITE_IOCAP_ATOMIC4K 0x00000010 -#define SQLITE_IOCAP_ATOMIC8K 0x00000020 -#define SQLITE_IOCAP_ATOMIC16K 0x00000040 -#define SQLITE_IOCAP_ATOMIC32K 0x00000080 -#define SQLITE_IOCAP_ATOMIC64K 0x00000100 -#define SQLITE_IOCAP_SAFE_APPEND 0x00000200 -#define SQLITE_IOCAP_SEQUENTIAL 0x00000400 - -/* -** CAPI3REF: File Locking Levels {H10250} -** -** SQLite uses one of these integer values as the second -** argument to calls it makes to the xLock() and xUnlock() methods -** of an [sqlite3_io_methods] object. -*/ -#define SQLITE_LOCK_NONE 0 -#define SQLITE_LOCK_SHARED 1 -#define SQLITE_LOCK_RESERVED 2 -#define SQLITE_LOCK_PENDING 3 -#define SQLITE_LOCK_EXCLUSIVE 4 - -/* -** CAPI3REF: Synchronization Type Flags {H10260} -** -** When SQLite invokes the xSync() method of an -** [sqlite3_io_methods] object it uses a combination of -** these integer values as the second argument. -** -** When the SQLITE_SYNC_DATAONLY flag is used, it means that the -** sync operation only needs to flush data to mass storage. Inode -** information need not be flushed. If the lower four bits of the flag -** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. -** If the lower four bits equal SQLITE_SYNC_FULL, that means -** to use Mac OS X style fullsync instead of fsync(). -*/ -#define SQLITE_SYNC_NORMAL 0x00002 -#define SQLITE_SYNC_FULL 0x00003 -#define SQLITE_SYNC_DATAONLY 0x00010 - -/* -** CAPI3REF: OS Interface Open File Handle {H11110} -** -** An [sqlite3_file] object represents an open file in the -** [sqlite3_vfs | OS interface layer]. Individual OS interface -** implementations will -** want to subclass this object by appending additional fields -** for their own use. The pMethods entry is a pointer to an -** [sqlite3_io_methods] object that defines methods for performing -** I/O operations on the open file. -*/ -typedef struct sqlite3_file sqlite3_file; -struct sqlite3_file { - const struct sqlite3_io_methods *pMethods; /* Methods for an open file */ -}; - -/* -** CAPI3REF: OS Interface File Virtual Methods Object {H11120} -** -** Every file opened by the [sqlite3_vfs] xOpen method populates an -** [sqlite3_file] object (or, more commonly, a subclass of the -** [sqlite3_file] object) with a pointer to an instance of this object. -** This object defines the methods used to perform various operations -** against the open file represented by the [sqlite3_file] object. -** -** If the xOpen method sets the sqlite3_file.pMethods element -** to a non-NULL pointer, then the sqlite3_io_methods.xClose method -** may be invoked even if the xOpen reported that it failed. The -** only way to prevent a call to xClose following a failed xOpen -** is for the xOpen to set the sqlite3_file.pMethods element to NULL. -** -** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or -** [SQLITE_SYNC_FULL]. The first choice is the normal fsync(). -** The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY] -** flag may be ORed in to indicate that only the data of the file -** and not its inode needs to be synced. -** -** The integer values to xLock() and xUnlock() are one of -**
    -**
  • [SQLITE_LOCK_NONE], -**
  • [SQLITE_LOCK_SHARED], -**
  • [SQLITE_LOCK_RESERVED], -**
  • [SQLITE_LOCK_PENDING], or -**
  • [SQLITE_LOCK_EXCLUSIVE]. -**
-** xLock() increases the lock. xUnlock() decreases the lock. -** The xCheckReservedLock() method checks whether any database connection, -** either in this process or in some other process, is holding a RESERVED, -** PENDING, or EXCLUSIVE lock on the file. It returns true -** if such a lock exists and false otherwise. -** -** The xFileControl() method is a generic interface that allows custom -** VFS implementations to directly control an open file using the -** [sqlite3_file_control()] interface. The second "op" argument is an -** integer opcode. The third argument is a generic pointer intended to -** point to a structure that may contain arguments or space in which to -** write return values. Potential uses for xFileControl() might be -** functions to enable blocking locks with timeouts, to change the -** locking strategy (for example to use dot-file locks), to inquire -** about the status of a lock, or to break stale locks. The SQLite -** core reserves all opcodes less than 100 for its own use. -** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available. -** Applications that define a custom xFileControl method should use opcodes -** greater than 100 to avoid conflicts. -** -** The xSectorSize() method returns the sector size of the -** device that underlies the file. The sector size is the -** minimum write that can be performed without disturbing -** other bytes in the file. The xDeviceCharacteristics() -** method returns a bit vector describing behaviors of the -** underlying device: -** -**
    -**
  • [SQLITE_IOCAP_ATOMIC] -**
  • [SQLITE_IOCAP_ATOMIC512] -**
  • [SQLITE_IOCAP_ATOMIC1K] -**
  • [SQLITE_IOCAP_ATOMIC2K] -**
  • [SQLITE_IOCAP_ATOMIC4K] -**
  • [SQLITE_IOCAP_ATOMIC8K] -**
  • [SQLITE_IOCAP_ATOMIC16K] -**
  • [SQLITE_IOCAP_ATOMIC32K] -**
  • [SQLITE_IOCAP_ATOMIC64K] -**
  • [SQLITE_IOCAP_SAFE_APPEND] -**
  • [SQLITE_IOCAP_SEQUENTIAL] -**
-** -** The SQLITE_IOCAP_ATOMIC property means that all writes of -** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values -** mean that writes of blocks that are nnn bytes in size and -** are aligned to an address which is an integer multiple of -** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means -** that when data is appended to a file, the data is appended -** first then the size of the file is extended, never the other -** way around. The SQLITE_IOCAP_SEQUENTIAL property means that -** information is written to disk in the same order as calls -** to xWrite(). -** -** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill -** in the unread portions of the buffer with zeros. A VFS that -** fails to zero-fill short reads might seem to work. However, -** failure to zero-fill short reads will eventually lead to -** database corruption. -*/ -typedef struct sqlite3_io_methods sqlite3_io_methods; -struct sqlite3_io_methods { - int iVersion; - int (*xClose)(sqlite3_file*); - int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); - int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); - int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); - int (*xSync)(sqlite3_file*, int flags); - int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); - int (*xLock)(sqlite3_file*, int); - int (*xUnlock)(sqlite3_file*, int); - int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); - int (*xFileControl)(sqlite3_file*, int op, void *pArg); - int (*xSectorSize)(sqlite3_file*); - int (*xDeviceCharacteristics)(sqlite3_file*); - /* Additional methods may be added in future releases */ -}; - -/* -** CAPI3REF: Standard File Control Opcodes {H11310} -** -** These integer constants are opcodes for the xFileControl method -** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()] -** interface. -** -** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This -** opcode causes the xFileControl method to write the current state of -** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], -** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) -** into an integer that the pArg argument points to. This capability -** is used during testing and only needs to be supported when SQLITE_TEST -** is defined. -*/ -#define SQLITE_FCNTL_LOCKSTATE 1 -#define SQLITE_GET_LOCKPROXYFILE 2 -#define SQLITE_SET_LOCKPROXYFILE 3 -#define SQLITE_LAST_ERRNO 4 - -/* -** CAPI3REF: Mutex Handle {H17110} -** -** The mutex module within SQLite defines [sqlite3_mutex] to be an -** abstract type for a mutex object. The SQLite core never looks -** at the internal representation of an [sqlite3_mutex]. It only -** deals with pointers to the [sqlite3_mutex] object. -** -** Mutexes are created using [sqlite3_mutex_alloc()]. -*/ -typedef struct sqlite3_mutex sqlite3_mutex; - -/* -** CAPI3REF: OS Interface Object {H11140} -** -** An instance of the sqlite3_vfs object defines the interface between -** the SQLite core and the underlying operating system. The "vfs" -** in the name of the object stands for "virtual file system". -** -** The value of the iVersion field is initially 1 but may be larger in -** future versions of SQLite. Additional fields may be appended to this -** object when the iVersion value is increased. Note that the structure -** of the sqlite3_vfs object changes in the transaction between -** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not -** modified. -** -** The szOsFile field is the size of the subclassed [sqlite3_file] -** structure used by this VFS. mxPathname is the maximum length of -** a pathname in this VFS. -** -** Registered sqlite3_vfs objects are kept on a linked list formed by -** the pNext pointer. The [sqlite3_vfs_register()] -** and [sqlite3_vfs_unregister()] interfaces manage this list -** in a thread-safe way. The [sqlite3_vfs_find()] interface -** searches the list. Neither the application code nor the VFS -** implementation should use the pNext pointer. -** -** The pNext field is the only field in the sqlite3_vfs -** structure that SQLite will ever modify. SQLite will only access -** or modify this field while holding a particular static mutex. -** The application should never modify anything within the sqlite3_vfs -** object once the object has been registered. -** -** The zName field holds the name of the VFS module. The name must -** be unique across all VFS modules. -** -** SQLite will guarantee that the zFilename parameter to xOpen -** is either a NULL pointer or string obtained -** from xFullPathname(). SQLite further guarantees that -** the string will be valid and unchanged until xClose() is -** called. Because of the previous sentence, -** the [sqlite3_file] can safely store a pointer to the -** filename if it needs to remember the filename for some reason. -** If the zFilename parameter is xOpen is a NULL pointer then xOpen -** must invent its own temporary name for the file. Whenever the -** xFilename parameter is NULL it will also be the case that the -** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. -** -** The flags argument to xOpen() includes all bits set in -** the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] -** or [sqlite3_open16()] is used, then flags includes at least -** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. -** If xOpen() opens a file read-only then it sets *pOutFlags to -** include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. -** -** SQLite will also add one of the following flags to the xOpen() -** call, depending on the object being opened: -** -**
    -**
  • [SQLITE_OPEN_MAIN_DB] -**
  • [SQLITE_OPEN_MAIN_JOURNAL] -**
  • [SQLITE_OPEN_TEMP_DB] -**
  • [SQLITE_OPEN_TEMP_JOURNAL] -**
  • [SQLITE_OPEN_TRANSIENT_DB] -**
  • [SQLITE_OPEN_SUBJOURNAL] -**
  • [SQLITE_OPEN_MASTER_JOURNAL] -**
-** -** The file I/O implementation can use the object type flags to -** change the way it deals with files. For example, an application -** that does not care about crash recovery or rollback might make -** the open of a journal file a no-op. Writes to this journal would -** also be no-ops, and any attempt to read the journal would return -** SQLITE_IOERR. Or the implementation might recognize that a database -** file will be doing page-aligned sector reads and writes in a random -** order and set up its I/O subsystem accordingly. -** -** SQLite might also add one of the following flags to the xOpen method: -** -**
    -**
  • [SQLITE_OPEN_DELETEONCLOSE] -**
  • [SQLITE_OPEN_EXCLUSIVE] -**
-** -** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be -** deleted when it is closed. The [SQLITE_OPEN_DELETEONCLOSE] -** will be set for TEMP databases, journals and for subjournals. -** -** The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction -** with the [SQLITE_OPEN_CREATE] flag, which are both directly -** analogous to the O_EXCL and O_CREAT flags of the POSIX open() -** API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the -** SQLITE_OPEN_CREATE, is used to indicate that file should always -** be created, and that it is an error if it already exists. -** It is not used to indicate the file should be opened -** for exclusive access. -** -** At least szOsFile bytes of memory are allocated by SQLite -** to hold the [sqlite3_file] structure passed as the third -** argument to xOpen. The xOpen method does not have to -** allocate the structure; it should just fill it in. Note that -** the xOpen method must set the sqlite3_file.pMethods to either -** a valid [sqlite3_io_methods] object or to NULL. xOpen must do -** this even if the open fails. SQLite expects that the sqlite3_file.pMethods -** element will be valid after xOpen returns regardless of the success -** or failure of the xOpen call. -** -** The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] -** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to -** test whether a file is readable and writable, or [SQLITE_ACCESS_READ] -** to test whether a file is at least readable. The file can be a -** directory. -** -** SQLite will always allocate at least mxPathname+1 bytes for the -** output buffer xFullPathname. The exact size of the output buffer -** is also passed as a parameter to both methods. If the output buffer -** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is -** handled as a fatal error by SQLite, vfs implementations should endeavor -** to prevent this by setting mxPathname to a sufficiently large value. -** -** The xRandomness(), xSleep(), and xCurrentTime() interfaces -** are not strictly a part of the filesystem, but they are -** included in the VFS structure for completeness. -** The xRandomness() function attempts to return nBytes bytes -** of good-quality randomness into zOut. The return value is -** the actual number of bytes of randomness obtained. -** The xSleep() method causes the calling thread to sleep for at -** least the number of microseconds given. The xCurrentTime() -** method returns a Julian Day Number for the current date and time. -** -*/ -typedef struct sqlite3_vfs sqlite3_vfs; -struct sqlite3_vfs { - int iVersion; /* Structure version number */ - int szOsFile; /* Size of subclassed sqlite3_file */ - int mxPathname; /* Maximum file pathname length */ - sqlite3_vfs *pNext; /* Next registered VFS */ - const char *zName; /* Name of this virtual file system */ - void *pAppData; /* Pointer to application-specific data */ - int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, - int flags, int *pOutFlags); - int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); - int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); - int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); - void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); - void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); - void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); - void (*xDlClose)(sqlite3_vfs*, void*); - int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); - int (*xSleep)(sqlite3_vfs*, int microseconds); - int (*xCurrentTime)(sqlite3_vfs*, double*); - int (*xGetLastError)(sqlite3_vfs*, int, char *); - /* New fields may be appended in figure versions. The iVersion - ** value will increment whenever this happens. */ -}; - -/* -** CAPI3REF: Flags for the xAccess VFS method {H11190} -** -** These integer constants can be used as the third parameter to -** the xAccess method of an [sqlite3_vfs] object. {END} They determine -** what kind of permissions the xAccess method is looking for. -** With SQLITE_ACCESS_EXISTS, the xAccess method -** simply checks whether the file exists. -** With SQLITE_ACCESS_READWRITE, the xAccess method -** checks whether the file is both readable and writable. -** With SQLITE_ACCESS_READ, the xAccess method -** checks whether the file is readable. -*/ -#define SQLITE_ACCESS_EXISTS 0 -#define SQLITE_ACCESS_READWRITE 1 -#define SQLITE_ACCESS_READ 2 - -/* -** CAPI3REF: Initialize The SQLite Library {H10130} -** -** The sqlite3_initialize() routine initializes the -** SQLite library. The sqlite3_shutdown() routine -** deallocates any resources that were allocated by sqlite3_initialize(). -** This routines are designed to aid in process initialization and -** shutdown on embedded systems. Workstation applications using -** SQLite normally do not need to invoke either of these routines. -** -** A call to sqlite3_initialize() is an "effective" call if it is -** the first time sqlite3_initialize() is invoked during the lifetime of -** the process, or if it is the first time sqlite3_initialize() is invoked -** following a call to sqlite3_shutdown(). Only an effective call -** of sqlite3_initialize() does any initialization. All other calls -** are harmless no-ops. -** -** A call to sqlite3_shutdown() is an "effective" call if it is the first -** call to sqlite3_shutdown() since the last sqlite3_initialize(). Only -** an effective call to sqlite3_shutdown() does any deinitialization. -** All other valid calls to sqlite3_shutdown() are harmless no-ops. -** -** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() -** is not. The sqlite3_shutdown() interface must only be called from a -** single thread. All open [database connections] must be closed and all -** other SQLite resources must be deallocated prior to invoking -** sqlite3_shutdown(). -** -** Among other things, sqlite3_initialize() will invoke -** sqlite3_os_init(). Similarly, sqlite3_shutdown() -** will invoke sqlite3_os_end(). -** -** The sqlite3_initialize() routine returns [SQLITE_OK] on success. -** If for some reason, sqlite3_initialize() is unable to initialize -** the library (perhaps it is unable to allocate a needed resource such -** as a mutex) it returns an [error code] other than [SQLITE_OK]. -** -** The sqlite3_initialize() routine is called internally by many other -** SQLite interfaces so that an application usually does not need to -** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] -** calls sqlite3_initialize() so the SQLite library will be automatically -** initialized when [sqlite3_open()] is called if it has not be initialized -** already. However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] -** compile-time option, then the automatic calls to sqlite3_initialize() -** are omitted and the application must call sqlite3_initialize() directly -** prior to using any other SQLite interface. For maximum portability, -** it is recommended that applications always invoke sqlite3_initialize() -** directly prior to using any other SQLite interface. Future releases -** of SQLite may require this. In other words, the behavior exhibited -** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the -** default behavior in some future release of SQLite. -** -** The sqlite3_os_init() routine does operating-system specific -** initialization of the SQLite library. The sqlite3_os_end() -** routine undoes the effect of sqlite3_os_init(). Typical tasks -** performed by these routines include allocation or deallocation -** of static resources, initialization of global variables, -** setting up a default [sqlite3_vfs] module, or setting up -** a default configuration using [sqlite3_config()]. -** -** The application should never invoke either sqlite3_os_init() -** or sqlite3_os_end() directly. The application should only invoke -** sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init() -** interface is called automatically by sqlite3_initialize() and -** sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate -** implementations for sqlite3_os_init() and sqlite3_os_end() -** are built into SQLite when it is compiled for Unix, Windows, or OS/2. -** When [custom builds | built for other platforms] -** (using the [SQLITE_OS_OTHER=1] compile-time -** option) the application must supply a suitable implementation for -** sqlite3_os_init() and sqlite3_os_end(). An application-supplied -** implementation of sqlite3_os_init() or sqlite3_os_end() -** must return [SQLITE_OK] on success and some other [error code] upon -** failure. -*/ -SQLITE_API int sqlite3_initialize(void); -SQLITE_API int sqlite3_shutdown(void); -SQLITE_API int sqlite3_os_init(void); -SQLITE_API int sqlite3_os_end(void); - -/* -** CAPI3REF: Configuring The SQLite Library {H14100} -** EXPERIMENTAL -** -** The sqlite3_config() interface is used to make global configuration -** changes to SQLite in order to tune SQLite to the specific needs of -** the application. The default configuration is recommended for most -** applications and so this routine is usually not necessary. It is -** provided to support rare applications with unusual needs. -** -** The sqlite3_config() interface is not threadsafe. The application -** must insure that no other SQLite interfaces are invoked by other -** threads while sqlite3_config() is running. Furthermore, sqlite3_config() -** may only be invoked prior to library initialization using -** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. -** Note, however, that sqlite3_config() can be called as part of the -** implementation of an application-defined [sqlite3_os_init()]. -** -** The first argument to sqlite3_config() is an integer -** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines -** what property of SQLite is to be configured. Subsequent arguments -** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option] -** in the first argument. -** -** When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. -** If the option is unknown or SQLite is unable to set the option -** then this routine returns a non-zero [error code]. -** -** Requirements: -** [H14103] [H14106] [H14120] [H14123] [H14126] [H14129] [H14132] [H14135] -** [H14138] [H14141] [H14144] [H14147] [H14150] [H14153] [H14156] [H14159] -** [H14162] [H14165] [H14168] -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_config(int, ...); - -/* -** CAPI3REF: Configure database connections {H14200} -** EXPERIMENTAL -** -** The sqlite3_db_config() interface is used to make configuration -** changes to a [database connection]. The interface is similar to -** [sqlite3_config()] except that the changes apply to a single -** [database connection] (specified in the first argument). The -** sqlite3_db_config() interface can only be used immediately after -** the database connection is created using [sqlite3_open()], -** [sqlite3_open16()], or [sqlite3_open_v2()]. -** -** The second argument to sqlite3_db_config(D,V,...) is the -** configuration verb - an integer code that indicates what -** aspect of the [database connection] is being configured. -** The only choice for this value is [SQLITE_DBCONFIG_LOOKASIDE]. -** New verbs are likely to be added in future releases of SQLite. -** Additional arguments depend on the verb. -** -** Requirements: -** [H14203] [H14206] [H14209] [H14212] [H14215] -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...); - -/* -** CAPI3REF: Memory Allocation Routines {H10155} -** EXPERIMENTAL -** -** An instance of this object defines the interface between SQLite -** and low-level memory allocation routines. -** -** This object is used in only one place in the SQLite interface. -** A pointer to an instance of this object is the argument to -** [sqlite3_config()] when the configuration option is -** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. -** By creating an instance of this object -** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) -** during configuration, an application can specify an alternative -** memory allocation subsystem for SQLite to use for all of its -** dynamic memory needs. -** -** Note that SQLite comes with several [built-in memory allocators] -** that are perfectly adequate for the overwhelming majority of applications -** and that this object is only useful to a tiny minority of applications -** with specialized memory allocation requirements. This object is -** also used during testing of SQLite in order to specify an alternative -** memory allocator that simulates memory out-of-memory conditions in -** order to verify that SQLite recovers gracefully from such -** conditions. -** -** The xMalloc and xFree methods must work like the -** malloc() and free() functions from the standard C library. -** The xRealloc method must work like realloc() from the standard C library -** with the exception that if the second argument to xRealloc is zero, -** xRealloc must be a no-op - it must not perform any allocation or -** deallocation. SQLite guaranteeds that the second argument to -** xRealloc is always a value returned by a prior call to xRoundup. -** And so in cases where xRoundup always returns a positive number, -** xRealloc can perform exactly as the standard library realloc() and -** still be in compliance with this specification. -** -** xSize should return the allocated size of a memory allocation -** previously obtained from xMalloc or xRealloc. The allocated size -** is always at least as big as the requested size but may be larger. -** -** The xRoundup method returns what would be the allocated size of -** a memory allocation given a particular requested size. Most memory -** allocators round up memory allocations at least to the next multiple -** of 8. Some allocators round up to a larger multiple or to a power of 2. -** Every memory allocation request coming in through [sqlite3_malloc()] -** or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, -** that causes the corresponding memory allocation to fail. -** -** The xInit method initializes the memory allocator. (For example, -** it might allocate any require mutexes or initialize internal data -** structures. The xShutdown method is invoked (indirectly) by -** [sqlite3_shutdown()] and should deallocate any resources acquired -** by xInit. The pAppData pointer is used as the only parameter to -** xInit and xShutdown. -** -** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes -** the xInit method, so the xInit method need not be threadsafe. The -** xShutdown method is only called from [sqlite3_shutdown()] so it does -** not need to be threadsafe either. For all other methods, SQLite -** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the -** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which -** it is by default) and so the methods are automatically serialized. -** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other -** methods must be threadsafe or else make their own arrangements for -** serialization. -** -** SQLite will never invoke xInit() more than once without an intervening -** call to xShutdown(). -*/ -typedef struct sqlite3_mem_methods sqlite3_mem_methods; -struct sqlite3_mem_methods { - void *(*xMalloc)(int); /* Memory allocation function */ - void (*xFree)(void*); /* Free a prior allocation */ - void *(*xRealloc)(void*,int); /* Resize an allocation */ - int (*xSize)(void*); /* Return the size of an allocation */ - int (*xRoundup)(int); /* Round up request size to allocation size */ - int (*xInit)(void*); /* Initialize the memory allocator */ - void (*xShutdown)(void*); /* Deinitialize the memory allocator */ - void *pAppData; /* Argument to xInit() and xShutdown() */ -}; - -/* -** CAPI3REF: Configuration Options {H10160} -** EXPERIMENTAL -** -** These constants are the available integer configuration options that -** can be passed as the first argument to the [sqlite3_config()] interface. -** -** New configuration options may be added in future releases of SQLite. -** Existing configuration options might be discontinued. Applications -** should check the return code from [sqlite3_config()] to make sure that -** the call worked. The [sqlite3_config()] interface will return a -** non-zero [error code] if a discontinued or unsupported configuration option -** is invoked. -** -**
-**
SQLITE_CONFIG_SINGLETHREAD
-**
There are no arguments to this option. This option disables -** all mutexing and puts SQLite into a mode where it can only be used -** by a single thread.
-** -**
SQLITE_CONFIG_MULTITHREAD
-**
There are no arguments to this option. This option disables -** mutexing on [database connection] and [prepared statement] objects. -** The application is responsible for serializing access to -** [database connections] and [prepared statements]. But other mutexes -** are enabled so that SQLite will be safe to use in a multi-threaded -** environment as long as no two threads attempt to use the same -** [database connection] at the same time. See the [threading mode] -** documentation for additional information.
-** -**
SQLITE_CONFIG_SERIALIZED
-**
There are no arguments to this option. This option enables -** all mutexes including the recursive -** mutexes on [database connection] and [prepared statement] objects. -** In this mode (which is the default when SQLite is compiled with -** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access -** to [database connections] and [prepared statements] so that the -** application is free to use the same [database connection] or the -** same [prepared statement] in different threads at the same time. -** See the [threading mode] documentation for additional information.
-** -**
SQLITE_CONFIG_MALLOC
-**
This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mem_methods] structure. The argument specifies -** alternative low-level memory allocation routines to be used in place of -** the memory allocation routines built into SQLite.
-** -**
SQLITE_CONFIG_GETMALLOC
-**
This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mem_methods] structure. The [sqlite3_mem_methods] -** structure is filled with the currently defined memory allocation routines. -** This option can be used to overload the default memory allocation -** routines with a wrapper that simulations memory allocation failure or -** tracks memory usage, for example.
-** -**
SQLITE_CONFIG_MEMSTATUS
-**
This option takes single argument of type int, interpreted as a -** boolean, which enables or disables the collection of memory allocation -** statistics. When disabled, the following SQLite interfaces become -** non-operational: -**
    -**
  • [sqlite3_memory_used()] -**
  • [sqlite3_memory_highwater()] -**
  • [sqlite3_soft_heap_limit()] -**
  • [sqlite3_status()] -**
-**
-** -**
SQLITE_CONFIG_SCRATCH
-**
This option specifies a static memory buffer that SQLite can use for -** scratch memory. There are three arguments: A pointer an 8-byte -** aligned memory buffer from which the scrach allocations will be -** drawn, the size of each scratch allocation (sz), -** and the maximum number of scratch allocations (N). The sz -** argument must be a multiple of 16. The sz parameter should be a few bytes -** larger than the actual scratch space required due to internal overhead. -** The first argument should pointer to an 8-byte aligned buffer -** of at least sz*N bytes of memory. -** SQLite will use no more than one scratch buffer at once per thread, so -** N should be set to the expected maximum number of threads. The sz -** parameter should be 6 times the size of the largest database page size. -** Scratch buffers are used as part of the btree balance operation. If -** The btree balancer needs additional memory beyond what is provided by -** scratch buffers or if no scratch buffer space is specified, then SQLite -** goes to [sqlite3_malloc()] to obtain the memory it needs.
-** -**
SQLITE_CONFIG_PAGECACHE
-**
This option specifies a static memory buffer that SQLite can use for -** the database page cache with the default page cache implemenation. -** This configuration should not be used if an application-define page -** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option. -** There are three arguments to this option: A pointer to 8-byte aligned -** memory, the size of each page buffer (sz), and the number of pages (N). -** The sz argument should be the size of the largest database page -** (a power of two between 512 and 32768) plus a little extra for each -** page header. The page header size is 20 to 40 bytes depending on -** the host architecture. It is harmless, apart from the wasted memory, -** to make sz a little too large. The first -** argument should point to an allocation of at least sz*N bytes of memory. -** SQLite will use the memory provided by the first argument to satisfy its -** memory needs for the first N pages that it adds to cache. If additional -** page cache memory is needed beyond what is provided by this option, then -** SQLite goes to [sqlite3_malloc()] for the additional storage space. -** The implementation might use one or more of the N buffers to hold -** memory accounting information. The pointer in the first argument must -** be aligned to an 8-byte boundary or subsequent behavior of SQLite -** will be undefined.
-** -**
SQLITE_CONFIG_HEAP
-**
This option specifies a static memory buffer that SQLite will use -** for all of its dynamic memory allocation needs beyond those provided -** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE]. -** There are three arguments: An 8-byte aligned pointer to the memory, -** the number of bytes in the memory buffer, and the minimum allocation size. -** If the first pointer (the memory pointer) is NULL, then SQLite reverts -** to using its default memory allocator (the system malloc() implementation), -** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. If the -** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or -** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory -** allocator is engaged to handle all of SQLites memory allocation needs. -** The first pointer (the memory pointer) must be aligned to an 8-byte -** boundary or subsequent behavior of SQLite will be undefined.
-** -**
SQLITE_CONFIG_MUTEX
-**
This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mutex_methods] structure. The argument specifies -** alternative low-level mutex routines to be used in place -** the mutex routines built into SQLite.
-** -**
SQLITE_CONFIG_GETMUTEX
-**
This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mutex_methods] structure. The -** [sqlite3_mutex_methods] -** structure is filled with the currently defined mutex routines. -** This option can be used to overload the default mutex allocation -** routines with a wrapper used to track mutex usage for performance -** profiling or testing, for example.
-** -**
SQLITE_CONFIG_LOOKASIDE
-**
This option takes two arguments that determine the default -** memory allocation lookaside optimization. The first argument is the -** size of each lookaside buffer slot and the second is the number of -** slots allocated to each database connection. This option sets the -** default lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] -** verb to [sqlite3_db_config()] can be used to change the lookaside -** configuration on individual connections.
-** -**
SQLITE_CONFIG_PCACHE
-**
This option takes a single argument which is a pointer to -** an [sqlite3_pcache_methods] object. This object specifies the interface -** to a custom page cache implementation. SQLite makes a copy of the -** object and uses it for page cache memory allocations.
-** -**
SQLITE_CONFIG_GETPCACHE
-**
This option takes a single argument which is a pointer to an -** [sqlite3_pcache_methods] object. SQLite copies of the current -** page cache implementation into that object.
-** -**
-*/ -#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ -#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ -#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ -#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */ -#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ -#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ -#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ -#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ -#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ -/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ -#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ -#define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */ -#define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */ - -/* -** CAPI3REF: Configuration Options {H10170} -** EXPERIMENTAL -** -** These constants are the available integer configuration options that -** can be passed as the second argument to the [sqlite3_db_config()] interface. -** -** New configuration options may be added in future releases of SQLite. -** Existing configuration options might be discontinued. Applications -** should check the return code from [sqlite3_db_config()] to make sure that -** the call worked. The [sqlite3_db_config()] interface will return a -** non-zero [error code] if a discontinued or unsupported configuration option -** is invoked. -** -**
-**
SQLITE_DBCONFIG_LOOKASIDE
-**
This option takes three additional arguments that determine the -** [lookaside memory allocator] configuration for the [database connection]. -** The first argument (the third parameter to [sqlite3_db_config()] is a -** pointer to an memory buffer to use for lookaside memory. -** The first argument may be NULL in which case SQLite will allocate the -** lookaside buffer itself using [sqlite3_malloc()]. The second argument is the -** size of each lookaside buffer slot and the third argument is the number of -** slots. The size of the buffer in the first argument must be greater than -** or equal to the product of the second and third arguments. The buffer -** must be aligned to an 8-byte boundary. If the second argument is not -** a multiple of 8, it is internally rounded down to the next smaller -** multiple of 8. See also: [SQLITE_CONFIG_LOOKASIDE]
-** -**
-*/ -#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ - - -/* -** CAPI3REF: Enable Or Disable Extended Result Codes {H12200} -** -** The sqlite3_extended_result_codes() routine enables or disables the -** [extended result codes] feature of SQLite. The extended result -** codes are disabled by default for historical compatibility considerations. -** -** Requirements: -** [H12201] [H12202] -*/ -SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); - -/* -** CAPI3REF: Last Insert Rowid {H12220} -** -** Each entry in an SQLite table has a unique 64-bit signed -** integer key called the [ROWID | "rowid"]. The rowid is always available -** as an undeclared column named ROWID, OID, or _ROWID_ as long as those -** names are not also used by explicitly declared columns. If -** the table has a column of type [INTEGER PRIMARY KEY] then that column -** is another alias for the rowid. -** -** This routine returns the [rowid] of the most recent -** successful [INSERT] into the database from the [database connection] -** in the first argument. If no successful [INSERT]s -** have ever occurred on that database connection, zero is returned. -** -** If an [INSERT] occurs within a trigger, then the [rowid] of the inserted -** row is returned by this routine as long as the trigger is running. -** But once the trigger terminates, the value returned by this routine -** reverts to the last value inserted before the trigger fired. -** -** An [INSERT] that fails due to a constraint violation is not a -** successful [INSERT] and does not change the value returned by this -** routine. Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, -** and INSERT OR ABORT make no changes to the return value of this -** routine when their insertion fails. When INSERT OR REPLACE -** encounters a constraint violation, it does not fail. The -** INSERT continues to completion after deleting rows that caused -** the constraint problem so INSERT OR REPLACE will always change -** the return value of this interface. -** -** For the purposes of this routine, an [INSERT] is considered to -** be successful even if it is subsequently rolled back. -** -** Requirements: -** [H12221] [H12223] -** -** If a separate thread performs a new [INSERT] on the same -** database connection while the [sqlite3_last_insert_rowid()] -** function is running and thus changes the last insert [rowid], -** then the value returned by [sqlite3_last_insert_rowid()] is -** unpredictable and might not equal either the old or the new -** last insert [rowid]. -*/ -SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); - -/* -** CAPI3REF: Count The Number Of Rows Modified {H12240} -** -** This function returns the number of database rows that were changed -** or inserted or deleted by the most recently completed SQL statement -** on the [database connection] specified by the first parameter. -** Only changes that are directly specified by the [INSERT], [UPDATE], -** or [DELETE] statement are counted. Auxiliary changes caused by -** triggers or [foreign key actions] are not counted. Use the -** [sqlite3_total_changes()] function to find the total number of changes -** including changes caused by triggers and foreign key actions. -** -** Changes to a view that are simulated by an [INSTEAD OF trigger] -** are not counted. Only real table changes are counted. -** -** A "row change" is a change to a single row of a single table -** caused by an INSERT, DELETE, or UPDATE statement. Rows that -** are changed as side effects of [REPLACE] constraint resolution, -** rollback, ABORT processing, [DROP TABLE], or by any other -** mechanisms do not count as direct row changes. -** -** A "trigger context" is a scope of execution that begins and -** ends with the script of a [CREATE TRIGGER | trigger]. -** Most SQL statements are -** evaluated outside of any trigger. This is the "top level" -** trigger context. If a trigger fires from the top level, a -** new trigger context is entered for the duration of that one -** trigger. Subtriggers create subcontexts for their duration. -** -** Calling [sqlite3_exec()] or [sqlite3_step()] recursively does -** not create a new trigger context. -** -** This function returns the number of direct row changes in the -** most recent INSERT, UPDATE, or DELETE statement within the same -** trigger context. -** -** Thus, when called from the top level, this function returns the -** number of changes in the most recent INSERT, UPDATE, or DELETE -** that also occurred at the top level. Within the body of a trigger, -** the sqlite3_changes() interface can be called to find the number of -** changes in the most recently completed INSERT, UPDATE, or DELETE -** statement within the body of the same trigger. -** However, the number returned does not include changes -** caused by subtriggers since those have their own context. -** -** See also the [sqlite3_total_changes()] interface and the -** [count_changes pragma]. -** -** Requirements: -** [H12241] [H12243] -** -** If a separate thread makes changes on the same database connection -** while [sqlite3_changes()] is running then the value returned -** is unpredictable and not meaningful. -*/ -SQLITE_API int sqlite3_changes(sqlite3*); - -/* -** CAPI3REF: Total Number Of Rows Modified {H12260} -** -** This function returns the number of row changes caused by [INSERT], -** [UPDATE] or [DELETE] statements since the [database connection] was opened. -** The count includes all changes from all [CREATE TRIGGER | trigger] -** contexts and changes made by [foreign key actions]. However, -** the count does not include changes used to implement [REPLACE] constraints, -** do rollbacks or ABORT processing, or [DROP TABLE] processing. The -** count does not include rows of views that fire an [INSTEAD OF trigger], -** though if the INSTEAD OF trigger makes changes of its own, those changes -** are counted. -** The changes are counted as soon as the statement that makes them is -** completed (when the statement handle is passed to [sqlite3_reset()] or -** [sqlite3_finalize()]). -** -** See also the [sqlite3_changes()] interface and the -** [count_changes pragma]. -** -** Requirements: -** [H12261] [H12263] -** -** If a separate thread makes changes on the same database connection -** while [sqlite3_total_changes()] is running then the value -** returned is unpredictable and not meaningful. -*/ -SQLITE_API int sqlite3_total_changes(sqlite3*); - -/* -** CAPI3REF: Interrupt A Long-Running Query {H12270} -** -** This function causes any pending database operation to abort and -** return at its earliest opportunity. This routine is typically -** called in response to a user action such as pressing "Cancel" -** or Ctrl-C where the user wants a long query operation to halt -** immediately. -** -** It is safe to call this routine from a thread different from the -** thread that is currently running the database operation. But it -** is not safe to call this routine with a [database connection] that -** is closed or might close before sqlite3_interrupt() returns. -** -** If an SQL operation is very nearly finished at the time when -** sqlite3_interrupt() is called, then it might not have an opportunity -** to be interrupted and might continue to completion. -** -** An SQL operation that is interrupted will return [SQLITE_INTERRUPT]. -** If the interrupted SQL operation is an INSERT, UPDATE, or DELETE -** that is inside an explicit transaction, then the entire transaction -** will be rolled back automatically. -** -** The sqlite3_interrupt(D) call is in effect until all currently running -** SQL statements on [database connection] D complete. Any new SQL statements -** that are started after the sqlite3_interrupt() call and before the -** running statements reaches zero are interrupted as if they had been -** running prior to the sqlite3_interrupt() call. New SQL statements -** that are started after the running statement count reaches zero are -** not effected by the sqlite3_interrupt(). -** A call to sqlite3_interrupt(D) that occurs when there are no running -** SQL statements is a no-op and has no effect on SQL statements -** that are started after the sqlite3_interrupt() call returns. -** -** Requirements: -** [H12271] [H12272] -** -** If the database connection closes while [sqlite3_interrupt()] -** is running then bad things will likely happen. -*/ -SQLITE_API void sqlite3_interrupt(sqlite3*); - -/* -** CAPI3REF: Determine If An SQL Statement Is Complete {H10510} -** -** These routines are useful during command-line input to determine if the -** currently entered text seems to form a complete SQL statement or -** if additional input is needed before sending the text into -** SQLite for parsing. These routines return 1 if the input string -** appears to be a complete SQL statement. A statement is judged to be -** complete if it ends with a semicolon token and is not a prefix of a -** well-formed CREATE TRIGGER statement. Semicolons that are embedded within -** string literals or quoted identifier names or comments are not -** independent tokens (they are part of the token in which they are -** embedded) and thus do not count as a statement terminator. Whitespace -** and comments that follow the final semicolon are ignored. -** -** These routines return 0 if the statement is incomplete. If a -** memory allocation fails, then SQLITE_NOMEM is returned. -** -** These routines do not parse the SQL statements thus -** will not detect syntactically incorrect SQL. -** -** If SQLite has not been initialized using [sqlite3_initialize()] prior -** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked -** automatically by sqlite3_complete16(). If that initialization fails, -** then the return value from sqlite3_complete16() will be non-zero -** regardless of whether or not the input SQL is complete. -** -** Requirements: [H10511] [H10512] -** -** The input to [sqlite3_complete()] must be a zero-terminated -** UTF-8 string. -** -** The input to [sqlite3_complete16()] must be a zero-terminated -** UTF-16 string in native byte order. -*/ -SQLITE_API int sqlite3_complete(const char *sql); -SQLITE_API int sqlite3_complete16(const void *sql); - -/* -** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors {H12310} -** -** This routine sets a callback function that might be invoked whenever -** an attempt is made to open a database table that another thread -** or process has locked. -** -** If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] -** is returned immediately upon encountering the lock. If the busy callback -** is not NULL, then the callback will be invoked with two arguments. -** -** The first argument to the handler is a copy of the void* pointer which -** is the third argument to sqlite3_busy_handler(). The second argument to -** the handler callback is the number of times that the busy handler has -** been invoked for this locking event. If the -** busy callback returns 0, then no additional attempts are made to -** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned. -** If the callback returns non-zero, then another attempt -** is made to open the database for reading and the cycle repeats. -** -** The presence of a busy handler does not guarantee that it will be invoked -** when there is lock contention. If SQLite determines that invoking the busy -** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY] -** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler. -** Consider a scenario where one process is holding a read lock that -** it is trying to promote to a reserved lock and -** a second process is holding a reserved lock that it is trying -** to promote to an exclusive lock. The first process cannot proceed -** because it is blocked by the second and the second process cannot -** proceed because it is blocked by the first. If both processes -** invoke the busy handlers, neither will make any progress. Therefore, -** SQLite returns [SQLITE_BUSY] for the first process, hoping that this -** will induce the first process to release its read lock and allow -** the second process to proceed. -** -** The default busy callback is NULL. -** -** The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED] -** when SQLite is in the middle of a large transaction where all the -** changes will not fit into the in-memory cache. SQLite will -** already hold a RESERVED lock on the database file, but it needs -** to promote this lock to EXCLUSIVE so that it can spill cache -** pages into the database file without harm to concurrent -** readers. If it is unable to promote the lock, then the in-memory -** cache will be left in an inconsistent state and so the error -** code is promoted from the relatively benign [SQLITE_BUSY] to -** the more severe [SQLITE_IOERR_BLOCKED]. This error code promotion -** forces an automatic rollback of the changes. See the -** -** CorruptionFollowingBusyError wiki page for a discussion of why -** this is important. -** -** There can only be a single busy handler defined for each -** [database connection]. Setting a new busy handler clears any -** previously set handler. Note that calling [sqlite3_busy_timeout()] -** will also set or clear the busy handler. -** -** The busy callback should not take any actions which modify the -** database connection that invoked the busy handler. Any such actions -** result in undefined behavior. -** -** Requirements: -** [H12311] [H12312] [H12314] [H12316] [H12318] -** -** A busy handler must not close the database connection -** or [prepared statement] that invoked the busy handler. -*/ -SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); - -/* -** CAPI3REF: Set A Busy Timeout {H12340} -** -** This routine sets a [sqlite3_busy_handler | busy handler] that sleeps -** for a specified amount of time when a table is locked. The handler -** will sleep multiple times until at least "ms" milliseconds of sleeping -** have accumulated. {H12343} After "ms" milliseconds of sleeping, -** the handler returns 0 which causes [sqlite3_step()] to return -** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]. -** -** Calling this routine with an argument less than or equal to zero -** turns off all busy handlers. -** -** There can only be a single busy handler for a particular -** [database connection] any any given moment. If another busy handler -** was defined (using [sqlite3_busy_handler()]) prior to calling -** this routine, that other busy handler is cleared. -** -** Requirements: -** [H12341] [H12343] [H12344] -*/ -SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); - -/* -** CAPI3REF: Convenience Routines For Running Queries {H12370} -** -** Definition: A result table is memory data structure created by the -** [sqlite3_get_table()] interface. A result table records the -** complete query results from one or more queries. -** -** The table conceptually has a number of rows and columns. But -** these numbers are not part of the result table itself. These -** numbers are obtained separately. Let N be the number of rows -** and M be the number of columns. -** -** A result table is an array of pointers to zero-terminated UTF-8 strings. -** There are (N+1)*M elements in the array. The first M pointers point -** to zero-terminated strings that contain the names of the columns. -** The remaining entries all point to query results. NULL values result -** in NULL pointers. All other values are in their UTF-8 zero-terminated -** string representation as returned by [sqlite3_column_text()]. -** -** A result table might consist of one or more memory allocations. -** It is not safe to pass a result table directly to [sqlite3_free()]. -** A result table should be deallocated using [sqlite3_free_table()]. -** -** As an example of the result table format, suppose a query result -** is as follows: -** -**
-**        Name        | Age
-**        -----------------------
-**        Alice       | 43
-**        Bob         | 28
-**        Cindy       | 21
-** 
-** -** There are two column (M==2) and three rows (N==3). Thus the -** result table has 8 entries. Suppose the result table is stored -** in an array names azResult. Then azResult holds this content: -** -**
-**        azResult[0] = "Name";
-**        azResult[1] = "Age";
-**        azResult[2] = "Alice";
-**        azResult[3] = "43";
-**        azResult[4] = "Bob";
-**        azResult[5] = "28";
-**        azResult[6] = "Cindy";
-**        azResult[7] = "21";
-** 
-** -** The sqlite3_get_table() function evaluates one or more -** semicolon-separated SQL statements in the zero-terminated UTF-8 -** string of its 2nd parameter. It returns a result table to the -** pointer given in its 3rd parameter. -** -** After the calling function has finished using the result, it should -** pass the pointer to the result table to sqlite3_free_table() in order to -** release the memory that was malloced. Because of the way the -** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling -** function must not try to call [sqlite3_free()] directly. Only -** [sqlite3_free_table()] is able to release the memory properly and safely. -** -** The sqlite3_get_table() interface is implemented as a wrapper around -** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access -** to any internal data structures of SQLite. It uses only the public -** interface defined here. As a consequence, errors that occur in the -** wrapper layer outside of the internal [sqlite3_exec()] call are not -** reflected in subsequent calls to [sqlite3_errcode()] or [sqlite3_errmsg()]. -** -** Requirements: -** [H12371] [H12373] [H12374] [H12376] [H12379] [H12382] -*/ -SQLITE_API int sqlite3_get_table( - sqlite3 *db, /* An open database */ - const char *zSql, /* SQL to be evaluated */ - char ***pazResult, /* Results of the query */ - int *pnRow, /* Number of result rows written here */ - int *pnColumn, /* Number of result columns written here */ - char **pzErrmsg /* Error msg written here */ -); -SQLITE_API void sqlite3_free_table(char **result); - -/* -** CAPI3REF: Formatted String Printing Functions {H17400} -** -** These routines are work-alikes of the "printf()" family of functions -** from the standard C library. -** -** The sqlite3_mprintf() and sqlite3_vmprintf() routines write their -** results into memory obtained from [sqlite3_malloc()]. -** The strings returned by these two routines should be -** released by [sqlite3_free()]. Both routines return a -** NULL pointer if [sqlite3_malloc()] is unable to allocate enough -** memory to hold the resulting string. -** -** In sqlite3_snprintf() routine is similar to "snprintf()" from -** the standard C library. The result is written into the -** buffer supplied as the second parameter whose size is given by -** the first parameter. Note that the order of the -** first two parameters is reversed from snprintf(). This is an -** historical accident that cannot be fixed without breaking -** backwards compatibility. Note also that sqlite3_snprintf() -** returns a pointer to its buffer instead of the number of -** characters actually written into the buffer. We admit that -** the number of characters written would be a more useful return -** value but we cannot change the implementation of sqlite3_snprintf() -** now without breaking compatibility. -** -** As long as the buffer size is greater than zero, sqlite3_snprintf() -** guarantees that the buffer is always zero-terminated. The first -** parameter "n" is the total size of the buffer, including space for -** the zero terminator. So the longest string that can be completely -** written will be n-1 characters. -** -** These routines all implement some additional formatting -** options that are useful for constructing SQL statements. -** All of the usual printf() formatting options apply. In addition, there -** is are "%q", "%Q", and "%z" options. -** -** The %q option works like %s in that it substitutes a null-terminated -** string from the argument list. But %q also doubles every '\'' character. -** %q is designed for use inside a string literal. By doubling each '\'' -** character it escapes that character and allows it to be inserted into -** the string. -** -** For example, assume the string variable zText contains text as follows: -** -**
-**  char *zText = "It's a happy day!";
-** 
-** -** One can use this text in an SQL statement as follows: -** -**
-**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
-**  sqlite3_exec(db, zSQL, 0, 0, 0);
-**  sqlite3_free(zSQL);
-** 
-** -** Because the %q format string is used, the '\'' character in zText -** is escaped and the SQL generated is as follows: -** -**
-**  INSERT INTO table1 VALUES('It''s a happy day!')
-** 
-** -** This is correct. Had we used %s instead of %q, the generated SQL -** would have looked like this: -** -**
-**  INSERT INTO table1 VALUES('It's a happy day!');
-** 
-** -** This second example is an SQL syntax error. As a general rule you should -** always use %q instead of %s when inserting text into a string literal. -** -** The %Q option works like %q except it also adds single quotes around -** the outside of the total string. Additionally, if the parameter in the -** argument list is a NULL pointer, %Q substitutes the text "NULL" (without -** single quotes) in place of the %Q option. So, for example, one could say: -** -**
-**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
-**  sqlite3_exec(db, zSQL, 0, 0, 0);
-**  sqlite3_free(zSQL);
-** 
-** -** The code above will render a correct SQL statement in the zSQL -** variable even if the zText variable is a NULL pointer. -** -** The "%z" formatting option works exactly like "%s" with the -** addition that after the string has been read and copied into -** the result, [sqlite3_free()] is called on the input string. {END} -** -** Requirements: -** [H17403] [H17406] [H17407] -*/ -SQLITE_API char *sqlite3_mprintf(const char*,...); -SQLITE_API char *sqlite3_vmprintf(const char*, va_list); -SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); - -/* -** CAPI3REF: Memory Allocation Subsystem {H17300} -** -** The SQLite core uses these three routines for all of its own -** internal memory allocation needs. "Core" in the previous sentence -** does not include operating-system specific VFS implementation. The -** Windows VFS uses native malloc() and free() for some operations. -** -** The sqlite3_malloc() routine returns a pointer to a block -** of memory at least N bytes in length, where N is the parameter. -** If sqlite3_malloc() is unable to obtain sufficient free -** memory, it returns a NULL pointer. If the parameter N to -** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns -** a NULL pointer. -** -** Calling sqlite3_free() with a pointer previously returned -** by sqlite3_malloc() or sqlite3_realloc() releases that memory so -** that it might be reused. The sqlite3_free() routine is -** a no-op if is called with a NULL pointer. Passing a NULL pointer -** to sqlite3_free() is harmless. After being freed, memory -** should neither be read nor written. Even reading previously freed -** memory might result in a segmentation fault or other severe error. -** Memory corruption, a segmentation fault, or other severe error -** might result if sqlite3_free() is called with a non-NULL pointer that -** was not obtained from sqlite3_malloc() or sqlite3_realloc(). -** -** The sqlite3_realloc() interface attempts to resize a -** prior memory allocation to be at least N bytes, where N is the -** second parameter. The memory allocation to be resized is the first -** parameter. If the first parameter to sqlite3_realloc() -** is a NULL pointer then its behavior is identical to calling -** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc(). -** If the second parameter to sqlite3_realloc() is zero or -** negative then the behavior is exactly the same as calling -** sqlite3_free(P) where P is the first parameter to sqlite3_realloc(). -** sqlite3_realloc() returns a pointer to a memory allocation -** of at least N bytes in size or NULL if sufficient memory is unavailable. -** If M is the size of the prior allocation, then min(N,M) bytes -** of the prior allocation are copied into the beginning of buffer returned -** by sqlite3_realloc() and the prior allocation is freed. -** If sqlite3_realloc() returns NULL, then the prior allocation -** is not freed. -** -** The memory returned by sqlite3_malloc() and sqlite3_realloc() -** is always aligned to at least an 8 byte boundary. {END} -** -** The default implementation of the memory allocation subsystem uses -** the malloc(), realloc() and free() provided by the standard C library. -** {H17382} However, if SQLite is compiled with the -** SQLITE_MEMORY_SIZE=NNN C preprocessor macro (where NNN -** is an integer), then SQLite create a static array of at least -** NNN bytes in size and uses that array for all of its dynamic -** memory allocation needs. {END} Additional memory allocator options -** may be added in future releases. -** -** In SQLite version 3.5.0 and 3.5.1, it was possible to define -** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in -** implementation of these routines to be omitted. That capability -** is no longer provided. Only built-in memory allocators can be used. -** -** The Windows OS interface layer calls -** the system malloc() and free() directly when converting -** filenames between the UTF-8 encoding used by SQLite -** and whatever filename encoding is used by the particular Windows -** installation. Memory allocation errors are detected, but -** they are reported back as [SQLITE_CANTOPEN] or -** [SQLITE_IOERR] rather than [SQLITE_NOMEM]. -** -** Requirements: -** [H17303] [H17304] [H17305] [H17306] [H17310] [H17312] [H17315] [H17318] -** [H17321] [H17322] [H17323] -** -** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] -** must be either NULL or else pointers obtained from a prior -** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have -** not yet been released. -** -** The application must not read or write any part of -** a block of memory after it has been released using -** [sqlite3_free()] or [sqlite3_realloc()]. -*/ -SQLITE_API void *sqlite3_malloc(int); -SQLITE_API void *sqlite3_realloc(void*, int); -SQLITE_API void sqlite3_free(void*); - -/* -** CAPI3REF: Memory Allocator Statistics {H17370} -** -** SQLite provides these two interfaces for reporting on the status -** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()] -** routines, which form the built-in memory allocation subsystem. -** -** Requirements: -** [H17371] [H17373] [H17374] [H17375] -*/ -SQLITE_API sqlite3_int64 sqlite3_memory_used(void); -SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag); - -/* -** CAPI3REF: Pseudo-Random Number Generator {H17390} -** -** SQLite contains a high-quality pseudo-random number generator (PRNG) used to -** select random [ROWID | ROWIDs] when inserting new records into a table that -** already uses the largest possible [ROWID]. The PRNG is also used for -** the build-in random() and randomblob() SQL functions. This interface allows -** applications to access the same PRNG for other purposes. -** -** A call to this routine stores N bytes of randomness into buffer P. -** -** The first time this routine is invoked (either internally or by -** the application) the PRNG is seeded using randomness obtained -** from the xRandomness method of the default [sqlite3_vfs] object. -** On all subsequent invocations, the pseudo-randomness is generated -** internally and without recourse to the [sqlite3_vfs] xRandomness -** method. -** -** Requirements: -** [H17392] -*/ -SQLITE_API void sqlite3_randomness(int N, void *P); - -/* -** CAPI3REF: Compile-Time Authorization Callbacks {H12500} -** -** This routine registers a authorizer callback with a particular -** [database connection], supplied in the first argument. -** The authorizer callback is invoked as SQL statements are being compiled -** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()], -** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. At various -** points during the compilation process, as logic is being created -** to perform various actions, the authorizer callback is invoked to -** see if those actions are allowed. The authorizer callback should -** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the -** specific action but allow the SQL statement to continue to be -** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be -** rejected with an error. If the authorizer callback returns -** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY] -** then the [sqlite3_prepare_v2()] or equivalent call that triggered -** the authorizer will fail with an error message. -** -** When the callback returns [SQLITE_OK], that means the operation -** requested is ok. When the callback returns [SQLITE_DENY], the -** [sqlite3_prepare_v2()] or equivalent call that triggered the -** authorizer will fail with an error message explaining that -** access is denied. -** -** The first parameter to the authorizer callback is a copy of the third -** parameter to the sqlite3_set_authorizer() interface. The second parameter -** to the callback is an integer [SQLITE_COPY | action code] that specifies -** the particular action to be authorized. The third through sixth parameters -** to the callback are zero-terminated strings that contain additional -** details about the action to be authorized. -** -** If the action code is [SQLITE_READ] -** and the callback returns [SQLITE_IGNORE] then the -** [prepared statement] statement is constructed to substitute -** a NULL value in place of the table column that would have -** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] -** return can be used to deny an untrusted user access to individual -** columns of a table. -** If the action code is [SQLITE_DELETE] and the callback returns -** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the -** [truncate optimization] is disabled and all rows are deleted individually. -** -** An authorizer is used when [sqlite3_prepare | preparing] -** SQL statements from an untrusted source, to ensure that the SQL statements -** do not try to access data they are not allowed to see, or that they do not -** try to execute malicious statements that damage the database. For -** example, an application may allow a user to enter arbitrary -** SQL queries for evaluation by a database. But the application does -** not want the user to be able to make arbitrary changes to the -** database. An authorizer could then be put in place while the -** user-entered SQL is being [sqlite3_prepare | prepared] that -** disallows everything except [SELECT] statements. -** -** Applications that need to process SQL from untrusted sources -** might also consider lowering resource limits using [sqlite3_limit()] -** and limiting database size using the [max_page_count] [PRAGMA] -** in addition to using an authorizer. -** -** Only a single authorizer can be in place on a database connection -** at a time. Each call to sqlite3_set_authorizer overrides the -** previous call. Disable the authorizer by installing a NULL callback. -** The authorizer is disabled by default. -** -** The authorizer callback must not do anything that will modify -** the database connection that invoked the authorizer callback. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** When [sqlite3_prepare_v2()] is used to prepare a statement, the -** statement might be re-prepared during [sqlite3_step()] due to a -** schema change. Hence, the application should ensure that the -** correct authorizer callback remains in place during the [sqlite3_step()]. -** -** Note that the authorizer callback is invoked only during -** [sqlite3_prepare()] or its variants. Authorization is not -** performed during statement evaluation in [sqlite3_step()], unless -** as stated in the previous paragraph, sqlite3_step() invokes -** sqlite3_prepare_v2() to reprepare a statement after a schema change. -** -** Requirements: -** [H12501] [H12502] [H12503] [H12504] [H12505] [H12506] [H12507] [H12510] -** [H12511] [H12512] [H12520] [H12521] [H12522] -*/ -SQLITE_API int sqlite3_set_authorizer( - sqlite3*, - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), - void *pUserData -); - -/* -** CAPI3REF: Authorizer Return Codes {H12590} -** -** The [sqlite3_set_authorizer | authorizer callback function] must -** return either [SQLITE_OK] or one of these two constants in order -** to signal SQLite whether or not the action is permitted. See the -** [sqlite3_set_authorizer | authorizer documentation] for additional -** information. -*/ -#define SQLITE_DENY 1 /* Abort the SQL statement with an error */ -#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */ - -/* -** CAPI3REF: Authorizer Action Codes {H12550} -** -** The [sqlite3_set_authorizer()] interface registers a callback function -** that is invoked to authorize certain SQL statement actions. The -** second parameter to the callback is an integer code that specifies -** what action is being authorized. These are the integer action codes that -** the authorizer callback may be passed. -** -** These action code values signify what kind of operation is to be -** authorized. The 3rd and 4th parameters to the authorization -** callback function will be parameters or NULL depending on which of these -** codes is used as the second parameter. The 5th parameter to the -** authorizer callback is the name of the database ("main", "temp", -** etc.) if applicable. The 6th parameter to the authorizer callback -** is the name of the inner-most trigger or view that is responsible for -** the access attempt or NULL if this access attempt is directly from -** top-level SQL code. -** -** Requirements: -** [H12551] [H12552] [H12553] [H12554] -*/ -/******************************************* 3rd ************ 4th ***********/ -#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */ -#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */ -#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */ -#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */ -#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */ -#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */ -#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */ -#define SQLITE_CREATE_VIEW 8 /* View Name NULL */ -#define SQLITE_DELETE 9 /* Table Name NULL */ -#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */ -#define SQLITE_DROP_TABLE 11 /* Table Name NULL */ -#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */ -#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */ -#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */ -#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */ -#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */ -#define SQLITE_DROP_VIEW 17 /* View Name NULL */ -#define SQLITE_INSERT 18 /* Table Name NULL */ -#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */ -#define SQLITE_READ 20 /* Table Name Column Name */ -#define SQLITE_SELECT 21 /* NULL NULL */ -#define SQLITE_TRANSACTION 22 /* Operation NULL */ -#define SQLITE_UPDATE 23 /* Table Name Column Name */ -#define SQLITE_ATTACH 24 /* Filename NULL */ -#define SQLITE_DETACH 25 /* Database Name NULL */ -#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */ -#define SQLITE_REINDEX 27 /* Index Name NULL */ -#define SQLITE_ANALYZE 28 /* Table Name NULL */ -#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */ -#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */ -#define SQLITE_FUNCTION 31 /* NULL Function Name */ -#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */ -#define SQLITE_COPY 0 /* No longer used */ - -/* -** CAPI3REF: Tracing And Profiling Functions {H12280} -** EXPERIMENTAL -** -** These routines register callback functions that can be used for -** tracing and profiling the execution of SQL statements. -** -** The callback function registered by sqlite3_trace() is invoked at -** various times when an SQL statement is being run by [sqlite3_step()]. -** The callback returns a UTF-8 rendering of the SQL statement text -** as the statement first begins executing. Additional callbacks occur -** as each triggered subprogram is entered. The callbacks for triggers -** contain a UTF-8 SQL comment that identifies the trigger. -** -** The callback function registered by sqlite3_profile() is invoked -** as each SQL statement finishes. The profile callback contains -** the original statement text and an estimate of wall-clock time -** of how long that statement took to run. -** -** Requirements: -** [H12281] [H12282] [H12283] [H12284] [H12285] [H12287] [H12288] [H12289] -** [H12290] -*/ -SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); -SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*, - void(*xProfile)(void*,const char*,sqlite3_uint64), void*); - -/* -** CAPI3REF: Query Progress Callbacks {H12910} -** -** This routine configures a callback function - the -** progress callback - that is invoked periodically during long -** running calls to [sqlite3_exec()], [sqlite3_step()] and -** [sqlite3_get_table()]. An example use for this -** interface is to keep a GUI updated during a large query. -** -** If the progress callback returns non-zero, the operation is -** interrupted. This feature can be used to implement a -** "Cancel" button on a GUI progress dialog box. -** -** The progress handler must not do anything that will modify -** the database connection that invoked the progress handler. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** Requirements: -** [H12911] [H12912] [H12913] [H12914] [H12915] [H12916] [H12917] [H12918] -** -*/ -SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); - -/* -** CAPI3REF: Opening A New Database Connection {H12700} -** -** These routines open an SQLite database file whose name is given by the -** filename argument. The filename argument is interpreted as UTF-8 for -** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte -** order for sqlite3_open16(). A [database connection] handle is usually -** returned in *ppDb, even if an error occurs. The only exception is that -** if SQLite is unable to allocate memory to hold the [sqlite3] object, -** a NULL will be written into *ppDb instead of a pointer to the [sqlite3] -** object. If the database is opened (and/or created) successfully, then -** [SQLITE_OK] is returned. Otherwise an [error code] is returned. The -** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain -** an English language description of the error. -** -** The default encoding for the database will be UTF-8 if -** sqlite3_open() or sqlite3_open_v2() is called and -** UTF-16 in the native byte order if sqlite3_open16() is used. -** -** Whether or not an error occurs when it is opened, resources -** associated with the [database connection] handle should be released by -** passing it to [sqlite3_close()] when it is no longer required. -** -** The sqlite3_open_v2() interface works like sqlite3_open() -** except that it accepts two additional parameters for additional control -** over the new database connection. The flags parameter can take one of -** the following three values, optionally combined with the -** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE], -** and/or [SQLITE_OPEN_PRIVATECACHE] flags: -** -**
-**
[SQLITE_OPEN_READONLY]
-**
The database is opened in read-only mode. If the database does not -** already exist, an error is returned.
-** -**
[SQLITE_OPEN_READWRITE]
-**
The database is opened for reading and writing if possible, or reading -** only if the file is write protected by the operating system. In either -** case the database must already exist, otherwise an error is returned.
-** -**
[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
-**
The database is opened for reading and writing, and is creates it if -** it does not already exist. This is the behavior that is always used for -** sqlite3_open() and sqlite3_open16().
-**
-** -** If the 3rd parameter to sqlite3_open_v2() is not one of the -** combinations shown above or one of the combinations shown above combined -** with the [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], -** [SQLITE_OPEN_SHAREDCACHE] and/or [SQLITE_OPEN_SHAREDCACHE] flags, -** then the behavior is undefined. -** -** If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection -** opens in the multi-thread [threading mode] as long as the single-thread -** mode has not been set at compile-time or start-time. If the -** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens -** in the serialized [threading mode] unless single-thread was -** previously selected at compile-time or start-time. -** The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be -** eligible to use [shared cache mode], regardless of whether or not shared -** cache is enabled using [sqlite3_enable_shared_cache()]. The -** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not -** participate in [shared cache mode] even if it is enabled. -** -** If the filename is ":memory:", then a private, temporary in-memory database -** is created for the connection. This in-memory database will vanish when -** the database connection is closed. Future versions of SQLite might -** make use of additional special filenames that begin with the ":" character. -** It is recommended that when a database filename actually does begin with -** a ":" character you should prefix the filename with a pathname such as -** "./" to avoid ambiguity. -** -** If the filename is an empty string, then a private, temporary -** on-disk database will be created. This private database will be -** automatically deleted as soon as the database connection is closed. -** -** The fourth parameter to sqlite3_open_v2() is the name of the -** [sqlite3_vfs] object that defines the operating system interface that -** the new database connection should use. If the fourth parameter is -** a NULL pointer then the default [sqlite3_vfs] object is used. -** -** Note to Windows users: The encoding used for the filename argument -** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever -** codepage is currently defined. Filenames containing international -** characters must be converted to UTF-8 prior to passing them into -** sqlite3_open() or sqlite3_open_v2(). -** -** Requirements: -** [H12701] [H12702] [H12703] [H12704] [H12706] [H12707] [H12709] [H12711] -** [H12712] [H12713] [H12714] [H12717] [H12719] [H12721] [H12723] -*/ -SQLITE_API int sqlite3_open( - const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb /* OUT: SQLite db handle */ -); -SQLITE_API int sqlite3_open16( - const void *filename, /* Database filename (UTF-16) */ - sqlite3 **ppDb /* OUT: SQLite db handle */ -); -SQLITE_API int sqlite3_open_v2( - const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb, /* OUT: SQLite db handle */ - int flags, /* Flags */ - const char *zVfs /* Name of VFS module to use */ -); - -/* -** CAPI3REF: Error Codes And Messages {H12800} -** -** The sqlite3_errcode() interface returns the numeric [result code] or -** [extended result code] for the most recent failed sqlite3_* API call -** associated with a [database connection]. If a prior API call failed -** but the most recent API call succeeded, the return value from -** sqlite3_errcode() is undefined. The sqlite3_extended_errcode() -** interface is the same except that it always returns the -** [extended result code] even when extended result codes are -** disabled. -** -** The sqlite3_errmsg() and sqlite3_errmsg16() return English-language -** text that describes the error, as either UTF-8 or UTF-16 respectively. -** Memory to hold the error message string is managed internally. -** The application does not need to worry about freeing the result. -** However, the error string might be overwritten or deallocated by -** subsequent calls to other SQLite interface functions. -** -** When the serialized [threading mode] is in use, it might be the -** case that a second error occurs on a separate thread in between -** the time of the first error and the call to these interfaces. -** When that happens, the second error will be reported since these -** interfaces always report the most recent result. To avoid -** this, each thread can obtain exclusive use of the [database connection] D -** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning -** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after -** all calls to the interfaces listed here are completed. -** -** If an interface fails with SQLITE_MISUSE, that means the interface -** was invoked incorrectly by the application. In that case, the -** error code and message may or may not be set. -** -** Requirements: -** [H12801] [H12802] [H12803] [H12807] [H12808] [H12809] -*/ -SQLITE_API int sqlite3_errcode(sqlite3 *db); -SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); -SQLITE_API const char *sqlite3_errmsg(sqlite3*); -SQLITE_API const void *sqlite3_errmsg16(sqlite3*); - -/* -** CAPI3REF: SQL Statement Object {H13000} -** KEYWORDS: {prepared statement} {prepared statements} -** -** An instance of this object represents a single SQL statement. -** This object is variously known as a "prepared statement" or a -** "compiled SQL statement" or simply as a "statement". -** -** The life of a statement object goes something like this: -** -**
    -**
  1. Create the object using [sqlite3_prepare_v2()] or a related -** function. -**
  2. Bind values to [host parameters] using the sqlite3_bind_*() -** interfaces. -**
  3. Run the SQL by calling [sqlite3_step()] one or more times. -**
  4. Reset the statement using [sqlite3_reset()] then go back -** to step 2. Do this zero or more times. -**
  5. Destroy the object using [sqlite3_finalize()]. -**
-** -** Refer to documentation on individual methods above for additional -** information. -*/ -typedef struct sqlite3_stmt sqlite3_stmt; - -/* -** CAPI3REF: Run-time Limits {H12760} -** -** This interface allows the size of various constructs to be limited -** on a connection by connection basis. The first parameter is the -** [database connection] whose limit is to be set or queried. The -** second parameter is one of the [limit categories] that define a -** class of constructs to be size limited. The third parameter is the -** new limit for that construct. The function returns the old limit. -** -** If the new limit is a negative number, the limit is unchanged. -** For the limit category of SQLITE_LIMIT_XYZ there is a -** [limits | hard upper bound] -** set by a compile-time C preprocessor macro named -** [limits | SQLITE_MAX_XYZ]. -** (The "_LIMIT_" in the name is changed to "_MAX_".) -** Attempts to increase a limit above its hard upper bound are -** silently truncated to the hard upper limit. -** -** Run time limits are intended for use in applications that manage -** both their own internal database and also databases that are controlled -** by untrusted external sources. An example application might be a -** web browser that has its own databases for storing history and -** separate databases controlled by JavaScript applications downloaded -** off the Internet. The internal databases can be given the -** large, default limits. Databases managed by external sources can -** be given much smaller limits designed to prevent a denial of service -** attack. Developers might also want to use the [sqlite3_set_authorizer()] -** interface to further control untrusted SQL. The size of the database -** created by an untrusted script can be contained using the -** [max_page_count] [PRAGMA]. -** -** New run-time limit categories may be added in future releases. -** -** Requirements: -** [H12762] [H12766] [H12769] -*/ -SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); - -/* -** CAPI3REF: Run-Time Limit Categories {H12790} -** KEYWORDS: {limit category} {*limit categories} -** -** These constants define various performance limits -** that can be lowered at run-time using [sqlite3_limit()]. -** The synopsis of the meanings of the various limits is shown below. -** Additional information is available at [limits | Limits in SQLite]. -** -**
-**
SQLITE_LIMIT_LENGTH
-**
The maximum size of any string or BLOB or table row.
-** -**
SQLITE_LIMIT_SQL_LENGTH
-**
The maximum length of an SQL statement.
-** -**
SQLITE_LIMIT_COLUMN
-**
The maximum number of columns in a table definition or in the -** result set of a [SELECT] or the maximum number of columns in an index -** or in an ORDER BY or GROUP BY clause.
-** -**
SQLITE_LIMIT_EXPR_DEPTH
-**
The maximum depth of the parse tree on any expression.
-** -**
SQLITE_LIMIT_COMPOUND_SELECT
-**
The maximum number of terms in a compound SELECT statement.
-** -**
SQLITE_LIMIT_VDBE_OP
-**
The maximum number of instructions in a virtual machine program -** used to implement an SQL statement.
-** -**
SQLITE_LIMIT_FUNCTION_ARG
-**
The maximum number of arguments on a function.
-** -**
SQLITE_LIMIT_ATTACHED
-**
The maximum number of [ATTACH | attached databases].
-** -**
SQLITE_LIMIT_LIKE_PATTERN_LENGTH
-**
The maximum length of the pattern argument to the [LIKE] or -** [GLOB] operators.
-** -**
SQLITE_LIMIT_VARIABLE_NUMBER
-**
The maximum number of variables in an SQL statement that can -** be bound.
-** -**
SQLITE_LIMIT_TRIGGER_DEPTH
-**
The maximum depth of recursion for triggers.
-**
-*/ -#define SQLITE_LIMIT_LENGTH 0 -#define SQLITE_LIMIT_SQL_LENGTH 1 -#define SQLITE_LIMIT_COLUMN 2 -#define SQLITE_LIMIT_EXPR_DEPTH 3 -#define SQLITE_LIMIT_COMPOUND_SELECT 4 -#define SQLITE_LIMIT_VDBE_OP 5 -#define SQLITE_LIMIT_FUNCTION_ARG 6 -#define SQLITE_LIMIT_ATTACHED 7 -#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8 -#define SQLITE_LIMIT_VARIABLE_NUMBER 9 -#define SQLITE_LIMIT_TRIGGER_DEPTH 10 - -/* -** CAPI3REF: Compiling An SQL Statement {H13010} -** KEYWORDS: {SQL statement compiler} -** -** To execute an SQL query, it must first be compiled into a byte-code -** program using one of these routines. -** -** The first argument, "db", is a [database connection] obtained from a -** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or -** [sqlite3_open16()]. The database connection must not have been closed. -** -** The second argument, "zSql", is the statement to be compiled, encoded -** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2() -** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2() -** use UTF-16. -** -** If the nByte argument is less than zero, then zSql is read up to the -** first zero terminator. If nByte is non-negative, then it is the maximum -** number of bytes read from zSql. When nByte is non-negative, the -** zSql string ends at either the first '\000' or '\u0000' character or -** the nByte-th byte, whichever comes first. If the caller knows -** that the supplied string is nul-terminated, then there is a small -** performance advantage to be gained by passing an nByte parameter that -** is equal to the number of bytes in the input string including -** the nul-terminator bytes. -** -** If pzTail is not NULL then *pzTail is made to point to the first byte -** past the end of the first SQL statement in zSql. These routines only -** compile the first statement in zSql, so *pzTail is left pointing to -** what remains uncompiled. -** -** *ppStmt is left pointing to a compiled [prepared statement] that can be -** executed using [sqlite3_step()]. If there is an error, *ppStmt is set -** to NULL. If the input text contains no SQL (if the input is an empty -** string or a comment) then *ppStmt is set to NULL. -** The calling procedure is responsible for deleting the compiled -** SQL statement using [sqlite3_finalize()] after it has finished with it. -** ppStmt may not be NULL. -** -** On success, [SQLITE_OK] is returned, otherwise an [error code] is returned. -** -** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are -** recommended for all new programs. The two older interfaces are retained -** for backwards compatibility, but their use is discouraged. -** In the "v2" interfaces, the prepared statement -** that is returned (the [sqlite3_stmt] object) contains a copy of the -** original SQL text. This causes the [sqlite3_step()] interface to -** behave a differently in three ways: -** -**
    -**
  1. -** If the database schema changes, instead of returning [SQLITE_SCHEMA] as it -** always used to do, [sqlite3_step()] will automatically recompile the SQL -** statement and try to run it again. If the schema has changed in -** a way that makes the statement no longer valid, [sqlite3_step()] will still -** return [SQLITE_SCHEMA]. But unlike the legacy behavior, [SQLITE_SCHEMA] is -** now a fatal error. Calling [sqlite3_prepare_v2()] again will not make the -** error go away. Note: use [sqlite3_errmsg()] to find the text -** of the parsing error that results in an [SQLITE_SCHEMA] return. -**
  2. -** -**
  3. -** When an error occurs, [sqlite3_step()] will return one of the detailed -** [error codes] or [extended error codes]. The legacy behavior was that -** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code -** and you would have to make a second call to [sqlite3_reset()] in order -** to find the underlying cause of the problem. With the "v2" prepare -** interfaces, the underlying reason for the error is returned immediately. -**
  4. -** -**
  5. -** ^If the value of a [parameter | host parameter] in the WHERE clause might -** change the query plan for a statement, then the statement may be -** automatically recompiled (as if there had been a schema change) on the first -** [sqlite3_step()] call following any change to the -** [sqlite3_bind_text | bindings] of the [parameter]. -**
  6. -**
-** -** Requirements: -** [H13011] [H13012] [H13013] [H13014] [H13015] [H13016] [H13019] [H13021] -** -*/ -SQLITE_API int sqlite3_prepare( - sqlite3 *db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare_v2( - sqlite3 *db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare16( - sqlite3 *db, /* Database handle */ - const void *zSql, /* SQL statement, UTF-16 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare16_v2( - sqlite3 *db, /* Database handle */ - const void *zSql, /* SQL statement, UTF-16 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); - -/* -** CAPI3REF: Retrieving Statement SQL {H13100} -** -** This interface can be used to retrieve a saved copy of the original -** SQL text used to create a [prepared statement] if that statement was -** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. -** -** Requirements: -** [H13101] [H13102] [H13103] -*/ -SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Dynamically Typed Value Object {H15000} -** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} -** -** SQLite uses the sqlite3_value object to represent all values -** that can be stored in a database table. SQLite uses dynamic typing -** for the values it stores. Values stored in sqlite3_value objects -** can be integers, floating point values, strings, BLOBs, or NULL. -** -** An sqlite3_value object may be either "protected" or "unprotected". -** Some interfaces require a protected sqlite3_value. Other interfaces -** will accept either a protected or an unprotected sqlite3_value. -** Every interface that accepts sqlite3_value arguments specifies -** whether or not it requires a protected sqlite3_value. -** -** The terms "protected" and "unprotected" refer to whether or not -** a mutex is held. A internal mutex is held for a protected -** sqlite3_value object but no mutex is held for an unprotected -** sqlite3_value object. If SQLite is compiled to be single-threaded -** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) -** or if SQLite is run in one of reduced mutex modes -** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] -** then there is no distinction between protected and unprotected -** sqlite3_value objects and they can be used interchangeably. However, -** for maximum code portability it is recommended that applications -** still make the distinction between between protected and unprotected -** sqlite3_value objects even when not strictly required. -** -** The sqlite3_value objects that are passed as parameters into the -** implementation of [application-defined SQL functions] are protected. -** The sqlite3_value object returned by -** [sqlite3_column_value()] is unprotected. -** Unprotected sqlite3_value objects may only be used with -** [sqlite3_result_value()] and [sqlite3_bind_value()]. -** The [sqlite3_value_blob | sqlite3_value_type()] family of -** interfaces require protected sqlite3_value objects. -*/ -typedef struct Mem sqlite3_value; - -/* -** CAPI3REF: SQL Function Context Object {H16001} -** -** The context in which an SQL function executes is stored in an -** sqlite3_context object. A pointer to an sqlite3_context object -** is always first parameter to [application-defined SQL functions]. -** The application-defined SQL function implementation will pass this -** pointer through into calls to [sqlite3_result_int | sqlite3_result()], -** [sqlite3_aggregate_context()], [sqlite3_user_data()], -** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], -** and/or [sqlite3_set_auxdata()]. -*/ -typedef struct sqlite3_context sqlite3_context; - -/* -** CAPI3REF: Binding Values To Prepared Statements {H13500} -** KEYWORDS: {host parameter} {host parameters} {host parameter name} -** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding} -** -** In the SQL strings input to [sqlite3_prepare_v2()] and its variants, -** literals may be replaced by a [parameter] that matches one of following -** templates: -** -**
    -**
  • ? -**
  • ?NNN -**
  • :VVV -**
  • @VVV -**
  • $VVV -**
-** -** In the templates above, NNN represents an integer literal, -** and VVV represents an alphanumeric identifer. The values of these -** parameters (also called "host parameter names" or "SQL parameters") -** can be set using the sqlite3_bind_*() routines defined here. -** -** The first argument to the sqlite3_bind_*() routines is always -** a pointer to the [sqlite3_stmt] object returned from -** [sqlite3_prepare_v2()] or its variants. -** -** The second argument is the index of the SQL parameter to be set. -** The leftmost SQL parameter has an index of 1. When the same named -** SQL parameter is used more than once, second and subsequent -** occurrences have the same index as the first occurrence. -** The index for named parameters can be looked up using the -** [sqlite3_bind_parameter_index()] API if desired. The index -** for "?NNN" parameters is the value of NNN. -** The NNN value must be between 1 and the [sqlite3_limit()] -** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999). -** -** The third argument is the value to bind to the parameter. -** -** In those routines that have a fourth argument, its value is the -** number of bytes in the parameter. To be clear: the value is the -** number of bytes in the value, not the number of characters. -** If the fourth parameter is negative, the length of the string is -** the number of bytes up to the first zero terminator. -** -** The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and -** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or -** string after SQLite has finished with it. If the fifth argument is -** the special value [SQLITE_STATIC], then SQLite assumes that the -** information is in static, unmanaged space and does not need to be freed. -** If the fifth argument has the value [SQLITE_TRANSIENT], then -** SQLite makes its own private copy of the data immediately, before -** the sqlite3_bind_*() routine returns. -** -** The sqlite3_bind_zeroblob() routine binds a BLOB of length N that -** is filled with zeroes. A zeroblob uses a fixed amount of memory -** (just an integer to hold its size) while it is being processed. -** Zeroblobs are intended to serve as placeholders for BLOBs whose -** content is later written using -** [sqlite3_blob_open | incremental BLOB I/O] routines. -** A negative value for the zeroblob results in a zero-length BLOB. -** -** The sqlite3_bind_*() routines must be called after -** [sqlite3_prepare_v2()] (and its variants) or [sqlite3_reset()] and -** before [sqlite3_step()]. -** Bindings are not cleared by the [sqlite3_reset()] routine. -** Unbound parameters are interpreted as NULL. -** -** These routines return [SQLITE_OK] on success or an error code if -** anything goes wrong. [SQLITE_RANGE] is returned if the parameter -** index is out of range. [SQLITE_NOMEM] is returned if malloc() fails. -** [SQLITE_MISUSE] might be returned if these routines are called on a -** virtual machine that is the wrong state or which has already been finalized. -** Detection of misuse is unreliable. Applications should not depend -** on SQLITE_MISUSE returns. SQLITE_MISUSE is intended to indicate a -** a logic error in the application. Future versions of SQLite might -** panic rather than return SQLITE_MISUSE. -** -** See also: [sqlite3_bind_parameter_count()], -** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. -** -** Requirements: -** [H13506] [H13509] [H13512] [H13515] [H13518] [H13521] [H13524] [H13527] -** [H13530] [H13533] [H13536] [H13539] [H13542] [H13545] [H13548] [H13551] -** -*/ -SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); -SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double); -SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int); -SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); -SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int); -SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*)); -SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); -SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); -SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); - -/* -** CAPI3REF: Number Of SQL Parameters {H13600} -** -** This routine can be used to find the number of [SQL parameters] -** in a [prepared statement]. SQL parameters are tokens of the -** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as -** placeholders for values that are [sqlite3_bind_blob | bound] -** to the parameters at a later time. -** -** This routine actually returns the index of the largest (rightmost) -** parameter. For all forms except ?NNN, this will correspond to the -** number of unique parameters. If parameters of the ?NNN are used, -** there may be gaps in the list. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_name()], and -** [sqlite3_bind_parameter_index()]. -** -** Requirements: -** [H13601] -*/ -SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); - -/* -** CAPI3REF: Name Of A Host Parameter {H13620} -** -** This routine returns a pointer to the name of the n-th -** [SQL parameter] in a [prepared statement]. -** SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA" -** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA" -** respectively. -** In other words, the initial ":" or "$" or "@" or "?" -** is included as part of the name. -** Parameters of the form "?" without a following integer have no name -** and are also referred to as "anonymous parameters". -** -** The first host parameter has an index of 1, not 0. -** -** If the value n is out of range or if the n-th parameter is -** nameless, then NULL is returned. The returned string is -** always in UTF-8 encoding even if the named parameter was -** originally specified as UTF-16 in [sqlite3_prepare16()] or -** [sqlite3_prepare16_v2()]. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_count()], and -** [sqlite3_bind_parameter_index()]. -** -** Requirements: -** [H13621] -*/ -SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); - -/* -** CAPI3REF: Index Of A Parameter With A Given Name {H13640} -** -** Return the index of an SQL parameter given its name. The -** index value returned is suitable for use as the second -** parameter to [sqlite3_bind_blob|sqlite3_bind()]. A zero -** is returned if no matching parameter is found. The parameter -** name must be given in UTF-8 even if the original statement -** was prepared from UTF-16 text using [sqlite3_prepare16_v2()]. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_count()], and -** [sqlite3_bind_parameter_index()]. -** -** Requirements: -** [H13641] -*/ -SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); - -/* -** CAPI3REF: Reset All Bindings On A Prepared Statement {H13660} -** -** Contrary to the intuition of many, [sqlite3_reset()] does not reset -** the [sqlite3_bind_blob | bindings] on a [prepared statement]. -** Use this routine to reset all host parameters to NULL. -** -** Requirements: -** [H13661] -*/ -SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); - -/* -** CAPI3REF: Number Of Columns In A Result Set {H13710} -** -** Return the number of columns in the result set returned by the -** [prepared statement]. This routine returns 0 if pStmt is an SQL -** statement that does not return data (for example an [UPDATE]). -** -** Requirements: -** [H13711] -*/ -SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Column Names In A Result Set {H13720} -** -** These routines return the name assigned to a particular column -** in the result set of a [SELECT] statement. The sqlite3_column_name() -** interface returns a pointer to a zero-terminated UTF-8 string -** and sqlite3_column_name16() returns a pointer to a zero-terminated -** UTF-16 string. The first parameter is the [prepared statement] -** that implements the [SELECT] statement. The second parameter is the -** column number. The leftmost column is number 0. -** -** The returned string pointer is valid until either the [prepared statement] -** is destroyed by [sqlite3_finalize()] or until the next call to -** sqlite3_column_name() or sqlite3_column_name16() on the same column. -** -** If sqlite3_malloc() fails during the processing of either routine -** (for example during a conversion from UTF-8 to UTF-16) then a -** NULL pointer is returned. -** -** The name of a result column is the value of the "AS" clause for -** that column, if there is an AS clause. If there is no AS clause -** then the name of the column is unspecified and may change from -** one release of SQLite to the next. -** -** Requirements: -** [H13721] [H13723] [H13724] [H13725] [H13726] [H13727] -*/ -SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N); -SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); - -/* -** CAPI3REF: Source Of Data In A Query Result {H13740} -** -** These routines provide a means to determine what column of what -** table in which database a result of a [SELECT] statement comes from. -** The name of the database or table or column can be returned as -** either a UTF-8 or UTF-16 string. The _database_ routines return -** the database name, the _table_ routines return the table name, and -** the origin_ routines return the column name. -** The returned string is valid until the [prepared statement] is destroyed -** using [sqlite3_finalize()] or until the same information is requested -** again in a different encoding. -** -** The names returned are the original un-aliased names of the -** database, table, and column. -** -** The first argument to the following calls is a [prepared statement]. -** These functions return information about the Nth column returned by -** the statement, where N is the second function argument. -** -** If the Nth column returned by the statement is an expression or -** subquery and is not a column value, then all of these functions return -** NULL. These routine might also return NULL if a memory allocation error -** occurs. Otherwise, they return the name of the attached database, table -** and column that query result column was extracted from. -** -** As with all other SQLite APIs, those postfixed with "16" return -** UTF-16 encoded strings, the other functions return UTF-8. {END} -** -** These APIs are only available if the library was compiled with the -** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined. -** -** {A13751} -** If two or more threads call one or more of these routines against the same -** prepared statement and column at the same time then the results are -** undefined. -** -** Requirements: -** [H13741] [H13742] [H13743] [H13744] [H13745] [H13746] [H13748] -** -** If two or more threads call one or more -** [sqlite3_column_database_name | column metadata interfaces] -** for the same [prepared statement] and result column -** at the same time then the results are undefined. -*/ -SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int); -SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int); -SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); - -/* -** CAPI3REF: Declared Datatype Of A Query Result {H13760} -** -** The first parameter is a [prepared statement]. -** If this statement is a [SELECT] statement and the Nth column of the -** returned result set of that [SELECT] is a table column (not an -** expression or subquery) then the declared type of the table -** column is returned. If the Nth column of the result set is an -** expression or subquery, then a NULL pointer is returned. -** The returned string is always UTF-8 encoded. {END} -** -** For example, given the database schema: -** -** CREATE TABLE t1(c1 VARIANT); -** -** and the following statement to be compiled: -** -** SELECT c1 + 1, c1 FROM t1; -** -** this routine would return the string "VARIANT" for the second result -** column (i==1), and a NULL pointer for the first result column (i==0). -** -** SQLite uses dynamic run-time typing. So just because a column -** is declared to contain a particular type does not mean that the -** data stored in that column is of the declared type. SQLite is -** strongly typed, but the typing is dynamic not static. Type -** is associated with individual values, not with the containers -** used to hold those values. -** -** Requirements: -** [H13761] [H13762] [H13763] -*/ -SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); - -/* -** CAPI3REF: Evaluate An SQL Statement {H13200} -** -** After a [prepared statement] has been prepared using either -** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy -** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function -** must be called one or more times to evaluate the statement. -** -** The details of the behavior of the sqlite3_step() interface depend -** on whether the statement was prepared using the newer "v2" interface -** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy -** interface [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the -** new "v2" interface is recommended for new applications but the legacy -** interface will continue to be supported. -** -** In the legacy interface, the return value will be either [SQLITE_BUSY], -** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE]. -** With the "v2" interface, any of the other [result codes] or -** [extended result codes] might be returned as well. -** -** [SQLITE_BUSY] means that the database engine was unable to acquire the -** database locks it needs to do its job. If the statement is a [COMMIT] -** or occurs outside of an explicit transaction, then you can retry the -** statement. If the statement is not a [COMMIT] and occurs within a -** explicit transaction then you should rollback the transaction before -** continuing. -** -** [SQLITE_DONE] means that the statement has finished executing -** successfully. sqlite3_step() should not be called again on this virtual -** machine without first calling [sqlite3_reset()] to reset the virtual -** machine back to its initial state. -** -** If the SQL statement being executed returns any data, then [SQLITE_ROW] -** is returned each time a new row of data is ready for processing by the -** caller. The values may be accessed using the [column access functions]. -** sqlite3_step() is called again to retrieve the next row of data. -** -** [SQLITE_ERROR] means that a run-time error (such as a constraint -** violation) has occurred. sqlite3_step() should not be called again on -** the VM. More information may be found by calling [sqlite3_errmsg()]. -** With the legacy interface, a more specific error code (for example, -** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth) -** can be obtained by calling [sqlite3_reset()] on the -** [prepared statement]. In the "v2" interface, -** the more specific error code is returned directly by sqlite3_step(). -** -** [SQLITE_MISUSE] means that the this routine was called inappropriately. -** Perhaps it was called on a [prepared statement] that has -** already been [sqlite3_finalize | finalized] or on one that had -** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could -** be the case that the same database connection is being used by two or -** more threads at the same moment in time. -** -** Goofy Interface Alert: In the legacy interface, the sqlite3_step() -** API always returns a generic error code, [SQLITE_ERROR], following any -** error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call -** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the -** specific [error codes] that better describes the error. -** We admit that this is a goofy design. The problem has been fixed -** with the "v2" interface. If you prepare all of your SQL statements -** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead -** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, -** then the more specific [error codes] are returned directly -** by sqlite3_step(). The use of the "v2" interface is recommended. -** -** Requirements: -** [H13202] [H15304] [H15306] [H15308] [H15310] -*/ -SQLITE_API int sqlite3_step(sqlite3_stmt*); - -/* -** CAPI3REF: Number of columns in a result set {H13770} -** -** Returns the number of values in the current row of the result set. -** -** Requirements: -** [H13771] [H13772] -*/ -SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Fundamental Datatypes {H10265} -** KEYWORDS: SQLITE_TEXT -** -** {H10266} Every value in SQLite has one of five fundamental datatypes: -** -**
    -**
  • 64-bit signed integer -**
  • 64-bit IEEE floating point number -**
  • string -**
  • BLOB -**
  • NULL -**
{END} -** -** These constants are codes for each of those types. -** -** Note that the SQLITE_TEXT constant was also used in SQLite version 2 -** for a completely different meaning. Software that links against both -** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not -** SQLITE_TEXT. -*/ -#define SQLITE_INTEGER 1 -#define SQLITE_FLOAT 2 -#define SQLITE_BLOB 4 -#define SQLITE_NULL 5 -#ifdef SQLITE_TEXT -# undef SQLITE_TEXT -#else -# define SQLITE_TEXT 3 -#endif -#define SQLITE3_TEXT 3 - -/* -** CAPI3REF: Result Values From A Query {H13800} -** KEYWORDS: {column access functions} -** -** These routines form the "result set query" interface. -** -** These routines return information about a single column of the current -** result row of a query. In every case the first argument is a pointer -** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*] -** that was returned from [sqlite3_prepare_v2()] or one of its variants) -** and the second argument is the index of the column for which information -** should be returned. The leftmost column of the result set has the index 0. -** The number of columns in the result can be determined using -** [sqlite3_column_count()]. -** -** If the SQL statement does not currently point to a valid row, or if the -** column index is out of range, the result is undefined. -** These routines may only be called when the most recent call to -** [sqlite3_step()] has returned [SQLITE_ROW] and neither -** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently. -** If any of these routines are called after [sqlite3_reset()] or -** [sqlite3_finalize()] or after [sqlite3_step()] has returned -** something other than [SQLITE_ROW], the results are undefined. -** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()] -** are called from a different thread while any of these routines -** are pending, then the results are undefined. -** -** The sqlite3_column_type() routine returns the -** [SQLITE_INTEGER | datatype code] for the initial data type -** of the result column. The returned value is one of [SQLITE_INTEGER], -** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value -** returned by sqlite3_column_type() is only meaningful if no type -** conversions have occurred as described below. After a type conversion, -** the value returned by sqlite3_column_type() is undefined. Future -** versions of SQLite may change the behavior of sqlite3_column_type() -** following a type conversion. -** -** If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() -** routine returns the number of bytes in that BLOB or string. -** If the result is a UTF-16 string, then sqlite3_column_bytes() converts -** the string to UTF-8 and then returns the number of bytes. -** If the result is a numeric value then sqlite3_column_bytes() uses -** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns -** the number of bytes in that string. -** The value returned does not include the zero terminator at the end -** of the string. For clarity: the value returned is the number of -** bytes in the string, not the number of characters. -** -** Strings returned by sqlite3_column_text() and sqlite3_column_text16(), -** even empty strings, are always zero terminated. The return -** value from sqlite3_column_blob() for a zero-length BLOB is an arbitrary -** pointer, possibly even a NULL pointer. -** -** The sqlite3_column_bytes16() routine is similar to sqlite3_column_bytes() -** but leaves the result in UTF-16 in native byte order instead of UTF-8. -** The zero terminator is not included in this count. -** -** The object returned by [sqlite3_column_value()] is an -** [unprotected sqlite3_value] object. An unprotected sqlite3_value object -** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()]. -** If the [unprotected sqlite3_value] object returned by -** [sqlite3_column_value()] is used in any other way, including calls -** to routines like [sqlite3_value_int()], [sqlite3_value_text()], -** or [sqlite3_value_bytes()], then the behavior is undefined. -** -** These routines attempt to convert the value where appropriate. For -** example, if the internal representation is FLOAT and a text result -** is requested, [sqlite3_snprintf()] is used internally to perform the -** conversion automatically. The following table details the conversions -** that are applied: -** -**
-** -**
Internal
Type
Requested
Type
Conversion -** -**
NULL INTEGER Result is 0 -**
NULL FLOAT Result is 0.0 -**
NULL TEXT Result is NULL pointer -**
NULL BLOB Result is NULL pointer -**
INTEGER FLOAT Convert from integer to float -**
INTEGER TEXT ASCII rendering of the integer -**
INTEGER BLOB Same as INTEGER->TEXT -**
FLOAT INTEGER Convert from float to integer -**
FLOAT TEXT ASCII rendering of the float -**
FLOAT BLOB Same as FLOAT->TEXT -**
TEXT INTEGER Use atoi() -**
TEXT FLOAT Use atof() -**
TEXT BLOB No change -**
BLOB INTEGER Convert to TEXT then use atoi() -**
BLOB FLOAT Convert to TEXT then use atof() -**
BLOB TEXT Add a zero terminator if needed -**
-**
-** -** The table above makes reference to standard C library functions atoi() -** and atof(). SQLite does not really use these functions. It has its -** own equivalent internal routines. The atoi() and atof() names are -** used in the table for brevity and because they are familiar to most -** C programmers. -** -** Note that when type conversions occur, pointers returned by prior -** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or -** sqlite3_column_text16() may be invalidated. -** Type conversions and pointer invalidations might occur -** in the following cases: -** -**
    -**
  • The initial content is a BLOB and sqlite3_column_text() or -** sqlite3_column_text16() is called. A zero-terminator might -** need to be added to the string.
  • -**
  • The initial content is UTF-8 text and sqlite3_column_bytes16() or -** sqlite3_column_text16() is called. The content must be converted -** to UTF-16.
  • -**
  • The initial content is UTF-16 text and sqlite3_column_bytes() or -** sqlite3_column_text() is called. The content must be converted -** to UTF-8.
  • -**
-** -** Conversions between UTF-16be and UTF-16le are always done in place and do -** not invalidate a prior pointer, though of course the content of the buffer -** that the prior pointer points to will have been modified. Other kinds -** of conversion are done in place when it is possible, but sometimes they -** are not possible and in those cases prior pointers are invalidated. -** -** The safest and easiest to remember policy is to invoke these routines -** in one of the following ways: -** -**
    -**
  • sqlite3_column_text() followed by sqlite3_column_bytes()
  • -**
  • sqlite3_column_blob() followed by sqlite3_column_bytes()
  • -**
  • sqlite3_column_text16() followed by sqlite3_column_bytes16()
  • -**
-** -** In other words, you should call sqlite3_column_text(), -** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result -** into the desired format, then invoke sqlite3_column_bytes() or -** sqlite3_column_bytes16() to find the size of the result. Do not mix calls -** to sqlite3_column_text() or sqlite3_column_blob() with calls to -** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() -** with calls to sqlite3_column_bytes(). -** -** The pointers returned are valid until a type conversion occurs as -** described above, or until [sqlite3_step()] or [sqlite3_reset()] or -** [sqlite3_finalize()] is called. The memory space used to hold strings -** and BLOBs is freed automatically. Do not pass the pointers returned -** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into -** [sqlite3_free()]. -** -** If a memory allocation error occurs during the evaluation of any -** of these routines, a default value is returned. The default value -** is either the integer 0, the floating point number 0.0, or a NULL -** pointer. Subsequent calls to [sqlite3_errcode()] will return -** [SQLITE_NOMEM]. -** -** Requirements: -** [H13803] [H13806] [H13809] [H13812] [H13815] [H13818] [H13821] [H13824] -** [H13827] [H13830] -*/ -SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); -SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); -SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); -SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); - -/* -** CAPI3REF: Destroy A Prepared Statement Object {H13300} -** -** The sqlite3_finalize() function is called to delete a [prepared statement]. -** If the statement was executed successfully or not executed at all, then -** SQLITE_OK is returned. If execution of the statement failed then an -** [error code] or [extended error code] is returned. -** -** This routine can be called at any point during the execution of the -** [prepared statement]. If the virtual machine has not -** completed execution when this routine is called, that is like -** encountering an error or an [sqlite3_interrupt | interrupt]. -** Incomplete updates may be rolled back and transactions canceled, -** depending on the circumstances, and the -** [error code] returned will be [SQLITE_ABORT]. -** -** Requirements: -** [H11302] [H11304] -*/ -SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Reset A Prepared Statement Object {H13330} -** -** The sqlite3_reset() function is called to reset a [prepared statement] -** object back to its initial state, ready to be re-executed. -** Any SQL statement variables that had values bound to them using -** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values. -** Use [sqlite3_clear_bindings()] to reset the bindings. -** -** {H11332} The [sqlite3_reset(S)] interface resets the [prepared statement] S -** back to the beginning of its program. -** -** {H11334} If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], -** or if [sqlite3_step(S)] has never before been called on S, -** then [sqlite3_reset(S)] returns [SQLITE_OK]. -** -** {H11336} If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S indicated an error, then -** [sqlite3_reset(S)] returns an appropriate [error code]. -** -** {H11338} The [sqlite3_reset(S)] interface does not change the values -** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. -*/ -SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Create Or Redefine SQL Functions {H16100} -** KEYWORDS: {function creation routines} -** KEYWORDS: {application-defined SQL function} -** KEYWORDS: {application-defined SQL functions} -** -** These two functions (collectively known as "function creation routines") -** are used to add SQL functions or aggregates or to redefine the behavior -** of existing SQL functions or aggregates. The only difference between the -** two is that the second parameter, the name of the (scalar) function or -** aggregate, is encoded in UTF-8 for sqlite3_create_function() and UTF-16 -** for sqlite3_create_function16(). -** -** The first parameter is the [database connection] to which the SQL -** function is to be added. If a single program uses more than one database -** connection internally, then SQL functions must be added individually to -** each database connection. -** -** The second parameter is the name of the SQL function to be created or -** redefined. The length of the name is limited to 255 bytes, exclusive of -** the zero-terminator. Note that the name length limit is in bytes, not -** characters. Any attempt to create a function with a longer name -** will result in [SQLITE_ERROR] being returned. -** -** The third parameter (nArg) -** is the number of arguments that the SQL function or -** aggregate takes. If this parameter is -1, then the SQL function or -** aggregate may take any number of arguments between 0 and the limit -** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third -** parameter is less than -1 or greater than 127 then the behavior is -** undefined. -** -** The fourth parameter, eTextRep, specifies what -** [SQLITE_UTF8 | text encoding] this SQL function prefers for -** its parameters. Any SQL function implementation should be able to work -** work with UTF-8, UTF-16le, or UTF-16be. But some implementations may be -** more efficient with one encoding than another. An application may -** invoke sqlite3_create_function() or sqlite3_create_function16() multiple -** times with the same function but with different values of eTextRep. -** When multiple implementations of the same function are available, SQLite -** will pick the one that involves the least amount of data conversion. -** If there is only a single implementation which does not care what text -** encoding is used, then the fourth argument should be [SQLITE_ANY]. -** -** The fifth parameter is an arbitrary pointer. The implementation of the -** function can gain access to this pointer using [sqlite3_user_data()]. -** -** The seventh, eighth and ninth parameters, xFunc, xStep and xFinal, are -** pointers to C-language functions that implement the SQL function or -** aggregate. A scalar SQL function requires an implementation of the xFunc -** callback only, NULL pointers should be passed as the xStep and xFinal -** parameters. An aggregate SQL function requires an implementation of xStep -** and xFinal and NULL should be passed for xFunc. To delete an existing -** SQL function or aggregate, pass NULL for all three function callbacks. -** -** It is permitted to register multiple implementations of the same -** functions with the same name but with either differing numbers of -** arguments or differing preferred text encodings. SQLite will use -** the implementation that most closely matches the way in which the -** SQL function is used. A function implementation with a non-negative -** nArg parameter is a better match than a function implementation with -** a negative nArg. A function where the preferred text encoding -** matches the database encoding is a better -** match than a function where the encoding is different. -** A function where the encoding difference is between UTF16le and UTF16be -** is a closer match than a function where the encoding difference is -** between UTF8 and UTF16. -** -** Built-in functions may be overloaded by new application-defined functions. -** The first application-defined function with a given name overrides all -** built-in functions in the same [database connection] with the same name. -** Subsequent application-defined functions of the same name only override -** prior application-defined functions that are an exact match for the -** number of parameters and preferred encoding. -** -** An application-defined function is permitted to call other -** SQLite interfaces. However, such calls must not -** close the database connection nor finalize or reset the prepared -** statement in which the function is running. -** -** Requirements: -** [H16103] [H16106] [H16109] [H16112] [H16118] [H16121] [H16127] -** [H16130] [H16133] [H16136] [H16139] [H16142] -*/ -SQLITE_API int sqlite3_create_function( - sqlite3 *db, - const char *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) -); -SQLITE_API int sqlite3_create_function16( - sqlite3 *db, - const void *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) -); - -/* -** CAPI3REF: Text Encodings {H10267} -** -** These constant define integer codes that represent the various -** text encodings supported by SQLite. -*/ -#define SQLITE_UTF8 1 -#define SQLITE_UTF16LE 2 -#define SQLITE_UTF16BE 3 -#define SQLITE_UTF16 4 /* Use native byte order */ -#define SQLITE_ANY 5 /* sqlite3_create_function only */ -#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */ - -/* -** CAPI3REF: Deprecated Functions -** DEPRECATED -** -** These functions are [deprecated]. In order to maintain -** backwards compatibility with older code, these functions continue -** to be supported. However, new applications should avoid -** the use of these functions. To help encourage people to avoid -** using these functions, we are not going to tell you what they do. -*/ -#ifndef SQLITE_OMIT_DEPRECATED -SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void); -SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); -SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64); -#endif - -/* -** CAPI3REF: Obtaining SQL Function Parameter Values {H15100} -** -** The C-language implementation of SQL functions and aggregates uses -** this set of interface routines to access the parameter values on -** the function or aggregate. -** -** The xFunc (for scalar functions) or xStep (for aggregates) parameters -** to [sqlite3_create_function()] and [sqlite3_create_function16()] -** define callbacks that implement the SQL functions and aggregates. -** The 4th parameter to these callbacks is an array of pointers to -** [protected sqlite3_value] objects. There is one [sqlite3_value] object for -** each parameter to the SQL function. These routines are used to -** extract values from the [sqlite3_value] objects. -** -** These routines work only with [protected sqlite3_value] objects. -** Any attempt to use these routines on an [unprotected sqlite3_value] -** object results in undefined behavior. -** -** These routines work just like the corresponding [column access functions] -** except that these routines take a single [protected sqlite3_value] object -** pointer instead of a [sqlite3_stmt*] pointer and an integer column number. -** -** The sqlite3_value_text16() interface extracts a UTF-16 string -** in the native byte-order of the host machine. The -** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces -** extract UTF-16 strings as big-endian and little-endian respectively. -** -** The sqlite3_value_numeric_type() interface attempts to apply -** numeric affinity to the value. This means that an attempt is -** made to convert the value to an integer or floating point. If -** such a conversion is possible without loss of information (in other -** words, if the value is a string that looks like a number) -** then the conversion is performed. Otherwise no conversion occurs. -** The [SQLITE_INTEGER | datatype] after conversion is returned. -** -** Please pay particular attention to the fact that the pointer returned -** from [sqlite3_value_blob()], [sqlite3_value_text()], or -** [sqlite3_value_text16()] can be invalidated by a subsequent call to -** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()], -** or [sqlite3_value_text16()]. -** -** These routines must be called from the same thread as -** the SQL function that supplied the [sqlite3_value*] parameters. -** -** Requirements: -** [H15103] [H15106] [H15109] [H15112] [H15115] [H15118] [H15121] [H15124] -** [H15127] [H15130] [H15133] [H15136] -*/ -SQLITE_API const void *sqlite3_value_blob(sqlite3_value*); -SQLITE_API int sqlite3_value_bytes(sqlite3_value*); -SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); -SQLITE_API double sqlite3_value_double(sqlite3_value*); -SQLITE_API int sqlite3_value_int(sqlite3_value*); -SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*); -SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*); -SQLITE_API int sqlite3_value_type(sqlite3_value*); -SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); - -/* -** CAPI3REF: Obtain Aggregate Function Context {H16210} -** -** The implementation of aggregate SQL functions use this routine to allocate -** a structure for storing their state. -** -** The first time the sqlite3_aggregate_context() routine is called for a -** particular aggregate, SQLite allocates nBytes of memory, zeroes out that -** memory, and returns a pointer to it. On second and subsequent calls to -** sqlite3_aggregate_context() for the same aggregate function index, -** the same buffer is returned. The implementation of the aggregate can use -** the returned buffer to accumulate data. -** -** SQLite automatically frees the allocated buffer when the aggregate -** query concludes. -** -** The first parameter should be a copy of the -** [sqlite3_context | SQL function context] that is the first parameter -** to the callback routine that implements the aggregate function. -** -** This routine must be called from the same thread in which -** the aggregate SQL function is running. -** -** Requirements: -** [H16211] [H16213] [H16215] [H16217] -*/ -SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); - -/* -** CAPI3REF: User Data For Functions {H16240} -** -** The sqlite3_user_data() interface returns a copy of -** the pointer that was the pUserData parameter (the 5th parameter) -** of the [sqlite3_create_function()] -** and [sqlite3_create_function16()] routines that originally -** registered the application defined function. {END} -** -** This routine must be called from the same thread in which -** the application-defined function is running. -** -** Requirements: -** [H16243] -*/ -SQLITE_API void *sqlite3_user_data(sqlite3_context*); - -/* -** CAPI3REF: Database Connection For Functions {H16250} -** -** The sqlite3_context_db_handle() interface returns a copy of -** the pointer to the [database connection] (the 1st parameter) -** of the [sqlite3_create_function()] -** and [sqlite3_create_function16()] routines that originally -** registered the application defined function. -** -** Requirements: -** [H16253] -*/ -SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); - -/* -** CAPI3REF: Function Auxiliary Data {H16270} -** -** The following two functions may be used by scalar SQL functions to -** associate metadata with argument values. If the same value is passed to -** multiple invocations of the same SQL function during query execution, under -** some circumstances the associated metadata may be preserved. This may -** be used, for example, to add a regular-expression matching scalar -** function. The compiled version of the regular expression is stored as -** metadata associated with the SQL value passed as the regular expression -** pattern. The compiled regular expression can be reused on multiple -** invocations of the same function so that the original pattern string -** does not need to be recompiled on each invocation. -** -** The sqlite3_get_auxdata() interface returns a pointer to the metadata -** associated by the sqlite3_set_auxdata() function with the Nth argument -** value to the application-defined function. If no metadata has been ever -** been set for the Nth argument of the function, or if the corresponding -** function parameter has changed since the meta-data was set, -** then sqlite3_get_auxdata() returns a NULL pointer. -** -** The sqlite3_set_auxdata() interface saves the metadata -** pointed to by its 3rd parameter as the metadata for the N-th -** argument of the application-defined function. Subsequent -** calls to sqlite3_get_auxdata() might return this data, if it has -** not been destroyed. -** If it is not NULL, SQLite will invoke the destructor -** function given by the 4th parameter to sqlite3_set_auxdata() on -** the metadata when the corresponding function parameter changes -** or when the SQL statement completes, whichever comes first. -** -** SQLite is free to call the destructor and drop metadata on any -** parameter of any function at any time. The only guarantee is that -** the destructor will be called before the metadata is dropped. -** -** In practice, metadata is preserved between function calls for -** expressions that are constant at compile time. This includes literal -** values and SQL variables. -** -** These routines must be called from the same thread in which -** the SQL function is running. -** -** Requirements: -** [H16272] [H16274] [H16276] [H16277] [H16278] [H16279] -*/ -SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N); -SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); - - -/* -** CAPI3REF: Constants Defining Special Destructor Behavior {H10280} -** -** These are special values for the destructor that is passed in as the -** final argument to routines like [sqlite3_result_blob()]. If the destructor -** argument is SQLITE_STATIC, it means that the content pointer is constant -** and will never change. It does not need to be destroyed. The -** SQLITE_TRANSIENT value means that the content will likely change in -** the near future and that SQLite should make its own private copy of -** the content before returning. -** -** The typedef is necessary to work around problems in certain -** C++ compilers. See ticket #2191. -*/ -typedef void (*sqlite3_destructor_type)(void*); -#define SQLITE_STATIC ((sqlite3_destructor_type)0) -#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) - -/* -** CAPI3REF: Setting The Result Of An SQL Function {H16400} -** -** These routines are used by the xFunc or xFinal callbacks that -** implement SQL functions and aggregates. See -** [sqlite3_create_function()] and [sqlite3_create_function16()] -** for additional information. -** -** These functions work very much like the [parameter binding] family of -** functions used to bind values to host parameters in prepared statements. -** Refer to the [SQL parameter] documentation for additional information. -** -** The sqlite3_result_blob() interface sets the result from -** an application-defined function to be the BLOB whose content is pointed -** to by the second parameter and which is N bytes long where N is the -** third parameter. -** -** The sqlite3_result_zeroblob() interfaces set the result of -** the application-defined function to be a BLOB containing all zero -** bytes and N bytes in size, where N is the value of the 2nd parameter. -** -** The sqlite3_result_double() interface sets the result from -** an application-defined function to be a floating point value specified -** by its 2nd argument. -** -** The sqlite3_result_error() and sqlite3_result_error16() functions -** cause the implemented SQL function to throw an exception. -** SQLite uses the string pointed to by the -** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16() -** as the text of an error message. SQLite interprets the error -** message string from sqlite3_result_error() as UTF-8. SQLite -** interprets the string from sqlite3_result_error16() as UTF-16 in native -** byte order. If the third parameter to sqlite3_result_error() -** or sqlite3_result_error16() is negative then SQLite takes as the error -** message all text up through the first zero character. -** If the third parameter to sqlite3_result_error() or -** sqlite3_result_error16() is non-negative then SQLite takes that many -** bytes (not characters) from the 2nd parameter as the error message. -** The sqlite3_result_error() and sqlite3_result_error16() -** routines make a private copy of the error message text before -** they return. Hence, the calling function can deallocate or -** modify the text after they return without harm. -** The sqlite3_result_error_code() function changes the error code -** returned by SQLite as a result of an error in a function. By default, -** the error code is SQLITE_ERROR. A subsequent call to sqlite3_result_error() -** or sqlite3_result_error16() resets the error code to SQLITE_ERROR. -** -** The sqlite3_result_toobig() interface causes SQLite to throw an error -** indicating that a string or BLOB is to long to represent. -** -** The sqlite3_result_nomem() interface causes SQLite to throw an error -** indicating that a memory allocation failed. -** -** The sqlite3_result_int() interface sets the return value -** of the application-defined function to be the 32-bit signed integer -** value given in the 2nd argument. -** The sqlite3_result_int64() interface sets the return value -** of the application-defined function to be the 64-bit signed integer -** value given in the 2nd argument. -** -** The sqlite3_result_null() interface sets the return value -** of the application-defined function to be NULL. -** -** The sqlite3_result_text(), sqlite3_result_text16(), -** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces -** set the return value of the application-defined function to be -** a text string which is represented as UTF-8, UTF-16 native byte order, -** UTF-16 little endian, or UTF-16 big endian, respectively. -** SQLite takes the text result from the application from -** the 2nd parameter of the sqlite3_result_text* interfaces. -** If the 3rd parameter to the sqlite3_result_text* interfaces -** is negative, then SQLite takes result text from the 2nd parameter -** through the first zero character. -** If the 3rd parameter to the sqlite3_result_text* interfaces -** is non-negative, then as many bytes (not characters) of the text -** pointed to by the 2nd parameter are taken as the application-defined -** function result. -** If the 4th parameter to the sqlite3_result_text* interfaces -** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that -** function as the destructor on the text or BLOB result when it has -** finished using that result. -** If the 4th parameter to the sqlite3_result_text* interfaces or to -** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite -** assumes that the text or BLOB result is in constant space and does not -** copy the content of the parameter nor call a destructor on the content -** when it has finished using that result. -** If the 4th parameter to the sqlite3_result_text* interfaces -** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT -** then SQLite makes a copy of the result into space obtained from -** from [sqlite3_malloc()] before it returns. -** -** The sqlite3_result_value() interface sets the result of -** the application-defined function to be a copy the -** [unprotected sqlite3_value] object specified by the 2nd parameter. The -** sqlite3_result_value() interface makes a copy of the [sqlite3_value] -** so that the [sqlite3_value] specified in the parameter may change or -** be deallocated after sqlite3_result_value() returns without harm. -** A [protected sqlite3_value] object may always be used where an -** [unprotected sqlite3_value] object is required, so either -** kind of [sqlite3_value] object can be used with this interface. -** -** If these routines are called from within the different thread -** than the one containing the application-defined function that received -** the [sqlite3_context] pointer, the results are undefined. -** -** Requirements: -** [H16403] [H16406] [H16409] [H16412] [H16415] [H16418] [H16421] [H16424] -** [H16427] [H16430] [H16433] [H16436] [H16439] [H16442] [H16445] [H16448] -** [H16451] [H16454] [H16457] [H16460] [H16463] -*/ -SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_double(sqlite3_context*, double); -SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int); -SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int); -SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*); -SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*); -SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int); -SQLITE_API void sqlite3_result_int(sqlite3_context*, int); -SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); -SQLITE_API void sqlite3_result_null(sqlite3_context*); -SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*); -SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n); - -/* -** CAPI3REF: Define New Collating Sequences {H16600} -** -** These functions are used to add new collation sequences to the -** [database connection] specified as the first argument. -** -** The name of the new collation sequence is specified as a UTF-8 string -** for sqlite3_create_collation() and sqlite3_create_collation_v2() -** and a UTF-16 string for sqlite3_create_collation16(). In all cases -** the name is passed as the second function argument. -** -** The third argument may be one of the constants [SQLITE_UTF8], -** [SQLITE_UTF16LE], or [SQLITE_UTF16BE], indicating that the user-supplied -** routine expects to be passed pointers to strings encoded using UTF-8, -** UTF-16 little-endian, or UTF-16 big-endian, respectively. The -** third argument might also be [SQLITE_UTF16] to indicate that the routine -** expects pointers to be UTF-16 strings in the native byte order, or the -** argument can be [SQLITE_UTF16_ALIGNED] if the -** the routine expects pointers to 16-bit word aligned strings -** of UTF-16 in the native byte order. -** -** A pointer to the user supplied routine must be passed as the fifth -** argument. If it is NULL, this is the same as deleting the collation -** sequence (so that SQLite cannot call it anymore). -** Each time the application supplied function is invoked, it is passed -** as its first parameter a copy of the void* passed as the fourth argument -** to sqlite3_create_collation() or sqlite3_create_collation16(). -** -** The remaining arguments to the application-supplied routine are two strings, -** each represented by a (length, data) pair and encoded in the encoding -** that was passed as the third argument when the collation sequence was -** registered. {END} The application defined collation routine should -** return negative, zero or positive if the first string is less than, -** equal to, or greater than the second string. i.e. (STRING1 - STRING2). -** -** The sqlite3_create_collation_v2() works like sqlite3_create_collation() -** except that it takes an extra argument which is a destructor for -** the collation. The destructor is called when the collation is -** destroyed and is passed a copy of the fourth parameter void* pointer -** of the sqlite3_create_collation_v2(). -** Collations are destroyed when they are overridden by later calls to the -** collation creation functions or when the [database connection] is closed -** using [sqlite3_close()]. -** -** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. -** -** Requirements: -** [H16603] [H16604] [H16606] [H16609] [H16612] [H16615] [H16618] [H16621] -** [H16624] [H16627] [H16630] -*/ -SQLITE_API int sqlite3_create_collation( - sqlite3*, - const char *zName, - int eTextRep, - void*, - int(*xCompare)(void*,int,const void*,int,const void*) -); -SQLITE_API int sqlite3_create_collation_v2( - sqlite3*, - const char *zName, - int eTextRep, - void*, - int(*xCompare)(void*,int,const void*,int,const void*), - void(*xDestroy)(void*) -); -SQLITE_API int sqlite3_create_collation16( - sqlite3*, - const void *zName, - int eTextRep, - void*, - int(*xCompare)(void*,int,const void*,int,const void*) -); - -/* -** CAPI3REF: Collation Needed Callbacks {H16700} -** -** To avoid having to register all collation sequences before a database -** can be used, a single callback function may be registered with the -** [database connection] to be called whenever an undefined collation -** sequence is required. -** -** If the function is registered using the sqlite3_collation_needed() API, -** then it is passed the names of undefined collation sequences as strings -** encoded in UTF-8. {H16703} If sqlite3_collation_needed16() is used, -** the names are passed as UTF-16 in machine native byte order. -** A call to either function replaces any existing callback. -** -** When the callback is invoked, the first argument passed is a copy -** of the second argument to sqlite3_collation_needed() or -** sqlite3_collation_needed16(). The second argument is the database -** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], -** or [SQLITE_UTF16LE], indicating the most desirable form of the collation -** sequence function required. The fourth parameter is the name of the -** required collation sequence. -** -** The callback function should register the desired collation using -** [sqlite3_create_collation()], [sqlite3_create_collation16()], or -** [sqlite3_create_collation_v2()]. -** -** Requirements: -** [H16702] [H16704] [H16706] -*/ -SQLITE_API int sqlite3_collation_needed( - sqlite3*, - void*, - void(*)(void*,sqlite3*,int eTextRep,const char*) -); -SQLITE_API int sqlite3_collation_needed16( - sqlite3*, - void*, - void(*)(void*,sqlite3*,int eTextRep,const void*) -); - -/* -** Specify the key for an encrypted database. This routine should be -** called right after sqlite3_open(). -** -** The code to implement this API is not available in the public release -** of SQLite. -*/ -SQLITE_API int sqlite3_key( - sqlite3 *db, /* Database to be rekeyed */ - const void *pKey, int nKey /* The key */ -); - -/* -** Change the key on an open database. If the current database is not -** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the -** database is decrypted. -** -** The code to implement this API is not available in the public release -** of SQLite. -*/ -SQLITE_API int sqlite3_rekey( - sqlite3 *db, /* Database to be rekeyed */ - const void *pKey, int nKey /* The new key */ -); - -/* -** CAPI3REF: Suspend Execution For A Short Time {H10530} -** -** The sqlite3_sleep() function causes the current thread to suspend execution -** for at least a number of milliseconds specified in its parameter. -** -** If the operating system does not support sleep requests with -** millisecond time resolution, then the time will be rounded up to -** the nearest second. The number of milliseconds of sleep actually -** requested from the operating system is returned. -** -** SQLite implements this interface by calling the xSleep() -** method of the default [sqlite3_vfs] object. -** -** Requirements: [H10533] [H10536] -*/ -SQLITE_API int sqlite3_sleep(int); - -/* -** CAPI3REF: Name Of The Folder Holding Temporary Files {H10310} -** -** If this global variable is made to point to a string which is -** the name of a folder (a.k.a. directory), then all temporary files -** created by SQLite will be placed in that directory. If this variable -** is a NULL pointer, then SQLite performs a search for an appropriate -** temporary file directory. -** -** It is not safe to read or modify this variable in more than one -** thread at a time. It is not safe to read or modify this variable -** if a [database connection] is being used at the same time in a separate -** thread. -** It is intended that this variable be set once -** as part of process initialization and before any SQLite interface -** routines have been called and that this variable remain unchanged -** thereafter. -** -** The [temp_store_directory pragma] may modify this variable and cause -** it to point to memory obtained from [sqlite3_malloc]. Furthermore, -** the [temp_store_directory pragma] always assumes that any string -** that this variable points to is held in memory obtained from -** [sqlite3_malloc] and the pragma may attempt to free that memory -** using [sqlite3_free]. -** Hence, if this variable is modified directly, either it should be -** made NULL or made to point to memory obtained from [sqlite3_malloc] -** or else the use of the [temp_store_directory pragma] should be avoided. -*/ -SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory; - -/* -** CAPI3REF: Test For Auto-Commit Mode {H12930} -** KEYWORDS: {autocommit mode} -** -** The sqlite3_get_autocommit() interface returns non-zero or -** zero if the given database connection is or is not in autocommit mode, -** respectively. Autocommit mode is on by default. -** Autocommit mode is disabled by a [BEGIN] statement. -** Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK]. -** -** If certain kinds of errors occur on a statement within a multi-statement -** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR], -** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the -** transaction might be rolled back automatically. The only way to -** find out whether SQLite automatically rolled back the transaction after -** an error is to use this function. -** -** If another thread changes the autocommit status of the database -** connection while this routine is running, then the return value -** is undefined. -** -** Requirements: [H12931] [H12932] [H12933] [H12934] -*/ -SQLITE_API int sqlite3_get_autocommit(sqlite3*); - -/* -** CAPI3REF: Find The Database Handle Of A Prepared Statement {H13120} -** -** The sqlite3_db_handle interface returns the [database connection] handle -** to which a [prepared statement] belongs. The [database connection] -** returned by sqlite3_db_handle is the same [database connection] that was the first argument -** to the [sqlite3_prepare_v2()] call (or its variants) that was used to -** create the statement in the first place. -** -** Requirements: [H13123] -*/ -SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); - -/* -** CAPI3REF: Find the next prepared statement {H13140} -** -** This interface returns a pointer to the next [prepared statement] after -** pStmt associated with the [database connection] pDb. If pStmt is NULL -** then this interface returns a pointer to the first prepared statement -** associated with the database connection pDb. If no prepared statement -** satisfies the conditions of this routine, it returns NULL. -** -** The [database connection] pointer D in a call to -** [sqlite3_next_stmt(D,S)] must refer to an open database -** connection and in particular must not be a NULL pointer. -** -** Requirements: [H13143] [H13146] [H13149] [H13152] -*/ -SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Commit And Rollback Notification Callbacks {H12950} -** -** The sqlite3_commit_hook() interface registers a callback -** function to be invoked whenever a transaction is [COMMIT | committed]. -** Any callback set by a previous call to sqlite3_commit_hook() -** for the same database connection is overridden. -** The sqlite3_rollback_hook() interface registers a callback -** function to be invoked whenever a transaction is [ROLLBACK | rolled back]. -** Any callback set by a previous call to sqlite3_commit_hook() -** for the same database connection is overridden. -** The pArg argument is passed through to the callback. -** If the callback on a commit hook function returns non-zero, -** then the commit is converted into a rollback. -** -** If another function was previously registered, its -** pArg value is returned. Otherwise NULL is returned. -** -** The callback implementation must not do anything that will modify -** the database connection that invoked the callback. Any actions -** to modify the database connection must be deferred until after the -** completion of the [sqlite3_step()] call that triggered the commit -** or rollback hook in the first place. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** Registering a NULL function disables the callback. -** -** When the commit hook callback routine returns zero, the [COMMIT] -** operation is allowed to continue normally. If the commit hook -** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK]. -** The rollback hook is invoked on a rollback that results from a commit -** hook returning non-zero, just as it would be with any other rollback. -** -** For the purposes of this API, a transaction is said to have been -** rolled back if an explicit "ROLLBACK" statement is executed, or -** an error or constraint causes an implicit rollback to occur. -** The rollback callback is not invoked if a transaction is -** automatically rolled back because the database connection is closed. -** The rollback callback is not invoked if a transaction is -** rolled back because a commit callback returned non-zero. -** Check on this -** -** See also the [sqlite3_update_hook()] interface. -** -** Requirements: -** [H12951] [H12952] [H12953] [H12954] [H12955] -** [H12961] [H12962] [H12963] [H12964] -*/ -SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); -SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); - -/* -** CAPI3REF: Data Change Notification Callbacks {H12970} -** -** The sqlite3_update_hook() interface registers a callback function -** with the [database connection] identified by the first argument -** to be invoked whenever a row is updated, inserted or deleted. -** Any callback set by a previous call to this function -** for the same database connection is overridden. -** -** The second argument is a pointer to the function to invoke when a -** row is updated, inserted or deleted. -** The first argument to the callback is a copy of the third argument -** to sqlite3_update_hook(). -** The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], -** or [SQLITE_UPDATE], depending on the operation that caused the callback -** to be invoked. -** The third and fourth arguments to the callback contain pointers to the -** database and table name containing the affected row. -** The final callback parameter is the [rowid] of the row. -** In the case of an update, this is the [rowid] after the update takes place. -** -** The update hook is not invoked when internal system tables are -** modified (i.e. sqlite_master and sqlite_sequence). -** -** In the current implementation, the update hook -** is not invoked when duplication rows are deleted because of an -** [ON CONFLICT | ON CONFLICT REPLACE] clause. Nor is the update hook -** invoked when rows are deleted using the [truncate optimization]. -** The exceptions defined in this paragraph might change in a future -** release of SQLite. -** -** The update hook implementation must not do anything that will modify -** the database connection that invoked the update hook. Any actions -** to modify the database connection must be deferred until after the -** completion of the [sqlite3_step()] call that triggered the update hook. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** If another function was previously registered, its pArg value -** is returned. Otherwise NULL is returned. -** -** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()] -** interfaces. -** -** Requirements: -** [H12971] [H12973] [H12975] [H12977] [H12979] [H12981] [H12983] [H12986] -*/ -SQLITE_API void *sqlite3_update_hook( - sqlite3*, - void(*)(void *,int ,char const *,char const *,sqlite3_int64), - void* -); - -/* -** CAPI3REF: Enable Or Disable Shared Pager Cache {H10330} -** KEYWORDS: {shared cache} -** -** This routine enables or disables the sharing of the database cache -** and schema data structures between [database connection | connections] -** to the same database. Sharing is enabled if the argument is true -** and disabled if the argument is false. -** -** Cache sharing is enabled and disabled for an entire process. -** This is a change as of SQLite version 3.5.0. In prior versions of SQLite, -** sharing was enabled or disabled for each thread separately. -** -** The cache sharing mode set by this interface effects all subsequent -** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. -** Existing database connections continue use the sharing mode -** that was in effect at the time they were opened. -** -** Virtual tables cannot be used with a shared cache. When shared -** cache is enabled, the [sqlite3_create_module()] API used to register -** virtual tables will always return an error. -** -** This routine returns [SQLITE_OK] if shared cache was enabled or disabled -** successfully. An [error code] is returned otherwise. -** -** Shared cache is disabled by default. But this might change in -** future releases of SQLite. Applications that care about shared -** cache setting should set it explicitly. -** -** See Also: [SQLite Shared-Cache Mode] -** -** Requirements: [H10331] [H10336] [H10337] [H10339] -*/ -SQLITE_API int sqlite3_enable_shared_cache(int); - -/* -** CAPI3REF: Attempt To Free Heap Memory {H17340} -** -** The sqlite3_release_memory() interface attempts to free N bytes -** of heap memory by deallocating non-essential memory allocations -** held by the database library. {END} Memory used to cache database -** pages to improve performance is an example of non-essential memory. -** sqlite3_release_memory() returns the number of bytes actually freed, -** which might be more or less than the amount requested. -** -** Requirements: [H17341] [H17342] -*/ -SQLITE_API int sqlite3_release_memory(int); - -/* -** CAPI3REF: Impose A Limit On Heap Size {H17350} -** -** The sqlite3_soft_heap_limit() interface places a "soft" limit -** on the amount of heap memory that may be allocated by SQLite. -** If an internal allocation is requested that would exceed the -** soft heap limit, [sqlite3_release_memory()] is invoked one or -** more times to free up some space before the allocation is performed. -** -** The limit is called "soft", because if [sqlite3_release_memory()] -** cannot free sufficient memory to prevent the limit from being exceeded, -** the memory is allocated anyway and the current operation proceeds. -** -** A negative or zero value for N means that there is no soft heap limit and -** [sqlite3_release_memory()] will only be called when memory is exhausted. -** The default value for the soft heap limit is zero. -** -** SQLite makes a best effort to honor the soft heap limit. -** But if the soft heap limit cannot be honored, execution will -** continue without error or notification. This is why the limit is -** called a "soft" limit. It is advisory only. -** -** Prior to SQLite version 3.5.0, this routine only constrained the memory -** allocated by a single thread - the same thread in which this routine -** runs. Beginning with SQLite version 3.5.0, the soft heap limit is -** applied to all threads. The value specified for the soft heap limit -** is an upper bound on the total memory allocation for all threads. In -** version 3.5.0 there is no mechanism for limiting the heap usage for -** individual threads. -** -** Requirements: -** [H16351] [H16352] [H16353] [H16354] [H16355] [H16358] -*/ -SQLITE_API void sqlite3_soft_heap_limit(int); - -/* -** CAPI3REF: Extract Metadata About A Column Of A Table {H12850} -** -** This routine returns metadata about a specific column of a specific -** database table accessible using the [database connection] handle -** passed as the first function argument. -** -** The column is identified by the second, third and fourth parameters to -** this function. The second parameter is either the name of the database -** (i.e. "main", "temp" or an attached database) containing the specified -** table or NULL. If it is NULL, then all attached databases are searched -** for the table using the same algorithm used by the database engine to -** resolve unqualified table references. -** -** The third and fourth parameters to this function are the table and column -** name of the desired column, respectively. Neither of these parameters -** may be NULL. -** -** Metadata is returned by writing to the memory locations passed as the 5th -** and subsequent parameters to this function. Any of these arguments may be -** NULL, in which case the corresponding element of metadata is omitted. -** -**
-** -**
Parameter Output
Type
Description -** -**
5th const char* Data type -**
6th const char* Name of default collation sequence -**
7th int True if column has a NOT NULL constraint -**
8th int True if column is part of the PRIMARY KEY -**
9th int True if column is [AUTOINCREMENT] -**
-**
-** -** The memory pointed to by the character pointers returned for the -** declaration type and collation sequence is valid only until the next -** call to any SQLite API function. -** -** If the specified table is actually a view, an [error code] is returned. -** -** If the specified column is "rowid", "oid" or "_rowid_" and an -** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output -** parameters are set for the explicitly declared column. If there is no -** explicitly declared [INTEGER PRIMARY KEY] column, then the output -** parameters are set as follows: -** -**
-**     data type: "INTEGER"
-**     collation sequence: "BINARY"
-**     not null: 0
-**     primary key: 1
-**     auto increment: 0
-** 
-** -** This function may load one or more schemas from database files. If an -** error occurs during this process, or if the requested table or column -** cannot be found, an [error code] is returned and an error message left -** in the [database connection] (to be retrieved using sqlite3_errmsg()). -** -** This API is only available if the library was compiled with the -** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined. -*/ -SQLITE_API int sqlite3_table_column_metadata( - sqlite3 *db, /* Connection handle */ - const char *zDbName, /* Database name or NULL */ - const char *zTableName, /* Table name */ - const char *zColumnName, /* Column name */ - char const **pzDataType, /* OUTPUT: Declared data type */ - char const **pzCollSeq, /* OUTPUT: Collation sequence name */ - int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */ - int *pPrimaryKey, /* OUTPUT: True if column part of PK */ - int *pAutoinc /* OUTPUT: True if column is auto-increment */ -); - -/* -** CAPI3REF: Load An Extension {H12600} -** -** This interface loads an SQLite extension library from the named file. -** -** {H12601} The sqlite3_load_extension() interface attempts to load an -** SQLite extension library contained in the file zFile. -** -** {H12602} The entry point is zProc. -** -** {H12603} zProc may be 0, in which case the name of the entry point -** defaults to "sqlite3_extension_init". -** -** {H12604} The sqlite3_load_extension() interface shall return -** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. -** -** {H12605} If an error occurs and pzErrMsg is not 0, then the -** [sqlite3_load_extension()] interface shall attempt to -** fill *pzErrMsg with error message text stored in memory -** obtained from [sqlite3_malloc()]. {END} The calling function -** should free this memory by calling [sqlite3_free()]. -** -** {H12606} Extension loading must be enabled using -** [sqlite3_enable_load_extension()] prior to calling this API, -** otherwise an error will be returned. -*/ -SQLITE_API int sqlite3_load_extension( - sqlite3 *db, /* Load the extension into this database connection */ - const char *zFile, /* Name of the shared library containing extension */ - const char *zProc, /* Entry point. Derived from zFile if 0 */ - char **pzErrMsg /* Put error message here if not 0 */ -); - -/* -** CAPI3REF: Enable Or Disable Extension Loading {H12620} -** -** So as not to open security holes in older applications that are -** unprepared to deal with extension loading, and as a means of disabling -** extension loading while evaluating user-entered SQL, the following API -** is provided to turn the [sqlite3_load_extension()] mechanism on and off. -** -** Extension loading is off by default. See ticket #1863. -** -** {H12621} Call the sqlite3_enable_load_extension() routine with onoff==1 -** to turn extension loading on and call it with onoff==0 to turn -** it back off again. -** -** {H12622} Extension loading is off by default. -*/ -SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); - -/* -** CAPI3REF: Automatically Load An Extensions {H12640} -** -** This API can be invoked at program startup in order to register -** one or more statically linked extensions that will be available -** to all new [database connections]. {END} -** -** This routine stores a pointer to the extension in an array that is -** obtained from [sqlite3_malloc()]. If you run a memory leak checker -** on your program and it reports a leak because of this array, invoke -** [sqlite3_reset_auto_extension()] prior to shutdown to free the memory. -** -** {H12641} This function registers an extension entry point that is -** automatically invoked whenever a new [database connection] -** is opened using [sqlite3_open()], [sqlite3_open16()], -** or [sqlite3_open_v2()]. -** -** {H12642} Duplicate extensions are detected so calling this routine -** multiple times with the same extension is harmless. -** -** {H12643} This routine stores a pointer to the extension in an array -** that is obtained from [sqlite3_malloc()]. -** -** {H12644} Automatic extensions apply across all threads. -*/ -SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void)); - -/* -** CAPI3REF: Reset Automatic Extension Loading {H12660} -** -** This function disables all previously registered automatic -** extensions. {END} It undoes the effect of all prior -** [sqlite3_auto_extension()] calls. -** -** {H12661} This function disables all previously registered -** automatic extensions. -** -** {H12662} This function disables automatic extensions in all threads. -*/ -SQLITE_API void sqlite3_reset_auto_extension(void); - -/* -****** EXPERIMENTAL - subject to change without notice ************** -** -** The interface to the virtual-table mechanism is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - -/* -** Structures used by the virtual table interface -*/ -typedef struct sqlite3_vtab sqlite3_vtab; -typedef struct sqlite3_index_info sqlite3_index_info; -typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor; -typedef struct sqlite3_module sqlite3_module; - -/* -** CAPI3REF: Virtual Table Object {H18000} -** KEYWORDS: sqlite3_module {virtual table module} -** EXPERIMENTAL -** -** This structure, sometimes called a a "virtual table module", -** defines the implementation of a [virtual tables]. -** This structure consists mostly of methods for the module. -** -** A virtual table module is created by filling in a persistent -** instance of this structure and passing a pointer to that instance -** to [sqlite3_create_module()] or [sqlite3_create_module_v2()]. -** The registration remains valid until it is replaced by a different -** module or until the [database connection] closes. The content -** of this structure must not change while it is registered with -** any database connection. -*/ -struct sqlite3_module { - int iVersion; - int (*xCreate)(sqlite3*, void *pAux, - int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xConnect)(sqlite3*, void *pAux, - int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); - int (*xDisconnect)(sqlite3_vtab *pVTab); - int (*xDestroy)(sqlite3_vtab *pVTab); - int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); - int (*xClose)(sqlite3_vtab_cursor*); - int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, - int argc, sqlite3_value **argv); - int (*xNext)(sqlite3_vtab_cursor*); - int (*xEof)(sqlite3_vtab_cursor*); - int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); - int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); - int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); - int (*xBegin)(sqlite3_vtab *pVTab); - int (*xSync)(sqlite3_vtab *pVTab); - int (*xCommit)(sqlite3_vtab *pVTab); - int (*xRollback)(sqlite3_vtab *pVTab); - int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, - void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), - void **ppArg); - int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); -}; - -/* -** CAPI3REF: Virtual Table Indexing Information {H18100} -** KEYWORDS: sqlite3_index_info -** EXPERIMENTAL -** -** The sqlite3_index_info structure and its substructures is used to -** pass information into and receive the reply from the [xBestIndex] -** method of a [virtual table module]. The fields under **Inputs** are the -** inputs to xBestIndex and are read-only. xBestIndex inserts its -** results into the **Outputs** fields. -** -** The aConstraint[] array records WHERE clause constraints of the form: -** -**
column OP expr
-** -** where OP is =, <, <=, >, or >=. The particular operator is -** stored in aConstraint[].op. The index of the column is stored in -** aConstraint[].iColumn. aConstraint[].usable is TRUE if the -** expr on the right-hand side can be evaluated (and thus the constraint -** is usable) and false if it cannot. -** -** The optimizer automatically inverts terms of the form "expr OP column" -** and makes other simplifications to the WHERE clause in an attempt to -** get as many WHERE clause terms into the form shown above as possible. -** The aConstraint[] array only reports WHERE clause terms in the correct -** form that refer to the particular virtual table being queried. -** -** Information about the ORDER BY clause is stored in aOrderBy[]. -** Each term of aOrderBy records a column of the ORDER BY clause. -** -** The [xBestIndex] method must fill aConstraintUsage[] with information -** about what parameters to pass to xFilter. If argvIndex>0 then -** the right-hand side of the corresponding aConstraint[] is evaluated -** and becomes the argvIndex-th entry in argv. If aConstraintUsage[].omit -** is true, then the constraint is assumed to be fully handled by the -** virtual table and is not checked again by SQLite. -** -** The idxNum and idxPtr values are recorded and passed into the -** [xFilter] method. -** [sqlite3_free()] is used to free idxPtr if and only iff -** needToFreeIdxPtr is true. -** -** The orderByConsumed means that output from [xFilter]/[xNext] will occur in -** the correct order to satisfy the ORDER BY clause so that no separate -** sorting step is required. -** -** The estimatedCost value is an estimate of the cost of doing the -** particular lookup. A full scan of a table with N entries should have -** a cost of N. A binary search of a table of N entries should have a -** cost of approximately log(N). -*/ -struct sqlite3_index_info { - /* Inputs */ - int nConstraint; /* Number of entries in aConstraint */ - struct sqlite3_index_constraint { - int iColumn; /* Column on left-hand side of constraint */ - unsigned char op; /* Constraint operator */ - unsigned char usable; /* True if this constraint is usable */ - int iTermOffset; /* Used internally - xBestIndex should ignore */ - } *aConstraint; /* Table of WHERE clause constraints */ - int nOrderBy; /* Number of terms in the ORDER BY clause */ - struct sqlite3_index_orderby { - int iColumn; /* Column number */ - unsigned char desc; /* True for DESC. False for ASC. */ - } *aOrderBy; /* The ORDER BY clause */ - /* Outputs */ - struct sqlite3_index_constraint_usage { - int argvIndex; /* if >0, constraint is part of argv to xFilter */ - unsigned char omit; /* Do not code a test for this constraint */ - } *aConstraintUsage; - int idxNum; /* Number used to identify the index */ - char *idxStr; /* String, possibly obtained from sqlite3_malloc */ - int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */ - int orderByConsumed; /* True if output is already ordered */ - double estimatedCost; /* Estimated cost of using this index */ -}; -#define SQLITE_INDEX_CONSTRAINT_EQ 2 -#define SQLITE_INDEX_CONSTRAINT_GT 4 -#define SQLITE_INDEX_CONSTRAINT_LE 8 -#define SQLITE_INDEX_CONSTRAINT_LT 16 -#define SQLITE_INDEX_CONSTRAINT_GE 32 -#define SQLITE_INDEX_CONSTRAINT_MATCH 64 - -/* -** CAPI3REF: Register A Virtual Table Implementation {H18200} -** EXPERIMENTAL -** -** This routine is used to register a new [virtual table module] name. -** Module names must be registered before -** creating a new [virtual table] using the module, or before using a -** preexisting [virtual table] for the module. -** -** The module name is registered on the [database connection] specified -** by the first parameter. The name of the module is given by the -** second parameter. The third parameter is a pointer to -** the implementation of the [virtual table module]. The fourth -** parameter is an arbitrary client data pointer that is passed through -** into the [xCreate] and [xConnect] methods of the virtual table module -** when a new virtual table is be being created or reinitialized. -** -** This interface has exactly the same effect as calling -** [sqlite3_create_module_v2()] with a NULL client data destructor. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module( - sqlite3 *db, /* SQLite connection to register module with */ - const char *zName, /* Name of the module */ - const sqlite3_module *p, /* Methods for the module */ - void *pClientData /* Client data for xCreate/xConnect */ -); - -/* -** CAPI3REF: Register A Virtual Table Implementation {H18210} -** EXPERIMENTAL -** -** This routine is identical to the [sqlite3_create_module()] method, -** except that it has an extra parameter to specify -** a destructor function for the client data pointer. SQLite will -** invoke the destructor function (if it is not NULL) when SQLite -** no longer needs the pClientData pointer. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module_v2( - sqlite3 *db, /* SQLite connection to register module with */ - const char *zName, /* Name of the module */ - const sqlite3_module *p, /* Methods for the module */ - void *pClientData, /* Client data for xCreate/xConnect */ - void(*xDestroy)(void*) /* Module destructor function */ -); - -/* -** CAPI3REF: Virtual Table Instance Object {H18010} -** KEYWORDS: sqlite3_vtab -** EXPERIMENTAL -** -** Every [virtual table module] implementation uses a subclass -** of the following structure to describe a particular instance -** of the [virtual table]. Each subclass will -** be tailored to the specific needs of the module implementation. -** The purpose of this superclass is to define certain fields that are -** common to all module implementations. -** -** Virtual tables methods can set an error message by assigning a -** string obtained from [sqlite3_mprintf()] to zErrMsg. The method should -** take care that any prior string is freed by a call to [sqlite3_free()] -** prior to assigning a new string to zErrMsg. After the error message -** is delivered up to the client application, the string will be automatically -** freed by sqlite3_free() and the zErrMsg field will be zeroed. -*/ -struct sqlite3_vtab { - const sqlite3_module *pModule; /* The module for this virtual table */ - int nRef; /* NO LONGER USED */ - char *zErrMsg; /* Error message from sqlite3_mprintf() */ - /* Virtual table implementations will typically add additional fields */ -}; - -/* -** CAPI3REF: Virtual Table Cursor Object {H18020} -** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor} -** EXPERIMENTAL -** -** Every [virtual table module] implementation uses a subclass of the -** following structure to describe cursors that point into the -** [virtual table] and are used -** to loop through the virtual table. Cursors are created using the -** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed -** by the [sqlite3_module.xClose | xClose] method. Cussors are used -** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods -** of the module. Each module implementation will define -** the content of a cursor structure to suit its own needs. -** -** This superclass exists in order to define fields of the cursor that -** are common to all implementations. -*/ -struct sqlite3_vtab_cursor { - sqlite3_vtab *pVtab; /* Virtual table of this cursor */ - /* Virtual table implementations will typically add additional fields */ -}; - -/* -** CAPI3REF: Declare The Schema Of A Virtual Table {H18280} -** EXPERIMENTAL -** -** The [xCreate] and [xConnect] methods of a -** [virtual table module] call this interface -** to declare the format (the names and datatypes of the columns) of -** the virtual tables they implement. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zSQL); - -/* -** CAPI3REF: Overload A Function For A Virtual Table {H18300} -** EXPERIMENTAL -** -** Virtual tables can provide alternative implementations of functions -** using the [xFindFunction] method of the [virtual table module]. -** But global versions of those functions -** must exist in order to be overloaded. -** -** This API makes sure a global version of a function with a particular -** name and number of parameters exists. If no such function exists -** before this API is called, a new function is created. The implementation -** of the new function always causes an exception to be thrown. So -** the new function is not good for anything by itself. Its only -** purpose is to be a placeholder function that can be overloaded -** by a [virtual table]. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); - -/* -** The interface to the virtual-table mechanism defined above (back up -** to a comment remarkably similar to this one) is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -** -****** EXPERIMENTAL - subject to change without notice ************** -*/ - -/* -** CAPI3REF: A Handle To An Open BLOB {H17800} -** KEYWORDS: {BLOB handle} {BLOB handles} -** -** An instance of this object represents an open BLOB on which -** [sqlite3_blob_open | incremental BLOB I/O] can be performed. -** Objects of this type are created by [sqlite3_blob_open()] -** and destroyed by [sqlite3_blob_close()]. -** The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces -** can be used to read or write small subsections of the BLOB. -** The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes. -*/ -typedef struct sqlite3_blob sqlite3_blob; - -/* -** CAPI3REF: Open A BLOB For Incremental I/O {H17810} -** -** This interfaces opens a [BLOB handle | handle] to the BLOB located -** in row iRow, column zColumn, table zTable in database zDb; -** in other words, the same BLOB that would be selected by: -** -**
-**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
-** 
{END} -** -** If the flags parameter is non-zero, then the BLOB is opened for read -** and write access. If it is zero, the BLOB is opened for read access. -** It is not possible to open a column that is part of an index or primary -** key for writing. ^If [foreign key constraints] are enabled, it is -** not possible to open a column that is part of a [child key] for writing. -** -** Note that the database name is not the filename that contains -** the database but rather the symbolic name of the database that -** is assigned when the database is connected using [ATTACH]. -** For the main database file, the database name is "main". -** For TEMP tables, the database name is "temp". -** -** On success, [SQLITE_OK] is returned and the new [BLOB handle] is written -** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set -** to be a null pointer. -** This function sets the [database connection] error code and message -** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related -** functions. Note that the *ppBlob variable is always initialized in a -** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob -** regardless of the success or failure of this routine. -** -** If the row that a BLOB handle points to is modified by an -** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects -** then the BLOB handle is marked as "expired". -** This is true if any column of the row is changed, even a column -** other than the one the BLOB handle is open on. -** Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for -** a expired BLOB handle fail with an return code of [SQLITE_ABORT]. -** Changes written into a BLOB prior to the BLOB expiring are not -** rollback by the expiration of the BLOB. Such changes will eventually -** commit if the transaction continues to completion. -** -** Use the [sqlite3_blob_bytes()] interface to determine the size of -** the opened blob. The size of a blob may not be changed by this -** interface. Use the [UPDATE] SQL command to change the size of a -** blob. -** -** The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces -** and the built-in [zeroblob] SQL function can be used, if desired, -** to create an empty, zero-filled blob in which to read or write using -** this interface. -** -** To avoid a resource leak, every open [BLOB handle] should eventually -** be released by a call to [sqlite3_blob_close()]. -** -** Requirements: -** [H17813] [H17814] [H17816] [H17819] [H17821] [H17824] -*/ -SQLITE_API int sqlite3_blob_open( - sqlite3*, - const char *zDb, - const char *zTable, - const char *zColumn, - sqlite3_int64 iRow, - int flags, - sqlite3_blob **ppBlob -); - -/* -** CAPI3REF: Close A BLOB Handle {H17830} -** -** Closes an open [BLOB handle]. -** -** Closing a BLOB shall cause the current transaction to commit -** if there are no other BLOBs, no pending prepared statements, and the -** database connection is in [autocommit mode]. -** If any writes were made to the BLOB, they might be held in cache -** until the close operation if they will fit. -** -** Closing the BLOB often forces the changes -** out to disk and so if any I/O errors occur, they will likely occur -** at the time when the BLOB is closed. Any errors that occur during -** closing are reported as a non-zero return value. -** -** The BLOB is closed unconditionally. Even if this routine returns -** an error code, the BLOB is still closed. -** -** Calling this routine with a null pointer (which as would be returned -** by failed call to [sqlite3_blob_open()]) is a harmless no-op. -** -** Requirements: -** [H17833] [H17836] [H17839] -*/ -SQLITE_API int sqlite3_blob_close(sqlite3_blob *); - -/* -** CAPI3REF: Return The Size Of An Open BLOB {H17840} -** -** Returns the size in bytes of the BLOB accessible via the -** successfully opened [BLOB handle] in its only argument. The -** incremental blob I/O routines can only read or overwriting existing -** blob content; they cannot change the size of a blob. -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** Requirements: -** [H17843] -*/ -SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); - -/* -** CAPI3REF: Read Data From A BLOB Incrementally {H17850} -** -** This function is used to read data from an open [BLOB handle] into a -** caller-supplied buffer. N bytes of data are copied into buffer Z -** from the open BLOB, starting at offset iOffset. -** -** If offset iOffset is less than N bytes from the end of the BLOB, -** [SQLITE_ERROR] is returned and no data is read. If N or iOffset is -** less than zero, [SQLITE_ERROR] is returned and no data is read. -** The size of the blob (and hence the maximum value of N+iOffset) -** can be determined using the [sqlite3_blob_bytes()] interface. -** -** An attempt to read from an expired [BLOB handle] fails with an -** error code of [SQLITE_ABORT]. -** -** On success, SQLITE_OK is returned. -** Otherwise, an [error code] or an [extended error code] is returned. -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** See also: [sqlite3_blob_write()]. -** -** Requirements: -** [H17853] [H17856] [H17859] [H17862] [H17863] [H17865] [H17868] -*/ -SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); - -/* -** CAPI3REF: Write Data Into A BLOB Incrementally {H17870} -** -** This function is used to write data into an open [BLOB handle] from a -** caller-supplied buffer. N bytes of data are copied from the buffer Z -** into the open BLOB, starting at offset iOffset. -** -** If the [BLOB handle] passed as the first argument was not opened for -** writing (the flags parameter to [sqlite3_blob_open()] was zero), -** this function returns [SQLITE_READONLY]. -** -** This function may only modify the contents of the BLOB; it is -** not possible to increase the size of a BLOB using this API. -** If offset iOffset is less than N bytes from the end of the BLOB, -** [SQLITE_ERROR] is returned and no data is written. If N is -** less than zero [SQLITE_ERROR] is returned and no data is written. -** The size of the BLOB (and hence the maximum value of N+iOffset) -** can be determined using the [sqlite3_blob_bytes()] interface. -** -** An attempt to write to an expired [BLOB handle] fails with an -** error code of [SQLITE_ABORT]. Writes to the BLOB that occurred -** before the [BLOB handle] expired are not rolled back by the -** expiration of the handle, though of course those changes might -** have been overwritten by the statement that expired the BLOB handle -** or by other independent statements. -** -** On success, SQLITE_OK is returned. -** Otherwise, an [error code] or an [extended error code] is returned. -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** See also: [sqlite3_blob_read()]. -** -** Requirements: -** [H17873] [H17874] [H17875] [H17876] [H17877] [H17879] [H17882] [H17885] -** [H17888] -*/ -SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); - -/* -** CAPI3REF: Virtual File System Objects {H11200} -** -** A virtual filesystem (VFS) is an [sqlite3_vfs] object -** that SQLite uses to interact -** with the underlying operating system. Most SQLite builds come with a -** single default VFS that is appropriate for the host computer. -** New VFSes can be registered and existing VFSes can be unregistered. -** The following interfaces are provided. -** -** The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. -** Names are case sensitive. -** Names are zero-terminated UTF-8 strings. -** If there is no match, a NULL pointer is returned. -** If zVfsName is NULL then the default VFS is returned. -** -** New VFSes are registered with sqlite3_vfs_register(). -** Each new VFS becomes the default VFS if the makeDflt flag is set. -** The same VFS can be registered multiple times without injury. -** To make an existing VFS into the default VFS, register it again -** with the makeDflt flag set. If two different VFSes with the -** same name are registered, the behavior is undefined. If a -** VFS is registered with a name that is NULL or an empty string, -** then the behavior is undefined. -** -** Unregister a VFS with the sqlite3_vfs_unregister() interface. -** If the default VFS is unregistered, another VFS is chosen as -** the default. The choice for the new VFS is arbitrary. -** -** Requirements: -** [H11203] [H11206] [H11209] [H11212] [H11215] [H11218] -*/ -SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName); -SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); -SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); - -/* -** CAPI3REF: Mutexes {H17000} -** -** The SQLite core uses these routines for thread -** synchronization. Though they are intended for internal -** use by SQLite, code that links against SQLite is -** permitted to use any of these routines. -** -** The SQLite source code contains multiple implementations -** of these mutex routines. An appropriate implementation -** is selected automatically at compile-time. The following -** implementations are available in the SQLite core: -** -**
    -**
  • SQLITE_MUTEX_OS2 -**
  • SQLITE_MUTEX_PTHREAD -**
  • SQLITE_MUTEX_W32 -**
  • SQLITE_MUTEX_NOOP -**
-** -** The SQLITE_MUTEX_NOOP implementation is a set of routines -** that does no real locking and is appropriate for use in -** a single-threaded application. The SQLITE_MUTEX_OS2, -** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations -** are appropriate for use on OS/2, Unix, and Windows. -** -** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor -** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex -** implementation is included with the library. In this case the -** application must supply a custom mutex implementation using the -** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function -** before calling sqlite3_initialize() or any other public sqlite3_ -** function that calls sqlite3_initialize(). -** -** {H17011} The sqlite3_mutex_alloc() routine allocates a new -** mutex and returns a pointer to it. {H17012} If it returns NULL -** that means that a mutex could not be allocated. {H17013} SQLite -** will unwind its stack and return an error. {H17014} The argument -** to sqlite3_mutex_alloc() is one of these integer constants: -** -**
    -**
  • SQLITE_MUTEX_FAST -**
  • SQLITE_MUTEX_RECURSIVE -**
  • SQLITE_MUTEX_STATIC_MASTER -**
  • SQLITE_MUTEX_STATIC_MEM -**
  • SQLITE_MUTEX_STATIC_MEM2 -**
  • SQLITE_MUTEX_STATIC_PRNG -**
  • SQLITE_MUTEX_STATIC_LRU -**
  • SQLITE_MUTEX_STATIC_LRU2 -**
-** -** {H17015} The first two constants cause sqlite3_mutex_alloc() to create -** a new mutex. The new mutex is recursive when SQLITE_MUTEX_RECURSIVE -** is used but not necessarily so when SQLITE_MUTEX_FAST is used. {END} -** The mutex implementation does not need to make a distinction -** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does -** not want to. {H17016} But SQLite will only request a recursive mutex in -** cases where it really needs one. {END} If a faster non-recursive mutex -** implementation is available on the host platform, the mutex subsystem -** might return such a mutex in response to SQLITE_MUTEX_FAST. -** -** {H17017} The other allowed parameters to sqlite3_mutex_alloc() each return -** a pointer to a static preexisting mutex. {END} Six static mutexes are -** used by the current version of SQLite. Future versions of SQLite -** may add additional static mutexes. Static mutexes are for internal -** use by SQLite only. Applications that use SQLite mutexes should -** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or -** SQLITE_MUTEX_RECURSIVE. -** -** {H17018} Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST -** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() -** returns a different mutex on every call. {H17034} But for the static -** mutex types, the same mutex is returned on every call that has -** the same type number. -** -** {H17019} The sqlite3_mutex_free() routine deallocates a previously -** allocated dynamic mutex. {H17020} SQLite is careful to deallocate every -** dynamic mutex that it allocates. {A17021} The dynamic mutexes must not be in -** use when they are deallocated. {A17022} Attempting to deallocate a static -** mutex results in undefined behavior. {H17023} SQLite never deallocates -** a static mutex. {END} -** -** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt -** to enter a mutex. {H17024} If another thread is already within the mutex, -** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return -** SQLITE_BUSY. {H17025} The sqlite3_mutex_try() interface returns [SQLITE_OK] -** upon successful entry. {H17026} Mutexes created using -** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread. -** {H17027} In such cases the, -** mutex must be exited an equal number of times before another thread -** can enter. {A17028} If the same thread tries to enter any other -** kind of mutex more than once, the behavior is undefined. -** {H17029} SQLite will never exhibit -** such behavior in its own use of mutexes. -** -** Some systems (for example, Windows 95) do not support the operation -** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() -** will always return SQLITE_BUSY. {H17030} The SQLite core only ever uses -** sqlite3_mutex_try() as an optimization so this is acceptable behavior. -** -** {H17031} The sqlite3_mutex_leave() routine exits a mutex that was -** previously entered by the same thread. {A17032} The behavior -** is undefined if the mutex is not currently entered by the -** calling thread or is not currently allocated. {H17033} SQLite will -** never do either. {END} -** -** If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or -** sqlite3_mutex_leave() is a NULL pointer, then all three routines -** behave as no-ops. -** -** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. -*/ -SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int); -SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*); -SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*); -SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*); -SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*); - -/* -** CAPI3REF: Mutex Methods Object {H17120} -** EXPERIMENTAL -** -** An instance of this structure defines the low-level routines -** used to allocate and use mutexes. -** -** Usually, the default mutex implementations provided by SQLite are -** sufficient, however the user has the option of substituting a custom -** implementation for specialized deployments or systems for which SQLite -** does not provide a suitable implementation. In this case, the user -** creates and populates an instance of this structure to pass -** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. -** Additionally, an instance of this structure can be used as an -** output variable when querying the system for the current mutex -** implementation, using the [SQLITE_CONFIG_GETMUTEX] option. -** -** The xMutexInit method defined by this structure is invoked as -** part of system initialization by the sqlite3_initialize() function. -** {H17001} The xMutexInit routine shall be called by SQLite once for each -** effective call to [sqlite3_initialize()]. -** -** The xMutexEnd method defined by this structure is invoked as -** part of system shutdown by the sqlite3_shutdown() function. The -** implementation of this method is expected to release all outstanding -** resources obtained by the mutex methods implementation, especially -** those obtained by the xMutexInit method. {H17003} The xMutexEnd() -** interface shall be invoked once for each call to [sqlite3_shutdown()]. -** -** The remaining seven methods defined by this structure (xMutexAlloc, -** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and -** xMutexNotheld) implement the following interfaces (respectively): -** -**
    -**
  • [sqlite3_mutex_alloc()]
  • -**
  • [sqlite3_mutex_free()]
  • -**
  • [sqlite3_mutex_enter()]
  • -**
  • [sqlite3_mutex_try()]
  • -**
  • [sqlite3_mutex_leave()]
  • -**
  • [sqlite3_mutex_held()]
  • -**
  • [sqlite3_mutex_notheld()]
  • -**
-** -** The only difference is that the public sqlite3_XXX functions enumerated -** above silently ignore any invocations that pass a NULL pointer instead -** of a valid mutex handle. The implementations of the methods defined -** by this structure are not required to handle this case, the results -** of passing a NULL pointer instead of a valid mutex handle are undefined -** (i.e. it is acceptable to provide an implementation that segfaults if -** it is passed a NULL pointer). -** -** The xMutexInit() method must be threadsafe. It must be harmless to -** invoke xMutexInit() mutiple times within the same process and without -** intervening calls to xMutexEnd(). Second and subsequent calls to -** xMutexInit() must be no-ops. -** -** xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] -** and its associates). Similarly, xMutexAlloc() must not use SQLite memory -** allocation for a static mutex. However xMutexAlloc() may use SQLite -** memory allocation for a fast or recursive mutex. -** -** SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is -** called, but only if the prior call to xMutexInit returned SQLITE_OK. -** If xMutexInit fails in any way, it is expected to clean up after itself -** prior to returning. -*/ -typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; -struct sqlite3_mutex_methods { - int (*xMutexInit)(void); - int (*xMutexEnd)(void); - sqlite3_mutex *(*xMutexAlloc)(int); - void (*xMutexFree)(sqlite3_mutex *); - void (*xMutexEnter)(sqlite3_mutex *); - int (*xMutexTry)(sqlite3_mutex *); - void (*xMutexLeave)(sqlite3_mutex *); - int (*xMutexHeld)(sqlite3_mutex *); - int (*xMutexNotheld)(sqlite3_mutex *); -}; - -/* -** CAPI3REF: Mutex Verification Routines {H17080} -** -** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines -** are intended for use inside assert() statements. {H17081} The SQLite core -** never uses these routines except inside an assert() and applications -** are advised to follow the lead of the core. {H17082} The core only -** provides implementations for these routines when it is compiled -** with the SQLITE_DEBUG flag. {A17087} External mutex implementations -** are only required to provide these routines if SQLITE_DEBUG is -** defined and if NDEBUG is not defined. -** -** {H17083} These routines should return true if the mutex in their argument -** is held or not held, respectively, by the calling thread. -** -** {X17084} The implementation is not required to provided versions of these -** routines that actually work. If the implementation does not provide working -** versions of these routines, it should at least provide stubs that always -** return true so that one does not get spurious assertion failures. -** -** {H17085} If the argument to sqlite3_mutex_held() is a NULL pointer then -** the routine should return 1. {END} This seems counter-intuitive since -** clearly the mutex cannot be held if it does not exist. But the -** the reason the mutex does not exist is because the build is not -** using mutexes. And we do not want the assert() containing the -** call to sqlite3_mutex_held() to fail, so a non-zero return is -** the appropriate thing to do. {H17086} The sqlite3_mutex_notheld() -** interface should also return 1 when given a NULL pointer. -*/ -SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); -SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); - -/* -** CAPI3REF: Mutex Types {H17001} -** -** The [sqlite3_mutex_alloc()] interface takes a single argument -** which is one of these integer constants. -** -** The set of static mutexes may change from one SQLite release to the -** next. Applications that override the built-in mutex logic must be -** prepared to accommodate additional static mutexes. -*/ -#define SQLITE_MUTEX_FAST 0 -#define SQLITE_MUTEX_RECURSIVE 1 -#define SQLITE_MUTEX_STATIC_MASTER 2 -#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */ -#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */ -#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */ -#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_random() */ -#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */ -#define SQLITE_MUTEX_STATIC_LRU2 7 /* lru page list */ - -/* -** CAPI3REF: Retrieve the mutex for a database connection {H17002} -** -** This interface returns a pointer the [sqlite3_mutex] object that -** serializes access to the [database connection] given in the argument -** when the [threading mode] is Serialized. -** If the [threading mode] is Single-thread or Multi-thread then this -** routine returns a NULL pointer. -*/ -SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); - -/* -** CAPI3REF: Low-Level Control Of Database Files {H11300} -** -** {H11301} The [sqlite3_file_control()] interface makes a direct call to the -** xFileControl method for the [sqlite3_io_methods] object associated -** with a particular database identified by the second argument. {H11302} The -** name of the database is the name assigned to the database by the -** ATTACH SQL command that opened the -** database. {H11303} To control the main database file, use the name "main" -** or a NULL pointer. {H11304} The third and fourth parameters to this routine -** are passed directly through to the second and third parameters of -** the xFileControl method. {H11305} The return value of the xFileControl -** method becomes the return value of this routine. -** -** {H11306} If the second parameter (zDbName) does not match the name of any -** open database file, then SQLITE_ERROR is returned. {H11307} This error -** code is not remembered and will not be recalled by [sqlite3_errcode()] -** or [sqlite3_errmsg()]. {A11308} The underlying xFileControl method might -** also return SQLITE_ERROR. {A11309} There is no way to distinguish between -** an incorrect zDbName and an SQLITE_ERROR return from the underlying -** xFileControl method. {END} -** -** See also: [SQLITE_FCNTL_LOCKSTATE] -*/ -SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); - -/* -** CAPI3REF: Testing Interface {H11400} -** -** The sqlite3_test_control() interface is used to read out internal -** state of SQLite and to inject faults into SQLite for testing -** purposes. The first parameter is an operation code that determines -** the number, meaning, and operation of all subsequent parameters. -** -** This interface is not for use by applications. It exists solely -** for verifying the correct operation of the SQLite library. Depending -** on how the SQLite library is compiled, this interface might not exist. -** -** The details of the operation codes, their meanings, the parameters -** they take, and what they do are all subject to change without notice. -** Unlike most of the SQLite API, this function is not guaranteed to -** operate consistently from one release to the next. -*/ -SQLITE_API int sqlite3_test_control(int op, ...); - -/* -** CAPI3REF: Testing Interface Operation Codes {H11410} -** -** These constants are the valid operation code parameters used -** as the first argument to [sqlite3_test_control()]. -** -** These parameters and their meanings are subject to change -** without notice. These values are for testing purposes only. -** Applications should not use any of these parameters or the -** [sqlite3_test_control()] interface. -*/ -#define SQLITE_TESTCTRL_PRNG_SAVE 5 -#define SQLITE_TESTCTRL_PRNG_RESTORE 6 -#define SQLITE_TESTCTRL_PRNG_RESET 7 -#define SQLITE_TESTCTRL_BITVEC_TEST 8 -#define SQLITE_TESTCTRL_FAULT_INSTALL 9 -#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10 -#define SQLITE_TESTCTRL_PENDING_BYTE 11 -#define SQLITE_TESTCTRL_ASSERT 12 -#define SQLITE_TESTCTRL_ALWAYS 13 -#define SQLITE_TESTCTRL_RESERVE 14 - -/* -** CAPI3REF: SQLite Runtime Status {H17200} -** EXPERIMENTAL -** -** This interface is used to retrieve runtime status information -** about the preformance of SQLite, and optionally to reset various -** highwater marks. The first argument is an integer code for -** the specific parameter to measure. Recognized integer codes -** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...]. -** The current value of the parameter is returned into *pCurrent. -** The highest recorded value is returned in *pHighwater. If the -** resetFlag is true, then the highest record value is reset after -** *pHighwater is written. Some parameters do not record the highest -** value. For those parameters -** nothing is written into *pHighwater and the resetFlag is ignored. -** Other parameters record only the highwater mark and not the current -** value. For these latter parameters nothing is written into *pCurrent. -** -** This routine returns SQLITE_OK on success and a non-zero -** [error code] on failure. -** -** This routine is threadsafe but is not atomic. This routine can be -** called while other threads are running the same or different SQLite -** interfaces. However the values returned in *pCurrent and -** *pHighwater reflect the status of SQLite at different points in time -** and it is possible that another thread might change the parameter -** in between the times when *pCurrent and *pHighwater are written. -** -** See also: [sqlite3_db_status()] -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); - - -/* -** CAPI3REF: Status Parameters {H17250} -** EXPERIMENTAL -** -** These integer constants designate various run-time status parameters -** that can be returned by [sqlite3_status()]. -** -**
-**
SQLITE_STATUS_MEMORY_USED
-**
This parameter is the current amount of memory checked out -** using [sqlite3_malloc()], either directly or indirectly. The -** figure includes calls made to [sqlite3_malloc()] by the application -** and internal memory usage by the SQLite library. Scratch memory -** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache -** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in -** this parameter. The amount returned is the sum of the allocation -** sizes as reported by the xSize method in [sqlite3_mem_methods].
-** -**
SQLITE_STATUS_MALLOC_SIZE
-**
This parameter records the largest memory allocation request -** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their -** internal equivalents). Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
-** -**
SQLITE_STATUS_PAGECACHE_USED
-**
This parameter returns the number of pages used out of the -** [pagecache memory allocator] that was configured using -** [SQLITE_CONFIG_PAGECACHE]. The -** value returned is in pages, not in bytes.
-** -**
SQLITE_STATUS_PAGECACHE_OVERFLOW
-**
This parameter returns the number of bytes of page cache -** allocation which could not be statisfied by the [SQLITE_CONFIG_PAGECACHE] -** buffer and where forced to overflow to [sqlite3_malloc()]. The -** returned value includes allocations that overflowed because they -** where too large (they were larger than the "sz" parameter to -** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because -** no space was left in the page cache.
-** -**
SQLITE_STATUS_PAGECACHE_SIZE
-**
This parameter records the largest memory allocation request -** handed to [pagecache memory allocator]. Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
-** -**
SQLITE_STATUS_SCRATCH_USED
-**
This parameter returns the number of allocations used out of the -** [scratch memory allocator] configured using -** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not -** in bytes. Since a single thread may only have one scratch allocation -** outstanding at time, this parameter also reports the number of threads -** using scratch memory at the same time.
-** -**
SQLITE_STATUS_SCRATCH_OVERFLOW
-**
This parameter returns the number of bytes of scratch memory -** allocation which could not be statisfied by the [SQLITE_CONFIG_SCRATCH] -** buffer and where forced to overflow to [sqlite3_malloc()]. The values -** returned include overflows because the requested allocation was too -** larger (that is, because the requested allocation was larger than the -** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer -** slots were available. -**
-** -**
SQLITE_STATUS_SCRATCH_SIZE
-**
This parameter records the largest memory allocation request -** handed to [scratch memory allocator]. Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
-** -**
SQLITE_STATUS_PARSER_STACK
-**
This parameter records the deepest parser stack. It is only -** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].
-**
-** -** New status parameters may be added from time to time. -*/ -#define SQLITE_STATUS_MEMORY_USED 0 -#define SQLITE_STATUS_PAGECACHE_USED 1 -#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2 -#define SQLITE_STATUS_SCRATCH_USED 3 -#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 -#define SQLITE_STATUS_MALLOC_SIZE 5 -#define SQLITE_STATUS_PARSER_STACK 6 -#define SQLITE_STATUS_PAGECACHE_SIZE 7 -#define SQLITE_STATUS_SCRATCH_SIZE 8 - -/* -** CAPI3REF: Database Connection Status {H17500} -** EXPERIMENTAL -** -** This interface is used to retrieve runtime status information -** about a single [database connection]. The first argument is the -** database connection object to be interrogated. The second argument -** is the parameter to interrogate. Currently, the only allowed value -** for the second parameter is [SQLITE_DBSTATUS_LOOKASIDE_USED]. -** Additional options will likely appear in future releases of SQLite. -** -** The current value of the requested parameter is written into *pCur -** and the highest instantaneous value is written into *pHiwtr. If -** the resetFlg is true, then the highest instantaneous value is -** reset back down to the current value. -** -** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); - -/* -** CAPI3REF: Status Parameters for database connections {H17520} -** EXPERIMENTAL -** -** These constants are the available integer "verbs" that can be passed as -** the second argument to the [sqlite3_db_status()] interface. -** -** New verbs may be added in future releases of SQLite. Existing verbs -** might be discontinued. Applications should check the return code from -** [sqlite3_db_status()] to make sure that the call worked. -** The [sqlite3_db_status()] interface will return a non-zero error code -** if a discontinued or unsupported verb is invoked. -** -**
-**
SQLITE_DBSTATUS_LOOKASIDE_USED
-**
This parameter returns the number of lookaside memory slots currently -** checked out.
-**
-*/ -#define SQLITE_DBSTATUS_LOOKASIDE_USED 0 - - -/* -** CAPI3REF: Prepared Statement Status {H17550} -** EXPERIMENTAL -** -** Each prepared statement maintains various -** [SQLITE_STMTSTATUS_SORT | counters] that measure the number -** of times it has performed specific operations. These counters can -** be used to monitor the performance characteristics of the prepared -** statements. For example, if the number of table steps greatly exceeds -** the number of table searches or result rows, that would tend to indicate -** that the prepared statement is using a full table scan rather than -** an index. -** -** This interface is used to retrieve and reset counter values from -** a [prepared statement]. The first argument is the prepared statement -** object to be interrogated. The second argument -** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter] -** to be interrogated. -** The current value of the requested counter is returned. -** If the resetFlg is true, then the counter is reset to zero after this -** interface call returns. -** -** See also: [sqlite3_status()] and [sqlite3_db_status()]. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); - -/* -** CAPI3REF: Status Parameters for prepared statements {H17570} -** EXPERIMENTAL -** -** These preprocessor macros define integer codes that name counter -** values associated with the [sqlite3_stmt_status()] interface. -** The meanings of the various counters are as follows: -** -**
-**
SQLITE_STMTSTATUS_FULLSCAN_STEP
-**
This is the number of times that SQLite has stepped forward in -** a table as part of a full table scan. Large numbers for this counter -** may indicate opportunities for performance improvement through -** careful use of indices.
-** -**
SQLITE_STMTSTATUS_SORT
-**
This is the number of sort operations that have occurred. -** A non-zero value in this counter may indicate an opportunity to -** improvement performance through careful use of indices.
-** -**
-*/ -#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1 -#define SQLITE_STMTSTATUS_SORT 2 - -/* -** CAPI3REF: Custom Page Cache Object -** EXPERIMENTAL -** -** The sqlite3_pcache type is opaque. It is implemented by -** the pluggable module. The SQLite core has no knowledge of -** its size or internal structure and never deals with the -** sqlite3_pcache object except by holding and passing pointers -** to the object. -** -** See [sqlite3_pcache_methods] for additional information. -*/ -typedef struct sqlite3_pcache sqlite3_pcache; - -/* -** CAPI3REF: Application Defined Page Cache. -** KEYWORDS: {page cache} -** EXPERIMENTAL -** -** The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can -** register an alternative page cache implementation by passing in an -** instance of the sqlite3_pcache_methods structure. The majority of the -** heap memory used by SQLite is used by the page cache to cache data read -** from, or ready to be written to, the database file. By implementing a -** custom page cache using this API, an application can control more -** precisely the amount of memory consumed by SQLite, the way in which -** that memory is allocated and released, and the policies used to -** determine exactly which parts of a database file are cached and for -** how long. -** -** The contents of the sqlite3_pcache_methods structure are copied to an -** internal buffer by SQLite within the call to [sqlite3_config]. Hence -** the application may discard the parameter after the call to -** [sqlite3_config()] returns. -** -** The xInit() method is called once for each call to [sqlite3_initialize()] -** (usually only once during the lifetime of the process). It is passed -** a copy of the sqlite3_pcache_methods.pArg value. It can be used to set -** up global structures and mutexes required by the custom page cache -** implementation. -** -** The xShutdown() method is called from within [sqlite3_shutdown()], -** if the application invokes this API. It can be used to clean up -** any outstanding resources before process shutdown, if required. -** -** SQLite holds a [SQLITE_MUTEX_RECURSIVE] mutex when it invokes -** the xInit method, so the xInit method need not be threadsafe. The -** xShutdown method is only called from [sqlite3_shutdown()] so it does -** not need to be threadsafe either. All other methods must be threadsafe -** in multithreaded applications. -** -** SQLite will never invoke xInit() more than once without an intervening -** call to xShutdown(). -** -** The xCreate() method is used to construct a new cache instance. SQLite -** will typically create one cache instance for each open database file, -** though this is not guaranteed. The -** first parameter, szPage, is the size in bytes of the pages that must -** be allocated by the cache. szPage will not be a power of two. szPage -** will the page size of the database file that is to be cached plus an -** increment (here called "R") of about 100 or 200. SQLite will use the -** extra R bytes on each page to store metadata about the underlying -** database page on disk. The value of R depends -** on the SQLite version, the target platform, and how SQLite was compiled. -** R is constant for a particular build of SQLite. The second argument to -** xCreate(), bPurgeable, is true if the cache being created will -** be used to cache database pages of a file stored on disk, or -** false if it is used for an in-memory database. The cache implementation -** does not have to do anything special based with the value of bPurgeable; -** it is purely advisory. On a cache where bPurgeable is false, SQLite will -** never invoke xUnpin() except to deliberately delete a page. -** In other words, a cache created with bPurgeable set to false will -** never contain any unpinned pages. -** -** The xCachesize() method may be called at any time by SQLite to set the -** suggested maximum cache-size (number of pages stored by) the cache -** instance passed as the first argument. This is the value configured using -** the SQLite "[PRAGMA cache_size]" command. As with the bPurgeable parameter, -** the implementation is not required to do anything with this -** value; it is advisory only. -** -** The xPagecount() method should return the number of pages currently -** stored in the cache. -** -** The xFetch() method is used to fetch a page and return a pointer to it. -** A 'page', in this context, is a buffer of szPage bytes aligned at an -** 8-byte boundary. The page to be fetched is determined by the key. The -** mimimum key value is 1. After it has been retrieved using xFetch, the page -** is considered to be "pinned". -** -** If the requested page is already in the page cache, then the page cache -** implementation must return a pointer to the page buffer with its content -** intact. If the requested page is not already in the cache, then the -** behavior of the cache implementation is determined by the value of the -** createFlag parameter passed to xFetch, according to the following table: -** -** -**
createFlag Behaviour when page is not already in cache -**
0 Do not allocate a new page. Return NULL. -**
1 Allocate a new page if it easy and convenient to do so. -** Otherwise return NULL. -**
2 Make every effort to allocate a new page. Only return -** NULL if allocating a new page is effectively impossible. -**
-** -** SQLite will normally invoke xFetch() with a createFlag of 0 or 1. If -** a call to xFetch() with createFlag==1 returns NULL, then SQLite will -** attempt to unpin one or more cache pages by spilling the content of -** pinned pages to disk and synching the operating system disk cache. After -** attempting to unpin pages, the xFetch() method will be invoked again with -** a createFlag of 2. -** -** xUnpin() is called by SQLite with a pointer to a currently pinned page -** as its second argument. If the third parameter, discard, is non-zero, -** then the page should be evicted from the cache. In this case SQLite -** assumes that the next time the page is retrieved from the cache using -** the xFetch() method, it will be zeroed. If the discard parameter is -** zero, then the page is considered to be unpinned. The cache implementation -** may choose to evict unpinned pages at any time. -** -** The cache is not required to perform any reference counting. A single -** call to xUnpin() unpins the page regardless of the number of prior calls -** to xFetch(). -** -** The xRekey() method is used to change the key value associated with the -** page passed as the second argument from oldKey to newKey. If the cache -** previously contains an entry associated with newKey, it should be -** discarded. Any prior cache entry associated with newKey is guaranteed not -** to be pinned. -** -** When SQLite calls the xTruncate() method, the cache must discard all -** existing cache entries with page numbers (keys) greater than or equal -** to the value of the iLimit parameter passed to xTruncate(). If any -** of these pages are pinned, they are implicitly unpinned, meaning that -** they can be safely discarded. -** -** The xDestroy() method is used to delete a cache allocated by xCreate(). -** All resources associated with the specified cache should be freed. After -** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] -** handle invalid, and will not use it with any other sqlite3_pcache_methods -** functions. -*/ -typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; -struct sqlite3_pcache_methods { - void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, void*, int discard); - void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); -}; - -/* -** CAPI3REF: Online Backup Object -** EXPERIMENTAL -** -** The sqlite3_backup object records state information about an ongoing -** online backup operation. The sqlite3_backup object is created by -** a call to [sqlite3_backup_init()] and is destroyed by a call to -** [sqlite3_backup_finish()]. -** -** See Also: [Using the SQLite Online Backup API] -*/ -typedef struct sqlite3_backup sqlite3_backup; - -/* -** CAPI3REF: Online Backup API. -** EXPERIMENTAL -** -** This API is used to overwrite the contents of one database with that -** of another. It is useful either for creating backups of databases or -** for copying in-memory databases to or from persistent files. -** -** See Also: [Using the SQLite Online Backup API] -** -** Exclusive access is required to the destination database for the -** duration of the operation. However the source database is only -** read-locked while it is actually being read, it is not locked -** continuously for the entire operation. Thus, the backup may be -** performed on a live database without preventing other users from -** writing to the database for an extended period of time. -** -** To perform a backup operation: -**
    -**
  1. sqlite3_backup_init() is called once to initialize the -** backup, -**
  2. sqlite3_backup_step() is called one or more times to transfer -** the data between the two databases, and finally -**
  3. sqlite3_backup_finish() is called to release all resources -** associated with the backup operation. -**
-** There should be exactly one call to sqlite3_backup_finish() for each -** successful call to sqlite3_backup_init(). -** -** sqlite3_backup_init() -** -** The first two arguments passed to [sqlite3_backup_init()] are the database -** handle associated with the destination database and the database name -** used to attach the destination database to the handle. The database name -** is "main" for the main database, "temp" for the temporary database, or -** the name specified as part of the [ATTACH] statement if the destination is -** an attached database. The third and fourth arguments passed to -** sqlite3_backup_init() identify the [database connection] -** and database name used -** to access the source database. The values passed for the source and -** destination [database connection] parameters must not be the same. -** -** If an error occurs within sqlite3_backup_init(), then NULL is returned -** and an error code and error message written into the [database connection] -** passed as the first argument. They may be retrieved using the -** [sqlite3_errcode()], [sqlite3_errmsg()], and [sqlite3_errmsg16()] functions. -** Otherwise, if successful, a pointer to an [sqlite3_backup] object is -** returned. This pointer may be used with the sqlite3_backup_step() and -** sqlite3_backup_finish() functions to perform the specified backup -** operation. -** -** sqlite3_backup_step() -** -** Function [sqlite3_backup_step()] is used to copy up to nPage pages between -** the source and destination databases, where nPage is the value of the -** second parameter passed to sqlite3_backup_step(). If nPage is a negative -** value, all remaining source pages are copied. If the required pages are -** succesfully copied, but there are still more pages to copy before the -** backup is complete, it returns [SQLITE_OK]. If no error occured and there -** are no more pages to copy, then [SQLITE_DONE] is returned. If an error -** occurs, then an SQLite error code is returned. As well as [SQLITE_OK] and -** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY], -** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code. -** -** As well as the case where the destination database file was opened for -** read-only access, sqlite3_backup_step() may return [SQLITE_READONLY] if -** the destination is an in-memory database with a different page size -** from the source database. -** -** If sqlite3_backup_step() cannot obtain a required file-system lock, then -** the [sqlite3_busy_handler | busy-handler function] -** is invoked (if one is specified). If the -** busy-handler returns non-zero before the lock is available, then -** [SQLITE_BUSY] is returned to the caller. In this case the call to -** sqlite3_backup_step() can be retried later. If the source -** [database connection] -** is being used to write to the source database when sqlite3_backup_step() -** is called, then [SQLITE_LOCKED] is returned immediately. Again, in this -** case the call to sqlite3_backup_step() can be retried later on. If -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or -** [SQLITE_READONLY] is returned, then -** there is no point in retrying the call to sqlite3_backup_step(). These -** errors are considered fatal. At this point the application must accept -** that the backup operation has failed and pass the backup operation handle -** to the sqlite3_backup_finish() to release associated resources. -** -** Following the first call to sqlite3_backup_step(), an exclusive lock is -** obtained on the destination file. It is not released until either -** sqlite3_backup_finish() is called or the backup operation is complete -** and sqlite3_backup_step() returns [SQLITE_DONE]. Additionally, each time -** a call to sqlite3_backup_step() is made a [shared lock] is obtained on -** the source database file. This lock is released before the -** sqlite3_backup_step() call returns. Because the source database is not -** locked between calls to sqlite3_backup_step(), it may be modified mid-way -** through the backup procedure. If the source database is modified by an -** external process or via a database connection other than the one being -** used by the backup operation, then the backup will be transparently -** restarted by the next call to sqlite3_backup_step(). If the source -** database is modified by the using the same database connection as is used -** by the backup operation, then the backup database is transparently -** updated at the same time. -** -** sqlite3_backup_finish() -** -** Once sqlite3_backup_step() has returned [SQLITE_DONE], or when the -** application wishes to abandon the backup operation, the [sqlite3_backup] -** object should be passed to sqlite3_backup_finish(). This releases all -** resources associated with the backup operation. If sqlite3_backup_step() -** has not yet returned [SQLITE_DONE], then any active write-transaction on the -** destination database is rolled back. The [sqlite3_backup] object is invalid -** and may not be used following a call to sqlite3_backup_finish(). -** -** The value returned by sqlite3_backup_finish is [SQLITE_OK] if no error -** occurred, regardless or whether or not sqlite3_backup_step() was called -** a sufficient number of times to complete the backup operation. Or, if -** an out-of-memory condition or IO error occured during a call to -** sqlite3_backup_step() then [SQLITE_NOMEM] or an -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] error code -** is returned. In this case the error code and an error message are -** written to the destination [database connection]. -** -** A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() is -** not a permanent error and does not affect the return value of -** sqlite3_backup_finish(). -** -** sqlite3_backup_remaining(), sqlite3_backup_pagecount() -** -** Each call to sqlite3_backup_step() sets two values stored internally -** by an [sqlite3_backup] object. The number of pages still to be backed -** up, which may be queried by sqlite3_backup_remaining(), and the total -** number of pages in the source database file, which may be queried by -** sqlite3_backup_pagecount(). -** -** The values returned by these functions are only updated by -** sqlite3_backup_step(). If the source database is modified during a backup -** operation, then the values are not updated to account for any extra -** pages that need to be updated or the size of the source database file -** changing. -** -** Concurrent Usage of Database Handles -** -** The source [database connection] may be used by the application for other -** purposes while a backup operation is underway or being initialized. -** If SQLite is compiled and configured to support threadsafe database -** connections, then the source database connection may be used concurrently -** from within other threads. -** -** However, the application must guarantee that the destination database -** connection handle is not passed to any other API (by any thread) after -** sqlite3_backup_init() is called and before the corresponding call to -** sqlite3_backup_finish(). Unfortunately SQLite does not currently check -** for this, if the application does use the destination [database connection] -** for some other purpose during a backup operation, things may appear to -** work correctly but in fact be subtly malfunctioning. Use of the -** destination database connection while a backup is in progress might -** also cause a mutex deadlock. -** -** Furthermore, if running in [shared cache mode], the application must -** guarantee that the shared cache used by the destination database -** is not accessed while the backup is running. In practice this means -** that the application must guarantee that the file-system file being -** backed up to is not accessed by any connection within the process, -** not just the specific connection that was passed to sqlite3_backup_init(). -** -** The [sqlite3_backup] object itself is partially threadsafe. Multiple -** threads may safely make multiple concurrent calls to sqlite3_backup_step(). -** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() -** APIs are not strictly speaking threadsafe. If they are invoked at the -** same time as another thread is invoking sqlite3_backup_step() it is -** possible that they return invalid values. -*/ -SQLITE_API sqlite3_backup *sqlite3_backup_init( - sqlite3 *pDest, /* Destination database handle */ - const char *zDestName, /* Destination database name */ - sqlite3 *pSource, /* Source database handle */ - const char *zSourceName /* Source database name */ -); -SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); -SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); -SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p); -SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); - -/* -** CAPI3REF: Unlock Notification -** EXPERIMENTAL -** -** When running in shared-cache mode, a database operation may fail with -** an [SQLITE_LOCKED] error if the required locks on the shared-cache or -** individual tables within the shared-cache cannot be obtained. See -** [SQLite Shared-Cache Mode] for a description of shared-cache locking. -** This API may be used to register a callback that SQLite will invoke -** when the connection currently holding the required lock relinquishes it. -** This API is only available if the library was compiled with the -** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined. -** -** See Also: [Using the SQLite Unlock Notification Feature]. -** -** Shared-cache locks are released when a database connection concludes -** its current transaction, either by committing it or rolling it back. -** -** When a connection (known as the blocked connection) fails to obtain a -** shared-cache lock and SQLITE_LOCKED is returned to the caller, the -** identity of the database connection (the blocking connection) that -** has locked the required resource is stored internally. After an -** application receives an SQLITE_LOCKED error, it may call the -** sqlite3_unlock_notify() method with the blocked connection handle as -** the first argument to register for a callback that will be invoked -** when the blocking connections current transaction is concluded. The -** callback is invoked from within the [sqlite3_step] or [sqlite3_close] -** call that concludes the blocking connections transaction. -** -** If sqlite3_unlock_notify() is called in a multi-threaded application, -** there is a chance that the blocking connection will have already -** concluded its transaction by the time sqlite3_unlock_notify() is invoked. -** If this happens, then the specified callback is invoked immediately, -** from within the call to sqlite3_unlock_notify(). -** -** If the blocked connection is attempting to obtain a write-lock on a -** shared-cache table, and more than one other connection currently holds -** a read-lock on the same table, then SQLite arbitrarily selects one of -** the other connections to use as the blocking connection. -** -** There may be at most one unlock-notify callback registered by a -** blocked connection. If sqlite3_unlock_notify() is called when the -** blocked connection already has a registered unlock-notify callback, -** then the new callback replaces the old. If sqlite3_unlock_notify() is -** called with a NULL pointer as its second argument, then any existing -** unlock-notify callback is cancelled. The blocked connections -** unlock-notify callback may also be canceled by closing the blocked -** connection using [sqlite3_close()]. -** -** The unlock-notify callback is not reentrant. If an application invokes -** any sqlite3_xxx API functions from within an unlock-notify callback, a -** crash or deadlock may be the result. -** -** Unless deadlock is detected (see below), sqlite3_unlock_notify() always -** returns SQLITE_OK. -** -** Callback Invocation Details -** -** When an unlock-notify callback is registered, the application provides a -** single void* pointer that is passed to the callback when it is invoked. -** However, the signature of the callback function allows SQLite to pass -** it an array of void* context pointers. The first argument passed to -** an unlock-notify callback is a pointer to an array of void* pointers, -** and the second is the number of entries in the array. -** -** When a blocking connections transaction is concluded, there may be -** more than one blocked connection that has registered for an unlock-notify -** callback. If two or more such blocked connections have specified the -** same callback function, then instead of invoking the callback function -** multiple times, it is invoked once with the set of void* context pointers -** specified by the blocked connections bundled together into an array. -** This gives the application an opportunity to prioritize any actions -** related to the set of unblocked database connections. -** -** Deadlock Detection -** -** Assuming that after registering for an unlock-notify callback a -** database waits for the callback to be issued before taking any further -** action (a reasonable assumption), then using this API may cause the -** application to deadlock. For example, if connection X is waiting for -** connection Y's transaction to be concluded, and similarly connection -** Y is waiting on connection X's transaction, then neither connection -** will proceed and the system may remain deadlocked indefinitely. -** -** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock -** detection. If a given call to sqlite3_unlock_notify() would put the -** system in a deadlocked state, then SQLITE_LOCKED is returned and no -** unlock-notify callback is registered. The system is said to be in -** a deadlocked state if connection A has registered for an unlock-notify -** callback on the conclusion of connection B's transaction, and connection -** B has itself registered for an unlock-notify callback when connection -** A's transaction is concluded. Indirect deadlock is also detected, so -** the system is also considered to be deadlocked if connection B has -** registered for an unlock-notify callback on the conclusion of connection -** C's transaction, where connection C is waiting on connection A. Any -** number of levels of indirection are allowed. -** -** The "DROP TABLE" Exception -** -** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost -** always appropriate to call sqlite3_unlock_notify(). There is however, -** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement, -** SQLite checks if there are any currently executing SELECT statements -** that belong to the same connection. If there are, SQLITE_LOCKED is -** returned. In this case there is no "blocking connection", so invoking -** sqlite3_unlock_notify() results in the unlock-notify callback being -** invoked immediately. If the application then re-attempts the "DROP TABLE" -** or "DROP INDEX" query, an infinite loop might be the result. -** -** One way around this problem is to check the extended error code returned -** by an sqlite3_step() call. If there is a blocking connection, then the -** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in -** the special "DROP TABLE/INDEX" case, the extended error code is just -** SQLITE_LOCKED. -*/ -SQLITE_API int sqlite3_unlock_notify( - sqlite3 *pBlocked, /* Waiting connection */ - void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ - void *pNotifyArg /* Argument to pass to xNotify */ -); - - -/* -** CAPI3REF: String Comparison -** EXPERIMENTAL -** -** The [sqlite3_strnicmp()] API allows applications and extensions to -** compare the contents of two buffers containing UTF-8 strings in a -** case-indendent fashion, using the same definition of case independence -** that SQLite uses internally when comparing identifiers. -*/ -SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); - -/* -** Undo the hack that converts floating point types to integer for -** builds on processors without floating point support. -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# undef double -#endif - -#ifdef __cplusplus -} /* End of the 'extern "C"' block */ -#endif -#endif - diff --git a/package/sqlite/src/sqlite3.h b/package/sqlite/src/sqlite3.h new file mode 100644 index 000000000..fc015b08e --- /dev/null +++ b/package/sqlite/src/sqlite3.h @@ -0,0 +1,5772 @@ +/* +** 2001 September 15 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** This header file defines the interface that the SQLite library +** presents to client programs. If a C-function, structure, datatype, +** or constant definition does not appear in this file, then it is +** not a published API of SQLite, is subject to change without +** notice, and should not be referenced by programs that use SQLite. +** +** Some of the definitions that are in this file are marked as +** "experimental". Experimental interfaces are normally new +** features recently added to SQLite. We do not anticipate changes +** to experimental interfaces but reserve the right to make minor changes +** if experience from use "in the wild" suggest such changes are prudent. +** +** The official C-language API documentation for SQLite is derived +** from comments in this file. This file is the authoritative source +** on how SQLite interfaces are suppose to operate. +** +** The name of this file under configuration management is "sqlite.h.in". +** The makefile makes some minor changes to this file (such as inserting +** the version number) and changes its name to "sqlite3.h" as +** part of the build process. +*/ +#ifndef _SQLITE3_H_ +#define _SQLITE3_H_ +#include /* Needed for the definition of va_list */ + +/* +** Make sure we can call this stuff from C++. +*/ +#ifdef __cplusplus +extern "C" { +#endif + + +/* +** Add the ability to override 'extern' +*/ +#ifndef SQLITE_EXTERN +# define SQLITE_EXTERN extern +#endif + +#ifndef SQLITE_API +# define SQLITE_API +#endif + + +/* +** These no-op macros are used in front of interfaces to mark those +** interfaces as either deprecated or experimental. New applications +** should not use deprecated interfaces - they are support for backwards +** compatibility only. Application writers should be aware that +** experimental interfaces are subject to change in point releases. +** +** These macros used to resolve to various kinds of compiler magic that +** would generate warning messages when they were used. But that +** compiler magic ended up generating such a flurry of bug reports +** that we have taken it all out and gone back to using simple +** noop macros. +*/ +#define SQLITE_DEPRECATED +#define SQLITE_EXPERIMENTAL + +/* +** Ensure these symbols were not defined by some previous header file. +*/ +#ifdef SQLITE_VERSION +# undef SQLITE_VERSION +#endif +#ifdef SQLITE_VERSION_NUMBER +# undef SQLITE_VERSION_NUMBER +#endif + +/* +** CAPI3REF: Compile-Time Library Version Numbers {H10010} +** +** The SQLITE_VERSION and SQLITE_VERSION_NUMBER #defines in +** the sqlite3.h file specify the version of SQLite with which +** that header file is associated. +** +** The "version" of SQLite is a string of the form "W.X.Y" or "W.X.Y.Z". +** The W value is major version number and is always 3 in SQLite3. +** The W value only changes when backwards compatibility is +** broken and we intend to never break backwards compatibility. +** The X value is the minor version number and only changes when +** there are major feature enhancements that are forwards compatible +** but not backwards compatible. +** The Y value is the release number and is incremented with +** each release but resets back to 0 whenever X is incremented. +** The Z value only appears on branch releases. +** +** The SQLITE_VERSION_NUMBER is an integer that is computed as +** follows: +** +**
+** SQLITE_VERSION_NUMBER = W*1000000 + X*1000 + Y
+** 
+** +** Since version 3.6.18, SQLite source code has been stored in the +** fossil configuration management +** system. The SQLITE_SOURCE_ID +** macro is a string which identifies a particular check-in of SQLite +** within its configuration management system. The string contains the +** date and time of the check-in (UTC) and an SHA1 hash of the entire +** source tree. +** +** See also: [sqlite3_libversion()], +** [sqlite3_libversion_number()], [sqlite3_sourceid()], +** [sqlite_version()] and [sqlite_source_id()]. +** +** Requirements: [H10011] [H10014] +*/ +#define SQLITE_VERSION "3.6.20" +#define SQLITE_VERSION_NUMBER 3006020 +#define SQLITE_SOURCE_ID "2009-11-04 13:30:02 eb7a544fe49d1626bacecfe53ddc03fe082e3243" + +/* +** CAPI3REF: Run-Time Library Version Numbers {H10020} +** KEYWORDS: sqlite3_version +** +** These interfaces provide the same information as the [SQLITE_VERSION], +** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] #defines in the header, +** but are associated with the library instead of the header file. Cautious +** programmers might include assert() statements in their application to +** verify that values returned by these interfaces match the macros in +** the header, and thus insure that the application is +** compiled with matching library and header files. +** +**
+** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
+** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
+** assert( strcmp(sqlite3_libversion,SQLITE_VERSION)==0 );
+** 
+** +** The sqlite3_libversion() function returns the same information as is +** in the sqlite3_version[] string constant. The function is provided +** for use in DLLs since DLL users usually do not have direct access to string +** constants within the DLL. Similarly, the sqlite3_sourceid() function +** returns the same information as is in the [SQLITE_SOURCE_ID] #define of +** the header file. +** +** See also: [sqlite_version()] and [sqlite_source_id()]. +** +** Requirements: [H10021] [H10022] [H10023] +*/ +SQLITE_API SQLITE_EXTERN const char sqlite3_version[]; +SQLITE_API const char *sqlite3_libversion(void); +SQLITE_API const char *sqlite3_sourceid(void); +SQLITE_API int sqlite3_libversion_number(void); + +/* +** CAPI3REF: Test To See If The Library Is Threadsafe {H10100} +** +** SQLite can be compiled with or without mutexes. When +** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes +** are enabled and SQLite is threadsafe. When the +** [SQLITE_THREADSAFE] macro is 0, +** the mutexes are omitted. Without the mutexes, it is not safe +** to use SQLite concurrently from more than one thread. +** +** Enabling mutexes incurs a measurable performance penalty. +** So if speed is of utmost importance, it makes sense to disable +** the mutexes. But for maximum safety, mutexes should be enabled. +** The default behavior is for mutexes to be enabled. +** +** This interface can be used by an application to make sure that the +** version of SQLite that it is linking against was compiled with +** the desired setting of the [SQLITE_THREADSAFE] macro. +** +** This interface only reports on the compile-time mutex setting +** of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with +** SQLITE_THREADSAFE=1 then mutexes are enabled by default but +** can be fully or partially disabled using a call to [sqlite3_config()] +** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD], +** or [SQLITE_CONFIG_MUTEX]. The return value of this function shows +** only the default compile-time setting, not any run-time changes +** to that setting. +** +** See the [threading mode] documentation for additional information. +** +** Requirements: [H10101] [H10102] +*/ +SQLITE_API int sqlite3_threadsafe(void); + +/* +** CAPI3REF: Database Connection Handle {H12000} +** KEYWORDS: {database connection} {database connections} +** +** Each open SQLite database is represented by a pointer to an instance of +** the opaque structure named "sqlite3". It is useful to think of an sqlite3 +** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and +** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] +** is its destructor. There are many other interfaces (such as +** [sqlite3_prepare_v2()], [sqlite3_create_function()], and +** [sqlite3_busy_timeout()] to name but three) that are methods on an +** sqlite3 object. +*/ +typedef struct sqlite3 sqlite3; + +/* +** CAPI3REF: 64-Bit Integer Types {H10200} +** KEYWORDS: sqlite_int64 sqlite_uint64 +** +** Because there is no cross-platform way to specify 64-bit integer types +** SQLite includes typedefs for 64-bit signed and unsigned integers. +** +** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions. +** The sqlite_int64 and sqlite_uint64 types are supported for backwards +** compatibility only. +** +** Requirements: [H10201] [H10202] +*/ +#ifdef SQLITE_INT64_TYPE + typedef SQLITE_INT64_TYPE sqlite_int64; + typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; +#elif defined(_MSC_VER) || defined(__BORLANDC__) + typedef __int64 sqlite_int64; + typedef unsigned __int64 sqlite_uint64; +#else + typedef long long int sqlite_int64; + typedef unsigned long long int sqlite_uint64; +#endif +typedef sqlite_int64 sqlite3_int64; +typedef sqlite_uint64 sqlite3_uint64; + +/* +** If compiling for a processor that lacks floating point support, +** substitute integer for floating-point. +*/ +#ifdef SQLITE_OMIT_FLOATING_POINT +# define double sqlite3_int64 +#endif + +/* +** CAPI3REF: Closing A Database Connection {H12010} +** +** This routine is the destructor for the [sqlite3] object. +** +** Applications must [sqlite3_finalize | finalize] all [prepared statements] +** and [sqlite3_blob_close | close] all [BLOB handles] associated with +** the [sqlite3] object prior to attempting to close the object. +** +** If [sqlite3_close()] is invoked while a transaction is open, +** the transaction is automatically rolled back. +** +** The C parameter to [sqlite3_close(C)] must be either a NULL +** pointer or an [sqlite3] object pointer obtained +** from [sqlite3_open()], [sqlite3_open16()], or +** [sqlite3_open_v2()], and not previously closed. +** +** Requirements: +** [H12011] [H12012] [H12013] [H12014] [H12015] [H12019] +*/ +SQLITE_API int sqlite3_close(sqlite3 *); + +/* +** The type for a callback function. +** This is legacy and deprecated. It is included for historical +** compatibility and is not documented. +*/ +typedef int (*sqlite3_callback)(void*,int,char**, char**); + +/* +** CAPI3REF: One-Step Query Execution Interface {H12100} +** +** The sqlite3_exec() interface is a convenient way of running one or more +** SQL statements without having to write a lot of C code. The UTF-8 encoded +** SQL statements are passed in as the second parameter to sqlite3_exec(). +** The statements are evaluated one by one until either an error or +** an interrupt is encountered, or until they are all done. The 3rd parameter +** is an optional callback that is invoked once for each row of any query +** results produced by the SQL statements. The 5th parameter tells where +** to write any error messages. +** +** The error message passed back through the 5th parameter is held +** in memory obtained from [sqlite3_malloc()]. To avoid a memory leak, +** the calling application should call [sqlite3_free()] on any error +** message returned through the 5th parameter when it has finished using +** the error message. +** +** If the SQL statement in the 2nd parameter is NULL or an empty string +** or a string containing only whitespace and comments, then no SQL +** statements are evaluated and the database is not changed. +** +** The sqlite3_exec() interface is implemented in terms of +** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()]. +** The sqlite3_exec() routine does nothing to the database that cannot be done +** by [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()]. +** +** The first parameter to [sqlite3_exec()] must be an valid and open +** [database connection]. +** +** The database connection must not be closed while +** [sqlite3_exec()] is running. +** +** The calling function should use [sqlite3_free()] to free +** the memory that *errmsg is left pointing at once the error +** message is no longer needed. +** +** The SQL statement text in the 2nd parameter to [sqlite3_exec()] +** must remain unchanged while [sqlite3_exec()] is running. +** +** Requirements: +** [H12101] [H12102] [H12104] [H12105] [H12107] [H12110] [H12113] [H12116] +** [H12119] [H12122] [H12125] [H12131] [H12134] [H12137] [H12138] +*/ +SQLITE_API int sqlite3_exec( + sqlite3*, /* An open database */ + const char *sql, /* SQL to be evaluated */ + int (*callback)(void*,int,char**,char**), /* Callback function */ + void *, /* 1st argument to callback */ + char **errmsg /* Error msg written here */ +); + +/* +** CAPI3REF: Result Codes {H10210} +** KEYWORDS: SQLITE_OK {error code} {error codes} +** KEYWORDS: {result code} {result codes} +** +** Many SQLite functions return an integer result code from the set shown +** here in order to indicates success or failure. +** +** New error codes may be added in future versions of SQLite. +** +** See also: [SQLITE_IOERR_READ | extended result codes] +*/ +#define SQLITE_OK 0 /* Successful result */ +/* beginning-of-error-codes */ +#define SQLITE_ERROR 1 /* SQL error or missing database */ +#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */ +#define SQLITE_PERM 3 /* Access permission denied */ +#define SQLITE_ABORT 4 /* Callback routine requested an abort */ +#define SQLITE_BUSY 5 /* The database file is locked */ +#define SQLITE_LOCKED 6 /* A table in the database is locked */ +#define SQLITE_NOMEM 7 /* A malloc() failed */ +#define SQLITE_READONLY 8 /* Attempt to write a readonly database */ +#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ +#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ +#define SQLITE_CORRUPT 11 /* The database disk image is malformed */ +#define SQLITE_NOTFOUND 12 /* NOT USED. Table or record not found */ +#define SQLITE_FULL 13 /* Insertion failed because database is full */ +#define SQLITE_CANTOPEN 14 /* Unable to open the database file */ +#define SQLITE_PROTOCOL 15 /* NOT USED. Database lock protocol error */ +#define SQLITE_EMPTY 16 /* Database is empty */ +#define SQLITE_SCHEMA 17 /* The database schema changed */ +#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ +#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ +#define SQLITE_MISMATCH 20 /* Data type mismatch */ +#define SQLITE_MISUSE 21 /* Library used incorrectly */ +#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */ +#define SQLITE_AUTH 23 /* Authorization denied */ +#define SQLITE_FORMAT 24 /* Auxiliary database format error */ +#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ +#define SQLITE_NOTADB 26 /* File opened that is not a database file */ +#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ +#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ +/* end-of-error-codes */ + +/* +** CAPI3REF: Extended Result Codes {H10220} +** KEYWORDS: {extended error code} {extended error codes} +** KEYWORDS: {extended result code} {extended result codes} +** +** In its default configuration, SQLite API routines return one of 26 integer +** [SQLITE_OK | result codes]. However, experience has shown that many of +** these result codes are too coarse-grained. They do not provide as +** much information about problems as programmers might like. In an effort to +** address this, newer versions of SQLite (version 3.3.8 and later) include +** support for additional result codes that provide more detailed information +** about errors. The extended result codes are enabled or disabled +** on a per database connection basis using the +** [sqlite3_extended_result_codes()] API. +** +** Some of the available extended result codes are listed here. +** One may expect the number of extended result codes will be expand +** over time. Software that uses extended result codes should expect +** to see new result codes in future releases of SQLite. +** +** The SQLITE_OK result code will never be extended. It will always +** be exactly zero. +*/ +#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8)) +#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8)) +#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8)) +#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8)) +#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8)) +#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8)) +#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8)) +#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8)) +#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8)) +#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8)) +#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8)) +#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8)) +#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8)) +#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8)) +#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8)) +#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8)) +#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8)) +#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8) ) + +/* +** CAPI3REF: Flags For File Open Operations {H10230} +** +** These bit values are intended for use in the +** 3rd parameter to the [sqlite3_open_v2()] interface and +** in the 4th parameter to the xOpen method of the +** [sqlite3_vfs] object. +*/ +#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */ +#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ +#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ +#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ +#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ +#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */ +#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */ +#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */ +#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */ +#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */ +#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */ + +/* +** CAPI3REF: Device Characteristics {H10240} +** +** The xDeviceCapabilities method of the [sqlite3_io_methods] +** object returns an integer which is a vector of the these +** bit values expressing I/O characteristics of the mass storage +** device that holds the file that the [sqlite3_io_methods] +** refers to. +** +** The SQLITE_IOCAP_ATOMIC property means that all writes of +** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values +** mean that writes of blocks that are nnn bytes in size and +** are aligned to an address which is an integer multiple of +** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means +** that when data is appended to a file, the data is appended +** first then the size of the file is extended, never the other +** way around. The SQLITE_IOCAP_SEQUENTIAL property means that +** information is written to disk in the same order as calls +** to xWrite(). +*/ +#define SQLITE_IOCAP_ATOMIC 0x00000001 +#define SQLITE_IOCAP_ATOMIC512 0x00000002 +#define SQLITE_IOCAP_ATOMIC1K 0x00000004 +#define SQLITE_IOCAP_ATOMIC2K 0x00000008 +#define SQLITE_IOCAP_ATOMIC4K 0x00000010 +#define SQLITE_IOCAP_ATOMIC8K 0x00000020 +#define SQLITE_IOCAP_ATOMIC16K 0x00000040 +#define SQLITE_IOCAP_ATOMIC32K 0x00000080 +#define SQLITE_IOCAP_ATOMIC64K 0x00000100 +#define SQLITE_IOCAP_SAFE_APPEND 0x00000200 +#define SQLITE_IOCAP_SEQUENTIAL 0x00000400 + +/* +** CAPI3REF: File Locking Levels {H10250} +** +** SQLite uses one of these integer values as the second +** argument to calls it makes to the xLock() and xUnlock() methods +** of an [sqlite3_io_methods] object. +*/ +#define SQLITE_LOCK_NONE 0 +#define SQLITE_LOCK_SHARED 1 +#define SQLITE_LOCK_RESERVED 2 +#define SQLITE_LOCK_PENDING 3 +#define SQLITE_LOCK_EXCLUSIVE 4 + +/* +** CAPI3REF: Synchronization Type Flags {H10260} +** +** When SQLite invokes the xSync() method of an +** [sqlite3_io_methods] object it uses a combination of +** these integer values as the second argument. +** +** When the SQLITE_SYNC_DATAONLY flag is used, it means that the +** sync operation only needs to flush data to mass storage. Inode +** information need not be flushed. If the lower four bits of the flag +** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. +** If the lower four bits equal SQLITE_SYNC_FULL, that means +** to use Mac OS X style fullsync instead of fsync(). +*/ +#define SQLITE_SYNC_NORMAL 0x00002 +#define SQLITE_SYNC_FULL 0x00003 +#define SQLITE_SYNC_DATAONLY 0x00010 + +/* +** CAPI3REF: OS Interface Open File Handle {H11110} +** +** An [sqlite3_file] object represents an open file in the +** [sqlite3_vfs | OS interface layer]. Individual OS interface +** implementations will +** want to subclass this object by appending additional fields +** for their own use. The pMethods entry is a pointer to an +** [sqlite3_io_methods] object that defines methods for performing +** I/O operations on the open file. +*/ +typedef struct sqlite3_file sqlite3_file; +struct sqlite3_file { + const struct sqlite3_io_methods *pMethods; /* Methods for an open file */ +}; + +/* +** CAPI3REF: OS Interface File Virtual Methods Object {H11120} +** +** Every file opened by the [sqlite3_vfs] xOpen method populates an +** [sqlite3_file] object (or, more commonly, a subclass of the +** [sqlite3_file] object) with a pointer to an instance of this object. +** This object defines the methods used to perform various operations +** against the open file represented by the [sqlite3_file] object. +** +** If the xOpen method sets the sqlite3_file.pMethods element +** to a non-NULL pointer, then the sqlite3_io_methods.xClose method +** may be invoked even if the xOpen reported that it failed. The +** only way to prevent a call to xClose following a failed xOpen +** is for the xOpen to set the sqlite3_file.pMethods element to NULL. +** +** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or +** [SQLITE_SYNC_FULL]. The first choice is the normal fsync(). +** The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY] +** flag may be ORed in to indicate that only the data of the file +** and not its inode needs to be synced. +** +** The integer values to xLock() and xUnlock() are one of +**
    +**
  • [SQLITE_LOCK_NONE], +**
  • [SQLITE_LOCK_SHARED], +**
  • [SQLITE_LOCK_RESERVED], +**
  • [SQLITE_LOCK_PENDING], or +**
  • [SQLITE_LOCK_EXCLUSIVE]. +**
+** xLock() increases the lock. xUnlock() decreases the lock. +** The xCheckReservedLock() method checks whether any database connection, +** either in this process or in some other process, is holding a RESERVED, +** PENDING, or EXCLUSIVE lock on the file. It returns true +** if such a lock exists and false otherwise. +** +** The xFileControl() method is a generic interface that allows custom +** VFS implementations to directly control an open file using the +** [sqlite3_file_control()] interface. The second "op" argument is an +** integer opcode. The third argument is a generic pointer intended to +** point to a structure that may contain arguments or space in which to +** write return values. Potential uses for xFileControl() might be +** functions to enable blocking locks with timeouts, to change the +** locking strategy (for example to use dot-file locks), to inquire +** about the status of a lock, or to break stale locks. The SQLite +** core reserves all opcodes less than 100 for its own use. +** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available. +** Applications that define a custom xFileControl method should use opcodes +** greater than 100 to avoid conflicts. +** +** The xSectorSize() method returns the sector size of the +** device that underlies the file. The sector size is the +** minimum write that can be performed without disturbing +** other bytes in the file. The xDeviceCharacteristics() +** method returns a bit vector describing behaviors of the +** underlying device: +** +**
    +**
  • [SQLITE_IOCAP_ATOMIC] +**
  • [SQLITE_IOCAP_ATOMIC512] +**
  • [SQLITE_IOCAP_ATOMIC1K] +**
  • [SQLITE_IOCAP_ATOMIC2K] +**
  • [SQLITE_IOCAP_ATOMIC4K] +**
  • [SQLITE_IOCAP_ATOMIC8K] +**
  • [SQLITE_IOCAP_ATOMIC16K] +**
  • [SQLITE_IOCAP_ATOMIC32K] +**
  • [SQLITE_IOCAP_ATOMIC64K] +**
  • [SQLITE_IOCAP_SAFE_APPEND] +**
  • [SQLITE_IOCAP_SEQUENTIAL] +**
+** +** The SQLITE_IOCAP_ATOMIC property means that all writes of +** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values +** mean that writes of blocks that are nnn bytes in size and +** are aligned to an address which is an integer multiple of +** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means +** that when data is appended to a file, the data is appended +** first then the size of the file is extended, never the other +** way around. The SQLITE_IOCAP_SEQUENTIAL property means that +** information is written to disk in the same order as calls +** to xWrite(). +** +** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill +** in the unread portions of the buffer with zeros. A VFS that +** fails to zero-fill short reads might seem to work. However, +** failure to zero-fill short reads will eventually lead to +** database corruption. +*/ +typedef struct sqlite3_io_methods sqlite3_io_methods; +struct sqlite3_io_methods { + int iVersion; + int (*xClose)(sqlite3_file*); + int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); + int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); + int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); + int (*xSync)(sqlite3_file*, int flags); + int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); + int (*xLock)(sqlite3_file*, int); + int (*xUnlock)(sqlite3_file*, int); + int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); + int (*xFileControl)(sqlite3_file*, int op, void *pArg); + int (*xSectorSize)(sqlite3_file*); + int (*xDeviceCharacteristics)(sqlite3_file*); + /* Additional methods may be added in future releases */ +}; + +/* +** CAPI3REF: Standard File Control Opcodes {H11310} +** +** These integer constants are opcodes for the xFileControl method +** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()] +** interface. +** +** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This +** opcode causes the xFileControl method to write the current state of +** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], +** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) +** into an integer that the pArg argument points to. This capability +** is used during testing and only needs to be supported when SQLITE_TEST +** is defined. +*/ +#define SQLITE_FCNTL_LOCKSTATE 1 +#define SQLITE_GET_LOCKPROXYFILE 2 +#define SQLITE_SET_LOCKPROXYFILE 3 +#define SQLITE_LAST_ERRNO 4 + +/* +** CAPI3REF: Mutex Handle {H17110} +** +** The mutex module within SQLite defines [sqlite3_mutex] to be an +** abstract type for a mutex object. The SQLite core never looks +** at the internal representation of an [sqlite3_mutex]. It only +** deals with pointers to the [sqlite3_mutex] object. +** +** Mutexes are created using [sqlite3_mutex_alloc()]. +*/ +typedef struct sqlite3_mutex sqlite3_mutex; + +/* +** CAPI3REF: OS Interface Object {H11140} +** +** An instance of the sqlite3_vfs object defines the interface between +** the SQLite core and the underlying operating system. The "vfs" +** in the name of the object stands for "virtual file system". +** +** The value of the iVersion field is initially 1 but may be larger in +** future versions of SQLite. Additional fields may be appended to this +** object when the iVersion value is increased. Note that the structure +** of the sqlite3_vfs object changes in the transaction between +** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not +** modified. +** +** The szOsFile field is the size of the subclassed [sqlite3_file] +** structure used by this VFS. mxPathname is the maximum length of +** a pathname in this VFS. +** +** Registered sqlite3_vfs objects are kept on a linked list formed by +** the pNext pointer. The [sqlite3_vfs_register()] +** and [sqlite3_vfs_unregister()] interfaces manage this list +** in a thread-safe way. The [sqlite3_vfs_find()] interface +** searches the list. Neither the application code nor the VFS +** implementation should use the pNext pointer. +** +** The pNext field is the only field in the sqlite3_vfs +** structure that SQLite will ever modify. SQLite will only access +** or modify this field while holding a particular static mutex. +** The application should never modify anything within the sqlite3_vfs +** object once the object has been registered. +** +** The zName field holds the name of the VFS module. The name must +** be unique across all VFS modules. +** +** SQLite will guarantee that the zFilename parameter to xOpen +** is either a NULL pointer or string obtained +** from xFullPathname(). SQLite further guarantees that +** the string will be valid and unchanged until xClose() is +** called. Because of the previous sentence, +** the [sqlite3_file] can safely store a pointer to the +** filename if it needs to remember the filename for some reason. +** If the zFilename parameter is xOpen is a NULL pointer then xOpen +** must invent its own temporary name for the file. Whenever the +** xFilename parameter is NULL it will also be the case that the +** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. +** +** The flags argument to xOpen() includes all bits set in +** the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] +** or [sqlite3_open16()] is used, then flags includes at least +** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. +** If xOpen() opens a file read-only then it sets *pOutFlags to +** include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. +** +** SQLite will also add one of the following flags to the xOpen() +** call, depending on the object being opened: +** +**
    +**
  • [SQLITE_OPEN_MAIN_DB] +**
  • [SQLITE_OPEN_MAIN_JOURNAL] +**
  • [SQLITE_OPEN_TEMP_DB] +**
  • [SQLITE_OPEN_TEMP_JOURNAL] +**
  • [SQLITE_OPEN_TRANSIENT_DB] +**
  • [SQLITE_OPEN_SUBJOURNAL] +**
  • [SQLITE_OPEN_MASTER_JOURNAL] +**
+** +** The file I/O implementation can use the object type flags to +** change the way it deals with files. For example, an application +** that does not care about crash recovery or rollback might make +** the open of a journal file a no-op. Writes to this journal would +** also be no-ops, and any attempt to read the journal would return +** SQLITE_IOERR. Or the implementation might recognize that a database +** file will be doing page-aligned sector reads and writes in a random +** order and set up its I/O subsystem accordingly. +** +** SQLite might also add one of the following flags to the xOpen method: +** +**
    +**
  • [SQLITE_OPEN_DELETEONCLOSE] +**
  • [SQLITE_OPEN_EXCLUSIVE] +**
+** +** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be +** deleted when it is closed. The [SQLITE_OPEN_DELETEONCLOSE] +** will be set for TEMP databases, journals and for subjournals. +** +** The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction +** with the [SQLITE_OPEN_CREATE] flag, which are both directly +** analogous to the O_EXCL and O_CREAT flags of the POSIX open() +** API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the +** SQLITE_OPEN_CREATE, is used to indicate that file should always +** be created, and that it is an error if it already exists. +** It is not used to indicate the file should be opened +** for exclusive access. +** +** At least szOsFile bytes of memory are allocated by SQLite +** to hold the [sqlite3_file] structure passed as the third +** argument to xOpen. The xOpen method does not have to +** allocate the structure; it should just fill it in. Note that +** the xOpen method must set the sqlite3_file.pMethods to either +** a valid [sqlite3_io_methods] object or to NULL. xOpen must do +** this even if the open fails. SQLite expects that the sqlite3_file.pMethods +** element will be valid after xOpen returns regardless of the success +** or failure of the xOpen call. +** +** The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] +** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to +** test whether a file is readable and writable, or [SQLITE_ACCESS_READ] +** to test whether a file is at least readable. The file can be a +** directory. +** +** SQLite will always allocate at least mxPathname+1 bytes for the +** output buffer xFullPathname. The exact size of the output buffer +** is also passed as a parameter to both methods. If the output buffer +** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is +** handled as a fatal error by SQLite, vfs implementations should endeavor +** to prevent this by setting mxPathname to a sufficiently large value. +** +** The xRandomness(), xSleep(), and xCurrentTime() interfaces +** are not strictly a part of the filesystem, but they are +** included in the VFS structure for completeness. +** The xRandomness() function attempts to return nBytes bytes +** of good-quality randomness into zOut. The return value is +** the actual number of bytes of randomness obtained. +** The xSleep() method causes the calling thread to sleep for at +** least the number of microseconds given. The xCurrentTime() +** method returns a Julian Day Number for the current date and time. +** +*/ +typedef struct sqlite3_vfs sqlite3_vfs; +struct sqlite3_vfs { + int iVersion; /* Structure version number */ + int szOsFile; /* Size of subclassed sqlite3_file */ + int mxPathname; /* Maximum file pathname length */ + sqlite3_vfs *pNext; /* Next registered VFS */ + const char *zName; /* Name of this virtual file system */ + void *pAppData; /* Pointer to application-specific data */ + int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, + int flags, int *pOutFlags); + int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); + int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); + int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); + void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); + void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); + void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); + void (*xDlClose)(sqlite3_vfs*, void*); + int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); + int (*xSleep)(sqlite3_vfs*, int microseconds); + int (*xCurrentTime)(sqlite3_vfs*, double*); + int (*xGetLastError)(sqlite3_vfs*, int, char *); + /* New fields may be appended in figure versions. The iVersion + ** value will increment whenever this happens. */ +}; + +/* +** CAPI3REF: Flags for the xAccess VFS method {H11190} +** +** These integer constants can be used as the third parameter to +** the xAccess method of an [sqlite3_vfs] object. {END} They determine +** what kind of permissions the xAccess method is looking for. +** With SQLITE_ACCESS_EXISTS, the xAccess method +** simply checks whether the file exists. +** With SQLITE_ACCESS_READWRITE, the xAccess method +** checks whether the file is both readable and writable. +** With SQLITE_ACCESS_READ, the xAccess method +** checks whether the file is readable. +*/ +#define SQLITE_ACCESS_EXISTS 0 +#define SQLITE_ACCESS_READWRITE 1 +#define SQLITE_ACCESS_READ 2 + +/* +** CAPI3REF: Initialize The SQLite Library {H10130} +** +** The sqlite3_initialize() routine initializes the +** SQLite library. The sqlite3_shutdown() routine +** deallocates any resources that were allocated by sqlite3_initialize(). +** This routines are designed to aid in process initialization and +** shutdown on embedded systems. Workstation applications using +** SQLite normally do not need to invoke either of these routines. +** +** A call to sqlite3_initialize() is an "effective" call if it is +** the first time sqlite3_initialize() is invoked during the lifetime of +** the process, or if it is the first time sqlite3_initialize() is invoked +** following a call to sqlite3_shutdown(). Only an effective call +** of sqlite3_initialize() does any initialization. All other calls +** are harmless no-ops. +** +** A call to sqlite3_shutdown() is an "effective" call if it is the first +** call to sqlite3_shutdown() since the last sqlite3_initialize(). Only +** an effective call to sqlite3_shutdown() does any deinitialization. +** All other valid calls to sqlite3_shutdown() are harmless no-ops. +** +** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() +** is not. The sqlite3_shutdown() interface must only be called from a +** single thread. All open [database connections] must be closed and all +** other SQLite resources must be deallocated prior to invoking +** sqlite3_shutdown(). +** +** Among other things, sqlite3_initialize() will invoke +** sqlite3_os_init(). Similarly, sqlite3_shutdown() +** will invoke sqlite3_os_end(). +** +** The sqlite3_initialize() routine returns [SQLITE_OK] on success. +** If for some reason, sqlite3_initialize() is unable to initialize +** the library (perhaps it is unable to allocate a needed resource such +** as a mutex) it returns an [error code] other than [SQLITE_OK]. +** +** The sqlite3_initialize() routine is called internally by many other +** SQLite interfaces so that an application usually does not need to +** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] +** calls sqlite3_initialize() so the SQLite library will be automatically +** initialized when [sqlite3_open()] is called if it has not be initialized +** already. However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] +** compile-time option, then the automatic calls to sqlite3_initialize() +** are omitted and the application must call sqlite3_initialize() directly +** prior to using any other SQLite interface. For maximum portability, +** it is recommended that applications always invoke sqlite3_initialize() +** directly prior to using any other SQLite interface. Future releases +** of SQLite may require this. In other words, the behavior exhibited +** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the +** default behavior in some future release of SQLite. +** +** The sqlite3_os_init() routine does operating-system specific +** initialization of the SQLite library. The sqlite3_os_end() +** routine undoes the effect of sqlite3_os_init(). Typical tasks +** performed by these routines include allocation or deallocation +** of static resources, initialization of global variables, +** setting up a default [sqlite3_vfs] module, or setting up +** a default configuration using [sqlite3_config()]. +** +** The application should never invoke either sqlite3_os_init() +** or sqlite3_os_end() directly. The application should only invoke +** sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init() +** interface is called automatically by sqlite3_initialize() and +** sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate +** implementations for sqlite3_os_init() and sqlite3_os_end() +** are built into SQLite when it is compiled for Unix, Windows, or OS/2. +** When [custom builds | built for other platforms] +** (using the [SQLITE_OS_OTHER=1] compile-time +** option) the application must supply a suitable implementation for +** sqlite3_os_init() and sqlite3_os_end(). An application-supplied +** implementation of sqlite3_os_init() or sqlite3_os_end() +** must return [SQLITE_OK] on success and some other [error code] upon +** failure. +*/ +SQLITE_API int sqlite3_initialize(void); +SQLITE_API int sqlite3_shutdown(void); +SQLITE_API int sqlite3_os_init(void); +SQLITE_API int sqlite3_os_end(void); + +/* +** CAPI3REF: Configuring The SQLite Library {H14100} +** EXPERIMENTAL +** +** The sqlite3_config() interface is used to make global configuration +** changes to SQLite in order to tune SQLite to the specific needs of +** the application. The default configuration is recommended for most +** applications and so this routine is usually not necessary. It is +** provided to support rare applications with unusual needs. +** +** The sqlite3_config() interface is not threadsafe. The application +** must insure that no other SQLite interfaces are invoked by other +** threads while sqlite3_config() is running. Furthermore, sqlite3_config() +** may only be invoked prior to library initialization using +** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. +** Note, however, that sqlite3_config() can be called as part of the +** implementation of an application-defined [sqlite3_os_init()]. +** +** The first argument to sqlite3_config() is an integer +** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines +** what property of SQLite is to be configured. Subsequent arguments +** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option] +** in the first argument. +** +** When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. +** If the option is unknown or SQLite is unable to set the option +** then this routine returns a non-zero [error code]. +** +** Requirements: +** [H14103] [H14106] [H14120] [H14123] [H14126] [H14129] [H14132] [H14135] +** [H14138] [H14141] [H14144] [H14147] [H14150] [H14153] [H14156] [H14159] +** [H14162] [H14165] [H14168] +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_config(int, ...); + +/* +** CAPI3REF: Configure database connections {H14200} +** EXPERIMENTAL +** +** The sqlite3_db_config() interface is used to make configuration +** changes to a [database connection]. The interface is similar to +** [sqlite3_config()] except that the changes apply to a single +** [database connection] (specified in the first argument). The +** sqlite3_db_config() interface can only be used immediately after +** the database connection is created using [sqlite3_open()], +** [sqlite3_open16()], or [sqlite3_open_v2()]. +** +** The second argument to sqlite3_db_config(D,V,...) is the +** configuration verb - an integer code that indicates what +** aspect of the [database connection] is being configured. +** The only choice for this value is [SQLITE_DBCONFIG_LOOKASIDE]. +** New verbs are likely to be added in future releases of SQLite. +** Additional arguments depend on the verb. +** +** Requirements: +** [H14203] [H14206] [H14209] [H14212] [H14215] +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...); + +/* +** CAPI3REF: Memory Allocation Routines {H10155} +** EXPERIMENTAL +** +** An instance of this object defines the interface between SQLite +** and low-level memory allocation routines. +** +** This object is used in only one place in the SQLite interface. +** A pointer to an instance of this object is the argument to +** [sqlite3_config()] when the configuration option is +** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. +** By creating an instance of this object +** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) +** during configuration, an application can specify an alternative +** memory allocation subsystem for SQLite to use for all of its +** dynamic memory needs. +** +** Note that SQLite comes with several [built-in memory allocators] +** that are perfectly adequate for the overwhelming majority of applications +** and that this object is only useful to a tiny minority of applications +** with specialized memory allocation requirements. This object is +** also used during testing of SQLite in order to specify an alternative +** memory allocator that simulates memory out-of-memory conditions in +** order to verify that SQLite recovers gracefully from such +** conditions. +** +** The xMalloc and xFree methods must work like the +** malloc() and free() functions from the standard C library. +** The xRealloc method must work like realloc() from the standard C library +** with the exception that if the second argument to xRealloc is zero, +** xRealloc must be a no-op - it must not perform any allocation or +** deallocation. SQLite guaranteeds that the second argument to +** xRealloc is always a value returned by a prior call to xRoundup. +** And so in cases where xRoundup always returns a positive number, +** xRealloc can perform exactly as the standard library realloc() and +** still be in compliance with this specification. +** +** xSize should return the allocated size of a memory allocation +** previously obtained from xMalloc or xRealloc. The allocated size +** is always at least as big as the requested size but may be larger. +** +** The xRoundup method returns what would be the allocated size of +** a memory allocation given a particular requested size. Most memory +** allocators round up memory allocations at least to the next multiple +** of 8. Some allocators round up to a larger multiple or to a power of 2. +** Every memory allocation request coming in through [sqlite3_malloc()] +** or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, +** that causes the corresponding memory allocation to fail. +** +** The xInit method initializes the memory allocator. (For example, +** it might allocate any require mutexes or initialize internal data +** structures. The xShutdown method is invoked (indirectly) by +** [sqlite3_shutdown()] and should deallocate any resources acquired +** by xInit. The pAppData pointer is used as the only parameter to +** xInit and xShutdown. +** +** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes +** the xInit method, so the xInit method need not be threadsafe. The +** xShutdown method is only called from [sqlite3_shutdown()] so it does +** not need to be threadsafe either. For all other methods, SQLite +** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the +** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which +** it is by default) and so the methods are automatically serialized. +** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other +** methods must be threadsafe or else make their own arrangements for +** serialization. +** +** SQLite will never invoke xInit() more than once without an intervening +** call to xShutdown(). +*/ +typedef struct sqlite3_mem_methods sqlite3_mem_methods; +struct sqlite3_mem_methods { + void *(*xMalloc)(int); /* Memory allocation function */ + void (*xFree)(void*); /* Free a prior allocation */ + void *(*xRealloc)(void*,int); /* Resize an allocation */ + int (*xSize)(void*); /* Return the size of an allocation */ + int (*xRoundup)(int); /* Round up request size to allocation size */ + int (*xInit)(void*); /* Initialize the memory allocator */ + void (*xShutdown)(void*); /* Deinitialize the memory allocator */ + void *pAppData; /* Argument to xInit() and xShutdown() */ +}; + +/* +** CAPI3REF: Configuration Options {H10160} +** EXPERIMENTAL +** +** These constants are the available integer configuration options that +** can be passed as the first argument to the [sqlite3_config()] interface. +** +** New configuration options may be added in future releases of SQLite. +** Existing configuration options might be discontinued. Applications +** should check the return code from [sqlite3_config()] to make sure that +** the call worked. The [sqlite3_config()] interface will return a +** non-zero [error code] if a discontinued or unsupported configuration option +** is invoked. +** +**
+**
SQLITE_CONFIG_SINGLETHREAD
+**
There are no arguments to this option. This option disables +** all mutexing and puts SQLite into a mode where it can only be used +** by a single thread.
+** +**
SQLITE_CONFIG_MULTITHREAD
+**
There are no arguments to this option. This option disables +** mutexing on [database connection] and [prepared statement] objects. +** The application is responsible for serializing access to +** [database connections] and [prepared statements]. But other mutexes +** are enabled so that SQLite will be safe to use in a multi-threaded +** environment as long as no two threads attempt to use the same +** [database connection] at the same time. See the [threading mode] +** documentation for additional information.
+** +**
SQLITE_CONFIG_SERIALIZED
+**
There are no arguments to this option. This option enables +** all mutexes including the recursive +** mutexes on [database connection] and [prepared statement] objects. +** In this mode (which is the default when SQLite is compiled with +** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access +** to [database connections] and [prepared statements] so that the +** application is free to use the same [database connection] or the +** same [prepared statement] in different threads at the same time. +** See the [threading mode] documentation for additional information.
+** +**
SQLITE_CONFIG_MALLOC
+**
This option takes a single argument which is a pointer to an +** instance of the [sqlite3_mem_methods] structure. The argument specifies +** alternative low-level memory allocation routines to be used in place of +** the memory allocation routines built into SQLite.
+** +**
SQLITE_CONFIG_GETMALLOC
+**
This option takes a single argument which is a pointer to an +** instance of the [sqlite3_mem_methods] structure. The [sqlite3_mem_methods] +** structure is filled with the currently defined memory allocation routines. +** This option can be used to overload the default memory allocation +** routines with a wrapper that simulations memory allocation failure or +** tracks memory usage, for example.
+** +**
SQLITE_CONFIG_MEMSTATUS
+**
This option takes single argument of type int, interpreted as a +** boolean, which enables or disables the collection of memory allocation +** statistics. When disabled, the following SQLite interfaces become +** non-operational: +**
    +**
  • [sqlite3_memory_used()] +**
  • [sqlite3_memory_highwater()] +**
  • [sqlite3_soft_heap_limit()] +**
  • [sqlite3_status()] +**
+**
+** +**
SQLITE_CONFIG_SCRATCH
+**
This option specifies a static memory buffer that SQLite can use for +** scratch memory. There are three arguments: A pointer an 8-byte +** aligned memory buffer from which the scrach allocations will be +** drawn, the size of each scratch allocation (sz), +** and the maximum number of scratch allocations (N). The sz +** argument must be a multiple of 16. The sz parameter should be a few bytes +** larger than the actual scratch space required due to internal overhead. +** The first argument should pointer to an 8-byte aligned buffer +** of at least sz*N bytes of memory. +** SQLite will use no more than one scratch buffer at once per thread, so +** N should be set to the expected maximum number of threads. The sz +** parameter should be 6 times the size of the largest database page size. +** Scratch buffers are used as part of the btree balance operation. If +** The btree balancer needs additional memory beyond what is provided by +** scratch buffers or if no scratch buffer space is specified, then SQLite +** goes to [sqlite3_malloc()] to obtain the memory it needs.
+** +**
SQLITE_CONFIG_PAGECACHE
+**
This option specifies a static memory buffer that SQLite can use for +** the database page cache with the default page cache implemenation. +** This configuration should not be used if an application-define page +** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option. +** There are three arguments to this option: A pointer to 8-byte aligned +** memory, the size of each page buffer (sz), and the number of pages (N). +** The sz argument should be the size of the largest database page +** (a power of two between 512 and 32768) plus a little extra for each +** page header. The page header size is 20 to 40 bytes depending on +** the host architecture. It is harmless, apart from the wasted memory, +** to make sz a little too large. The first +** argument should point to an allocation of at least sz*N bytes of memory. +** SQLite will use the memory provided by the first argument to satisfy its +** memory needs for the first N pages that it adds to cache. If additional +** page cache memory is needed beyond what is provided by this option, then +** SQLite goes to [sqlite3_malloc()] for the additional storage space. +** The implementation might use one or more of the N buffers to hold +** memory accounting information. The pointer in the first argument must +** be aligned to an 8-byte boundary or subsequent behavior of SQLite +** will be undefined.
+** +**
SQLITE_CONFIG_HEAP
+**
This option specifies a static memory buffer that SQLite will use +** for all of its dynamic memory allocation needs beyond those provided +** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE]. +** There are three arguments: An 8-byte aligned pointer to the memory, +** the number of bytes in the memory buffer, and the minimum allocation size. +** If the first pointer (the memory pointer) is NULL, then SQLite reverts +** to using its default memory allocator (the system malloc() implementation), +** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. If the +** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or +** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory +** allocator is engaged to handle all of SQLites memory allocation needs. +** The first pointer (the memory pointer) must be aligned to an 8-byte +** boundary or subsequent behavior of SQLite will be undefined.
+** +**
SQLITE_CONFIG_MUTEX
+**
This option takes a single argument which is a pointer to an +** instance of the [sqlite3_mutex_methods] structure. The argument specifies +** alternative low-level mutex routines to be used in place +** the mutex routines built into SQLite.
+** +**
SQLITE_CONFIG_GETMUTEX
+**
This option takes a single argument which is a pointer to an +** instance of the [sqlite3_mutex_methods] structure. The +** [sqlite3_mutex_methods] +** structure is filled with the currently defined mutex routines. +** This option can be used to overload the default mutex allocation +** routines with a wrapper used to track mutex usage for performance +** profiling or testing, for example.
+** +**
SQLITE_CONFIG_LOOKASIDE
+**
This option takes two arguments that determine the default +** memory allocation lookaside optimization. The first argument is the +** size of each lookaside buffer slot and the second is the number of +** slots allocated to each database connection. This option sets the +** default lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] +** verb to [sqlite3_db_config()] can be used to change the lookaside +** configuration on individual connections.
+** +**
SQLITE_CONFIG_PCACHE
+**
This option takes a single argument which is a pointer to +** an [sqlite3_pcache_methods] object. This object specifies the interface +** to a custom page cache implementation. SQLite makes a copy of the +** object and uses it for page cache memory allocations.
+** +**
SQLITE_CONFIG_GETPCACHE
+**
This option takes a single argument which is a pointer to an +** [sqlite3_pcache_methods] object. SQLite copies of the current +** page cache implementation into that object.
+** +**
+*/ +#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ +#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ +#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ +#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ +#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ +#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */ +#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ +#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ +#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ +#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ +#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ +/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ +#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ +#define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */ +#define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */ + +/* +** CAPI3REF: Configuration Options {H10170} +** EXPERIMENTAL +** +** These constants are the available integer configuration options that +** can be passed as the second argument to the [sqlite3_db_config()] interface. +** +** New configuration options may be added in future releases of SQLite. +** Existing configuration options might be discontinued. Applications +** should check the return code from [sqlite3_db_config()] to make sure that +** the call worked. The [sqlite3_db_config()] interface will return a +** non-zero [error code] if a discontinued or unsupported configuration option +** is invoked. +** +**
+**
SQLITE_DBCONFIG_LOOKASIDE
+**
This option takes three additional arguments that determine the +** [lookaside memory allocator] configuration for the [database connection]. +** The first argument (the third parameter to [sqlite3_db_config()] is a +** pointer to an memory buffer to use for lookaside memory. +** The first argument may be NULL in which case SQLite will allocate the +** lookaside buffer itself using [sqlite3_malloc()]. The second argument is the +** size of each lookaside buffer slot and the third argument is the number of +** slots. The size of the buffer in the first argument must be greater than +** or equal to the product of the second and third arguments. The buffer +** must be aligned to an 8-byte boundary. If the second argument is not +** a multiple of 8, it is internally rounded down to the next smaller +** multiple of 8. See also: [SQLITE_CONFIG_LOOKASIDE]
+** +**
+*/ +#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ + + +/* +** CAPI3REF: Enable Or Disable Extended Result Codes {H12200} +** +** The sqlite3_extended_result_codes() routine enables or disables the +** [extended result codes] feature of SQLite. The extended result +** codes are disabled by default for historical compatibility considerations. +** +** Requirements: +** [H12201] [H12202] +*/ +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); + +/* +** CAPI3REF: Last Insert Rowid {H12220} +** +** Each entry in an SQLite table has a unique 64-bit signed +** integer key called the [ROWID | "rowid"]. The rowid is always available +** as an undeclared column named ROWID, OID, or _ROWID_ as long as those +** names are not also used by explicitly declared columns. If +** the table has a column of type [INTEGER PRIMARY KEY] then that column +** is another alias for the rowid. +** +** This routine returns the [rowid] of the most recent +** successful [INSERT] into the database from the [database connection] +** in the first argument. If no successful [INSERT]s +** have ever occurred on that database connection, zero is returned. +** +** If an [INSERT] occurs within a trigger, then the [rowid] of the inserted +** row is returned by this routine as long as the trigger is running. +** But once the trigger terminates, the value returned by this routine +** reverts to the last value inserted before the trigger fired. +** +** An [INSERT] that fails due to a constraint violation is not a +** successful [INSERT] and does not change the value returned by this +** routine. Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, +** and INSERT OR ABORT make no changes to the return value of this +** routine when their insertion fails. When INSERT OR REPLACE +** encounters a constraint violation, it does not fail. The +** INSERT continues to completion after deleting rows that caused +** the constraint problem so INSERT OR REPLACE will always change +** the return value of this interface. +** +** For the purposes of this routine, an [INSERT] is considered to +** be successful even if it is subsequently rolled back. +** +** Requirements: +** [H12221] [H12223] +** +** If a separate thread performs a new [INSERT] on the same +** database connection while the [sqlite3_last_insert_rowid()] +** function is running and thus changes the last insert [rowid], +** then the value returned by [sqlite3_last_insert_rowid()] is +** unpredictable and might not equal either the old or the new +** last insert [rowid]. +*/ +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); + +/* +** CAPI3REF: Count The Number Of Rows Modified {H12240} +** +** This function returns the number of database rows that were changed +** or inserted or deleted by the most recently completed SQL statement +** on the [database connection] specified by the first parameter. +** Only changes that are directly specified by the [INSERT], [UPDATE], +** or [DELETE] statement are counted. Auxiliary changes caused by +** triggers or [foreign key actions] are not counted. Use the +** [sqlite3_total_changes()] function to find the total number of changes +** including changes caused by triggers and foreign key actions. +** +** Changes to a view that are simulated by an [INSTEAD OF trigger] +** are not counted. Only real table changes are counted. +** +** A "row change" is a change to a single row of a single table +** caused by an INSERT, DELETE, or UPDATE statement. Rows that +** are changed as side effects of [REPLACE] constraint resolution, +** rollback, ABORT processing, [DROP TABLE], or by any other +** mechanisms do not count as direct row changes. +** +** A "trigger context" is a scope of execution that begins and +** ends with the script of a [CREATE TRIGGER | trigger]. +** Most SQL statements are +** evaluated outside of any trigger. This is the "top level" +** trigger context. If a trigger fires from the top level, a +** new trigger context is entered for the duration of that one +** trigger. Subtriggers create subcontexts for their duration. +** +** Calling [sqlite3_exec()] or [sqlite3_step()] recursively does +** not create a new trigger context. +** +** This function returns the number of direct row changes in the +** most recent INSERT, UPDATE, or DELETE statement within the same +** trigger context. +** +** Thus, when called from the top level, this function returns the +** number of changes in the most recent INSERT, UPDATE, or DELETE +** that also occurred at the top level. Within the body of a trigger, +** the sqlite3_changes() interface can be called to find the number of +** changes in the most recently completed INSERT, UPDATE, or DELETE +** statement within the body of the same trigger. +** However, the number returned does not include changes +** caused by subtriggers since those have their own context. +** +** See also the [sqlite3_total_changes()] interface and the +** [count_changes pragma]. +** +** Requirements: +** [H12241] [H12243] +** +** If a separate thread makes changes on the same database connection +** while [sqlite3_changes()] is running then the value returned +** is unpredictable and not meaningful. +*/ +SQLITE_API int sqlite3_changes(sqlite3*); + +/* +** CAPI3REF: Total Number Of Rows Modified {H12260} +** +** This function returns the number of row changes caused by [INSERT], +** [UPDATE] or [DELETE] statements since the [database connection] was opened. +** The count includes all changes from all [CREATE TRIGGER | trigger] +** contexts and changes made by [foreign key actions]. However, +** the count does not include changes used to implement [REPLACE] constraints, +** do rollbacks or ABORT processing, or [DROP TABLE] processing. The +** count does not include rows of views that fire an [INSTEAD OF trigger], +** though if the INSTEAD OF trigger makes changes of its own, those changes +** are counted. +** The changes are counted as soon as the statement that makes them is +** completed (when the statement handle is passed to [sqlite3_reset()] or +** [sqlite3_finalize()]). +** +** See also the [sqlite3_changes()] interface and the +** [count_changes pragma]. +** +** Requirements: +** [H12261] [H12263] +** +** If a separate thread makes changes on the same database connection +** while [sqlite3_total_changes()] is running then the value +** returned is unpredictable and not meaningful. +*/ +SQLITE_API int sqlite3_total_changes(sqlite3*); + +/* +** CAPI3REF: Interrupt A Long-Running Query {H12270} +** +** This function causes any pending database operation to abort and +** return at its earliest opportunity. This routine is typically +** called in response to a user action such as pressing "Cancel" +** or Ctrl-C where the user wants a long query operation to halt +** immediately. +** +** It is safe to call this routine from a thread different from the +** thread that is currently running the database operation. But it +** is not safe to call this routine with a [database connection] that +** is closed or might close before sqlite3_interrupt() returns. +** +** If an SQL operation is very nearly finished at the time when +** sqlite3_interrupt() is called, then it might not have an opportunity +** to be interrupted and might continue to completion. +** +** An SQL operation that is interrupted will return [SQLITE_INTERRUPT]. +** If the interrupted SQL operation is an INSERT, UPDATE, or DELETE +** that is inside an explicit transaction, then the entire transaction +** will be rolled back automatically. +** +** The sqlite3_interrupt(D) call is in effect until all currently running +** SQL statements on [database connection] D complete. Any new SQL statements +** that are started after the sqlite3_interrupt() call and before the +** running statements reaches zero are interrupted as if they had been +** running prior to the sqlite3_interrupt() call. New SQL statements +** that are started after the running statement count reaches zero are +** not effected by the sqlite3_interrupt(). +** A call to sqlite3_interrupt(D) that occurs when there are no running +** SQL statements is a no-op and has no effect on SQL statements +** that are started after the sqlite3_interrupt() call returns. +** +** Requirements: +** [H12271] [H12272] +** +** If the database connection closes while [sqlite3_interrupt()] +** is running then bad things will likely happen. +*/ +SQLITE_API void sqlite3_interrupt(sqlite3*); + +/* +** CAPI3REF: Determine If An SQL Statement Is Complete {H10510} +** +** These routines are useful during command-line input to determine if the +** currently entered text seems to form a complete SQL statement or +** if additional input is needed before sending the text into +** SQLite for parsing. These routines return 1 if the input string +** appears to be a complete SQL statement. A statement is judged to be +** complete if it ends with a semicolon token and is not a prefix of a +** well-formed CREATE TRIGGER statement. Semicolons that are embedded within +** string literals or quoted identifier names or comments are not +** independent tokens (they are part of the token in which they are +** embedded) and thus do not count as a statement terminator. Whitespace +** and comments that follow the final semicolon are ignored. +** +** These routines return 0 if the statement is incomplete. If a +** memory allocation fails, then SQLITE_NOMEM is returned. +** +** These routines do not parse the SQL statements thus +** will not detect syntactically incorrect SQL. +** +** If SQLite has not been initialized using [sqlite3_initialize()] prior +** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked +** automatically by sqlite3_complete16(). If that initialization fails, +** then the return value from sqlite3_complete16() will be non-zero +** regardless of whether or not the input SQL is complete. +** +** Requirements: [H10511] [H10512] +** +** The input to [sqlite3_complete()] must be a zero-terminated +** UTF-8 string. +** +** The input to [sqlite3_complete16()] must be a zero-terminated +** UTF-16 string in native byte order. +*/ +SQLITE_API int sqlite3_complete(const char *sql); +SQLITE_API int sqlite3_complete16(const void *sql); + +/* +** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors {H12310} +** +** This routine sets a callback function that might be invoked whenever +** an attempt is made to open a database table that another thread +** or process has locked. +** +** If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] +** is returned immediately upon encountering the lock. If the busy callback +** is not NULL, then the callback will be invoked with two arguments. +** +** The first argument to the handler is a copy of the void* pointer which +** is the third argument to sqlite3_busy_handler(). The second argument to +** the handler callback is the number of times that the busy handler has +** been invoked for this locking event. If the +** busy callback returns 0, then no additional attempts are made to +** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned. +** If the callback returns non-zero, then another attempt +** is made to open the database for reading and the cycle repeats. +** +** The presence of a busy handler does not guarantee that it will be invoked +** when there is lock contention. If SQLite determines that invoking the busy +** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY] +** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler. +** Consider a scenario where one process is holding a read lock that +** it is trying to promote to a reserved lock and +** a second process is holding a reserved lock that it is trying +** to promote to an exclusive lock. The first process cannot proceed +** because it is blocked by the second and the second process cannot +** proceed because it is blocked by the first. If both processes +** invoke the busy handlers, neither will make any progress. Therefore, +** SQLite returns [SQLITE_BUSY] for the first process, hoping that this +** will induce the first process to release its read lock and allow +** the second process to proceed. +** +** The default busy callback is NULL. +** +** The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED] +** when SQLite is in the middle of a large transaction where all the +** changes will not fit into the in-memory cache. SQLite will +** already hold a RESERVED lock on the database file, but it needs +** to promote this lock to EXCLUSIVE so that it can spill cache +** pages into the database file without harm to concurrent +** readers. If it is unable to promote the lock, then the in-memory +** cache will be left in an inconsistent state and so the error +** code is promoted from the relatively benign [SQLITE_BUSY] to +** the more severe [SQLITE_IOERR_BLOCKED]. This error code promotion +** forces an automatic rollback of the changes. See the +** +** CorruptionFollowingBusyError wiki page for a discussion of why +** this is important. +** +** There can only be a single busy handler defined for each +** [database connection]. Setting a new busy handler clears any +** previously set handler. Note that calling [sqlite3_busy_timeout()] +** will also set or clear the busy handler. +** +** The busy callback should not take any actions which modify the +** database connection that invoked the busy handler. Any such actions +** result in undefined behavior. +** +** Requirements: +** [H12311] [H12312] [H12314] [H12316] [H12318] +** +** A busy handler must not close the database connection +** or [prepared statement] that invoked the busy handler. +*/ +SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); + +/* +** CAPI3REF: Set A Busy Timeout {H12340} +** +** This routine sets a [sqlite3_busy_handler | busy handler] that sleeps +** for a specified amount of time when a table is locked. The handler +** will sleep multiple times until at least "ms" milliseconds of sleeping +** have accumulated. {H12343} After "ms" milliseconds of sleeping, +** the handler returns 0 which causes [sqlite3_step()] to return +** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]. +** +** Calling this routine with an argument less than or equal to zero +** turns off all busy handlers. +** +** There can only be a single busy handler for a particular +** [database connection] any any given moment. If another busy handler +** was defined (using [sqlite3_busy_handler()]) prior to calling +** this routine, that other busy handler is cleared. +** +** Requirements: +** [H12341] [H12343] [H12344] +*/ +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); + +/* +** CAPI3REF: Convenience Routines For Running Queries {H12370} +** +** Definition: A result table is memory data structure created by the +** [sqlite3_get_table()] interface. A result table records the +** complete query results from one or more queries. +** +** The table conceptually has a number of rows and columns. But +** these numbers are not part of the result table itself. These +** numbers are obtained separately. Let N be the number of rows +** and M be the number of columns. +** +** A result table is an array of pointers to zero-terminated UTF-8 strings. +** There are (N+1)*M elements in the array. The first M pointers point +** to zero-terminated strings that contain the names of the columns. +** The remaining entries all point to query results. NULL values result +** in NULL pointers. All other values are in their UTF-8 zero-terminated +** string representation as returned by [sqlite3_column_text()]. +** +** A result table might consist of one or more memory allocations. +** It is not safe to pass a result table directly to [sqlite3_free()]. +** A result table should be deallocated using [sqlite3_free_table()]. +** +** As an example of the result table format, suppose a query result +** is as follows: +** +**
+**        Name        | Age
+**        -----------------------
+**        Alice       | 43
+**        Bob         | 28
+**        Cindy       | 21
+** 
+** +** There are two column (M==2) and three rows (N==3). Thus the +** result table has 8 entries. Suppose the result table is stored +** in an array names azResult. Then azResult holds this content: +** +**
+**        azResult[0] = "Name";
+**        azResult[1] = "Age";
+**        azResult[2] = "Alice";
+**        azResult[3] = "43";
+**        azResult[4] = "Bob";
+**        azResult[5] = "28";
+**        azResult[6] = "Cindy";
+**        azResult[7] = "21";
+** 
+** +** The sqlite3_get_table() function evaluates one or more +** semicolon-separated SQL statements in the zero-terminated UTF-8 +** string of its 2nd parameter. It returns a result table to the +** pointer given in its 3rd parameter. +** +** After the calling function has finished using the result, it should +** pass the pointer to the result table to sqlite3_free_table() in order to +** release the memory that was malloced. Because of the way the +** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling +** function must not try to call [sqlite3_free()] directly. Only +** [sqlite3_free_table()] is able to release the memory properly and safely. +** +** The sqlite3_get_table() interface is implemented as a wrapper around +** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access +** to any internal data structures of SQLite. It uses only the public +** interface defined here. As a consequence, errors that occur in the +** wrapper layer outside of the internal [sqlite3_exec()] call are not +** reflected in subsequent calls to [sqlite3_errcode()] or [sqlite3_errmsg()]. +** +** Requirements: +** [H12371] [H12373] [H12374] [H12376] [H12379] [H12382] +*/ +SQLITE_API int sqlite3_get_table( + sqlite3 *db, /* An open database */ + const char *zSql, /* SQL to be evaluated */ + char ***pazResult, /* Results of the query */ + int *pnRow, /* Number of result rows written here */ + int *pnColumn, /* Number of result columns written here */ + char **pzErrmsg /* Error msg written here */ +); +SQLITE_API void sqlite3_free_table(char **result); + +/* +** CAPI3REF: Formatted String Printing Functions {H17400} +** +** These routines are work-alikes of the "printf()" family of functions +** from the standard C library. +** +** The sqlite3_mprintf() and sqlite3_vmprintf() routines write their +** results into memory obtained from [sqlite3_malloc()]. +** The strings returned by these two routines should be +** released by [sqlite3_free()]. Both routines return a +** NULL pointer if [sqlite3_malloc()] is unable to allocate enough +** memory to hold the resulting string. +** +** In sqlite3_snprintf() routine is similar to "snprintf()" from +** the standard C library. The result is written into the +** buffer supplied as the second parameter whose size is given by +** the first parameter. Note that the order of the +** first two parameters is reversed from snprintf(). This is an +** historical accident that cannot be fixed without breaking +** backwards compatibility. Note also that sqlite3_snprintf() +** returns a pointer to its buffer instead of the number of +** characters actually written into the buffer. We admit that +** the number of characters written would be a more useful return +** value but we cannot change the implementation of sqlite3_snprintf() +** now without breaking compatibility. +** +** As long as the buffer size is greater than zero, sqlite3_snprintf() +** guarantees that the buffer is always zero-terminated. The first +** parameter "n" is the total size of the buffer, including space for +** the zero terminator. So the longest string that can be completely +** written will be n-1 characters. +** +** These routines all implement some additional formatting +** options that are useful for constructing SQL statements. +** All of the usual printf() formatting options apply. In addition, there +** is are "%q", "%Q", and "%z" options. +** +** The %q option works like %s in that it substitutes a null-terminated +** string from the argument list. But %q also doubles every '\'' character. +** %q is designed for use inside a string literal. By doubling each '\'' +** character it escapes that character and allows it to be inserted into +** the string. +** +** For example, assume the string variable zText contains text as follows: +** +**
+**  char *zText = "It's a happy day!";
+** 
+** +** One can use this text in an SQL statement as follows: +** +**
+**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
+**  sqlite3_exec(db, zSQL, 0, 0, 0);
+**  sqlite3_free(zSQL);
+** 
+** +** Because the %q format string is used, the '\'' character in zText +** is escaped and the SQL generated is as follows: +** +**
+**  INSERT INTO table1 VALUES('It''s a happy day!')
+** 
+** +** This is correct. Had we used %s instead of %q, the generated SQL +** would have looked like this: +** +**
+**  INSERT INTO table1 VALUES('It's a happy day!');
+** 
+** +** This second example is an SQL syntax error. As a general rule you should +** always use %q instead of %s when inserting text into a string literal. +** +** The %Q option works like %q except it also adds single quotes around +** the outside of the total string. Additionally, if the parameter in the +** argument list is a NULL pointer, %Q substitutes the text "NULL" (without +** single quotes) in place of the %Q option. So, for example, one could say: +** +**
+**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
+**  sqlite3_exec(db, zSQL, 0, 0, 0);
+**  sqlite3_free(zSQL);
+** 
+** +** The code above will render a correct SQL statement in the zSQL +** variable even if the zText variable is a NULL pointer. +** +** The "%z" formatting option works exactly like "%s" with the +** addition that after the string has been read and copied into +** the result, [sqlite3_free()] is called on the input string. {END} +** +** Requirements: +** [H17403] [H17406] [H17407] +*/ +SQLITE_API char *sqlite3_mprintf(const char*,...); +SQLITE_API char *sqlite3_vmprintf(const char*, va_list); +SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); + +/* +** CAPI3REF: Memory Allocation Subsystem {H17300} +** +** The SQLite core uses these three routines for all of its own +** internal memory allocation needs. "Core" in the previous sentence +** does not include operating-system specific VFS implementation. The +** Windows VFS uses native malloc() and free() for some operations. +** +** The sqlite3_malloc() routine returns a pointer to a block +** of memory at least N bytes in length, where N is the parameter. +** If sqlite3_malloc() is unable to obtain sufficient free +** memory, it returns a NULL pointer. If the parameter N to +** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns +** a NULL pointer. +** +** Calling sqlite3_free() with a pointer previously returned +** by sqlite3_malloc() or sqlite3_realloc() releases that memory so +** that it might be reused. The sqlite3_free() routine is +** a no-op if is called with a NULL pointer. Passing a NULL pointer +** to sqlite3_free() is harmless. After being freed, memory +** should neither be read nor written. Even reading previously freed +** memory might result in a segmentation fault or other severe error. +** Memory corruption, a segmentation fault, or other severe error +** might result if sqlite3_free() is called with a non-NULL pointer that +** was not obtained from sqlite3_malloc() or sqlite3_realloc(). +** +** The sqlite3_realloc() interface attempts to resize a +** prior memory allocation to be at least N bytes, where N is the +** second parameter. The memory allocation to be resized is the first +** parameter. If the first parameter to sqlite3_realloc() +** is a NULL pointer then its behavior is identical to calling +** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc(). +** If the second parameter to sqlite3_realloc() is zero or +** negative then the behavior is exactly the same as calling +** sqlite3_free(P) where P is the first parameter to sqlite3_realloc(). +** sqlite3_realloc() returns a pointer to a memory allocation +** of at least N bytes in size or NULL if sufficient memory is unavailable. +** If M is the size of the prior allocation, then min(N,M) bytes +** of the prior allocation are copied into the beginning of buffer returned +** by sqlite3_realloc() and the prior allocation is freed. +** If sqlite3_realloc() returns NULL, then the prior allocation +** is not freed. +** +** The memory returned by sqlite3_malloc() and sqlite3_realloc() +** is always aligned to at least an 8 byte boundary. {END} +** +** The default implementation of the memory allocation subsystem uses +** the malloc(), realloc() and free() provided by the standard C library. +** {H17382} However, if SQLite is compiled with the +** SQLITE_MEMORY_SIZE=NNN C preprocessor macro (where NNN +** is an integer), then SQLite create a static array of at least +** NNN bytes in size and uses that array for all of its dynamic +** memory allocation needs. {END} Additional memory allocator options +** may be added in future releases. +** +** In SQLite version 3.5.0 and 3.5.1, it was possible to define +** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in +** implementation of these routines to be omitted. That capability +** is no longer provided. Only built-in memory allocators can be used. +** +** The Windows OS interface layer calls +** the system malloc() and free() directly when converting +** filenames between the UTF-8 encoding used by SQLite +** and whatever filename encoding is used by the particular Windows +** installation. Memory allocation errors are detected, but +** they are reported back as [SQLITE_CANTOPEN] or +** [SQLITE_IOERR] rather than [SQLITE_NOMEM]. +** +** Requirements: +** [H17303] [H17304] [H17305] [H17306] [H17310] [H17312] [H17315] [H17318] +** [H17321] [H17322] [H17323] +** +** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] +** must be either NULL or else pointers obtained from a prior +** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have +** not yet been released. +** +** The application must not read or write any part of +** a block of memory after it has been released using +** [sqlite3_free()] or [sqlite3_realloc()]. +*/ +SQLITE_API void *sqlite3_malloc(int); +SQLITE_API void *sqlite3_realloc(void*, int); +SQLITE_API void sqlite3_free(void*); + +/* +** CAPI3REF: Memory Allocator Statistics {H17370} +** +** SQLite provides these two interfaces for reporting on the status +** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()] +** routines, which form the built-in memory allocation subsystem. +** +** Requirements: +** [H17371] [H17373] [H17374] [H17375] +*/ +SQLITE_API sqlite3_int64 sqlite3_memory_used(void); +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag); + +/* +** CAPI3REF: Pseudo-Random Number Generator {H17390} +** +** SQLite contains a high-quality pseudo-random number generator (PRNG) used to +** select random [ROWID | ROWIDs] when inserting new records into a table that +** already uses the largest possible [ROWID]. The PRNG is also used for +** the build-in random() and randomblob() SQL functions. This interface allows +** applications to access the same PRNG for other purposes. +** +** A call to this routine stores N bytes of randomness into buffer P. +** +** The first time this routine is invoked (either internally or by +** the application) the PRNG is seeded using randomness obtained +** from the xRandomness method of the default [sqlite3_vfs] object. +** On all subsequent invocations, the pseudo-randomness is generated +** internally and without recourse to the [sqlite3_vfs] xRandomness +** method. +** +** Requirements: +** [H17392] +*/ +SQLITE_API void sqlite3_randomness(int N, void *P); + +/* +** CAPI3REF: Compile-Time Authorization Callbacks {H12500} +** +** This routine registers a authorizer callback with a particular +** [database connection], supplied in the first argument. +** The authorizer callback is invoked as SQL statements are being compiled +** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()], +** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. At various +** points during the compilation process, as logic is being created +** to perform various actions, the authorizer callback is invoked to +** see if those actions are allowed. The authorizer callback should +** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the +** specific action but allow the SQL statement to continue to be +** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be +** rejected with an error. If the authorizer callback returns +** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY] +** then the [sqlite3_prepare_v2()] or equivalent call that triggered +** the authorizer will fail with an error message. +** +** When the callback returns [SQLITE_OK], that means the operation +** requested is ok. When the callback returns [SQLITE_DENY], the +** [sqlite3_prepare_v2()] or equivalent call that triggered the +** authorizer will fail with an error message explaining that +** access is denied. +** +** The first parameter to the authorizer callback is a copy of the third +** parameter to the sqlite3_set_authorizer() interface. The second parameter +** to the callback is an integer [SQLITE_COPY | action code] that specifies +** the particular action to be authorized. The third through sixth parameters +** to the callback are zero-terminated strings that contain additional +** details about the action to be authorized. +** +** If the action code is [SQLITE_READ] +** and the callback returns [SQLITE_IGNORE] then the +** [prepared statement] statement is constructed to substitute +** a NULL value in place of the table column that would have +** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] +** return can be used to deny an untrusted user access to individual +** columns of a table. +** If the action code is [SQLITE_DELETE] and the callback returns +** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the +** [truncate optimization] is disabled and all rows are deleted individually. +** +** An authorizer is used when [sqlite3_prepare | preparing] +** SQL statements from an untrusted source, to ensure that the SQL statements +** do not try to access data they are not allowed to see, or that they do not +** try to execute malicious statements that damage the database. For +** example, an application may allow a user to enter arbitrary +** SQL queries for evaluation by a database. But the application does +** not want the user to be able to make arbitrary changes to the +** database. An authorizer could then be put in place while the +** user-entered SQL is being [sqlite3_prepare | prepared] that +** disallows everything except [SELECT] statements. +** +** Applications that need to process SQL from untrusted sources +** might also consider lowering resource limits using [sqlite3_limit()] +** and limiting database size using the [max_page_count] [PRAGMA] +** in addition to using an authorizer. +** +** Only a single authorizer can be in place on a database connection +** at a time. Each call to sqlite3_set_authorizer overrides the +** previous call. Disable the authorizer by installing a NULL callback. +** The authorizer is disabled by default. +** +** The authorizer callback must not do anything that will modify +** the database connection that invoked the authorizer callback. +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their +** database connections for the meaning of "modify" in this paragraph. +** +** When [sqlite3_prepare_v2()] is used to prepare a statement, the +** statement might be re-prepared during [sqlite3_step()] due to a +** schema change. Hence, the application should ensure that the +** correct authorizer callback remains in place during the [sqlite3_step()]. +** +** Note that the authorizer callback is invoked only during +** [sqlite3_prepare()] or its variants. Authorization is not +** performed during statement evaluation in [sqlite3_step()], unless +** as stated in the previous paragraph, sqlite3_step() invokes +** sqlite3_prepare_v2() to reprepare a statement after a schema change. +** +** Requirements: +** [H12501] [H12502] [H12503] [H12504] [H12505] [H12506] [H12507] [H12510] +** [H12511] [H12512] [H12520] [H12521] [H12522] +*/ +SQLITE_API int sqlite3_set_authorizer( + sqlite3*, + int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), + void *pUserData +); + +/* +** CAPI3REF: Authorizer Return Codes {H12590} +** +** The [sqlite3_set_authorizer | authorizer callback function] must +** return either [SQLITE_OK] or one of these two constants in order +** to signal SQLite whether or not the action is permitted. See the +** [sqlite3_set_authorizer | authorizer documentation] for additional +** information. +*/ +#define SQLITE_DENY 1 /* Abort the SQL statement with an error */ +#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */ + +/* +** CAPI3REF: Authorizer Action Codes {H12550} +** +** The [sqlite3_set_authorizer()] interface registers a callback function +** that is invoked to authorize certain SQL statement actions. The +** second parameter to the callback is an integer code that specifies +** what action is being authorized. These are the integer action codes that +** the authorizer callback may be passed. +** +** These action code values signify what kind of operation is to be +** authorized. The 3rd and 4th parameters to the authorization +** callback function will be parameters or NULL depending on which of these +** codes is used as the second parameter. The 5th parameter to the +** authorizer callback is the name of the database ("main", "temp", +** etc.) if applicable. The 6th parameter to the authorizer callback +** is the name of the inner-most trigger or view that is responsible for +** the access attempt or NULL if this access attempt is directly from +** top-level SQL code. +** +** Requirements: +** [H12551] [H12552] [H12553] [H12554] +*/ +/******************************************* 3rd ************ 4th ***********/ +#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */ +#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */ +#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */ +#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */ +#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */ +#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */ +#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */ +#define SQLITE_CREATE_VIEW 8 /* View Name NULL */ +#define SQLITE_DELETE 9 /* Table Name NULL */ +#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */ +#define SQLITE_DROP_TABLE 11 /* Table Name NULL */ +#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */ +#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */ +#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */ +#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */ +#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */ +#define SQLITE_DROP_VIEW 17 /* View Name NULL */ +#define SQLITE_INSERT 18 /* Table Name NULL */ +#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */ +#define SQLITE_READ 20 /* Table Name Column Name */ +#define SQLITE_SELECT 21 /* NULL NULL */ +#define SQLITE_TRANSACTION 22 /* Operation NULL */ +#define SQLITE_UPDATE 23 /* Table Name Column Name */ +#define SQLITE_ATTACH 24 /* Filename NULL */ +#define SQLITE_DETACH 25 /* Database Name NULL */ +#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */ +#define SQLITE_REINDEX 27 /* Index Name NULL */ +#define SQLITE_ANALYZE 28 /* Table Name NULL */ +#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */ +#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */ +#define SQLITE_FUNCTION 31 /* NULL Function Name */ +#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */ +#define SQLITE_COPY 0 /* No longer used */ + +/* +** CAPI3REF: Tracing And Profiling Functions {H12280} +** EXPERIMENTAL +** +** These routines register callback functions that can be used for +** tracing and profiling the execution of SQL statements. +** +** The callback function registered by sqlite3_trace() is invoked at +** various times when an SQL statement is being run by [sqlite3_step()]. +** The callback returns a UTF-8 rendering of the SQL statement text +** as the statement first begins executing. Additional callbacks occur +** as each triggered subprogram is entered. The callbacks for triggers +** contain a UTF-8 SQL comment that identifies the trigger. +** +** The callback function registered by sqlite3_profile() is invoked +** as each SQL statement finishes. The profile callback contains +** the original statement text and an estimate of wall-clock time +** of how long that statement took to run. +** +** Requirements: +** [H12281] [H12282] [H12283] [H12284] [H12285] [H12287] [H12288] [H12289] +** [H12290] +*/ +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*, + void(*xProfile)(void*,const char*,sqlite3_uint64), void*); + +/* +** CAPI3REF: Query Progress Callbacks {H12910} +** +** This routine configures a callback function - the +** progress callback - that is invoked periodically during long +** running calls to [sqlite3_exec()], [sqlite3_step()] and +** [sqlite3_get_table()]. An example use for this +** interface is to keep a GUI updated during a large query. +** +** If the progress callback returns non-zero, the operation is +** interrupted. This feature can be used to implement a +** "Cancel" button on a GUI progress dialog box. +** +** The progress handler must not do anything that will modify +** the database connection that invoked the progress handler. +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their +** database connections for the meaning of "modify" in this paragraph. +** +** Requirements: +** [H12911] [H12912] [H12913] [H12914] [H12915] [H12916] [H12917] [H12918] +** +*/ +SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); + +/* +** CAPI3REF: Opening A New Database Connection {H12700} +** +** These routines open an SQLite database file whose name is given by the +** filename argument. The filename argument is interpreted as UTF-8 for +** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte +** order for sqlite3_open16(). A [database connection] handle is usually +** returned in *ppDb, even if an error occurs. The only exception is that +** if SQLite is unable to allocate memory to hold the [sqlite3] object, +** a NULL will be written into *ppDb instead of a pointer to the [sqlite3] +** object. If the database is opened (and/or created) successfully, then +** [SQLITE_OK] is returned. Otherwise an [error code] is returned. The +** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain +** an English language description of the error. +** +** The default encoding for the database will be UTF-8 if +** sqlite3_open() or sqlite3_open_v2() is called and +** UTF-16 in the native byte order if sqlite3_open16() is used. +** +** Whether or not an error occurs when it is opened, resources +** associated with the [database connection] handle should be released by +** passing it to [sqlite3_close()] when it is no longer required. +** +** The sqlite3_open_v2() interface works like sqlite3_open() +** except that it accepts two additional parameters for additional control +** over the new database connection. The flags parameter can take one of +** the following three values, optionally combined with the +** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE], +** and/or [SQLITE_OPEN_PRIVATECACHE] flags: +** +**
+**
[SQLITE_OPEN_READONLY]
+**
The database is opened in read-only mode. If the database does not +** already exist, an error is returned.
+** +**
[SQLITE_OPEN_READWRITE]
+**
The database is opened for reading and writing if possible, or reading +** only if the file is write protected by the operating system. In either +** case the database must already exist, otherwise an error is returned.
+** +**
[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
+**
The database is opened for reading and writing, and is creates it if +** it does not already exist. This is the behavior that is always used for +** sqlite3_open() and sqlite3_open16().
+**
+** +** If the 3rd parameter to sqlite3_open_v2() is not one of the +** combinations shown above or one of the combinations shown above combined +** with the [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], +** [SQLITE_OPEN_SHAREDCACHE] and/or [SQLITE_OPEN_SHAREDCACHE] flags, +** then the behavior is undefined. +** +** If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection +** opens in the multi-thread [threading mode] as long as the single-thread +** mode has not been set at compile-time or start-time. If the +** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens +** in the serialized [threading mode] unless single-thread was +** previously selected at compile-time or start-time. +** The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be +** eligible to use [shared cache mode], regardless of whether or not shared +** cache is enabled using [sqlite3_enable_shared_cache()]. The +** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not +** participate in [shared cache mode] even if it is enabled. +** +** If the filename is ":memory:", then a private, temporary in-memory database +** is created for the connection. This in-memory database will vanish when +** the database connection is closed. Future versions of SQLite might +** make use of additional special filenames that begin with the ":" character. +** It is recommended that when a database filename actually does begin with +** a ":" character you should prefix the filename with a pathname such as +** "./" to avoid ambiguity. +** +** If the filename is an empty string, then a private, temporary +** on-disk database will be created. This private database will be +** automatically deleted as soon as the database connection is closed. +** +** The fourth parameter to sqlite3_open_v2() is the name of the +** [sqlite3_vfs] object that defines the operating system interface that +** the new database connection should use. If the fourth parameter is +** a NULL pointer then the default [sqlite3_vfs] object is used. +** +** Note to Windows users: The encoding used for the filename argument +** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever +** codepage is currently defined. Filenames containing international +** characters must be converted to UTF-8 prior to passing them into +** sqlite3_open() or sqlite3_open_v2(). +** +** Requirements: +** [H12701] [H12702] [H12703] [H12704] [H12706] [H12707] [H12709] [H12711] +** [H12712] [H12713] [H12714] [H12717] [H12719] [H12721] [H12723] +*/ +SQLITE_API int sqlite3_open( + const char *filename, /* Database filename (UTF-8) */ + sqlite3 **ppDb /* OUT: SQLite db handle */ +); +SQLITE_API int sqlite3_open16( + const void *filename, /* Database filename (UTF-16) */ + sqlite3 **ppDb /* OUT: SQLite db handle */ +); +SQLITE_API int sqlite3_open_v2( + const char *filename, /* Database filename (UTF-8) */ + sqlite3 **ppDb, /* OUT: SQLite db handle */ + int flags, /* Flags */ + const char *zVfs /* Name of VFS module to use */ +); + +/* +** CAPI3REF: Error Codes And Messages {H12800} +** +** The sqlite3_errcode() interface returns the numeric [result code] or +** [extended result code] for the most recent failed sqlite3_* API call +** associated with a [database connection]. If a prior API call failed +** but the most recent API call succeeded, the return value from +** sqlite3_errcode() is undefined. The sqlite3_extended_errcode() +** interface is the same except that it always returns the +** [extended result code] even when extended result codes are +** disabled. +** +** The sqlite3_errmsg() and sqlite3_errmsg16() return English-language +** text that describes the error, as either UTF-8 or UTF-16 respectively. +** Memory to hold the error message string is managed internally. +** The application does not need to worry about freeing the result. +** However, the error string might be overwritten or deallocated by +** subsequent calls to other SQLite interface functions. +** +** When the serialized [threading mode] is in use, it might be the +** case that a second error occurs on a separate thread in between +** the time of the first error and the call to these interfaces. +** When that happens, the second error will be reported since these +** interfaces always report the most recent result. To avoid +** this, each thread can obtain exclusive use of the [database connection] D +** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning +** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after +** all calls to the interfaces listed here are completed. +** +** If an interface fails with SQLITE_MISUSE, that means the interface +** was invoked incorrectly by the application. In that case, the +** error code and message may or may not be set. +** +** Requirements: +** [H12801] [H12802] [H12803] [H12807] [H12808] [H12809] +*/ +SQLITE_API int sqlite3_errcode(sqlite3 *db); +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); +SQLITE_API const char *sqlite3_errmsg(sqlite3*); +SQLITE_API const void *sqlite3_errmsg16(sqlite3*); + +/* +** CAPI3REF: SQL Statement Object {H13000} +** KEYWORDS: {prepared statement} {prepared statements} +** +** An instance of this object represents a single SQL statement. +** This object is variously known as a "prepared statement" or a +** "compiled SQL statement" or simply as a "statement". +** +** The life of a statement object goes something like this: +** +**
    +**
  1. Create the object using [sqlite3_prepare_v2()] or a related +** function. +**
  2. Bind values to [host parameters] using the sqlite3_bind_*() +** interfaces. +**
  3. Run the SQL by calling [sqlite3_step()] one or more times. +**
  4. Reset the statement using [sqlite3_reset()] then go back +** to step 2. Do this zero or more times. +**
  5. Destroy the object using [sqlite3_finalize()]. +**
+** +** Refer to documentation on individual methods above for additional +** information. +*/ +typedef struct sqlite3_stmt sqlite3_stmt; + +/* +** CAPI3REF: Run-time Limits {H12760} +** +** This interface allows the size of various constructs to be limited +** on a connection by connection basis. The first parameter is the +** [database connection] whose limit is to be set or queried. The +** second parameter is one of the [limit categories] that define a +** class of constructs to be size limited. The third parameter is the +** new limit for that construct. The function returns the old limit. +** +** If the new limit is a negative number, the limit is unchanged. +** For the limit category of SQLITE_LIMIT_XYZ there is a +** [limits | hard upper bound] +** set by a compile-time C preprocessor macro named +** [limits | SQLITE_MAX_XYZ]. +** (The "_LIMIT_" in the name is changed to "_MAX_".) +** Attempts to increase a limit above its hard upper bound are +** silently truncated to the hard upper limit. +** +** Run time limits are intended for use in applications that manage +** both their own internal database and also databases that are controlled +** by untrusted external sources. An example application might be a +** web browser that has its own databases for storing history and +** separate databases controlled by JavaScript applications downloaded +** off the Internet. The internal databases can be given the +** large, default limits. Databases managed by external sources can +** be given much smaller limits designed to prevent a denial of service +** attack. Developers might also want to use the [sqlite3_set_authorizer()] +** interface to further control untrusted SQL. The size of the database +** created by an untrusted script can be contained using the +** [max_page_count] [PRAGMA]. +** +** New run-time limit categories may be added in future releases. +** +** Requirements: +** [H12762] [H12766] [H12769] +*/ +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); + +/* +** CAPI3REF: Run-Time Limit Categories {H12790} +** KEYWORDS: {limit category} {*limit categories} +** +** These constants define various performance limits +** that can be lowered at run-time using [sqlite3_limit()]. +** The synopsis of the meanings of the various limits is shown below. +** Additional information is available at [limits | Limits in SQLite]. +** +**
+**
SQLITE_LIMIT_LENGTH
+**
The maximum size of any string or BLOB or table row.
+** +**
SQLITE_LIMIT_SQL_LENGTH
+**
The maximum length of an SQL statement.
+** +**
SQLITE_LIMIT_COLUMN
+**
The maximum number of columns in a table definition or in the +** result set of a [SELECT] or the maximum number of columns in an index +** or in an ORDER BY or GROUP BY clause.
+** +**
SQLITE_LIMIT_EXPR_DEPTH
+**
The maximum depth of the parse tree on any expression.
+** +**
SQLITE_LIMIT_COMPOUND_SELECT
+**
The maximum number of terms in a compound SELECT statement.
+** +**
SQLITE_LIMIT_VDBE_OP
+**
The maximum number of instructions in a virtual machine program +** used to implement an SQL statement.
+** +**
SQLITE_LIMIT_FUNCTION_ARG
+**
The maximum number of arguments on a function.
+** +**
SQLITE_LIMIT_ATTACHED
+**
The maximum number of [ATTACH | attached databases].
+** +**
SQLITE_LIMIT_LIKE_PATTERN_LENGTH
+**
The maximum length of the pattern argument to the [LIKE] or +** [GLOB] operators.
+** +**
SQLITE_LIMIT_VARIABLE_NUMBER
+**
The maximum number of variables in an SQL statement that can +** be bound.
+** +**
SQLITE_LIMIT_TRIGGER_DEPTH
+**
The maximum depth of recursion for triggers.
+**
+*/ +#define SQLITE_LIMIT_LENGTH 0 +#define SQLITE_LIMIT_SQL_LENGTH 1 +#define SQLITE_LIMIT_COLUMN 2 +#define SQLITE_LIMIT_EXPR_DEPTH 3 +#define SQLITE_LIMIT_COMPOUND_SELECT 4 +#define SQLITE_LIMIT_VDBE_OP 5 +#define SQLITE_LIMIT_FUNCTION_ARG 6 +#define SQLITE_LIMIT_ATTACHED 7 +#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8 +#define SQLITE_LIMIT_VARIABLE_NUMBER 9 +#define SQLITE_LIMIT_TRIGGER_DEPTH 10 + +/* +** CAPI3REF: Compiling An SQL Statement {H13010} +** KEYWORDS: {SQL statement compiler} +** +** To execute an SQL query, it must first be compiled into a byte-code +** program using one of these routines. +** +** The first argument, "db", is a [database connection] obtained from a +** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or +** [sqlite3_open16()]. The database connection must not have been closed. +** +** The second argument, "zSql", is the statement to be compiled, encoded +** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2() +** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2() +** use UTF-16. +** +** If the nByte argument is less than zero, then zSql is read up to the +** first zero terminator. If nByte is non-negative, then it is the maximum +** number of bytes read from zSql. When nByte is non-negative, the +** zSql string ends at either the first '\000' or '\u0000' character or +** the nByte-th byte, whichever comes first. If the caller knows +** that the supplied string is nul-terminated, then there is a small +** performance advantage to be gained by passing an nByte parameter that +** is equal to the number of bytes in the input string including +** the nul-terminator bytes. +** +** If pzTail is not NULL then *pzTail is made to point to the first byte +** past the end of the first SQL statement in zSql. These routines only +** compile the first statement in zSql, so *pzTail is left pointing to +** what remains uncompiled. +** +** *ppStmt is left pointing to a compiled [prepared statement] that can be +** executed using [sqlite3_step()]. If there is an error, *ppStmt is set +** to NULL. If the input text contains no SQL (if the input is an empty +** string or a comment) then *ppStmt is set to NULL. +** The calling procedure is responsible for deleting the compiled +** SQL statement using [sqlite3_finalize()] after it has finished with it. +** ppStmt may not be NULL. +** +** On success, [SQLITE_OK] is returned, otherwise an [error code] is returned. +** +** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are +** recommended for all new programs. The two older interfaces are retained +** for backwards compatibility, but their use is discouraged. +** In the "v2" interfaces, the prepared statement +** that is returned (the [sqlite3_stmt] object) contains a copy of the +** original SQL text. This causes the [sqlite3_step()] interface to +** behave a differently in three ways: +** +**
    +**
  1. +** If the database schema changes, instead of returning [SQLITE_SCHEMA] as it +** always used to do, [sqlite3_step()] will automatically recompile the SQL +** statement and try to run it again. If the schema has changed in +** a way that makes the statement no longer valid, [sqlite3_step()] will still +** return [SQLITE_SCHEMA]. But unlike the legacy behavior, [SQLITE_SCHEMA] is +** now a fatal error. Calling [sqlite3_prepare_v2()] again will not make the +** error go away. Note: use [sqlite3_errmsg()] to find the text +** of the parsing error that results in an [SQLITE_SCHEMA] return. +**
  2. +** +**
  3. +** When an error occurs, [sqlite3_step()] will return one of the detailed +** [error codes] or [extended error codes]. The legacy behavior was that +** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code +** and you would have to make a second call to [sqlite3_reset()] in order +** to find the underlying cause of the problem. With the "v2" prepare +** interfaces, the underlying reason for the error is returned immediately. +**
  4. +** +**
  5. +** ^If the value of a [parameter | host parameter] in the WHERE clause might +** change the query plan for a statement, then the statement may be +** automatically recompiled (as if there had been a schema change) on the first +** [sqlite3_step()] call following any change to the +** [sqlite3_bind_text | bindings] of the [parameter]. +**
  6. +**
+** +** Requirements: +** [H13011] [H13012] [H13013] [H13014] [H13015] [H13016] [H13019] [H13021] +** +*/ +SQLITE_API int sqlite3_prepare( + sqlite3 *db, /* Database handle */ + const char *zSql, /* SQL statement, UTF-8 encoded */ + int nByte, /* Maximum length of zSql in bytes. */ + sqlite3_stmt **ppStmt, /* OUT: Statement handle */ + const char **pzTail /* OUT: Pointer to unused portion of zSql */ +); +SQLITE_API int sqlite3_prepare_v2( + sqlite3 *db, /* Database handle */ + const char *zSql, /* SQL statement, UTF-8 encoded */ + int nByte, /* Maximum length of zSql in bytes. */ + sqlite3_stmt **ppStmt, /* OUT: Statement handle */ + const char **pzTail /* OUT: Pointer to unused portion of zSql */ +); +SQLITE_API int sqlite3_prepare16( + sqlite3 *db, /* Database handle */ + const void *zSql, /* SQL statement, UTF-16 encoded */ + int nByte, /* Maximum length of zSql in bytes. */ + sqlite3_stmt **ppStmt, /* OUT: Statement handle */ + const void **pzTail /* OUT: Pointer to unused portion of zSql */ +); +SQLITE_API int sqlite3_prepare16_v2( + sqlite3 *db, /* Database handle */ + const void *zSql, /* SQL statement, UTF-16 encoded */ + int nByte, /* Maximum length of zSql in bytes. */ + sqlite3_stmt **ppStmt, /* OUT: Statement handle */ + const void **pzTail /* OUT: Pointer to unused portion of zSql */ +); + +/* +** CAPI3REF: Retrieving Statement SQL {H13100} +** +** This interface can be used to retrieve a saved copy of the original +** SQL text used to create a [prepared statement] if that statement was +** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. +** +** Requirements: +** [H13101] [H13102] [H13103] +*/ +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); + +/* +** CAPI3REF: Dynamically Typed Value Object {H15000} +** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} +** +** SQLite uses the sqlite3_value object to represent all values +** that can be stored in a database table. SQLite uses dynamic typing +** for the values it stores. Values stored in sqlite3_value objects +** can be integers, floating point values, strings, BLOBs, or NULL. +** +** An sqlite3_value object may be either "protected" or "unprotected". +** Some interfaces require a protected sqlite3_value. Other interfaces +** will accept either a protected or an unprotected sqlite3_value. +** Every interface that accepts sqlite3_value arguments specifies +** whether or not it requires a protected sqlite3_value. +** +** The terms "protected" and "unprotected" refer to whether or not +** a mutex is held. A internal mutex is held for a protected +** sqlite3_value object but no mutex is held for an unprotected +** sqlite3_value object. If SQLite is compiled to be single-threaded +** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) +** or if SQLite is run in one of reduced mutex modes +** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] +** then there is no distinction between protected and unprotected +** sqlite3_value objects and they can be used interchangeably. However, +** for maximum code portability it is recommended that applications +** still make the distinction between between protected and unprotected +** sqlite3_value objects even when not strictly required. +** +** The sqlite3_value objects that are passed as parameters into the +** implementation of [application-defined SQL functions] are protected. +** The sqlite3_value object returned by +** [sqlite3_column_value()] is unprotected. +** Unprotected sqlite3_value objects may only be used with +** [sqlite3_result_value()] and [sqlite3_bind_value()]. +** The [sqlite3_value_blob | sqlite3_value_type()] family of +** interfaces require protected sqlite3_value objects. +*/ +typedef struct Mem sqlite3_value; + +/* +** CAPI3REF: SQL Function Context Object {H16001} +** +** The context in which an SQL function executes is stored in an +** sqlite3_context object. A pointer to an sqlite3_context object +** is always first parameter to [application-defined SQL functions]. +** The application-defined SQL function implementation will pass this +** pointer through into calls to [sqlite3_result_int | sqlite3_result()], +** [sqlite3_aggregate_context()], [sqlite3_user_data()], +** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], +** and/or [sqlite3_set_auxdata()]. +*/ +typedef struct sqlite3_context sqlite3_context; + +/* +** CAPI3REF: Binding Values To Prepared Statements {H13500} +** KEYWORDS: {host parameter} {host parameters} {host parameter name} +** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding} +** +** In the SQL strings input to [sqlite3_prepare_v2()] and its variants, +** literals may be replaced by a [parameter] that matches one of following +** templates: +** +**
    +**
  • ? +**
  • ?NNN +**
  • :VVV +**
  • @VVV +**
  • $VVV +**
+** +** In the templates above, NNN represents an integer literal, +** and VVV represents an alphanumeric identifer. The values of these +** parameters (also called "host parameter names" or "SQL parameters") +** can be set using the sqlite3_bind_*() routines defined here. +** +** The first argument to the sqlite3_bind_*() routines is always +** a pointer to the [sqlite3_stmt] object returned from +** [sqlite3_prepare_v2()] or its variants. +** +** The second argument is the index of the SQL parameter to be set. +** The leftmost SQL parameter has an index of 1. When the same named +** SQL parameter is used more than once, second and subsequent +** occurrences have the same index as the first occurrence. +** The index for named parameters can be looked up using the +** [sqlite3_bind_parameter_index()] API if desired. The index +** for "?NNN" parameters is the value of NNN. +** The NNN value must be between 1 and the [sqlite3_limit()] +** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999). +** +** The third argument is the value to bind to the parameter. +** +** In those routines that have a fourth argument, its value is the +** number of bytes in the parameter. To be clear: the value is the +** number of bytes in the value, not the number of characters. +** If the fourth parameter is negative, the length of the string is +** the number of bytes up to the first zero terminator. +** +** The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and +** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or +** string after SQLite has finished with it. If the fifth argument is +** the special value [SQLITE_STATIC], then SQLite assumes that the +** information is in static, unmanaged space and does not need to be freed. +** If the fifth argument has the value [SQLITE_TRANSIENT], then +** SQLite makes its own private copy of the data immediately, before +** the sqlite3_bind_*() routine returns. +** +** The sqlite3_bind_zeroblob() routine binds a BLOB of length N that +** is filled with zeroes. A zeroblob uses a fixed amount of memory +** (just an integer to hold its size) while it is being processed. +** Zeroblobs are intended to serve as placeholders for BLOBs whose +** content is later written using +** [sqlite3_blob_open | incremental BLOB I/O] routines. +** A negative value for the zeroblob results in a zero-length BLOB. +** +** The sqlite3_bind_*() routines must be called after +** [sqlite3_prepare_v2()] (and its variants) or [sqlite3_reset()] and +** before [sqlite3_step()]. +** Bindings are not cleared by the [sqlite3_reset()] routine. +** Unbound parameters are interpreted as NULL. +** +** These routines return [SQLITE_OK] on success or an error code if +** anything goes wrong. [SQLITE_RANGE] is returned if the parameter +** index is out of range. [SQLITE_NOMEM] is returned if malloc() fails. +** [SQLITE_MISUSE] might be returned if these routines are called on a +** virtual machine that is the wrong state or which has already been finalized. +** Detection of misuse is unreliable. Applications should not depend +** on SQLITE_MISUSE returns. SQLITE_MISUSE is intended to indicate a +** a logic error in the application. Future versions of SQLite might +** panic rather than return SQLITE_MISUSE. +** +** See also: [sqlite3_bind_parameter_count()], +** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. +** +** Requirements: +** [H13506] [H13509] [H13512] [H13515] [H13518] [H13521] [H13524] [H13527] +** [H13530] [H13533] [H13536] [H13539] [H13542] [H13545] [H13548] [H13551] +** +*/ +SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); +SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double); +SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int); +SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); +SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int); +SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*)); +SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); +SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); +SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); + +/* +** CAPI3REF: Number Of SQL Parameters {H13600} +** +** This routine can be used to find the number of [SQL parameters] +** in a [prepared statement]. SQL parameters are tokens of the +** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as +** placeholders for values that are [sqlite3_bind_blob | bound] +** to the parameters at a later time. +** +** This routine actually returns the index of the largest (rightmost) +** parameter. For all forms except ?NNN, this will correspond to the +** number of unique parameters. If parameters of the ?NNN are used, +** there may be gaps in the list. +** +** See also: [sqlite3_bind_blob|sqlite3_bind()], +** [sqlite3_bind_parameter_name()], and +** [sqlite3_bind_parameter_index()]. +** +** Requirements: +** [H13601] +*/ +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); + +/* +** CAPI3REF: Name Of A Host Parameter {H13620} +** +** This routine returns a pointer to the name of the n-th +** [SQL parameter] in a [prepared statement]. +** SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA" +** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA" +** respectively. +** In other words, the initial ":" or "$" or "@" or "?" +** is included as part of the name. +** Parameters of the form "?" without a following integer have no name +** and are also referred to as "anonymous parameters". +** +** The first host parameter has an index of 1, not 0. +** +** If the value n is out of range or if the n-th parameter is +** nameless, then NULL is returned. The returned string is +** always in UTF-8 encoding even if the named parameter was +** originally specified as UTF-16 in [sqlite3_prepare16()] or +** [sqlite3_prepare16_v2()]. +** +** See also: [sqlite3_bind_blob|sqlite3_bind()], +** [sqlite3_bind_parameter_count()], and +** [sqlite3_bind_parameter_index()]. +** +** Requirements: +** [H13621] +*/ +SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); + +/* +** CAPI3REF: Index Of A Parameter With A Given Name {H13640} +** +** Return the index of an SQL parameter given its name. The +** index value returned is suitable for use as the second +** parameter to [sqlite3_bind_blob|sqlite3_bind()]. A zero +** is returned if no matching parameter is found. The parameter +** name must be given in UTF-8 even if the original statement +** was prepared from UTF-16 text using [sqlite3_prepare16_v2()]. +** +** See also: [sqlite3_bind_blob|sqlite3_bind()], +** [sqlite3_bind_parameter_count()], and +** [sqlite3_bind_parameter_index()]. +** +** Requirements: +** [H13641] +*/ +SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); + +/* +** CAPI3REF: Reset All Bindings On A Prepared Statement {H13660} +** +** Contrary to the intuition of many, [sqlite3_reset()] does not reset +** the [sqlite3_bind_blob | bindings] on a [prepared statement]. +** Use this routine to reset all host parameters to NULL. +** +** Requirements: +** [H13661] +*/ +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); + +/* +** CAPI3REF: Number Of Columns In A Result Set {H13710} +** +** Return the number of columns in the result set returned by the +** [prepared statement]. This routine returns 0 if pStmt is an SQL +** statement that does not return data (for example an [UPDATE]). +** +** Requirements: +** [H13711] +*/ +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); + +/* +** CAPI3REF: Column Names In A Result Set {H13720} +** +** These routines return the name assigned to a particular column +** in the result set of a [SELECT] statement. The sqlite3_column_name() +** interface returns a pointer to a zero-terminated UTF-8 string +** and sqlite3_column_name16() returns a pointer to a zero-terminated +** UTF-16 string. The first parameter is the [prepared statement] +** that implements the [SELECT] statement. The second parameter is the +** column number. The leftmost column is number 0. +** +** The returned string pointer is valid until either the [prepared statement] +** is destroyed by [sqlite3_finalize()] or until the next call to +** sqlite3_column_name() or sqlite3_column_name16() on the same column. +** +** If sqlite3_malloc() fails during the processing of either routine +** (for example during a conversion from UTF-8 to UTF-16) then a +** NULL pointer is returned. +** +** The name of a result column is the value of the "AS" clause for +** that column, if there is an AS clause. If there is no AS clause +** then the name of the column is unspecified and may change from +** one release of SQLite to the next. +** +** Requirements: +** [H13721] [H13723] [H13724] [H13725] [H13726] [H13727] +*/ +SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N); +SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); + +/* +** CAPI3REF: Source Of Data In A Query Result {H13740} +** +** These routines provide a means to determine what column of what +** table in which database a result of a [SELECT] statement comes from. +** The name of the database or table or column can be returned as +** either a UTF-8 or UTF-16 string. The _database_ routines return +** the database name, the _table_ routines return the table name, and +** the origin_ routines return the column name. +** The returned string is valid until the [prepared statement] is destroyed +** using [sqlite3_finalize()] or until the same information is requested +** again in a different encoding. +** +** The names returned are the original un-aliased names of the +** database, table, and column. +** +** The first argument to the following calls is a [prepared statement]. +** These functions return information about the Nth column returned by +** the statement, where N is the second function argument. +** +** If the Nth column returned by the statement is an expression or +** subquery and is not a column value, then all of these functions return +** NULL. These routine might also return NULL if a memory allocation error +** occurs. Otherwise, they return the name of the attached database, table +** and column that query result column was extracted from. +** +** As with all other SQLite APIs, those postfixed with "16" return +** UTF-16 encoded strings, the other functions return UTF-8. {END} +** +** These APIs are only available if the library was compiled with the +** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined. +** +** {A13751} +** If two or more threads call one or more of these routines against the same +** prepared statement and column at the same time then the results are +** undefined. +** +** Requirements: +** [H13741] [H13742] [H13743] [H13744] [H13745] [H13746] [H13748] +** +** If two or more threads call one or more +** [sqlite3_column_database_name | column metadata interfaces] +** for the same [prepared statement] and result column +** at the same time then the results are undefined. +*/ +SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int); +SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); + +/* +** CAPI3REF: Declared Datatype Of A Query Result {H13760} +** +** The first parameter is a [prepared statement]. +** If this statement is a [SELECT] statement and the Nth column of the +** returned result set of that [SELECT] is a table column (not an +** expression or subquery) then the declared type of the table +** column is returned. If the Nth column of the result set is an +** expression or subquery, then a NULL pointer is returned. +** The returned string is always UTF-8 encoded. {END} +** +** For example, given the database schema: +** +** CREATE TABLE t1(c1 VARIANT); +** +** and the following statement to be compiled: +** +** SELECT c1 + 1, c1 FROM t1; +** +** this routine would return the string "VARIANT" for the second result +** column (i==1), and a NULL pointer for the first result column (i==0). +** +** SQLite uses dynamic run-time typing. So just because a column +** is declared to contain a particular type does not mean that the +** data stored in that column is of the declared type. SQLite is +** strongly typed, but the typing is dynamic not static. Type +** is associated with individual values, not with the containers +** used to hold those values. +** +** Requirements: +** [H13761] [H13762] [H13763] +*/ +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); + +/* +** CAPI3REF: Evaluate An SQL Statement {H13200} +** +** After a [prepared statement] has been prepared using either +** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy +** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function +** must be called one or more times to evaluate the statement. +** +** The details of the behavior of the sqlite3_step() interface depend +** on whether the statement was prepared using the newer "v2" interface +** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy +** interface [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the +** new "v2" interface is recommended for new applications but the legacy +** interface will continue to be supported. +** +** In the legacy interface, the return value will be either [SQLITE_BUSY], +** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE]. +** With the "v2" interface, any of the other [result codes] or +** [extended result codes] might be returned as well. +** +** [SQLITE_BUSY] means that the database engine was unable to acquire the +** database locks it needs to do its job. If the statement is a [COMMIT] +** or occurs outside of an explicit transaction, then you can retry the +** statement. If the statement is not a [COMMIT] and occurs within a +** explicit transaction then you should rollback the transaction before +** continuing. +** +** [SQLITE_DONE] means that the statement has finished executing +** successfully. sqlite3_step() should not be called again on this virtual +** machine without first calling [sqlite3_reset()] to reset the virtual +** machine back to its initial state. +** +** If the SQL statement being executed returns any data, then [SQLITE_ROW] +** is returned each time a new row of data is ready for processing by the +** caller. The values may be accessed using the [column access functions]. +** sqlite3_step() is called again to retrieve the next row of data. +** +** [SQLITE_ERROR] means that a run-time error (such as a constraint +** violation) has occurred. sqlite3_step() should not be called again on +** the VM. More information may be found by calling [sqlite3_errmsg()]. +** With the legacy interface, a more specific error code (for example, +** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth) +** can be obtained by calling [sqlite3_reset()] on the +** [prepared statement]. In the "v2" interface, +** the more specific error code is returned directly by sqlite3_step(). +** +** [SQLITE_MISUSE] means that the this routine was called inappropriately. +** Perhaps it was called on a [prepared statement] that has +** already been [sqlite3_finalize | finalized] or on one that had +** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could +** be the case that the same database connection is being used by two or +** more threads at the same moment in time. +** +** Goofy Interface Alert: In the legacy interface, the sqlite3_step() +** API always returns a generic error code, [SQLITE_ERROR], following any +** error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call +** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the +** specific [error codes] that better describes the error. +** We admit that this is a goofy design. The problem has been fixed +** with the "v2" interface. If you prepare all of your SQL statements +** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead +** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, +** then the more specific [error codes] are returned directly +** by sqlite3_step(). The use of the "v2" interface is recommended. +** +** Requirements: +** [H13202] [H15304] [H15306] [H15308] [H15310] +*/ +SQLITE_API int sqlite3_step(sqlite3_stmt*); + +/* +** CAPI3REF: Number of columns in a result set {H13770} +** +** Returns the number of values in the current row of the result set. +** +** Requirements: +** [H13771] [H13772] +*/ +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); + +/* +** CAPI3REF: Fundamental Datatypes {H10265} +** KEYWORDS: SQLITE_TEXT +** +** {H10266} Every value in SQLite has one of five fundamental datatypes: +** +**
    +**
  • 64-bit signed integer +**
  • 64-bit IEEE floating point number +**
  • string +**
  • BLOB +**
  • NULL +**
{END} +** +** These constants are codes for each of those types. +** +** Note that the SQLITE_TEXT constant was also used in SQLite version 2 +** for a completely different meaning. Software that links against both +** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not +** SQLITE_TEXT. +*/ +#define SQLITE_INTEGER 1 +#define SQLITE_FLOAT 2 +#define SQLITE_BLOB 4 +#define SQLITE_NULL 5 +#ifdef SQLITE_TEXT +# undef SQLITE_TEXT +#else +# define SQLITE_TEXT 3 +#endif +#define SQLITE3_TEXT 3 + +/* +** CAPI3REF: Result Values From A Query {H13800} +** KEYWORDS: {column access functions} +** +** These routines form the "result set query" interface. +** +** These routines return information about a single column of the current +** result row of a query. In every case the first argument is a pointer +** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*] +** that was returned from [sqlite3_prepare_v2()] or one of its variants) +** and the second argument is the index of the column for which information +** should be returned. The leftmost column of the result set has the index 0. +** The number of columns in the result can be determined using +** [sqlite3_column_count()]. +** +** If the SQL statement does not currently point to a valid row, or if the +** column index is out of range, the result is undefined. +** These routines may only be called when the most recent call to +** [sqlite3_step()] has returned [SQLITE_ROW] and neither +** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently. +** If any of these routines are called after [sqlite3_reset()] or +** [sqlite3_finalize()] or after [sqlite3_step()] has returned +** something other than [SQLITE_ROW], the results are undefined. +** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()] +** are called from a different thread while any of these routines +** are pending, then the results are undefined. +** +** The sqlite3_column_type() routine returns the +** [SQLITE_INTEGER | datatype code] for the initial data type +** of the result column. The returned value is one of [SQLITE_INTEGER], +** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value +** returned by sqlite3_column_type() is only meaningful if no type +** conversions have occurred as described below. After a type conversion, +** the value returned by sqlite3_column_type() is undefined. Future +** versions of SQLite may change the behavior of sqlite3_column_type() +** following a type conversion. +** +** If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() +** routine returns the number of bytes in that BLOB or string. +** If the result is a UTF-16 string, then sqlite3_column_bytes() converts +** the string to UTF-8 and then returns the number of bytes. +** If the result is a numeric value then sqlite3_column_bytes() uses +** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns +** the number of bytes in that string. +** The value returned does not include the zero terminator at the end +** of the string. For clarity: the value returned is the number of +** bytes in the string, not the number of characters. +** +** Strings returned by sqlite3_column_text() and sqlite3_column_text16(), +** even empty strings, are always zero terminated. The return +** value from sqlite3_column_blob() for a zero-length BLOB is an arbitrary +** pointer, possibly even a NULL pointer. +** +** The sqlite3_column_bytes16() routine is similar to sqlite3_column_bytes() +** but leaves the result in UTF-16 in native byte order instead of UTF-8. +** The zero terminator is not included in this count. +** +** The object returned by [sqlite3_column_value()] is an +** [unprotected sqlite3_value] object. An unprotected sqlite3_value object +** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()]. +** If the [unprotected sqlite3_value] object returned by +** [sqlite3_column_value()] is used in any other way, including calls +** to routines like [sqlite3_value_int()], [sqlite3_value_text()], +** or [sqlite3_value_bytes()], then the behavior is undefined. +** +** These routines attempt to convert the value where appropriate. For +** example, if the internal representation is FLOAT and a text result +** is requested, [sqlite3_snprintf()] is used internally to perform the +** conversion automatically. The following table details the conversions +** that are applied: +** +**
+** +**
Internal
Type
Requested
Type
Conversion +** +**
NULL INTEGER Result is 0 +**
NULL FLOAT Result is 0.0 +**
NULL TEXT Result is NULL pointer +**
NULL BLOB Result is NULL pointer +**
INTEGER FLOAT Convert from integer to float +**
INTEGER TEXT ASCII rendering of the integer +**
INTEGER BLOB Same as INTEGER->TEXT +**
FLOAT INTEGER Convert from float to integer +**
FLOAT TEXT ASCII rendering of the float +**
FLOAT BLOB Same as FLOAT->TEXT +**
TEXT INTEGER Use atoi() +**
TEXT FLOAT Use atof() +**
TEXT BLOB No change +**
BLOB INTEGER Convert to TEXT then use atoi() +**
BLOB FLOAT Convert to TEXT then use atof() +**
BLOB TEXT Add a zero terminator if needed +**
+**
+** +** The table above makes reference to standard C library functions atoi() +** and atof(). SQLite does not really use these functions. It has its +** own equivalent internal routines. The atoi() and atof() names are +** used in the table for brevity and because they are familiar to most +** C programmers. +** +** Note that when type conversions occur, pointers returned by prior +** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or +** sqlite3_column_text16() may be invalidated. +** Type conversions and pointer invalidations might occur +** in the following cases: +** +**
    +**
  • The initial content is a BLOB and sqlite3_column_text() or +** sqlite3_column_text16() is called. A zero-terminator might +** need to be added to the string.
  • +**
  • The initial content is UTF-8 text and sqlite3_column_bytes16() or +** sqlite3_column_text16() is called. The content must be converted +** to UTF-16.
  • +**
  • The initial content is UTF-16 text and sqlite3_column_bytes() or +** sqlite3_column_text() is called. The content must be converted +** to UTF-8.
  • +**
+** +** Conversions between UTF-16be and UTF-16le are always done in place and do +** not invalidate a prior pointer, though of course the content of the buffer +** that the prior pointer points to will have been modified. Other kinds +** of conversion are done in place when it is possible, but sometimes they +** are not possible and in those cases prior pointers are invalidated. +** +** The safest and easiest to remember policy is to invoke these routines +** in one of the following ways: +** +**
    +**
  • sqlite3_column_text() followed by sqlite3_column_bytes()
  • +**
  • sqlite3_column_blob() followed by sqlite3_column_bytes()
  • +**
  • sqlite3_column_text16() followed by sqlite3_column_bytes16()
  • +**
+** +** In other words, you should call sqlite3_column_text(), +** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result +** into the desired format, then invoke sqlite3_column_bytes() or +** sqlite3_column_bytes16() to find the size of the result. Do not mix calls +** to sqlite3_column_text() or sqlite3_column_blob() with calls to +** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() +** with calls to sqlite3_column_bytes(). +** +** The pointers returned are valid until a type conversion occurs as +** described above, or until [sqlite3_step()] or [sqlite3_reset()] or +** [sqlite3_finalize()] is called. The memory space used to hold strings +** and BLOBs is freed automatically. Do not pass the pointers returned +** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into +** [sqlite3_free()]. +** +** If a memory allocation error occurs during the evaluation of any +** of these routines, a default value is returned. The default value +** is either the integer 0, the floating point number 0.0, or a NULL +** pointer. Subsequent calls to [sqlite3_errcode()] will return +** [SQLITE_NOMEM]. +** +** Requirements: +** [H13803] [H13806] [H13809] [H13812] [H13815] [H13818] [H13821] [H13824] +** [H13827] [H13830] +*/ +SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); +SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol); +SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); +SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); +SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); +SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol); +SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); + +/* +** CAPI3REF: Destroy A Prepared Statement Object {H13300} +** +** The sqlite3_finalize() function is called to delete a [prepared statement]. +** If the statement was executed successfully or not executed at all, then +** SQLITE_OK is returned. If execution of the statement failed then an +** [error code] or [extended error code] is returned. +** +** This routine can be called at any point during the execution of the +** [prepared statement]. If the virtual machine has not +** completed execution when this routine is called, that is like +** encountering an error or an [sqlite3_interrupt | interrupt]. +** Incomplete updates may be rolled back and transactions canceled, +** depending on the circumstances, and the +** [error code] returned will be [SQLITE_ABORT]. +** +** Requirements: +** [H11302] [H11304] +*/ +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); + +/* +** CAPI3REF: Reset A Prepared Statement Object {H13330} +** +** The sqlite3_reset() function is called to reset a [prepared statement] +** object back to its initial state, ready to be re-executed. +** Any SQL statement variables that had values bound to them using +** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values. +** Use [sqlite3_clear_bindings()] to reset the bindings. +** +** {H11332} The [sqlite3_reset(S)] interface resets the [prepared statement] S +** back to the beginning of its program. +** +** {H11334} If the most recent call to [sqlite3_step(S)] for the +** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], +** or if [sqlite3_step(S)] has never before been called on S, +** then [sqlite3_reset(S)] returns [SQLITE_OK]. +** +** {H11336} If the most recent call to [sqlite3_step(S)] for the +** [prepared statement] S indicated an error, then +** [sqlite3_reset(S)] returns an appropriate [error code]. +** +** {H11338} The [sqlite3_reset(S)] interface does not change the values +** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. +*/ +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); + +/* +** CAPI3REF: Create Or Redefine SQL Functions {H16100} +** KEYWORDS: {function creation routines} +** KEYWORDS: {application-defined SQL function} +** KEYWORDS: {application-defined SQL functions} +** +** These two functions (collectively known as "function creation routines") +** are used to add SQL functions or aggregates or to redefine the behavior +** of existing SQL functions or aggregates. The only difference between the +** two is that the second parameter, the name of the (scalar) function or +** aggregate, is encoded in UTF-8 for sqlite3_create_function() and UTF-16 +** for sqlite3_create_function16(). +** +** The first parameter is the [database connection] to which the SQL +** function is to be added. If a single program uses more than one database +** connection internally, then SQL functions must be added individually to +** each database connection. +** +** The second parameter is the name of the SQL function to be created or +** redefined. The length of the name is limited to 255 bytes, exclusive of +** the zero-terminator. Note that the name length limit is in bytes, not +** characters. Any attempt to create a function with a longer name +** will result in [SQLITE_ERROR] being returned. +** +** The third parameter (nArg) +** is the number of arguments that the SQL function or +** aggregate takes. If this parameter is -1, then the SQL function or +** aggregate may take any number of arguments between 0 and the limit +** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third +** parameter is less than -1 or greater than 127 then the behavior is +** undefined. +** +** The fourth parameter, eTextRep, specifies what +** [SQLITE_UTF8 | text encoding] this SQL function prefers for +** its parameters. Any SQL function implementation should be able to work +** work with UTF-8, UTF-16le, or UTF-16be. But some implementations may be +** more efficient with one encoding than another. An application may +** invoke sqlite3_create_function() or sqlite3_create_function16() multiple +** times with the same function but with different values of eTextRep. +** When multiple implementations of the same function are available, SQLite +** will pick the one that involves the least amount of data conversion. +** If there is only a single implementation which does not care what text +** encoding is used, then the fourth argument should be [SQLITE_ANY]. +** +** The fifth parameter is an arbitrary pointer. The implementation of the +** function can gain access to this pointer using [sqlite3_user_data()]. +** +** The seventh, eighth and ninth parameters, xFunc, xStep and xFinal, are +** pointers to C-language functions that implement the SQL function or +** aggregate. A scalar SQL function requires an implementation of the xFunc +** callback only, NULL pointers should be passed as the xStep and xFinal +** parameters. An aggregate SQL function requires an implementation of xStep +** and xFinal and NULL should be passed for xFunc. To delete an existing +** SQL function or aggregate, pass NULL for all three function callbacks. +** +** It is permitted to register multiple implementations of the same +** functions with the same name but with either differing numbers of +** arguments or differing preferred text encodings. SQLite will use +** the implementation that most closely matches the way in which the +** SQL function is used. A function implementation with a non-negative +** nArg parameter is a better match than a function implementation with +** a negative nArg. A function where the preferred text encoding +** matches the database encoding is a better +** match than a function where the encoding is different. +** A function where the encoding difference is between UTF16le and UTF16be +** is a closer match than a function where the encoding difference is +** between UTF8 and UTF16. +** +** Built-in functions may be overloaded by new application-defined functions. +** The first application-defined function with a given name overrides all +** built-in functions in the same [database connection] with the same name. +** Subsequent application-defined functions of the same name only override +** prior application-defined functions that are an exact match for the +** number of parameters and preferred encoding. +** +** An application-defined function is permitted to call other +** SQLite interfaces. However, such calls must not +** close the database connection nor finalize or reset the prepared +** statement in which the function is running. +** +** Requirements: +** [H16103] [H16106] [H16109] [H16112] [H16118] [H16121] [H16127] +** [H16130] [H16133] [H16136] [H16139] [H16142] +*/ +SQLITE_API int sqlite3_create_function( + sqlite3 *db, + const char *zFunctionName, + int nArg, + int eTextRep, + void *pApp, + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), + void (*xStep)(sqlite3_context*,int,sqlite3_value**), + void (*xFinal)(sqlite3_context*) +); +SQLITE_API int sqlite3_create_function16( + sqlite3 *db, + const void *zFunctionName, + int nArg, + int eTextRep, + void *pApp, + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), + void (*xStep)(sqlite3_context*,int,sqlite3_value**), + void (*xFinal)(sqlite3_context*) +); + +/* +** CAPI3REF: Text Encodings {H10267} +** +** These constant define integer codes that represent the various +** text encodings supported by SQLite. +*/ +#define SQLITE_UTF8 1 +#define SQLITE_UTF16LE 2 +#define SQLITE_UTF16BE 3 +#define SQLITE_UTF16 4 /* Use native byte order */ +#define SQLITE_ANY 5 /* sqlite3_create_function only */ +#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */ + +/* +** CAPI3REF: Deprecated Functions +** DEPRECATED +** +** These functions are [deprecated]. In order to maintain +** backwards compatibility with older code, these functions continue +** to be supported. However, new applications should avoid +** the use of these functions. To help encourage people to avoid +** using these functions, we are not going to tell you what they do. +*/ +#ifndef SQLITE_OMIT_DEPRECATED +SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); +SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void); +SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); +SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64); +#endif + +/* +** CAPI3REF: Obtaining SQL Function Parameter Values {H15100} +** +** The C-language implementation of SQL functions and aggregates uses +** this set of interface routines to access the parameter values on +** the function or aggregate. +** +** The xFunc (for scalar functions) or xStep (for aggregates) parameters +** to [sqlite3_create_function()] and [sqlite3_create_function16()] +** define callbacks that implement the SQL functions and aggregates. +** The 4th parameter to these callbacks is an array of pointers to +** [protected sqlite3_value] objects. There is one [sqlite3_value] object for +** each parameter to the SQL function. These routines are used to +** extract values from the [sqlite3_value] objects. +** +** These routines work only with [protected sqlite3_value] objects. +** Any attempt to use these routines on an [unprotected sqlite3_value] +** object results in undefined behavior. +** +** These routines work just like the corresponding [column access functions] +** except that these routines take a single [protected sqlite3_value] object +** pointer instead of a [sqlite3_stmt*] pointer and an integer column number. +** +** The sqlite3_value_text16() interface extracts a UTF-16 string +** in the native byte-order of the host machine. The +** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces +** extract UTF-16 strings as big-endian and little-endian respectively. +** +** The sqlite3_value_numeric_type() interface attempts to apply +** numeric affinity to the value. This means that an attempt is +** made to convert the value to an integer or floating point. If +** such a conversion is possible without loss of information (in other +** words, if the value is a string that looks like a number) +** then the conversion is performed. Otherwise no conversion occurs. +** The [SQLITE_INTEGER | datatype] after conversion is returned. +** +** Please pay particular attention to the fact that the pointer returned +** from [sqlite3_value_blob()], [sqlite3_value_text()], or +** [sqlite3_value_text16()] can be invalidated by a subsequent call to +** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()], +** or [sqlite3_value_text16()]. +** +** These routines must be called from the same thread as +** the SQL function that supplied the [sqlite3_value*] parameters. +** +** Requirements: +** [H15103] [H15106] [H15109] [H15112] [H15115] [H15118] [H15121] [H15124] +** [H15127] [H15130] [H15133] [H15136] +*/ +SQLITE_API const void *sqlite3_value_blob(sqlite3_value*); +SQLITE_API int sqlite3_value_bytes(sqlite3_value*); +SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); +SQLITE_API double sqlite3_value_double(sqlite3_value*); +SQLITE_API int sqlite3_value_int(sqlite3_value*); +SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*); +SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*); +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*); +SQLITE_API int sqlite3_value_type(sqlite3_value*); +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); + +/* +** CAPI3REF: Obtain Aggregate Function Context {H16210} +** +** The implementation of aggregate SQL functions use this routine to allocate +** a structure for storing their state. +** +** The first time the sqlite3_aggregate_context() routine is called for a +** particular aggregate, SQLite allocates nBytes of memory, zeroes out that +** memory, and returns a pointer to it. On second and subsequent calls to +** sqlite3_aggregate_context() for the same aggregate function index, +** the same buffer is returned. The implementation of the aggregate can use +** the returned buffer to accumulate data. +** +** SQLite automatically frees the allocated buffer when the aggregate +** query concludes. +** +** The first parameter should be a copy of the +** [sqlite3_context | SQL function context] that is the first parameter +** to the callback routine that implements the aggregate function. +** +** This routine must be called from the same thread in which +** the aggregate SQL function is running. +** +** Requirements: +** [H16211] [H16213] [H16215] [H16217] +*/ +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); + +/* +** CAPI3REF: User Data For Functions {H16240} +** +** The sqlite3_user_data() interface returns a copy of +** the pointer that was the pUserData parameter (the 5th parameter) +** of the [sqlite3_create_function()] +** and [sqlite3_create_function16()] routines that originally +** registered the application defined function. {END} +** +** This routine must be called from the same thread in which +** the application-defined function is running. +** +** Requirements: +** [H16243] +*/ +SQLITE_API void *sqlite3_user_data(sqlite3_context*); + +/* +** CAPI3REF: Database Connection For Functions {H16250} +** +** The sqlite3_context_db_handle() interface returns a copy of +** the pointer to the [database connection] (the 1st parameter) +** of the [sqlite3_create_function()] +** and [sqlite3_create_function16()] routines that originally +** registered the application defined function. +** +** Requirements: +** [H16253] +*/ +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); + +/* +** CAPI3REF: Function Auxiliary Data {H16270} +** +** The following two functions may be used by scalar SQL functions to +** associate metadata with argument values. If the same value is passed to +** multiple invocations of the same SQL function during query execution, under +** some circumstances the associated metadata may be preserved. This may +** be used, for example, to add a regular-expression matching scalar +** function. The compiled version of the regular expression is stored as +** metadata associated with the SQL value passed as the regular expression +** pattern. The compiled regular expression can be reused on multiple +** invocations of the same function so that the original pattern string +** does not need to be recompiled on each invocation. +** +** The sqlite3_get_auxdata() interface returns a pointer to the metadata +** associated by the sqlite3_set_auxdata() function with the Nth argument +** value to the application-defined function. If no metadata has been ever +** been set for the Nth argument of the function, or if the corresponding +** function parameter has changed since the meta-data was set, +** then sqlite3_get_auxdata() returns a NULL pointer. +** +** The sqlite3_set_auxdata() interface saves the metadata +** pointed to by its 3rd parameter as the metadata for the N-th +** argument of the application-defined function. Subsequent +** calls to sqlite3_get_auxdata() might return this data, if it has +** not been destroyed. +** If it is not NULL, SQLite will invoke the destructor +** function given by the 4th parameter to sqlite3_set_auxdata() on +** the metadata when the corresponding function parameter changes +** or when the SQL statement completes, whichever comes first. +** +** SQLite is free to call the destructor and drop metadata on any +** parameter of any function at any time. The only guarantee is that +** the destructor will be called before the metadata is dropped. +** +** In practice, metadata is preserved between function calls for +** expressions that are constant at compile time. This includes literal +** values and SQL variables. +** +** These routines must be called from the same thread in which +** the SQL function is running. +** +** Requirements: +** [H16272] [H16274] [H16276] [H16277] [H16278] [H16279] +*/ +SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N); +SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); + + +/* +** CAPI3REF: Constants Defining Special Destructor Behavior {H10280} +** +** These are special values for the destructor that is passed in as the +** final argument to routines like [sqlite3_result_blob()]. If the destructor +** argument is SQLITE_STATIC, it means that the content pointer is constant +** and will never change. It does not need to be destroyed. The +** SQLITE_TRANSIENT value means that the content will likely change in +** the near future and that SQLite should make its own private copy of +** the content before returning. +** +** The typedef is necessary to work around problems in certain +** C++ compilers. See ticket #2191. +*/ +typedef void (*sqlite3_destructor_type)(void*); +#define SQLITE_STATIC ((sqlite3_destructor_type)0) +#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) + +/* +** CAPI3REF: Setting The Result Of An SQL Function {H16400} +** +** These routines are used by the xFunc or xFinal callbacks that +** implement SQL functions and aggregates. See +** [sqlite3_create_function()] and [sqlite3_create_function16()] +** for additional information. +** +** These functions work very much like the [parameter binding] family of +** functions used to bind values to host parameters in prepared statements. +** Refer to the [SQL parameter] documentation for additional information. +** +** The sqlite3_result_blob() interface sets the result from +** an application-defined function to be the BLOB whose content is pointed +** to by the second parameter and which is N bytes long where N is the +** third parameter. +** +** The sqlite3_result_zeroblob() interfaces set the result of +** the application-defined function to be a BLOB containing all zero +** bytes and N bytes in size, where N is the value of the 2nd parameter. +** +** The sqlite3_result_double() interface sets the result from +** an application-defined function to be a floating point value specified +** by its 2nd argument. +** +** The sqlite3_result_error() and sqlite3_result_error16() functions +** cause the implemented SQL function to throw an exception. +** SQLite uses the string pointed to by the +** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16() +** as the text of an error message. SQLite interprets the error +** message string from sqlite3_result_error() as UTF-8. SQLite +** interprets the string from sqlite3_result_error16() as UTF-16 in native +** byte order. If the third parameter to sqlite3_result_error() +** or sqlite3_result_error16() is negative then SQLite takes as the error +** message all text up through the first zero character. +** If the third parameter to sqlite3_result_error() or +** sqlite3_result_error16() is non-negative then SQLite takes that many +** bytes (not characters) from the 2nd parameter as the error message. +** The sqlite3_result_error() and sqlite3_result_error16() +** routines make a private copy of the error message text before +** they return. Hence, the calling function can deallocate or +** modify the text after they return without harm. +** The sqlite3_result_error_code() function changes the error code +** returned by SQLite as a result of an error in a function. By default, +** the error code is SQLITE_ERROR. A subsequent call to sqlite3_result_error() +** or sqlite3_result_error16() resets the error code to SQLITE_ERROR. +** +** The sqlite3_result_toobig() interface causes SQLite to throw an error +** indicating that a string or BLOB is to long to represent. +** +** The sqlite3_result_nomem() interface causes SQLite to throw an error +** indicating that a memory allocation failed. +** +** The sqlite3_result_int() interface sets the return value +** of the application-defined function to be the 32-bit signed integer +** value given in the 2nd argument. +** The sqlite3_result_int64() interface sets the return value +** of the application-defined function to be the 64-bit signed integer +** value given in the 2nd argument. +** +** The sqlite3_result_null() interface sets the return value +** of the application-defined function to be NULL. +** +** The sqlite3_result_text(), sqlite3_result_text16(), +** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces +** set the return value of the application-defined function to be +** a text string which is represented as UTF-8, UTF-16 native byte order, +** UTF-16 little endian, or UTF-16 big endian, respectively. +** SQLite takes the text result from the application from +** the 2nd parameter of the sqlite3_result_text* interfaces. +** If the 3rd parameter to the sqlite3_result_text* interfaces +** is negative, then SQLite takes result text from the 2nd parameter +** through the first zero character. +** If the 3rd parameter to the sqlite3_result_text* interfaces +** is non-negative, then as many bytes (not characters) of the text +** pointed to by the 2nd parameter are taken as the application-defined +** function result. +** If the 4th parameter to the sqlite3_result_text* interfaces +** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that +** function as the destructor on the text or BLOB result when it has +** finished using that result. +** If the 4th parameter to the sqlite3_result_text* interfaces or to +** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite +** assumes that the text or BLOB result is in constant space and does not +** copy the content of the parameter nor call a destructor on the content +** when it has finished using that result. +** If the 4th parameter to the sqlite3_result_text* interfaces +** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT +** then SQLite makes a copy of the result into space obtained from +** from [sqlite3_malloc()] before it returns. +** +** The sqlite3_result_value() interface sets the result of +** the application-defined function to be a copy the +** [unprotected sqlite3_value] object specified by the 2nd parameter. The +** sqlite3_result_value() interface makes a copy of the [sqlite3_value] +** so that the [sqlite3_value] specified in the parameter may change or +** be deallocated after sqlite3_result_value() returns without harm. +** A [protected sqlite3_value] object may always be used where an +** [unprotected sqlite3_value] object is required, so either +** kind of [sqlite3_value] object can be used with this interface. +** +** If these routines are called from within the different thread +** than the one containing the application-defined function that received +** the [sqlite3_context] pointer, the results are undefined. +** +** Requirements: +** [H16403] [H16406] [H16409] [H16412] [H16415] [H16418] [H16421] [H16424] +** [H16427] [H16430] [H16433] [H16436] [H16439] [H16442] [H16445] [H16448] +** [H16451] [H16454] [H16457] [H16460] [H16463] +*/ +SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_double(sqlite3_context*, double); +SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int); +SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int); +SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*); +SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*); +SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int); +SQLITE_API void sqlite3_result_int(sqlite3_context*, int); +SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); +SQLITE_API void sqlite3_result_null(sqlite3_context*); +SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); +SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); +SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); +SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*); +SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n); + +/* +** CAPI3REF: Define New Collating Sequences {H16600} +** +** These functions are used to add new collation sequences to the +** [database connection] specified as the first argument. +** +** The name of the new collation sequence is specified as a UTF-8 string +** for sqlite3_create_collation() and sqlite3_create_collation_v2() +** and a UTF-16 string for sqlite3_create_collation16(). In all cases +** the name is passed as the second function argument. +** +** The third argument may be one of the constants [SQLITE_UTF8], +** [SQLITE_UTF16LE], or [SQLITE_UTF16BE], indicating that the user-supplied +** routine expects to be passed pointers to strings encoded using UTF-8, +** UTF-16 little-endian, or UTF-16 big-endian, respectively. The +** third argument might also be [SQLITE_UTF16] to indicate that the routine +** expects pointers to be UTF-16 strings in the native byte order, or the +** argument can be [SQLITE_UTF16_ALIGNED] if the +** the routine expects pointers to 16-bit word aligned strings +** of UTF-16 in the native byte order. +** +** A pointer to the user supplied routine must be passed as the fifth +** argument. If it is NULL, this is the same as deleting the collation +** sequence (so that SQLite cannot call it anymore). +** Each time the application supplied function is invoked, it is passed +** as its first parameter a copy of the void* passed as the fourth argument +** to sqlite3_create_collation() or sqlite3_create_collation16(). +** +** The remaining arguments to the application-supplied routine are two strings, +** each represented by a (length, data) pair and encoded in the encoding +** that was passed as the third argument when the collation sequence was +** registered. {END} The application defined collation routine should +** return negative, zero or positive if the first string is less than, +** equal to, or greater than the second string. i.e. (STRING1 - STRING2). +** +** The sqlite3_create_collation_v2() works like sqlite3_create_collation() +** except that it takes an extra argument which is a destructor for +** the collation. The destructor is called when the collation is +** destroyed and is passed a copy of the fourth parameter void* pointer +** of the sqlite3_create_collation_v2(). +** Collations are destroyed when they are overridden by later calls to the +** collation creation functions or when the [database connection] is closed +** using [sqlite3_close()]. +** +** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. +** +** Requirements: +** [H16603] [H16604] [H16606] [H16609] [H16612] [H16615] [H16618] [H16621] +** [H16624] [H16627] [H16630] +*/ +SQLITE_API int sqlite3_create_collation( + sqlite3*, + const char *zName, + int eTextRep, + void*, + int(*xCompare)(void*,int,const void*,int,const void*) +); +SQLITE_API int sqlite3_create_collation_v2( + sqlite3*, + const char *zName, + int eTextRep, + void*, + int(*xCompare)(void*,int,const void*,int,const void*), + void(*xDestroy)(void*) +); +SQLITE_API int sqlite3_create_collation16( + sqlite3*, + const void *zName, + int eTextRep, + void*, + int(*xCompare)(void*,int,const void*,int,const void*) +); + +/* +** CAPI3REF: Collation Needed Callbacks {H16700} +** +** To avoid having to register all collation sequences before a database +** can be used, a single callback function may be registered with the +** [database connection] to be called whenever an undefined collation +** sequence is required. +** +** If the function is registered using the sqlite3_collation_needed() API, +** then it is passed the names of undefined collation sequences as strings +** encoded in UTF-8. {H16703} If sqlite3_collation_needed16() is used, +** the names are passed as UTF-16 in machine native byte order. +** A call to either function replaces any existing callback. +** +** When the callback is invoked, the first argument passed is a copy +** of the second argument to sqlite3_collation_needed() or +** sqlite3_collation_needed16(). The second argument is the database +** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], +** or [SQLITE_UTF16LE], indicating the most desirable form of the collation +** sequence function required. The fourth parameter is the name of the +** required collation sequence. +** +** The callback function should register the desired collation using +** [sqlite3_create_collation()], [sqlite3_create_collation16()], or +** [sqlite3_create_collation_v2()]. +** +** Requirements: +** [H16702] [H16704] [H16706] +*/ +SQLITE_API int sqlite3_collation_needed( + sqlite3*, + void*, + void(*)(void*,sqlite3*,int eTextRep,const char*) +); +SQLITE_API int sqlite3_collation_needed16( + sqlite3*, + void*, + void(*)(void*,sqlite3*,int eTextRep,const void*) +); + +/* +** Specify the key for an encrypted database. This routine should be +** called right after sqlite3_open(). +** +** The code to implement this API is not available in the public release +** of SQLite. +*/ +SQLITE_API int sqlite3_key( + sqlite3 *db, /* Database to be rekeyed */ + const void *pKey, int nKey /* The key */ +); + +/* +** Change the key on an open database. If the current database is not +** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the +** database is decrypted. +** +** The code to implement this API is not available in the public release +** of SQLite. +*/ +SQLITE_API int sqlite3_rekey( + sqlite3 *db, /* Database to be rekeyed */ + const void *pKey, int nKey /* The new key */ +); + +/* +** CAPI3REF: Suspend Execution For A Short Time {H10530} +** +** The sqlite3_sleep() function causes the current thread to suspend execution +** for at least a number of milliseconds specified in its parameter. +** +** If the operating system does not support sleep requests with +** millisecond time resolution, then the time will be rounded up to +** the nearest second. The number of milliseconds of sleep actually +** requested from the operating system is returned. +** +** SQLite implements this interface by calling the xSleep() +** method of the default [sqlite3_vfs] object. +** +** Requirements: [H10533] [H10536] +*/ +SQLITE_API int sqlite3_sleep(int); + +/* +** CAPI3REF: Name Of The Folder Holding Temporary Files {H10310} +** +** If this global variable is made to point to a string which is +** the name of a folder (a.k.a. directory), then all temporary files +** created by SQLite will be placed in that directory. If this variable +** is a NULL pointer, then SQLite performs a search for an appropriate +** temporary file directory. +** +** It is not safe to read or modify this variable in more than one +** thread at a time. It is not safe to read or modify this variable +** if a [database connection] is being used at the same time in a separate +** thread. +** It is intended that this variable be set once +** as part of process initialization and before any SQLite interface +** routines have been called and that this variable remain unchanged +** thereafter. +** +** The [temp_store_directory pragma] may modify this variable and cause +** it to point to memory obtained from [sqlite3_malloc]. Furthermore, +** the [temp_store_directory pragma] always assumes that any string +** that this variable points to is held in memory obtained from +** [sqlite3_malloc] and the pragma may attempt to free that memory +** using [sqlite3_free]. +** Hence, if this variable is modified directly, either it should be +** made NULL or made to point to memory obtained from [sqlite3_malloc] +** or else the use of the [temp_store_directory pragma] should be avoided. +*/ +SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory; + +/* +** CAPI3REF: Test For Auto-Commit Mode {H12930} +** KEYWORDS: {autocommit mode} +** +** The sqlite3_get_autocommit() interface returns non-zero or +** zero if the given database connection is or is not in autocommit mode, +** respectively. Autocommit mode is on by default. +** Autocommit mode is disabled by a [BEGIN] statement. +** Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK]. +** +** If certain kinds of errors occur on a statement within a multi-statement +** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR], +** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the +** transaction might be rolled back automatically. The only way to +** find out whether SQLite automatically rolled back the transaction after +** an error is to use this function. +** +** If another thread changes the autocommit status of the database +** connection while this routine is running, then the return value +** is undefined. +** +** Requirements: [H12931] [H12932] [H12933] [H12934] +*/ +SQLITE_API int sqlite3_get_autocommit(sqlite3*); + +/* +** CAPI3REF: Find The Database Handle Of A Prepared Statement {H13120} +** +** The sqlite3_db_handle interface returns the [database connection] handle +** to which a [prepared statement] belongs. The [database connection] +** returned by sqlite3_db_handle is the same [database connection] that was the first argument +** to the [sqlite3_prepare_v2()] call (or its variants) that was used to +** create the statement in the first place. +** +** Requirements: [H13123] +*/ +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); + +/* +** CAPI3REF: Find the next prepared statement {H13140} +** +** This interface returns a pointer to the next [prepared statement] after +** pStmt associated with the [database connection] pDb. If pStmt is NULL +** then this interface returns a pointer to the first prepared statement +** associated with the database connection pDb. If no prepared statement +** satisfies the conditions of this routine, it returns NULL. +** +** The [database connection] pointer D in a call to +** [sqlite3_next_stmt(D,S)] must refer to an open database +** connection and in particular must not be a NULL pointer. +** +** Requirements: [H13143] [H13146] [H13149] [H13152] +*/ +SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); + +/* +** CAPI3REF: Commit And Rollback Notification Callbacks {H12950} +** +** The sqlite3_commit_hook() interface registers a callback +** function to be invoked whenever a transaction is [COMMIT | committed]. +** Any callback set by a previous call to sqlite3_commit_hook() +** for the same database connection is overridden. +** The sqlite3_rollback_hook() interface registers a callback +** function to be invoked whenever a transaction is [ROLLBACK | rolled back]. +** Any callback set by a previous call to sqlite3_commit_hook() +** for the same database connection is overridden. +** The pArg argument is passed through to the callback. +** If the callback on a commit hook function returns non-zero, +** then the commit is converted into a rollback. +** +** If another function was previously registered, its +** pArg value is returned. Otherwise NULL is returned. +** +** The callback implementation must not do anything that will modify +** the database connection that invoked the callback. Any actions +** to modify the database connection must be deferred until after the +** completion of the [sqlite3_step()] call that triggered the commit +** or rollback hook in the first place. +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their +** database connections for the meaning of "modify" in this paragraph. +** +** Registering a NULL function disables the callback. +** +** When the commit hook callback routine returns zero, the [COMMIT] +** operation is allowed to continue normally. If the commit hook +** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK]. +** The rollback hook is invoked on a rollback that results from a commit +** hook returning non-zero, just as it would be with any other rollback. +** +** For the purposes of this API, a transaction is said to have been +** rolled back if an explicit "ROLLBACK" statement is executed, or +** an error or constraint causes an implicit rollback to occur. +** The rollback callback is not invoked if a transaction is +** automatically rolled back because the database connection is closed. +** The rollback callback is not invoked if a transaction is +** rolled back because a commit callback returned non-zero. +** Check on this +** +** See also the [sqlite3_update_hook()] interface. +** +** Requirements: +** [H12951] [H12952] [H12953] [H12954] [H12955] +** [H12961] [H12962] [H12963] [H12964] +*/ +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); + +/* +** CAPI3REF: Data Change Notification Callbacks {H12970} +** +** The sqlite3_update_hook() interface registers a callback function +** with the [database connection] identified by the first argument +** to be invoked whenever a row is updated, inserted or deleted. +** Any callback set by a previous call to this function +** for the same database connection is overridden. +** +** The second argument is a pointer to the function to invoke when a +** row is updated, inserted or deleted. +** The first argument to the callback is a copy of the third argument +** to sqlite3_update_hook(). +** The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], +** or [SQLITE_UPDATE], depending on the operation that caused the callback +** to be invoked. +** The third and fourth arguments to the callback contain pointers to the +** database and table name containing the affected row. +** The final callback parameter is the [rowid] of the row. +** In the case of an update, this is the [rowid] after the update takes place. +** +** The update hook is not invoked when internal system tables are +** modified (i.e. sqlite_master and sqlite_sequence). +** +** In the current implementation, the update hook +** is not invoked when duplication rows are deleted because of an +** [ON CONFLICT | ON CONFLICT REPLACE] clause. Nor is the update hook +** invoked when rows are deleted using the [truncate optimization]. +** The exceptions defined in this paragraph might change in a future +** release of SQLite. +** +** The update hook implementation must not do anything that will modify +** the database connection that invoked the update hook. Any actions +** to modify the database connection must be deferred until after the +** completion of the [sqlite3_step()] call that triggered the update hook. +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their +** database connections for the meaning of "modify" in this paragraph. +** +** If another function was previously registered, its pArg value +** is returned. Otherwise NULL is returned. +** +** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()] +** interfaces. +** +** Requirements: +** [H12971] [H12973] [H12975] [H12977] [H12979] [H12981] [H12983] [H12986] +*/ +SQLITE_API void *sqlite3_update_hook( + sqlite3*, + void(*)(void *,int ,char const *,char const *,sqlite3_int64), + void* +); + +/* +** CAPI3REF: Enable Or Disable Shared Pager Cache {H10330} +** KEYWORDS: {shared cache} +** +** This routine enables or disables the sharing of the database cache +** and schema data structures between [database connection | connections] +** to the same database. Sharing is enabled if the argument is true +** and disabled if the argument is false. +** +** Cache sharing is enabled and disabled for an entire process. +** This is a change as of SQLite version 3.5.0. In prior versions of SQLite, +** sharing was enabled or disabled for each thread separately. +** +** The cache sharing mode set by this interface effects all subsequent +** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. +** Existing database connections continue use the sharing mode +** that was in effect at the time they were opened. +** +** Virtual tables cannot be used with a shared cache. When shared +** cache is enabled, the [sqlite3_create_module()] API used to register +** virtual tables will always return an error. +** +** This routine returns [SQLITE_OK] if shared cache was enabled or disabled +** successfully. An [error code] is returned otherwise. +** +** Shared cache is disabled by default. But this might change in +** future releases of SQLite. Applications that care about shared +** cache setting should set it explicitly. +** +** See Also: [SQLite Shared-Cache Mode] +** +** Requirements: [H10331] [H10336] [H10337] [H10339] +*/ +SQLITE_API int sqlite3_enable_shared_cache(int); + +/* +** CAPI3REF: Attempt To Free Heap Memory {H17340} +** +** The sqlite3_release_memory() interface attempts to free N bytes +** of heap memory by deallocating non-essential memory allocations +** held by the database library. {END} Memory used to cache database +** pages to improve performance is an example of non-essential memory. +** sqlite3_release_memory() returns the number of bytes actually freed, +** which might be more or less than the amount requested. +** +** Requirements: [H17341] [H17342] +*/ +SQLITE_API int sqlite3_release_memory(int); + +/* +** CAPI3REF: Impose A Limit On Heap Size {H17350} +** +** The sqlite3_soft_heap_limit() interface places a "soft" limit +** on the amount of heap memory that may be allocated by SQLite. +** If an internal allocation is requested that would exceed the +** soft heap limit, [sqlite3_release_memory()] is invoked one or +** more times to free up some space before the allocation is performed. +** +** The limit is called "soft", because if [sqlite3_release_memory()] +** cannot free sufficient memory to prevent the limit from being exceeded, +** the memory is allocated anyway and the current operation proceeds. +** +** A negative or zero value for N means that there is no soft heap limit and +** [sqlite3_release_memory()] will only be called when memory is exhausted. +** The default value for the soft heap limit is zero. +** +** SQLite makes a best effort to honor the soft heap limit. +** But if the soft heap limit cannot be honored, execution will +** continue without error or notification. This is why the limit is +** called a "soft" limit. It is advisory only. +** +** Prior to SQLite version 3.5.0, this routine only constrained the memory +** allocated by a single thread - the same thread in which this routine +** runs. Beginning with SQLite version 3.5.0, the soft heap limit is +** applied to all threads. The value specified for the soft heap limit +** is an upper bound on the total memory allocation for all threads. In +** version 3.5.0 there is no mechanism for limiting the heap usage for +** individual threads. +** +** Requirements: +** [H16351] [H16352] [H16353] [H16354] [H16355] [H16358] +*/ +SQLITE_API void sqlite3_soft_heap_limit(int); + +/* +** CAPI3REF: Extract Metadata About A Column Of A Table {H12850} +** +** This routine returns metadata about a specific column of a specific +** database table accessible using the [database connection] handle +** passed as the first function argument. +** +** The column is identified by the second, third and fourth parameters to +** this function. The second parameter is either the name of the database +** (i.e. "main", "temp" or an attached database) containing the specified +** table or NULL. If it is NULL, then all attached databases are searched +** for the table using the same algorithm used by the database engine to +** resolve unqualified table references. +** +** The third and fourth parameters to this function are the table and column +** name of the desired column, respectively. Neither of these parameters +** may be NULL. +** +** Metadata is returned by writing to the memory locations passed as the 5th +** and subsequent parameters to this function. Any of these arguments may be +** NULL, in which case the corresponding element of metadata is omitted. +** +**
+** +**
Parameter Output
Type
Description +** +**
5th const char* Data type +**
6th const char* Name of default collation sequence +**
7th int True if column has a NOT NULL constraint +**
8th int True if column is part of the PRIMARY KEY +**
9th int True if column is [AUTOINCREMENT] +**
+**
+** +** The memory pointed to by the character pointers returned for the +** declaration type and collation sequence is valid only until the next +** call to any SQLite API function. +** +** If the specified table is actually a view, an [error code] is returned. +** +** If the specified column is "rowid", "oid" or "_rowid_" and an +** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output +** parameters are set for the explicitly declared column. If there is no +** explicitly declared [INTEGER PRIMARY KEY] column, then the output +** parameters are set as follows: +** +**
+**     data type: "INTEGER"
+**     collation sequence: "BINARY"
+**     not null: 0
+**     primary key: 1
+**     auto increment: 0
+** 
+** +** This function may load one or more schemas from database files. If an +** error occurs during this process, or if the requested table or column +** cannot be found, an [error code] is returned and an error message left +** in the [database connection] (to be retrieved using sqlite3_errmsg()). +** +** This API is only available if the library was compiled with the +** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined. +*/ +SQLITE_API int sqlite3_table_column_metadata( + sqlite3 *db, /* Connection handle */ + const char *zDbName, /* Database name or NULL */ + const char *zTableName, /* Table name */ + const char *zColumnName, /* Column name */ + char const **pzDataType, /* OUTPUT: Declared data type */ + char const **pzCollSeq, /* OUTPUT: Collation sequence name */ + int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */ + int *pPrimaryKey, /* OUTPUT: True if column part of PK */ + int *pAutoinc /* OUTPUT: True if column is auto-increment */ +); + +/* +** CAPI3REF: Load An Extension {H12600} +** +** This interface loads an SQLite extension library from the named file. +** +** {H12601} The sqlite3_load_extension() interface attempts to load an +** SQLite extension library contained in the file zFile. +** +** {H12602} The entry point is zProc. +** +** {H12603} zProc may be 0, in which case the name of the entry point +** defaults to "sqlite3_extension_init". +** +** {H12604} The sqlite3_load_extension() interface shall return +** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. +** +** {H12605} If an error occurs and pzErrMsg is not 0, then the +** [sqlite3_load_extension()] interface shall attempt to +** fill *pzErrMsg with error message text stored in memory +** obtained from [sqlite3_malloc()]. {END} The calling function +** should free this memory by calling [sqlite3_free()]. +** +** {H12606} Extension loading must be enabled using +** [sqlite3_enable_load_extension()] prior to calling this API, +** otherwise an error will be returned. +*/ +SQLITE_API int sqlite3_load_extension( + sqlite3 *db, /* Load the extension into this database connection */ + const char *zFile, /* Name of the shared library containing extension */ + const char *zProc, /* Entry point. Derived from zFile if 0 */ + char **pzErrMsg /* Put error message here if not 0 */ +); + +/* +** CAPI3REF: Enable Or Disable Extension Loading {H12620} +** +** So as not to open security holes in older applications that are +** unprepared to deal with extension loading, and as a means of disabling +** extension loading while evaluating user-entered SQL, the following API +** is provided to turn the [sqlite3_load_extension()] mechanism on and off. +** +** Extension loading is off by default. See ticket #1863. +** +** {H12621} Call the sqlite3_enable_load_extension() routine with onoff==1 +** to turn extension loading on and call it with onoff==0 to turn +** it back off again. +** +** {H12622} Extension loading is off by default. +*/ +SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); + +/* +** CAPI3REF: Automatically Load An Extensions {H12640} +** +** This API can be invoked at program startup in order to register +** one or more statically linked extensions that will be available +** to all new [database connections]. {END} +** +** This routine stores a pointer to the extension in an array that is +** obtained from [sqlite3_malloc()]. If you run a memory leak checker +** on your program and it reports a leak because of this array, invoke +** [sqlite3_reset_auto_extension()] prior to shutdown to free the memory. +** +** {H12641} This function registers an extension entry point that is +** automatically invoked whenever a new [database connection] +** is opened using [sqlite3_open()], [sqlite3_open16()], +** or [sqlite3_open_v2()]. +** +** {H12642} Duplicate extensions are detected so calling this routine +** multiple times with the same extension is harmless. +** +** {H12643} This routine stores a pointer to the extension in an array +** that is obtained from [sqlite3_malloc()]. +** +** {H12644} Automatic extensions apply across all threads. +*/ +SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void)); + +/* +** CAPI3REF: Reset Automatic Extension Loading {H12660} +** +** This function disables all previously registered automatic +** extensions. {END} It undoes the effect of all prior +** [sqlite3_auto_extension()] calls. +** +** {H12661} This function disables all previously registered +** automatic extensions. +** +** {H12662} This function disables automatic extensions in all threads. +*/ +SQLITE_API void sqlite3_reset_auto_extension(void); + +/* +****** EXPERIMENTAL - subject to change without notice ************** +** +** The interface to the virtual-table mechanism is currently considered +** to be experimental. The interface might change in incompatible ways. +** If this is a problem for you, do not use the interface at this time. +** +** When the virtual-table mechanism stabilizes, we will declare the +** interface fixed, support it indefinitely, and remove this comment. +*/ + +/* +** Structures used by the virtual table interface +*/ +typedef struct sqlite3_vtab sqlite3_vtab; +typedef struct sqlite3_index_info sqlite3_index_info; +typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor; +typedef struct sqlite3_module sqlite3_module; + +/* +** CAPI3REF: Virtual Table Object {H18000} +** KEYWORDS: sqlite3_module {virtual table module} +** EXPERIMENTAL +** +** This structure, sometimes called a a "virtual table module", +** defines the implementation of a [virtual tables]. +** This structure consists mostly of methods for the module. +** +** A virtual table module is created by filling in a persistent +** instance of this structure and passing a pointer to that instance +** to [sqlite3_create_module()] or [sqlite3_create_module_v2()]. +** The registration remains valid until it is replaced by a different +** module or until the [database connection] closes. The content +** of this structure must not change while it is registered with +** any database connection. +*/ +struct sqlite3_module { + int iVersion; + int (*xCreate)(sqlite3*, void *pAux, + int argc, const char *const*argv, + sqlite3_vtab **ppVTab, char**); + int (*xConnect)(sqlite3*, void *pAux, + int argc, const char *const*argv, + sqlite3_vtab **ppVTab, char**); + int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); + int (*xDisconnect)(sqlite3_vtab *pVTab); + int (*xDestroy)(sqlite3_vtab *pVTab); + int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); + int (*xClose)(sqlite3_vtab_cursor*); + int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, + int argc, sqlite3_value **argv); + int (*xNext)(sqlite3_vtab_cursor*); + int (*xEof)(sqlite3_vtab_cursor*); + int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); + int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); + int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); + int (*xBegin)(sqlite3_vtab *pVTab); + int (*xSync)(sqlite3_vtab *pVTab); + int (*xCommit)(sqlite3_vtab *pVTab); + int (*xRollback)(sqlite3_vtab *pVTab); + int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, + void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), + void **ppArg); + int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); +}; + +/* +** CAPI3REF: Virtual Table Indexing Information {H18100} +** KEYWORDS: sqlite3_index_info +** EXPERIMENTAL +** +** The sqlite3_index_info structure and its substructures is used to +** pass information into and receive the reply from the [xBestIndex] +** method of a [virtual table module]. The fields under **Inputs** are the +** inputs to xBestIndex and are read-only. xBestIndex inserts its +** results into the **Outputs** fields. +** +** The aConstraint[] array records WHERE clause constraints of the form: +** +**
column OP expr
+** +** where OP is =, <, <=, >, or >=. The particular operator is +** stored in aConstraint[].op. The index of the column is stored in +** aConstraint[].iColumn. aConstraint[].usable is TRUE if the +** expr on the right-hand side can be evaluated (and thus the constraint +** is usable) and false if it cannot. +** +** The optimizer automatically inverts terms of the form "expr OP column" +** and makes other simplifications to the WHERE clause in an attempt to +** get as many WHERE clause terms into the form shown above as possible. +** The aConstraint[] array only reports WHERE clause terms in the correct +** form that refer to the particular virtual table being queried. +** +** Information about the ORDER BY clause is stored in aOrderBy[]. +** Each term of aOrderBy records a column of the ORDER BY clause. +** +** The [xBestIndex] method must fill aConstraintUsage[] with information +** about what parameters to pass to xFilter. If argvIndex>0 then +** the right-hand side of the corresponding aConstraint[] is evaluated +** and becomes the argvIndex-th entry in argv. If aConstraintUsage[].omit +** is true, then the constraint is assumed to be fully handled by the +** virtual table and is not checked again by SQLite. +** +** The idxNum and idxPtr values are recorded and passed into the +** [xFilter] method. +** [sqlite3_free()] is used to free idxPtr if and only iff +** needToFreeIdxPtr is true. +** +** The orderByConsumed means that output from [xFilter]/[xNext] will occur in +** the correct order to satisfy the ORDER BY clause so that no separate +** sorting step is required. +** +** The estimatedCost value is an estimate of the cost of doing the +** particular lookup. A full scan of a table with N entries should have +** a cost of N. A binary search of a table of N entries should have a +** cost of approximately log(N). +*/ +struct sqlite3_index_info { + /* Inputs */ + int nConstraint; /* Number of entries in aConstraint */ + struct sqlite3_index_constraint { + int iColumn; /* Column on left-hand side of constraint */ + unsigned char op; /* Constraint operator */ + unsigned char usable; /* True if this constraint is usable */ + int iTermOffset; /* Used internally - xBestIndex should ignore */ + } *aConstraint; /* Table of WHERE clause constraints */ + int nOrderBy; /* Number of terms in the ORDER BY clause */ + struct sqlite3_index_orderby { + int iColumn; /* Column number */ + unsigned char desc; /* True for DESC. False for ASC. */ + } *aOrderBy; /* The ORDER BY clause */ + /* Outputs */ + struct sqlite3_index_constraint_usage { + int argvIndex; /* if >0, constraint is part of argv to xFilter */ + unsigned char omit; /* Do not code a test for this constraint */ + } *aConstraintUsage; + int idxNum; /* Number used to identify the index */ + char *idxStr; /* String, possibly obtained from sqlite3_malloc */ + int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */ + int orderByConsumed; /* True if output is already ordered */ + double estimatedCost; /* Estimated cost of using this index */ +}; +#define SQLITE_INDEX_CONSTRAINT_EQ 2 +#define SQLITE_INDEX_CONSTRAINT_GT 4 +#define SQLITE_INDEX_CONSTRAINT_LE 8 +#define SQLITE_INDEX_CONSTRAINT_LT 16 +#define SQLITE_INDEX_CONSTRAINT_GE 32 +#define SQLITE_INDEX_CONSTRAINT_MATCH 64 + +/* +** CAPI3REF: Register A Virtual Table Implementation {H18200} +** EXPERIMENTAL +** +** This routine is used to register a new [virtual table module] name. +** Module names must be registered before +** creating a new [virtual table] using the module, or before using a +** preexisting [virtual table] for the module. +** +** The module name is registered on the [database connection] specified +** by the first parameter. The name of the module is given by the +** second parameter. The third parameter is a pointer to +** the implementation of the [virtual table module]. The fourth +** parameter is an arbitrary client data pointer that is passed through +** into the [xCreate] and [xConnect] methods of the virtual table module +** when a new virtual table is be being created or reinitialized. +** +** This interface has exactly the same effect as calling +** [sqlite3_create_module_v2()] with a NULL client data destructor. +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module( + sqlite3 *db, /* SQLite connection to register module with */ + const char *zName, /* Name of the module */ + const sqlite3_module *p, /* Methods for the module */ + void *pClientData /* Client data for xCreate/xConnect */ +); + +/* +** CAPI3REF: Register A Virtual Table Implementation {H18210} +** EXPERIMENTAL +** +** This routine is identical to the [sqlite3_create_module()] method, +** except that it has an extra parameter to specify +** a destructor function for the client data pointer. SQLite will +** invoke the destructor function (if it is not NULL) when SQLite +** no longer needs the pClientData pointer. +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module_v2( + sqlite3 *db, /* SQLite connection to register module with */ + const char *zName, /* Name of the module */ + const sqlite3_module *p, /* Methods for the module */ + void *pClientData, /* Client data for xCreate/xConnect */ + void(*xDestroy)(void*) /* Module destructor function */ +); + +/* +** CAPI3REF: Virtual Table Instance Object {H18010} +** KEYWORDS: sqlite3_vtab +** EXPERIMENTAL +** +** Every [virtual table module] implementation uses a subclass +** of the following structure to describe a particular instance +** of the [virtual table]. Each subclass will +** be tailored to the specific needs of the module implementation. +** The purpose of this superclass is to define certain fields that are +** common to all module implementations. +** +** Virtual tables methods can set an error message by assigning a +** string obtained from [sqlite3_mprintf()] to zErrMsg. The method should +** take care that any prior string is freed by a call to [sqlite3_free()] +** prior to assigning a new string to zErrMsg. After the error message +** is delivered up to the client application, the string will be automatically +** freed by sqlite3_free() and the zErrMsg field will be zeroed. +*/ +struct sqlite3_vtab { + const sqlite3_module *pModule; /* The module for this virtual table */ + int nRef; /* NO LONGER USED */ + char *zErrMsg; /* Error message from sqlite3_mprintf() */ + /* Virtual table implementations will typically add additional fields */ +}; + +/* +** CAPI3REF: Virtual Table Cursor Object {H18020} +** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor} +** EXPERIMENTAL +** +** Every [virtual table module] implementation uses a subclass of the +** following structure to describe cursors that point into the +** [virtual table] and are used +** to loop through the virtual table. Cursors are created using the +** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed +** by the [sqlite3_module.xClose | xClose] method. Cussors are used +** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods +** of the module. Each module implementation will define +** the content of a cursor structure to suit its own needs. +** +** This superclass exists in order to define fields of the cursor that +** are common to all implementations. +*/ +struct sqlite3_vtab_cursor { + sqlite3_vtab *pVtab; /* Virtual table of this cursor */ + /* Virtual table implementations will typically add additional fields */ +}; + +/* +** CAPI3REF: Declare The Schema Of A Virtual Table {H18280} +** EXPERIMENTAL +** +** The [xCreate] and [xConnect] methods of a +** [virtual table module] call this interface +** to declare the format (the names and datatypes of the columns) of +** the virtual tables they implement. +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zSQL); + +/* +** CAPI3REF: Overload A Function For A Virtual Table {H18300} +** EXPERIMENTAL +** +** Virtual tables can provide alternative implementations of functions +** using the [xFindFunction] method of the [virtual table module]. +** But global versions of those functions +** must exist in order to be overloaded. +** +** This API makes sure a global version of a function with a particular +** name and number of parameters exists. If no such function exists +** before this API is called, a new function is created. The implementation +** of the new function always causes an exception to be thrown. So +** the new function is not good for anything by itself. Its only +** purpose is to be a placeholder function that can be overloaded +** by a [virtual table]. +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); + +/* +** The interface to the virtual-table mechanism defined above (back up +** to a comment remarkably similar to this one) is currently considered +** to be experimental. The interface might change in incompatible ways. +** If this is a problem for you, do not use the interface at this time. +** +** When the virtual-table mechanism stabilizes, we will declare the +** interface fixed, support it indefinitely, and remove this comment. +** +****** EXPERIMENTAL - subject to change without notice ************** +*/ + +/* +** CAPI3REF: A Handle To An Open BLOB {H17800} +** KEYWORDS: {BLOB handle} {BLOB handles} +** +** An instance of this object represents an open BLOB on which +** [sqlite3_blob_open | incremental BLOB I/O] can be performed. +** Objects of this type are created by [sqlite3_blob_open()] +** and destroyed by [sqlite3_blob_close()]. +** The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces +** can be used to read or write small subsections of the BLOB. +** The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes. +*/ +typedef struct sqlite3_blob sqlite3_blob; + +/* +** CAPI3REF: Open A BLOB For Incremental I/O {H17810} +** +** This interfaces opens a [BLOB handle | handle] to the BLOB located +** in row iRow, column zColumn, table zTable in database zDb; +** in other words, the same BLOB that would be selected by: +** +**
+**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
+** 
{END} +** +** If the flags parameter is non-zero, then the BLOB is opened for read +** and write access. If it is zero, the BLOB is opened for read access. +** It is not possible to open a column that is part of an index or primary +** key for writing. ^If [foreign key constraints] are enabled, it is +** not possible to open a column that is part of a [child key] for writing. +** +** Note that the database name is not the filename that contains +** the database but rather the symbolic name of the database that +** is assigned when the database is connected using [ATTACH]. +** For the main database file, the database name is "main". +** For TEMP tables, the database name is "temp". +** +** On success, [SQLITE_OK] is returned and the new [BLOB handle] is written +** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set +** to be a null pointer. +** This function sets the [database connection] error code and message +** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related +** functions. Note that the *ppBlob variable is always initialized in a +** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob +** regardless of the success or failure of this routine. +** +** If the row that a BLOB handle points to is modified by an +** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects +** then the BLOB handle is marked as "expired". +** This is true if any column of the row is changed, even a column +** other than the one the BLOB handle is open on. +** Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for +** a expired BLOB handle fail with an return code of [SQLITE_ABORT]. +** Changes written into a BLOB prior to the BLOB expiring are not +** rollback by the expiration of the BLOB. Such changes will eventually +** commit if the transaction continues to completion. +** +** Use the [sqlite3_blob_bytes()] interface to determine the size of +** the opened blob. The size of a blob may not be changed by this +** interface. Use the [UPDATE] SQL command to change the size of a +** blob. +** +** The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces +** and the built-in [zeroblob] SQL function can be used, if desired, +** to create an empty, zero-filled blob in which to read or write using +** this interface. +** +** To avoid a resource leak, every open [BLOB handle] should eventually +** be released by a call to [sqlite3_blob_close()]. +** +** Requirements: +** [H17813] [H17814] [H17816] [H17819] [H17821] [H17824] +*/ +SQLITE_API int sqlite3_blob_open( + sqlite3*, + const char *zDb, + const char *zTable, + const char *zColumn, + sqlite3_int64 iRow, + int flags, + sqlite3_blob **ppBlob +); + +/* +** CAPI3REF: Close A BLOB Handle {H17830} +** +** Closes an open [BLOB handle]. +** +** Closing a BLOB shall cause the current transaction to commit +** if there are no other BLOBs, no pending prepared statements, and the +** database connection is in [autocommit mode]. +** If any writes were made to the BLOB, they might be held in cache +** until the close operation if they will fit. +** +** Closing the BLOB often forces the changes +** out to disk and so if any I/O errors occur, they will likely occur +** at the time when the BLOB is closed. Any errors that occur during +** closing are reported as a non-zero return value. +** +** The BLOB is closed unconditionally. Even if this routine returns +** an error code, the BLOB is still closed. +** +** Calling this routine with a null pointer (which as would be returned +** by failed call to [sqlite3_blob_open()]) is a harmless no-op. +** +** Requirements: +** [H17833] [H17836] [H17839] +*/ +SQLITE_API int sqlite3_blob_close(sqlite3_blob *); + +/* +** CAPI3REF: Return The Size Of An Open BLOB {H17840} +** +** Returns the size in bytes of the BLOB accessible via the +** successfully opened [BLOB handle] in its only argument. The +** incremental blob I/O routines can only read or overwriting existing +** blob content; they cannot change the size of a blob. +** +** This routine only works on a [BLOB handle] which has been created +** by a prior successful call to [sqlite3_blob_open()] and which has not +** been closed by [sqlite3_blob_close()]. Passing any other pointer in +** to this routine results in undefined and probably undesirable behavior. +** +** Requirements: +** [H17843] +*/ +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); + +/* +** CAPI3REF: Read Data From A BLOB Incrementally {H17850} +** +** This function is used to read data from an open [BLOB handle] into a +** caller-supplied buffer. N bytes of data are copied into buffer Z +** from the open BLOB, starting at offset iOffset. +** +** If offset iOffset is less than N bytes from the end of the BLOB, +** [SQLITE_ERROR] is returned and no data is read. If N or iOffset is +** less than zero, [SQLITE_ERROR] is returned and no data is read. +** The size of the blob (and hence the maximum value of N+iOffset) +** can be determined using the [sqlite3_blob_bytes()] interface. +** +** An attempt to read from an expired [BLOB handle] fails with an +** error code of [SQLITE_ABORT]. +** +** On success, SQLITE_OK is returned. +** Otherwise, an [error code] or an [extended error code] is returned. +** +** This routine only works on a [BLOB handle] which has been created +** by a prior successful call to [sqlite3_blob_open()] and which has not +** been closed by [sqlite3_blob_close()]. Passing any other pointer in +** to this routine results in undefined and probably undesirable behavior. +** +** See also: [sqlite3_blob_write()]. +** +** Requirements: +** [H17853] [H17856] [H17859] [H17862] [H17863] [H17865] [H17868] +*/ +SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); + +/* +** CAPI3REF: Write Data Into A BLOB Incrementally {H17870} +** +** This function is used to write data into an open [BLOB handle] from a +** caller-supplied buffer. N bytes of data are copied from the buffer Z +** into the open BLOB, starting at offset iOffset. +** +** If the [BLOB handle] passed as the first argument was not opened for +** writing (the flags parameter to [sqlite3_blob_open()] was zero), +** this function returns [SQLITE_READONLY]. +** +** This function may only modify the contents of the BLOB; it is +** not possible to increase the size of a BLOB using this API. +** If offset iOffset is less than N bytes from the end of the BLOB, +** [SQLITE_ERROR] is returned and no data is written. If N is +** less than zero [SQLITE_ERROR] is returned and no data is written. +** The size of the BLOB (and hence the maximum value of N+iOffset) +** can be determined using the [sqlite3_blob_bytes()] interface. +** +** An attempt to write to an expired [BLOB handle] fails with an +** error code of [SQLITE_ABORT]. Writes to the BLOB that occurred +** before the [BLOB handle] expired are not rolled back by the +** expiration of the handle, though of course those changes might +** have been overwritten by the statement that expired the BLOB handle +** or by other independent statements. +** +** On success, SQLITE_OK is returned. +** Otherwise, an [error code] or an [extended error code] is returned. +** +** This routine only works on a [BLOB handle] which has been created +** by a prior successful call to [sqlite3_blob_open()] and which has not +** been closed by [sqlite3_blob_close()]. Passing any other pointer in +** to this routine results in undefined and probably undesirable behavior. +** +** See also: [sqlite3_blob_read()]. +** +** Requirements: +** [H17873] [H17874] [H17875] [H17876] [H17877] [H17879] [H17882] [H17885] +** [H17888] +*/ +SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); + +/* +** CAPI3REF: Virtual File System Objects {H11200} +** +** A virtual filesystem (VFS) is an [sqlite3_vfs] object +** that SQLite uses to interact +** with the underlying operating system. Most SQLite builds come with a +** single default VFS that is appropriate for the host computer. +** New VFSes can be registered and existing VFSes can be unregistered. +** The following interfaces are provided. +** +** The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. +** Names are case sensitive. +** Names are zero-terminated UTF-8 strings. +** If there is no match, a NULL pointer is returned. +** If zVfsName is NULL then the default VFS is returned. +** +** New VFSes are registered with sqlite3_vfs_register(). +** Each new VFS becomes the default VFS if the makeDflt flag is set. +** The same VFS can be registered multiple times without injury. +** To make an existing VFS into the default VFS, register it again +** with the makeDflt flag set. If two different VFSes with the +** same name are registered, the behavior is undefined. If a +** VFS is registered with a name that is NULL or an empty string, +** then the behavior is undefined. +** +** Unregister a VFS with the sqlite3_vfs_unregister() interface. +** If the default VFS is unregistered, another VFS is chosen as +** the default. The choice for the new VFS is arbitrary. +** +** Requirements: +** [H11203] [H11206] [H11209] [H11212] [H11215] [H11218] +*/ +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName); +SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); + +/* +** CAPI3REF: Mutexes {H17000} +** +** The SQLite core uses these routines for thread +** synchronization. Though they are intended for internal +** use by SQLite, code that links against SQLite is +** permitted to use any of these routines. +** +** The SQLite source code contains multiple implementations +** of these mutex routines. An appropriate implementation +** is selected automatically at compile-time. The following +** implementations are available in the SQLite core: +** +**
    +**
  • SQLITE_MUTEX_OS2 +**
  • SQLITE_MUTEX_PTHREAD +**
  • SQLITE_MUTEX_W32 +**
  • SQLITE_MUTEX_NOOP +**
+** +** The SQLITE_MUTEX_NOOP implementation is a set of routines +** that does no real locking and is appropriate for use in +** a single-threaded application. The SQLITE_MUTEX_OS2, +** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations +** are appropriate for use on OS/2, Unix, and Windows. +** +** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor +** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex +** implementation is included with the library. In this case the +** application must supply a custom mutex implementation using the +** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function +** before calling sqlite3_initialize() or any other public sqlite3_ +** function that calls sqlite3_initialize(). +** +** {H17011} The sqlite3_mutex_alloc() routine allocates a new +** mutex and returns a pointer to it. {H17012} If it returns NULL +** that means that a mutex could not be allocated. {H17013} SQLite +** will unwind its stack and return an error. {H17014} The argument +** to sqlite3_mutex_alloc() is one of these integer constants: +** +**
    +**
  • SQLITE_MUTEX_FAST +**
  • SQLITE_MUTEX_RECURSIVE +**
  • SQLITE_MUTEX_STATIC_MASTER +**
  • SQLITE_MUTEX_STATIC_MEM +**
  • SQLITE_MUTEX_STATIC_MEM2 +**
  • SQLITE_MUTEX_STATIC_PRNG +**
  • SQLITE_MUTEX_STATIC_LRU +**
  • SQLITE_MUTEX_STATIC_LRU2 +**
+** +** {H17015} The first two constants cause sqlite3_mutex_alloc() to create +** a new mutex. The new mutex is recursive when SQLITE_MUTEX_RECURSIVE +** is used but not necessarily so when SQLITE_MUTEX_FAST is used. {END} +** The mutex implementation does not need to make a distinction +** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does +** not want to. {H17016} But SQLite will only request a recursive mutex in +** cases where it really needs one. {END} If a faster non-recursive mutex +** implementation is available on the host platform, the mutex subsystem +** might return such a mutex in response to SQLITE_MUTEX_FAST. +** +** {H17017} The other allowed parameters to sqlite3_mutex_alloc() each return +** a pointer to a static preexisting mutex. {END} Six static mutexes are +** used by the current version of SQLite. Future versions of SQLite +** may add additional static mutexes. Static mutexes are for internal +** use by SQLite only. Applications that use SQLite mutexes should +** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or +** SQLITE_MUTEX_RECURSIVE. +** +** {H17018} Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST +** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() +** returns a different mutex on every call. {H17034} But for the static +** mutex types, the same mutex is returned on every call that has +** the same type number. +** +** {H17019} The sqlite3_mutex_free() routine deallocates a previously +** allocated dynamic mutex. {H17020} SQLite is careful to deallocate every +** dynamic mutex that it allocates. {A17021} The dynamic mutexes must not be in +** use when they are deallocated. {A17022} Attempting to deallocate a static +** mutex results in undefined behavior. {H17023} SQLite never deallocates +** a static mutex. {END} +** +** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt +** to enter a mutex. {H17024} If another thread is already within the mutex, +** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return +** SQLITE_BUSY. {H17025} The sqlite3_mutex_try() interface returns [SQLITE_OK] +** upon successful entry. {H17026} Mutexes created using +** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread. +** {H17027} In such cases the, +** mutex must be exited an equal number of times before another thread +** can enter. {A17028} If the same thread tries to enter any other +** kind of mutex more than once, the behavior is undefined. +** {H17029} SQLite will never exhibit +** such behavior in its own use of mutexes. +** +** Some systems (for example, Windows 95) do not support the operation +** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() +** will always return SQLITE_BUSY. {H17030} The SQLite core only ever uses +** sqlite3_mutex_try() as an optimization so this is acceptable behavior. +** +** {H17031} The sqlite3_mutex_leave() routine exits a mutex that was +** previously entered by the same thread. {A17032} The behavior +** is undefined if the mutex is not currently entered by the +** calling thread or is not currently allocated. {H17033} SQLite will +** never do either. {END} +** +** If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or +** sqlite3_mutex_leave() is a NULL pointer, then all three routines +** behave as no-ops. +** +** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. +*/ +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int); +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*); +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*); +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*); +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*); + +/* +** CAPI3REF: Mutex Methods Object {H17120} +** EXPERIMENTAL +** +** An instance of this structure defines the low-level routines +** used to allocate and use mutexes. +** +** Usually, the default mutex implementations provided by SQLite are +** sufficient, however the user has the option of substituting a custom +** implementation for specialized deployments or systems for which SQLite +** does not provide a suitable implementation. In this case, the user +** creates and populates an instance of this structure to pass +** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. +** Additionally, an instance of this structure can be used as an +** output variable when querying the system for the current mutex +** implementation, using the [SQLITE_CONFIG_GETMUTEX] option. +** +** The xMutexInit method defined by this structure is invoked as +** part of system initialization by the sqlite3_initialize() function. +** {H17001} The xMutexInit routine shall be called by SQLite once for each +** effective call to [sqlite3_initialize()]. +** +** The xMutexEnd method defined by this structure is invoked as +** part of system shutdown by the sqlite3_shutdown() function. The +** implementation of this method is expected to release all outstanding +** resources obtained by the mutex methods implementation, especially +** those obtained by the xMutexInit method. {H17003} The xMutexEnd() +** interface shall be invoked once for each call to [sqlite3_shutdown()]. +** +** The remaining seven methods defined by this structure (xMutexAlloc, +** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and +** xMutexNotheld) implement the following interfaces (respectively): +** +**
    +**
  • [sqlite3_mutex_alloc()]
  • +**
  • [sqlite3_mutex_free()]
  • +**
  • [sqlite3_mutex_enter()]
  • +**
  • [sqlite3_mutex_try()]
  • +**
  • [sqlite3_mutex_leave()]
  • +**
  • [sqlite3_mutex_held()]
  • +**
  • [sqlite3_mutex_notheld()]
  • +**
+** +** The only difference is that the public sqlite3_XXX functions enumerated +** above silently ignore any invocations that pass a NULL pointer instead +** of a valid mutex handle. The implementations of the methods defined +** by this structure are not required to handle this case, the results +** of passing a NULL pointer instead of a valid mutex handle are undefined +** (i.e. it is acceptable to provide an implementation that segfaults if +** it is passed a NULL pointer). +** +** The xMutexInit() method must be threadsafe. It must be harmless to +** invoke xMutexInit() mutiple times within the same process and without +** intervening calls to xMutexEnd(). Second and subsequent calls to +** xMutexInit() must be no-ops. +** +** xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] +** and its associates). Similarly, xMutexAlloc() must not use SQLite memory +** allocation for a static mutex. However xMutexAlloc() may use SQLite +** memory allocation for a fast or recursive mutex. +** +** SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is +** called, but only if the prior call to xMutexInit returned SQLITE_OK. +** If xMutexInit fails in any way, it is expected to clean up after itself +** prior to returning. +*/ +typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; +struct sqlite3_mutex_methods { + int (*xMutexInit)(void); + int (*xMutexEnd)(void); + sqlite3_mutex *(*xMutexAlloc)(int); + void (*xMutexFree)(sqlite3_mutex *); + void (*xMutexEnter)(sqlite3_mutex *); + int (*xMutexTry)(sqlite3_mutex *); + void (*xMutexLeave)(sqlite3_mutex *); + int (*xMutexHeld)(sqlite3_mutex *); + int (*xMutexNotheld)(sqlite3_mutex *); +}; + +/* +** CAPI3REF: Mutex Verification Routines {H17080} +** +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines +** are intended for use inside assert() statements. {H17081} The SQLite core +** never uses these routines except inside an assert() and applications +** are advised to follow the lead of the core. {H17082} The core only +** provides implementations for these routines when it is compiled +** with the SQLITE_DEBUG flag. {A17087} External mutex implementations +** are only required to provide these routines if SQLITE_DEBUG is +** defined and if NDEBUG is not defined. +** +** {H17083} These routines should return true if the mutex in their argument +** is held or not held, respectively, by the calling thread. +** +** {X17084} The implementation is not required to provided versions of these +** routines that actually work. If the implementation does not provide working +** versions of these routines, it should at least provide stubs that always +** return true so that one does not get spurious assertion failures. +** +** {H17085} If the argument to sqlite3_mutex_held() is a NULL pointer then +** the routine should return 1. {END} This seems counter-intuitive since +** clearly the mutex cannot be held if it does not exist. But the +** the reason the mutex does not exist is because the build is not +** using mutexes. And we do not want the assert() containing the +** call to sqlite3_mutex_held() to fail, so a non-zero return is +** the appropriate thing to do. {H17086} The sqlite3_mutex_notheld() +** interface should also return 1 when given a NULL pointer. +*/ +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); + +/* +** CAPI3REF: Mutex Types {H17001} +** +** The [sqlite3_mutex_alloc()] interface takes a single argument +** which is one of these integer constants. +** +** The set of static mutexes may change from one SQLite release to the +** next. Applications that override the built-in mutex logic must be +** prepared to accommodate additional static mutexes. +*/ +#define SQLITE_MUTEX_FAST 0 +#define SQLITE_MUTEX_RECURSIVE 1 +#define SQLITE_MUTEX_STATIC_MASTER 2 +#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */ +#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */ +#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */ +#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_random() */ +#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */ +#define SQLITE_MUTEX_STATIC_LRU2 7 /* lru page list */ + +/* +** CAPI3REF: Retrieve the mutex for a database connection {H17002} +** +** This interface returns a pointer the [sqlite3_mutex] object that +** serializes access to the [database connection] given in the argument +** when the [threading mode] is Serialized. +** If the [threading mode] is Single-thread or Multi-thread then this +** routine returns a NULL pointer. +*/ +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); + +/* +** CAPI3REF: Low-Level Control Of Database Files {H11300} +** +** {H11301} The [sqlite3_file_control()] interface makes a direct call to the +** xFileControl method for the [sqlite3_io_methods] object associated +** with a particular database identified by the second argument. {H11302} The +** name of the database is the name assigned to the database by the +** ATTACH SQL command that opened the +** database. {H11303} To control the main database file, use the name "main" +** or a NULL pointer. {H11304} The third and fourth parameters to this routine +** are passed directly through to the second and third parameters of +** the xFileControl method. {H11305} The return value of the xFileControl +** method becomes the return value of this routine. +** +** {H11306} If the second parameter (zDbName) does not match the name of any +** open database file, then SQLITE_ERROR is returned. {H11307} This error +** code is not remembered and will not be recalled by [sqlite3_errcode()] +** or [sqlite3_errmsg()]. {A11308} The underlying xFileControl method might +** also return SQLITE_ERROR. {A11309} There is no way to distinguish between +** an incorrect zDbName and an SQLITE_ERROR return from the underlying +** xFileControl method. {END} +** +** See also: [SQLITE_FCNTL_LOCKSTATE] +*/ +SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); + +/* +** CAPI3REF: Testing Interface {H11400} +** +** The sqlite3_test_control() interface is used to read out internal +** state of SQLite and to inject faults into SQLite for testing +** purposes. The first parameter is an operation code that determines +** the number, meaning, and operation of all subsequent parameters. +** +** This interface is not for use by applications. It exists solely +** for verifying the correct operation of the SQLite library. Depending +** on how the SQLite library is compiled, this interface might not exist. +** +** The details of the operation codes, their meanings, the parameters +** they take, and what they do are all subject to change without notice. +** Unlike most of the SQLite API, this function is not guaranteed to +** operate consistently from one release to the next. +*/ +SQLITE_API int sqlite3_test_control(int op, ...); + +/* +** CAPI3REF: Testing Interface Operation Codes {H11410} +** +** These constants are the valid operation code parameters used +** as the first argument to [sqlite3_test_control()]. +** +** These parameters and their meanings are subject to change +** without notice. These values are for testing purposes only. +** Applications should not use any of these parameters or the +** [sqlite3_test_control()] interface. +*/ +#define SQLITE_TESTCTRL_PRNG_SAVE 5 +#define SQLITE_TESTCTRL_PRNG_RESTORE 6 +#define SQLITE_TESTCTRL_PRNG_RESET 7 +#define SQLITE_TESTCTRL_BITVEC_TEST 8 +#define SQLITE_TESTCTRL_FAULT_INSTALL 9 +#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10 +#define SQLITE_TESTCTRL_PENDING_BYTE 11 +#define SQLITE_TESTCTRL_ASSERT 12 +#define SQLITE_TESTCTRL_ALWAYS 13 +#define SQLITE_TESTCTRL_RESERVE 14 + +/* +** CAPI3REF: SQLite Runtime Status {H17200} +** EXPERIMENTAL +** +** This interface is used to retrieve runtime status information +** about the preformance of SQLite, and optionally to reset various +** highwater marks. The first argument is an integer code for +** the specific parameter to measure. Recognized integer codes +** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...]. +** The current value of the parameter is returned into *pCurrent. +** The highest recorded value is returned in *pHighwater. If the +** resetFlag is true, then the highest record value is reset after +** *pHighwater is written. Some parameters do not record the highest +** value. For those parameters +** nothing is written into *pHighwater and the resetFlag is ignored. +** Other parameters record only the highwater mark and not the current +** value. For these latter parameters nothing is written into *pCurrent. +** +** This routine returns SQLITE_OK on success and a non-zero +** [error code] on failure. +** +** This routine is threadsafe but is not atomic. This routine can be +** called while other threads are running the same or different SQLite +** interfaces. However the values returned in *pCurrent and +** *pHighwater reflect the status of SQLite at different points in time +** and it is possible that another thread might change the parameter +** in between the times when *pCurrent and *pHighwater are written. +** +** See also: [sqlite3_db_status()] +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); + + +/* +** CAPI3REF: Status Parameters {H17250} +** EXPERIMENTAL +** +** These integer constants designate various run-time status parameters +** that can be returned by [sqlite3_status()]. +** +**
+**
SQLITE_STATUS_MEMORY_USED
+**
This parameter is the current amount of memory checked out +** using [sqlite3_malloc()], either directly or indirectly. The +** figure includes calls made to [sqlite3_malloc()] by the application +** and internal memory usage by the SQLite library. Scratch memory +** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache +** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in +** this parameter. The amount returned is the sum of the allocation +** sizes as reported by the xSize method in [sqlite3_mem_methods].
+** +**
SQLITE_STATUS_MALLOC_SIZE
+**
This parameter records the largest memory allocation request +** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their +** internal equivalents). Only the value returned in the +** *pHighwater parameter to [sqlite3_status()] is of interest. +** The value written into the *pCurrent parameter is undefined.
+** +**
SQLITE_STATUS_PAGECACHE_USED
+**
This parameter returns the number of pages used out of the +** [pagecache memory allocator] that was configured using +** [SQLITE_CONFIG_PAGECACHE]. The +** value returned is in pages, not in bytes.
+** +**
SQLITE_STATUS_PAGECACHE_OVERFLOW
+**
This parameter returns the number of bytes of page cache +** allocation which could not be statisfied by the [SQLITE_CONFIG_PAGECACHE] +** buffer and where forced to overflow to [sqlite3_malloc()]. The +** returned value includes allocations that overflowed because they +** where too large (they were larger than the "sz" parameter to +** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because +** no space was left in the page cache.
+** +**
SQLITE_STATUS_PAGECACHE_SIZE
+**
This parameter records the largest memory allocation request +** handed to [pagecache memory allocator]. Only the value returned in the +** *pHighwater parameter to [sqlite3_status()] is of interest. +** The value written into the *pCurrent parameter is undefined.
+** +**
SQLITE_STATUS_SCRATCH_USED
+**
This parameter returns the number of allocations used out of the +** [scratch memory allocator] configured using +** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not +** in bytes. Since a single thread may only have one scratch allocation +** outstanding at time, this parameter also reports the number of threads +** using scratch memory at the same time.
+** +**
SQLITE_STATUS_SCRATCH_OVERFLOW
+**
This parameter returns the number of bytes of scratch memory +** allocation which could not be statisfied by the [SQLITE_CONFIG_SCRATCH] +** buffer and where forced to overflow to [sqlite3_malloc()]. The values +** returned include overflows because the requested allocation was too +** larger (that is, because the requested allocation was larger than the +** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer +** slots were available. +**
+** +**
SQLITE_STATUS_SCRATCH_SIZE
+**
This parameter records the largest memory allocation request +** handed to [scratch memory allocator]. Only the value returned in the +** *pHighwater parameter to [sqlite3_status()] is of interest. +** The value written into the *pCurrent parameter is undefined.
+** +**
SQLITE_STATUS_PARSER_STACK
+**
This parameter records the deepest parser stack. It is only +** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].
+**
+** +** New status parameters may be added from time to time. +*/ +#define SQLITE_STATUS_MEMORY_USED 0 +#define SQLITE_STATUS_PAGECACHE_USED 1 +#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2 +#define SQLITE_STATUS_SCRATCH_USED 3 +#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 +#define SQLITE_STATUS_MALLOC_SIZE 5 +#define SQLITE_STATUS_PARSER_STACK 6 +#define SQLITE_STATUS_PAGECACHE_SIZE 7 +#define SQLITE_STATUS_SCRATCH_SIZE 8 + +/* +** CAPI3REF: Database Connection Status {H17500} +** EXPERIMENTAL +** +** This interface is used to retrieve runtime status information +** about a single [database connection]. The first argument is the +** database connection object to be interrogated. The second argument +** is the parameter to interrogate. Currently, the only allowed value +** for the second parameter is [SQLITE_DBSTATUS_LOOKASIDE_USED]. +** Additional options will likely appear in future releases of SQLite. +** +** The current value of the requested parameter is written into *pCur +** and the highest instantaneous value is written into *pHiwtr. If +** the resetFlg is true, then the highest instantaneous value is +** reset back down to the current value. +** +** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); + +/* +** CAPI3REF: Status Parameters for database connections {H17520} +** EXPERIMENTAL +** +** These constants are the available integer "verbs" that can be passed as +** the second argument to the [sqlite3_db_status()] interface. +** +** New verbs may be added in future releases of SQLite. Existing verbs +** might be discontinued. Applications should check the return code from +** [sqlite3_db_status()] to make sure that the call worked. +** The [sqlite3_db_status()] interface will return a non-zero error code +** if a discontinued or unsupported verb is invoked. +** +**
+**
SQLITE_DBSTATUS_LOOKASIDE_USED
+**
This parameter returns the number of lookaside memory slots currently +** checked out.
+**
+*/ +#define SQLITE_DBSTATUS_LOOKASIDE_USED 0 + + +/* +** CAPI3REF: Prepared Statement Status {H17550} +** EXPERIMENTAL +** +** Each prepared statement maintains various +** [SQLITE_STMTSTATUS_SORT | counters] that measure the number +** of times it has performed specific operations. These counters can +** be used to monitor the performance characteristics of the prepared +** statements. For example, if the number of table steps greatly exceeds +** the number of table searches or result rows, that would tend to indicate +** that the prepared statement is using a full table scan rather than +** an index. +** +** This interface is used to retrieve and reset counter values from +** a [prepared statement]. The first argument is the prepared statement +** object to be interrogated. The second argument +** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter] +** to be interrogated. +** The current value of the requested counter is returned. +** If the resetFlg is true, then the counter is reset to zero after this +** interface call returns. +** +** See also: [sqlite3_status()] and [sqlite3_db_status()]. +*/ +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); + +/* +** CAPI3REF: Status Parameters for prepared statements {H17570} +** EXPERIMENTAL +** +** These preprocessor macros define integer codes that name counter +** values associated with the [sqlite3_stmt_status()] interface. +** The meanings of the various counters are as follows: +** +**
+**
SQLITE_STMTSTATUS_FULLSCAN_STEP
+**
This is the number of times that SQLite has stepped forward in +** a table as part of a full table scan. Large numbers for this counter +** may indicate opportunities for performance improvement through +** careful use of indices.
+** +**
SQLITE_STMTSTATUS_SORT
+**
This is the number of sort operations that have occurred. +** A non-zero value in this counter may indicate an opportunity to +** improvement performance through careful use of indices.
+** +**
+*/ +#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1 +#define SQLITE_STMTSTATUS_SORT 2 + +/* +** CAPI3REF: Custom Page Cache Object +** EXPERIMENTAL +** +** The sqlite3_pcache type is opaque. It is implemented by +** the pluggable module. The SQLite core has no knowledge of +** its size or internal structure and never deals with the +** sqlite3_pcache object except by holding and passing pointers +** to the object. +** +** See [sqlite3_pcache_methods] for additional information. +*/ +typedef struct sqlite3_pcache sqlite3_pcache; + +/* +** CAPI3REF: Application Defined Page Cache. +** KEYWORDS: {page cache} +** EXPERIMENTAL +** +** The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can +** register an alternative page cache implementation by passing in an +** instance of the sqlite3_pcache_methods structure. The majority of the +** heap memory used by SQLite is used by the page cache to cache data read +** from, or ready to be written to, the database file. By implementing a +** custom page cache using this API, an application can control more +** precisely the amount of memory consumed by SQLite, the way in which +** that memory is allocated and released, and the policies used to +** determine exactly which parts of a database file are cached and for +** how long. +** +** The contents of the sqlite3_pcache_methods structure are copied to an +** internal buffer by SQLite within the call to [sqlite3_config]. Hence +** the application may discard the parameter after the call to +** [sqlite3_config()] returns. +** +** The xInit() method is called once for each call to [sqlite3_initialize()] +** (usually only once during the lifetime of the process). It is passed +** a copy of the sqlite3_pcache_methods.pArg value. It can be used to set +** up global structures and mutexes required by the custom page cache +** implementation. +** +** The xShutdown() method is called from within [sqlite3_shutdown()], +** if the application invokes this API. It can be used to clean up +** any outstanding resources before process shutdown, if required. +** +** SQLite holds a [SQLITE_MUTEX_RECURSIVE] mutex when it invokes +** the xInit method, so the xInit method need not be threadsafe. The +** xShutdown method is only called from [sqlite3_shutdown()] so it does +** not need to be threadsafe either. All other methods must be threadsafe +** in multithreaded applications. +** +** SQLite will never invoke xInit() more than once without an intervening +** call to xShutdown(). +** +** The xCreate() method is used to construct a new cache instance. SQLite +** will typically create one cache instance for each open database file, +** though this is not guaranteed. The +** first parameter, szPage, is the size in bytes of the pages that must +** be allocated by the cache. szPage will not be a power of two. szPage +** will the page size of the database file that is to be cached plus an +** increment (here called "R") of about 100 or 200. SQLite will use the +** extra R bytes on each page to store metadata about the underlying +** database page on disk. The value of R depends +** on the SQLite version, the target platform, and how SQLite was compiled. +** R is constant for a particular build of SQLite. The second argument to +** xCreate(), bPurgeable, is true if the cache being created will +** be used to cache database pages of a file stored on disk, or +** false if it is used for an in-memory database. The cache implementation +** does not have to do anything special based with the value of bPurgeable; +** it is purely advisory. On a cache where bPurgeable is false, SQLite will +** never invoke xUnpin() except to deliberately delete a page. +** In other words, a cache created with bPurgeable set to false will +** never contain any unpinned pages. +** +** The xCachesize() method may be called at any time by SQLite to set the +** suggested maximum cache-size (number of pages stored by) the cache +** instance passed as the first argument. This is the value configured using +** the SQLite "[PRAGMA cache_size]" command. As with the bPurgeable parameter, +** the implementation is not required to do anything with this +** value; it is advisory only. +** +** The xPagecount() method should return the number of pages currently +** stored in the cache. +** +** The xFetch() method is used to fetch a page and return a pointer to it. +** A 'page', in this context, is a buffer of szPage bytes aligned at an +** 8-byte boundary. The page to be fetched is determined by the key. The +** mimimum key value is 1. After it has been retrieved using xFetch, the page +** is considered to be "pinned". +** +** If the requested page is already in the page cache, then the page cache +** implementation must return a pointer to the page buffer with its content +** intact. If the requested page is not already in the cache, then the +** behavior of the cache implementation is determined by the value of the +** createFlag parameter passed to xFetch, according to the following table: +** +** +**
createFlag Behaviour when page is not already in cache +**
0 Do not allocate a new page. Return NULL. +**
1 Allocate a new page if it easy and convenient to do so. +** Otherwise return NULL. +**
2 Make every effort to allocate a new page. Only return +** NULL if allocating a new page is effectively impossible. +**
+** +** SQLite will normally invoke xFetch() with a createFlag of 0 or 1. If +** a call to xFetch() with createFlag==1 returns NULL, then SQLite will +** attempt to unpin one or more cache pages by spilling the content of +** pinned pages to disk and synching the operating system disk cache. After +** attempting to unpin pages, the xFetch() method will be invoked again with +** a createFlag of 2. +** +** xUnpin() is called by SQLite with a pointer to a currently pinned page +** as its second argument. If the third parameter, discard, is non-zero, +** then the page should be evicted from the cache. In this case SQLite +** assumes that the next time the page is retrieved from the cache using +** the xFetch() method, it will be zeroed. If the discard parameter is +** zero, then the page is considered to be unpinned. The cache implementation +** may choose to evict unpinned pages at any time. +** +** The cache is not required to perform any reference counting. A single +** call to xUnpin() unpins the page regardless of the number of prior calls +** to xFetch(). +** +** The xRekey() method is used to change the key value associated with the +** page passed as the second argument from oldKey to newKey. If the cache +** previously contains an entry associated with newKey, it should be +** discarded. Any prior cache entry associated with newKey is guaranteed not +** to be pinned. +** +** When SQLite calls the xTruncate() method, the cache must discard all +** existing cache entries with page numbers (keys) greater than or equal +** to the value of the iLimit parameter passed to xTruncate(). If any +** of these pages are pinned, they are implicitly unpinned, meaning that +** they can be safely discarded. +** +** The xDestroy() method is used to delete a cache allocated by xCreate(). +** All resources associated with the specified cache should be freed. After +** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] +** handle invalid, and will not use it with any other sqlite3_pcache_methods +** functions. +*/ +typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; +struct sqlite3_pcache_methods { + void *pArg; + int (*xInit)(void*); + void (*xShutdown)(void*); + sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); + void (*xCachesize)(sqlite3_pcache*, int nCachesize); + int (*xPagecount)(sqlite3_pcache*); + void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); + void (*xUnpin)(sqlite3_pcache*, void*, int discard); + void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); + void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); + void (*xDestroy)(sqlite3_pcache*); +}; + +/* +** CAPI3REF: Online Backup Object +** EXPERIMENTAL +** +** The sqlite3_backup object records state information about an ongoing +** online backup operation. The sqlite3_backup object is created by +** a call to [sqlite3_backup_init()] and is destroyed by a call to +** [sqlite3_backup_finish()]. +** +** See Also: [Using the SQLite Online Backup API] +*/ +typedef struct sqlite3_backup sqlite3_backup; + +/* +** CAPI3REF: Online Backup API. +** EXPERIMENTAL +** +** This API is used to overwrite the contents of one database with that +** of another. It is useful either for creating backups of databases or +** for copying in-memory databases to or from persistent files. +** +** See Also: [Using the SQLite Online Backup API] +** +** Exclusive access is required to the destination database for the +** duration of the operation. However the source database is only +** read-locked while it is actually being read, it is not locked +** continuously for the entire operation. Thus, the backup may be +** performed on a live database without preventing other users from +** writing to the database for an extended period of time. +** +** To perform a backup operation: +**
    +**
  1. sqlite3_backup_init() is called once to initialize the +** backup, +**
  2. sqlite3_backup_step() is called one or more times to transfer +** the data between the two databases, and finally +**
  3. sqlite3_backup_finish() is called to release all resources +** associated with the backup operation. +**
+** There should be exactly one call to sqlite3_backup_finish() for each +** successful call to sqlite3_backup_init(). +** +** sqlite3_backup_init() +** +** The first two arguments passed to [sqlite3_backup_init()] are the database +** handle associated with the destination database and the database name +** used to attach the destination database to the handle. The database name +** is "main" for the main database, "temp" for the temporary database, or +** the name specified as part of the [ATTACH] statement if the destination is +** an attached database. The third and fourth arguments passed to +** sqlite3_backup_init() identify the [database connection] +** and database name used +** to access the source database. The values passed for the source and +** destination [database connection] parameters must not be the same. +** +** If an error occurs within sqlite3_backup_init(), then NULL is returned +** and an error code and error message written into the [database connection] +** passed as the first argument. They may be retrieved using the +** [sqlite3_errcode()], [sqlite3_errmsg()], and [sqlite3_errmsg16()] functions. +** Otherwise, if successful, a pointer to an [sqlite3_backup] object is +** returned. This pointer may be used with the sqlite3_backup_step() and +** sqlite3_backup_finish() functions to perform the specified backup +** operation. +** +** sqlite3_backup_step() +** +** Function [sqlite3_backup_step()] is used to copy up to nPage pages between +** the source and destination databases, where nPage is the value of the +** second parameter passed to sqlite3_backup_step(). If nPage is a negative +** value, all remaining source pages are copied. If the required pages are +** succesfully copied, but there are still more pages to copy before the +** backup is complete, it returns [SQLITE_OK]. If no error occured and there +** are no more pages to copy, then [SQLITE_DONE] is returned. If an error +** occurs, then an SQLite error code is returned. As well as [SQLITE_OK] and +** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY], +** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code. +** +** As well as the case where the destination database file was opened for +** read-only access, sqlite3_backup_step() may return [SQLITE_READONLY] if +** the destination is an in-memory database with a different page size +** from the source database. +** +** If sqlite3_backup_step() cannot obtain a required file-system lock, then +** the [sqlite3_busy_handler | busy-handler function] +** is invoked (if one is specified). If the +** busy-handler returns non-zero before the lock is available, then +** [SQLITE_BUSY] is returned to the caller. In this case the call to +** sqlite3_backup_step() can be retried later. If the source +** [database connection] +** is being used to write to the source database when sqlite3_backup_step() +** is called, then [SQLITE_LOCKED] is returned immediately. Again, in this +** case the call to sqlite3_backup_step() can be retried later on. If +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or +** [SQLITE_READONLY] is returned, then +** there is no point in retrying the call to sqlite3_backup_step(). These +** errors are considered fatal. At this point the application must accept +** that the backup operation has failed and pass the backup operation handle +** to the sqlite3_backup_finish() to release associated resources. +** +** Following the first call to sqlite3_backup_step(), an exclusive lock is +** obtained on the destination file. It is not released until either +** sqlite3_backup_finish() is called or the backup operation is complete +** and sqlite3_backup_step() returns [SQLITE_DONE]. Additionally, each time +** a call to sqlite3_backup_step() is made a [shared lock] is obtained on +** the source database file. This lock is released before the +** sqlite3_backup_step() call returns. Because the source database is not +** locked between calls to sqlite3_backup_step(), it may be modified mid-way +** through the backup procedure. If the source database is modified by an +** external process or via a database connection other than the one being +** used by the backup operation, then the backup will be transparently +** restarted by the next call to sqlite3_backup_step(). If the source +** database is modified by the using the same database connection as is used +** by the backup operation, then the backup database is transparently +** updated at the same time. +** +** sqlite3_backup_finish() +** +** Once sqlite3_backup_step() has returned [SQLITE_DONE], or when the +** application wishes to abandon the backup operation, the [sqlite3_backup] +** object should be passed to sqlite3_backup_finish(). This releases all +** resources associated with the backup operation. If sqlite3_backup_step() +** has not yet returned [SQLITE_DONE], then any active write-transaction on the +** destination database is rolled back. The [sqlite3_backup] object is invalid +** and may not be used following a call to sqlite3_backup_finish(). +** +** The value returned by sqlite3_backup_finish is [SQLITE_OK] if no error +** occurred, regardless or whether or not sqlite3_backup_step() was called +** a sufficient number of times to complete the backup operation. Or, if +** an out-of-memory condition or IO error occured during a call to +** sqlite3_backup_step() then [SQLITE_NOMEM] or an +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] error code +** is returned. In this case the error code and an error message are +** written to the destination [database connection]. +** +** A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() is +** not a permanent error and does not affect the return value of +** sqlite3_backup_finish(). +** +** sqlite3_backup_remaining(), sqlite3_backup_pagecount() +** +** Each call to sqlite3_backup_step() sets two values stored internally +** by an [sqlite3_backup] object. The number of pages still to be backed +** up, which may be queried by sqlite3_backup_remaining(), and the total +** number of pages in the source database file, which may be queried by +** sqlite3_backup_pagecount(). +** +** The values returned by these functions are only updated by +** sqlite3_backup_step(). If the source database is modified during a backup +** operation, then the values are not updated to account for any extra +** pages that need to be updated or the size of the source database file +** changing. +** +** Concurrent Usage of Database Handles +** +** The source [database connection] may be used by the application for other +** purposes while a backup operation is underway or being initialized. +** If SQLite is compiled and configured to support threadsafe database +** connections, then the source database connection may be used concurrently +** from within other threads. +** +** However, the application must guarantee that the destination database +** connection handle is not passed to any other API (by any thread) after +** sqlite3_backup_init() is called and before the corresponding call to +** sqlite3_backup_finish(). Unfortunately SQLite does not currently check +** for this, if the application does use the destination [database connection] +** for some other purpose during a backup operation, things may appear to +** work correctly but in fact be subtly malfunctioning. Use of the +** destination database connection while a backup is in progress might +** also cause a mutex deadlock. +** +** Furthermore, if running in [shared cache mode], the application must +** guarantee that the shared cache used by the destination database +** is not accessed while the backup is running. In practice this means +** that the application must guarantee that the file-system file being +** backed up to is not accessed by any connection within the process, +** not just the specific connection that was passed to sqlite3_backup_init(). +** +** The [sqlite3_backup] object itself is partially threadsafe. Multiple +** threads may safely make multiple concurrent calls to sqlite3_backup_step(). +** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() +** APIs are not strictly speaking threadsafe. If they are invoked at the +** same time as another thread is invoking sqlite3_backup_step() it is +** possible that they return invalid values. +*/ +SQLITE_API sqlite3_backup *sqlite3_backup_init( + sqlite3 *pDest, /* Destination database handle */ + const char *zDestName, /* Destination database name */ + sqlite3 *pSource, /* Source database handle */ + const char *zSourceName /* Source database name */ +); +SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p); +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); + +/* +** CAPI3REF: Unlock Notification +** EXPERIMENTAL +** +** When running in shared-cache mode, a database operation may fail with +** an [SQLITE_LOCKED] error if the required locks on the shared-cache or +** individual tables within the shared-cache cannot be obtained. See +** [SQLite Shared-Cache Mode] for a description of shared-cache locking. +** This API may be used to register a callback that SQLite will invoke +** when the connection currently holding the required lock relinquishes it. +** This API is only available if the library was compiled with the +** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined. +** +** See Also: [Using the SQLite Unlock Notification Feature]. +** +** Shared-cache locks are released when a database connection concludes +** its current transaction, either by committing it or rolling it back. +** +** When a connection (known as the blocked connection) fails to obtain a +** shared-cache lock and SQLITE_LOCKED is returned to the caller, the +** identity of the database connection (the blocking connection) that +** has locked the required resource is stored internally. After an +** application receives an SQLITE_LOCKED error, it may call the +** sqlite3_unlock_notify() method with the blocked connection handle as +** the first argument to register for a callback that will be invoked +** when the blocking connections current transaction is concluded. The +** callback is invoked from within the [sqlite3_step] or [sqlite3_close] +** call that concludes the blocking connections transaction. +** +** If sqlite3_unlock_notify() is called in a multi-threaded application, +** there is a chance that the blocking connection will have already +** concluded its transaction by the time sqlite3_unlock_notify() is invoked. +** If this happens, then the specified callback is invoked immediately, +** from within the call to sqlite3_unlock_notify(). +** +** If the blocked connection is attempting to obtain a write-lock on a +** shared-cache table, and more than one other connection currently holds +** a read-lock on the same table, then SQLite arbitrarily selects one of +** the other connections to use as the blocking connection. +** +** There may be at most one unlock-notify callback registered by a +** blocked connection. If sqlite3_unlock_notify() is called when the +** blocked connection already has a registered unlock-notify callback, +** then the new callback replaces the old. If sqlite3_unlock_notify() is +** called with a NULL pointer as its second argument, then any existing +** unlock-notify callback is cancelled. The blocked connections +** unlock-notify callback may also be canceled by closing the blocked +** connection using [sqlite3_close()]. +** +** The unlock-notify callback is not reentrant. If an application invokes +** any sqlite3_xxx API functions from within an unlock-notify callback, a +** crash or deadlock may be the result. +** +** Unless deadlock is detected (see below), sqlite3_unlock_notify() always +** returns SQLITE_OK. +** +** Callback Invocation Details +** +** When an unlock-notify callback is registered, the application provides a +** single void* pointer that is passed to the callback when it is invoked. +** However, the signature of the callback function allows SQLite to pass +** it an array of void* context pointers. The first argument passed to +** an unlock-notify callback is a pointer to an array of void* pointers, +** and the second is the number of entries in the array. +** +** When a blocking connections transaction is concluded, there may be +** more than one blocked connection that has registered for an unlock-notify +** callback. If two or more such blocked connections have specified the +** same callback function, then instead of invoking the callback function +** multiple times, it is invoked once with the set of void* context pointers +** specified by the blocked connections bundled together into an array. +** This gives the application an opportunity to prioritize any actions +** related to the set of unblocked database connections. +** +** Deadlock Detection +** +** Assuming that after registering for an unlock-notify callback a +** database waits for the callback to be issued before taking any further +** action (a reasonable assumption), then using this API may cause the +** application to deadlock. For example, if connection X is waiting for +** connection Y's transaction to be concluded, and similarly connection +** Y is waiting on connection X's transaction, then neither connection +** will proceed and the system may remain deadlocked indefinitely. +** +** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock +** detection. If a given call to sqlite3_unlock_notify() would put the +** system in a deadlocked state, then SQLITE_LOCKED is returned and no +** unlock-notify callback is registered. The system is said to be in +** a deadlocked state if connection A has registered for an unlock-notify +** callback on the conclusion of connection B's transaction, and connection +** B has itself registered for an unlock-notify callback when connection +** A's transaction is concluded. Indirect deadlock is also detected, so +** the system is also considered to be deadlocked if connection B has +** registered for an unlock-notify callback on the conclusion of connection +** C's transaction, where connection C is waiting on connection A. Any +** number of levels of indirection are allowed. +** +** The "DROP TABLE" Exception +** +** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost +** always appropriate to call sqlite3_unlock_notify(). There is however, +** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement, +** SQLite checks if there are any currently executing SELECT statements +** that belong to the same connection. If there are, SQLITE_LOCKED is +** returned. In this case there is no "blocking connection", so invoking +** sqlite3_unlock_notify() results in the unlock-notify callback being +** invoked immediately. If the application then re-attempts the "DROP TABLE" +** or "DROP INDEX" query, an infinite loop might be the result. +** +** One way around this problem is to check the extended error code returned +** by an sqlite3_step() call. If there is a blocking connection, then the +** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in +** the special "DROP TABLE/INDEX" case, the extended error code is just +** SQLITE_LOCKED. +*/ +SQLITE_API int sqlite3_unlock_notify( + sqlite3 *pBlocked, /* Waiting connection */ + void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ + void *pNotifyArg /* Argument to pass to xNotify */ +); + + +/* +** CAPI3REF: String Comparison +** EXPERIMENTAL +** +** The [sqlite3_strnicmp()] API allows applications and extensions to +** compare the contents of two buffers containing UTF-8 strings in a +** case-indendent fashion, using the same definition of case independence +** that SQLite uses internally when comparing identifiers. +*/ +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); + +/* +** Undo the hack that converts floating point types to integer for +** builds on processors without floating point support. +*/ +#ifdef SQLITE_OMIT_FLOATING_POINT +# undef double +#endif + +#ifdef __cplusplus +} /* End of the 'extern "C"' block */ +#endif +#endif + diff --git a/package/squid/Makefile b/package/squid/Makefile index 3fb78d66d..d10b71a16 100644 --- a/package/squid/Makefile +++ b/package/squid/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= squid PKG_VERSION:= 3.0.STABLE20 PKG_RELEASE:= 2 -PKG_BUILDDEP+= openssl PKG_MD5SUM:= b69577cfc5cfb6808ec426e3a933220d PKG_DESCR:= squid web and cache proxy PKG_SECTION:= net PKG_DEPENDS:= libopenssl libpthread +PKG_BUILDDEP+= openssl PKG_URL:= http://www.squid-cache.org PKG_SITES:= http://www.squid-cache.org/Versions/v3/3.0/ PKG_MULTI:= 1 @@ -81,7 +81,7 @@ $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_SMB_AUTH,ntlm_auth)) # LIBS="-nodefaultlibs -luClibc++ -ldl -lm" #endif -CONFIGURE_STYLE:= autotool gnu +AUTOTOOL_STYLE:= autotool CONFIGURE_ENV+= ac_cv_sizeof_void_p=4 \ ac_cv_sizeof_short=2 \ ac_cv_sizeof_int=4 \ @@ -134,8 +134,6 @@ CONFIGURE_ARGS+= --datadir=/usr/share/squid \ --enable-ntlm-auth-helpers="${NTLM_AUTH_HELPERS}" \ --enable-digest-auth-helpers="${DIGEST_AUTH_HELPERS}" \ --enable-external-acl-helpers="${EXTERNAL_ACL_HELPERS}" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto #ifeq (${ADK_COMPILE_SQUID_WITH_UCLIBCXX},y) # add workaround because libtool tries to link libstdc++ @@ -146,12 +144,14 @@ INSTALL_STYLE:= auto post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${INSTALL_DIR} ${IDIR_SQUID}/etc/squid - ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf ${IDIR_SQUID}/etc/squid/ + ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \ + ${IDIR_SQUID}/etc/squid/ ${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/ ${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid ${CP} ${WRKINST}/usr/share/squid/* ${IDIR_SQUID}/usr/share/squid/ ${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid ${INSTALL_BIN} ${WRKINST}/usr/sbin/squid ${IDIR_SQUID}/usr/sbin/ - ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/unlinkd ${IDIR_SQUID}/usr/lib/squid + ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/unlinkd \ + ${IDIR_SQUID}/usr/lib/squid include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/srelay/Makefile b/package/srelay/Makefile index c2372448b..b1f772faa 100644 --- a/package/srelay/Makefile +++ b/package/srelay/Makefile @@ -15,11 +15,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SRELAY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +INSTALL_STYLE:= manual + CONFIGURE_ENV+= ac_cv_lib_nsl_getaddrinfo=no CONFIGURE_ARGS+= --disable-thread \ --with-libwrap=no -BUILD_STYLE:= auto do-install: ${INSTALL_DIR} ${IDIR_SRELAY}/usr/bin ${IDIR_SRELAY}/etc diff --git a/package/ssltunnel/Makefile b/package/ssltunnel/Makefile index 87f653380..005601528 100644 --- a/package/ssltunnel/Makefile +++ b/package/ssltunnel/Makefile @@ -6,27 +6,27 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ssltunnel PKG_VERSION:= 1.16 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openssl ppp PKG_MD5SUM:= 4039b50566a33a4077883ea974e476d5 PKG_DESCR:= A PPP over SSL vpn tool PKG_SECTION:= net -PKG_DEPENDS:= ppp +PKG_DEPENDS:= libopenssl ppp +PKG_BUILDDEP+= openssl ppp PKG_SITES:= http://www.hsc.fr/ressources/outils/ssltunnel/download/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SSLTUNNEL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= BUILD_CC="${TARGET_CC}" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto XAKE_FLAGS+= CCOPT="${TARGET_CFLAGS}" INCLS="-I. -I${STAGING_DIR}/usr/include" post-install: ${INSTALL_DIR} ${IDIR_SSLTUNNEL}/usr/{bin,sbin} - ${INSTALL_BIN} ${WRKINST}/usr/bin/pppclient ${IDIR_SSLTUNNEL}/usr/bin/ - ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppwho ${IDIR_SSLTUNNEL}/usr/sbin/ - ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppserver ${IDIR_SSLTUNNEL}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/pppclient \ + ${IDIR_SSLTUNNEL}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppwho \ + ${IDIR_SSLTUNNEL}/usr/sbin/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppserver \ + ${IDIR_SSLTUNNEL}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ssmtp/Makefile b/package/ssmtp/Makefile index 1fe4431d6..dc3ea501e 100644 --- a/package/ssmtp/Makefile +++ b/package/ssmtp/Makefile @@ -17,9 +17,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SSMTP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +INSTALL_STYLE:= manual + CONFIGURE_ENV+= ac_cv_lib_nsl_gethostname=no -BUILD_STYLE:= auto do-install: ${INSTALL_DIR} ${IDIR_SSMTP}/etc/ssmtp diff --git a/package/strace/Makefile b/package/strace/Makefile index 44f56502a..66e0e14be 100644 --- a/package/strace/Makefile +++ b/package/strace/Makefile @@ -17,11 +17,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,STRACE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_STRACE}/usr/sbin/ - ${INSTALL_BIN} ${WRKBUILD}/${PKG_NAME} ${IDIR_STRACE}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/strace ${IDIR_STRACE}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/stress/Makefile b/package/stress/Makefile index dc5a1b286..5b710bf6f 100644 --- a/package/stress/Makefile +++ b/package/stress/Makefile @@ -15,10 +15,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,STRESS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-static -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_STRESS}/usr/bin/ diff --git a/package/subversion/Makefile b/package/subversion/Makefile index 9203f9510..10e6b6d3e 100644 --- a/package/subversion/Makefile +++ b/package/subversion/Makefile @@ -6,25 +6,21 @@ include ${TOPDIR}/rules.mk PKG_NAME:= subversion PKG_VERSION:= 1.6.6 PKG_RELEASE:= 1 -PKG_BUILDDEP+= apr-util expat apr zlib libiconv -ifneq ($(ADK_PACKAGE_SUBVERSION_NEON),) -PKG_BUILDDEP+= neon -endif PKG_MD5SUM:= 0ab0f26f6eb056add1b9d3059a3f4247 PKG_DESCR:= revision control program PKG_SECTION:= net PKG_DEPENDS:= zlib apr apr-util libiconv libexpat +PKG_BUILDDEP+= apr-util expat apr zlib libiconv +ifneq ($(ADK_PACKAGE_SUBVERSION_NEON),) +PKG_DEPENDS+= neon +PKG_BUILDDEP+= neon +endif PKG_SITES:= http://subversion.tigris.org/downloads/ include ${TOPDIR}/mk/package.mk -ifeq ($(ADK_PACKAGE_SUBVERSION_NEON),y) -PKG_DEPENDS+= neon -endif - $(eval $(call PKG_template,SUBVERSION,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-apr=${STAGING_DIR}/usr/bin/apr-config CONFIGURE_ARGS+= --with-apr-util=${STAGING_DIR}/usr/bin/apr-config CONFIGURE_ARGS+= --disable-mod-activation @@ -36,7 +32,6 @@ CONFIGURE_ARGS+= --without-jikes CONFIGURE_ARGS+= --without-jdk CONFIGURE_ARGS+= --disable-javahl CONFIGURE_ARGS+= --without-berkeley-db - LIBS= -lsqlite3 -laprutil-0 -lapr-0 -lexpat -liconv ifeq ($(ADK_PACKAGE_SUBVERSION_NEON),y) @@ -51,9 +46,6 @@ LIBS+= -pthread endif CONFIGURE_ENV+= LIBS='${LIBS}' - -BUILD_STYLE:= auto -INSTALL_STYLE:= auto INSTALL_TARGET:= external-install local-install post-install: diff --git a/package/swconfig/Makefile b/package/swconfig/Makefile index f9f183b10..8d7573c36 100644 --- a/package/swconfig/Makefile +++ b/package/swconfig/Makefile @@ -6,25 +6,24 @@ include ${TOPDIR}/rules.mk PKG_NAME:= swconfig PKG_VERSION:= 1.0 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libnl PKG_DESCR:= switch configuration utility PKG_SECTION:= misc +PKG_DEPENDS:= libnl +PKG_BUILDDEP+= libnl PKG_TARGET_CONFIG:= rb433 -WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION} NO_DISTFILES:= 1 include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SWCONFIG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -XAKE_FLAGS:= LIBS="-lnl -lm" CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_DIR)/include" -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual -do-configure: - mkdir -p ${WRKBUILD} - ${CP} ./src/* ${WRKBUILD} +XAKE_FLAGS:= LIBS="-lnl -lm" CFLAGS="$(TARGET_CFLAGS) \ + -I$(LINUX_DIR)/include" do-install: ${INSTALL_DIR} ${IDIR_SWCONFIG}/sbin diff --git a/package/syslog-ng/Makefile b/package/syslog-ng/Makefile index 5bd1daa0c..3289f0097 100644 --- a/package/syslog-ng/Makefile +++ b/package/syslog-ng/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= syslog-ng PKG_VERSION:= 1.6.12 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libol tcp_wrappers PKG_MD5SUM:= a3cbfdb6e1e5beea181a7349749719f3 PKG_DESCR:= A powerful syslog daemon PKG_SECTION:= admin PKG_DEPENDS:= libol libwrap +PKG_BUILDDEP+= libol tcp_wrappers PKG_URL:= http://www.balabit.com PKG_SITES:= http://www.balabit.com/downloads/files/syslog-ng/sources/1.6/src/ @@ -18,17 +18,17 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SYSLOG_NG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --enable-full-dynamic \ --enable-tcp-wrapper CONFIGURE_ENV+= ac_cv_path_libol_config=${STAGING_DIR}/usr/bin CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: - ${INSTALL_DIR} ${IDIR_SYSLOG_NG}/usr/sbin ${IDIR_SYSLOG_NG}/etc/syslog-ng - ${INSTALL_BIN} ${WRKINST}/usr/sbin/syslog-ng ${IDIR_SYSLOG_NG}/usr/sbin/ - ${INSTALL_DATA} ./files/syslog-ng.conf ${IDIR_SYSLOG_NG}/etc/syslog-ng/ + ${INSTALL_DIR} ${IDIR_SYSLOG_NG}/usr/sbin \ + ${IDIR_SYSLOG_NG}/etc/syslog-ng + ${INSTALL_BIN} ${WRKINST}/usr/sbin/syslog-ng \ + ${IDIR_SYSLOG_NG}/usr/sbin/ + ${INSTALL_DATA} ./files/syslog-ng.conf \ + ${IDIR_SYSLOG_NG}/etc/syslog-ng/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/sysstat/Makefile b/package/sysstat/Makefile index e1f28029b..e1c5fabf7 100644 --- a/package/sysstat/Makefile +++ b/package/sysstat/Makefile @@ -15,8 +15,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SYSSTAT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual do-configure: ${CP} ./files/CONFIG ${WRKBUILD}/build/ diff --git a/package/tar/Makefile b/package/tar/Makefile index c1a3823fb..380f8853e 100644 --- a/package/tar/Makefile +++ b/package/tar/Makefile @@ -17,11 +17,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TAR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= gl_cv_func_mbrtowc_incomplete_state=no \ gl_cv_func_wcrtomb_retval=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_TAR}/usr/bin diff --git a/package/tcl/Makefile b/package/tcl/Makefile index 939eceaa7..3eb849626 100644 --- a/package/tcl/Makefile +++ b/package/tcl/Makefile @@ -20,14 +20,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TCL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TCFLAGS+= -ldl -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= tcl_cv_strstr_unbroken=ok \ tcl_cv_strtod_buggy=ok \ tcl_cv_strtod_unbroken=ok \ tcl_cv_strtoul_unbroken=ok CONFIGURE_ARGS+= --enable-man-symlinks -BUILD_STYLE:= auto -INSTALL_STYLE:= auto INSTALL_TARGET= install-binaries install-libraries post-install: diff --git a/package/tcp_wrappers/Makefile b/package/tcp_wrappers/Makefile index 5191a1150..35fbf56dd 100644 --- a/package/tcp_wrappers/Makefile +++ b/package/tcp_wrappers/Makefile @@ -19,14 +19,17 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBWRAP,libwrap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + ALL_TARGET:= tidy all MAKE_FLAGS+= OPT_CFLAGS="${TARGET_CFLAGS}" \ CC="${TARGET_CC}" \ NETGROUP= \ VSYSLOG= \ BUGS= \ - EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 \ + 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 \ @@ -35,10 +38,9 @@ MAKE_FLAGS+= OPT_CFLAGS="${TARGET_CFLAGS}" \ do-install: ${INSTALL_DIR} ${IDIR_LIBWRAP}/usr/lib - ${CP} ${WRKBUILD}/shared/libwrap.so.* ${IDIR_LIBWRAP}/usr/lib/ + ${CP} ${WRKBUILD}/shared/libwrap.so* ${IDIR_LIBWRAP}/usr/lib/ ${INSTALL_DIR} ${WRKINST}/usr/lib ${WRKINST}/usr/include ${CP} ${WRKBUILD}/tcpd.h ${WRKINST}/usr/include ${CP} ${WRKBUILD}/shared/libwrap.so* ${WRKINST}/usr/lib - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/tcpdump/Makefile b/package/tcpdump/Makefile index c704097e1..2f8b3b7c2 100644 --- a/package/tcpdump/Makefile +++ b/package/tcpdump/Makefile @@ -21,14 +21,12 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TCPDUMP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= BUILD_CC="${TARGET_CC}" HOSTCC=${HOSTCC} \ ac_cv_linux_vers=2 \ td_cv_buggygetaddrinfo="no" CONFIGURE_ARGS+= --without-crypto -BUILD_STYLE:= auto -INSTALL_STYLE:= auto -XAKE_FLAGS+= CCOPT="${TARGET_CFLAGS}" INCLS="-I. -I${STAGING_DIR}/usr/include" +XAKE_FLAGS+= CCOPT="${TARGET_CFLAGS}" \ + INCLS="-I. -I${STAGING_DIR}/usr/include" post-install: ${INSTALL_DIR} ${IDIR_TCPDUMP}/usr/sbin diff --git a/package/tinc/Makefile b/package/tinc/Makefile index 0b697916e..29b443a4a 100644 --- a/package/tinc/Makefile +++ b/package/tinc/Makefile @@ -6,26 +6,21 @@ include ${TOPDIR}/rules.mk PKG_NAME:= tinc PKG_VERSION:= 1.0.11 PKG_RELEASE:= 1 -PKG_BUILDDEP+= zlib openssl liblzo PKG_MD5SUM:= ee0b1a3366c6e379cae34be6fa5dcb15 PKG_DESCR:= VPN tunnel daemon PKG_SECTION:= net PKG_DEPENDS:= zlib liblzo libopenssl kmod-tun +PKG_BUILDDEP+= zlib liblzo openssl PKG_URL:= http://www.tinc-vpn.org -PKG_SITES:= http://www.tinc-vpn.org/packages/ \ - http://ftp.yi.se/pub/tinc/ \ - http://www.mirrors.wiretapped.net/security/network-security/tinc/ +PKG_SITES:= http://www.tinc-vpn.org/packages/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TINC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --with-kernel=${LINUX_DIR} \ --with-zlib=${STAGING_DIR}/usr/ \ --with-lzo-include=${STAGING_DIR}/usr/include/lzo -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_TINC}/usr/sbin diff --git a/package/tinyproxy/Makefile b/package/tinyproxy/Makefile index 5bf6a8af8..88f003d9e 100644 --- a/package/tinyproxy/Makefile +++ b/package/tinyproxy/Makefile @@ -16,9 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TINYPROXY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto CONFIGURE_ENV+= ac_cv_header_libintl_h=no \ ac_cv_lib_nsl_gethostbyaddr=no \ ac_cv_lib_nsl_gethostname=no @@ -37,9 +34,17 @@ post-install: ${INSTALL_DIR} ${IDIR_TINYPROXY}/usr/sbin \ ${IDIR_TINYPROXY}/etc/tinyproxy \ ${IDIR_TINYPROXY}/usr/share/tinyproxy - ${INSTALL_DATA} ./files/tinyproxy.conf ${IDIR_TINYPROXY}/etc/tinyproxy - ${INSTALL_BIN} ${WRKINST}/usr/sbin/tinyproxy ${IDIR_TINYPROXY}/usr/sbin/ - ${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/{debug,default,stats}.html ${IDIR_TINYPROXY}/usr/share/tinyproxy/ - ${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/HTML_VARIABLES ${IDIR_TINYPROXY}/usr/share/tinyproxy/ + ${INSTALL_DATA} ./files/tinyproxy.conf \ + ${IDIR_TINYPROXY}/etc/tinyproxy + ${INSTALL_BIN} ${WRKINST}/usr/sbin/tinyproxy \ + ${IDIR_TINYPROXY}/usr/sbin/ + ${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/debug.html \ + ${IDIR_TINYPROXY}/usr/share/tinyproxy/ + ${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/default.html \ + ${IDIR_TINYPROXY}/usr/share/tinyproxy/ + ${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/stats.html \ + ${IDIR_TINYPROXY}/usr/share/tinyproxy/ + ${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/HTML_VARIABLES \ + ${IDIR_TINYPROXY}/usr/share/tinyproxy/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/tmsnc/Makefile b/package/tmsnc/Makefile index 915ef3dc1..7d22319dd 100644 --- a/package/tmsnc/Makefile +++ b/package/tmsnc/Makefile @@ -16,12 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TMSNC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= --with-libiconv-prefix=${STAGING_DIR}/usr \ --with-openssl=${STAGING_DIR}/usr \ --with-ncurses=${STAGING_DIR} -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: ${INSTALL_DIR} ${IDIR_TMSNC}/usr/bin diff --git a/package/tntnet/Makefile b/package/tntnet/Makefile index 0d23f4095..183f4da2b 100644 --- a/package/tntnet/Makefile +++ b/package/tntnet/Makefile @@ -9,13 +9,13 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= e2c3c5075a890711a7569730493c0996 PKG_DESCR:= small C++ application server PKG_SECTION:= net -PKG_BUILDDEP+= cxxtools zlib +PKG_DEPENDS:= cxxtools zlib libiconv libpthread +PKG_BUILDDEP+= cxxtools zlib libiconv ifneq (${ADK_COMPILE_TNTNET_WITH_OPENSSL},) PKG_BUILDDEP+= openssl else ifneq (${ADK_COMPILE_TNTNET_WITH_GNUTLS},) PKG_BUILDDEP+= gnutls endif -PKG_DEPENDS:= cxxtools zlib libpthread libiconv PKG_URL:= http://www.tntnet.org PKG_SITES:= http://www.tntnet.org/download/ #PKG_CXX:= TNTNET @@ -37,7 +37,6 @@ else TLDFLAGS+= -liconv -lpthread -lcxxtools -lm -ldl endif -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-epoll \ --without-sdk \ --without-cgi \ @@ -51,8 +50,6 @@ CONFIGURE_ARGS+= --without-ssl endif CONFIGURE_ENV+= CXXFLAGS='${TCXXFLAGS}' \ ac_cv_path_cxxtools_config=${STAGING_DIR}/usr/bin -BUILD_STYLE:= auto -INSTALL_STYLE:= auto #ifeq (${ADK_COMPILE_TNTNET_WITH_UCLIBCXX},y) # add workaround because libtool tries to link libstdc++ @@ -71,7 +68,9 @@ post-install: ${INSTALL_DATA} ./files/mime.conf \ ${IDIR_TNTNET}/etc/tntnet ${CP} ${WRKINST}/usr/bin/tntnet ${IDIR_TNTNET}/usr/bin - ${CP} ${WRKINST}/usr/lib/tntnet/tntnet.so* ${IDIR_TNTNET}/usr/lib/tntnet - ${CP} ${WRKINST}/usr/lib/libtntnet.so.* ${IDIR_TNTNET}/usr/lib + ${CP} ${WRKINST}/usr/lib/tntnet/tntnet.so* \ + ${IDIR_TNTNET}/usr/lib/tntnet + ${CP} ${WRKINST}/usr/lib/libtntnet.so.* \ + ${IDIR_TNTNET}/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/tor/Makefile b/package/tor/Makefile index f25a3f5bb..414d50a30 100644 --- a/package/tor/Makefile +++ b/package/tor/Makefile @@ -6,21 +6,18 @@ include ${TOPDIR}/rules.mk PKG_NAME:= tor PKG_VERSION:= 0.2.1.20 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libevent openssl zlib PKG_MD5SUM:= 0d62ee2332fdd95de43debac7435df19 PKG_DESCR:= An anonymous Internet communication system PKG_SECTION:= net -PKG_DEPENDS:= libevent libopenssl libpthread zlib +PKG_DEPENDS:= libevent libopenssl zlib libpthread +PKG_BUILDDEP+= libevent openssl zlib PKG_URL:= http://tor.eff.org PKG_SITES:= http://tor.eff.org/dist/ \ - http://ftp.se.linux.org/crypto/tor/ \ - http://tor.meulie.net/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TOR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_libevent_normal=yes \ ac_cv_libevent_linker_option="" \ ac_cv_libevent_dir="${STAGING_DIR}/usr" \ @@ -29,8 +26,6 @@ CONFIGURE_ENV+= ac_cv_libevent_normal=yes \ tor_cv_time_t_signed=yes \ tor_cv_null_is_zero=yes \ tor_cv_unaligned_ok=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_TOR}/usr/bin ${IDIR_TOR}/etc/tor diff --git a/package/tptest/Makefile b/package/tptest/Makefile index 3f6c0fc3c..436fce42c 100644 --- a/package/tptest/Makefile +++ b/package/tptest/Makefile @@ -16,6 +16,10 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,TPTEST,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: (cd ${WRKSRC}/apps/unix/server && ${MAKE} && ${MAKE} install DESTDIR="${WRKINST}") (cd ${WRKSRC}/apps/unix/client && ${MAKE} && ${MAKE} install DESTDIR="${WRKINST}") diff --git a/package/traceroute/Makefile b/package/traceroute/Makefile index 4db926568..fbec99543 100644 --- a/package/traceroute/Makefile +++ b/package/traceroute/Makefile @@ -16,12 +16,12 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,TRACEROUTE,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual + MAKE_FLAGS+= CC="${TARGET_CC}" \ AR="${TARGET_CROSS}ar" \ RANLIB="${TARGET_CROSS}ranlib" \ LDFLAGS="-L${WRKSRC}/libsupp" -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_TRACEROUTE)/usr/bin diff --git a/package/trafshow/Makefile b/package/trafshow/Makefile index d0d0dde3a..6f0411225 100644 --- a/package/trafshow/Makefile +++ b/package/trafshow/Makefile @@ -4,25 +4,24 @@ include ${TOPDIR}/rules.mk PKG_NAME:= trafshow -PKG_VERSION:= 4.0 +PKG_VERSION:= 5.2.3 PKG_RELEASE:= 1 PKG_MD5SUM:= 0b2f0bb23b7832138b7d841437b9e182 +PKG_SECTION:= net +PKG_SITES:= http://www.sfr-fresh.com/linux/misc/ +PKG_NOPARALLEL:= 1 + DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz -PKG_SITES:= ftp://ftp.nsk.su/pub/RinetSoftware/ -WRKDIST= ${WRKDIR}/trafshow-5.2.3 include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TRAFSHOW,trafshow,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -TCFLAGS+= -DHAVE_SOCKADDR_STORAGE -DHAVE_HAS_COLORS -I$(STAGING_DIR)/usr/include +TCFLAGS+= -DHAVE_SOCKADDR_STORAGE -DHAVE_HAS_COLORS TLDFLAGS+= -pthread -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -ALL_TARGET= -do-install: - ${INSTALL_DIR} ${IDIR_TRAFSHOW}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/trafshow ${IDIR_TRAFSHOW}/usr/sbin/ +post-install: + ${INSTALL_DIR} ${IDIR_TRAFSHOW}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/trafshow ${IDIR_TRAFSHOW}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/trafshow/patches/patch-Makefile_in b/package/trafshow/patches/patch-Makefile_in new file mode 100644 index 000000000..d5562d64c --- /dev/null +++ b/package/trafshow/patches/patch-Makefile_in @@ -0,0 +1,24 @@ +--- trafshow-5.2.3.orig/Makefile.in 2004-06-15 10:29:14.000000000 +0200 ++++ trafshow-5.2.3/Makefile.in 2010-02-05 23:07:13.164334256 +0100 +@@ -59,6 +59,8 @@ OBJ = $(CSRC:.c=.o) $(YSRC:.y=.o) $(LSRC + + CLEANFILES = $(PROG) $(OBJ) $(GENSRC) y.tab.h + ++all: $(PROG) ++ + $(PROG): $(OBJ) + @rm -f $@ + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) +@@ -73,9 +75,9 @@ version.c: VERSION Makefile + @echo 'char compiled[] = "$(CC) $(CFLAGS) $(LIBS)";' >> $@ + + install: +- ./install-sh -c -s -m 555 -o bin -g bin $(PROG) $(BINDEST)/$(PROG) +- ./install-sh -c -m 444 -o bin -g bin $(PROG).1 $(MANDEST)/man1/$(PROG).1 +- [ -f /etc/$(PROG) ] || ./install-sh -c -m 444 .trafshow /etc/$(PROG) ++ ./install-sh -c -m 755 $(PROG) $(DESTDIR)$(BINDEST)/$(PROG) ++ ./install-sh -c -m 644 $(PROG).1 $(DESTDIR)$(MANDEST)/man1/$(PROG).1 ++ ./install-sh -c -m 644 .trafshow $(DESTDIR)/etc/$(PROG) + + clean: + rm -f $(CLEANFILES) diff --git a/package/trafshow/patches/patch-session_c b/package/trafshow/patches/patch-session_c new file mode 100644 index 000000000..cee3cb266 --- /dev/null +++ b/package/trafshow/patches/patch-session_c @@ -0,0 +1,11 @@ +--- trafshow-5.2.3.orig/session.c 2006-01-08 06:58:08.000000000 +0100 ++++ trafshow-5.2.3/session.c 2010-02-05 22:59:54.974334342 +0100 +@@ -40,7 +40,7 @@ + #define ASYNC_MODE FNDELAY + #elif O_ASYNC + #define ASYNC_MODE O_ASYNC +-#elif ++#else + #error the fcntl argument to turn ON/OFF non-blocking I/O is unknown + #endif + diff --git a/package/tslib/Makefile b/package/tslib/Makefile index 9a7c0fd6b..59c960a10 100644 --- a/package/tslib/Makefile +++ b/package/tslib/Makefile @@ -19,7 +19,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,TSLIB,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= autogen gnu +AUTOTOOL_STYLE:= autogen CONFIGURE_ARGS+= --disable-ucb1x00 \ --disable-corgi \ --disable-collie \ @@ -27,8 +27,6 @@ CONFIGURE_ARGS+= --disable-ucb1x00 \ --disable-mk712 \ --disable-linear-h2200 \ --disable-arctic2 -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_TSLIB)/etc diff --git a/package/ttcp/Makefile b/package/ttcp/Makefile index 81f8daae2..e8df1cd43 100644 --- a/package/ttcp/Makefile +++ b/package/ttcp/Makefile @@ -10,14 +10,18 @@ PKG_DESCR:= A small utility to test TCP connection performance PKG_SECTION:= net NO_DISTFILES:= 1 -WRKDIST= ${WRKDIR}/ttcp include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TTCP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: - ${TARGET_CC} ${TARGET_CFLAGS} -o ${WRKBUILD}/ttcp ttcp.c + ${TARGET_CC} -Wall ${TCPPFLAGS} ${TCFLAGS} -o ${WRKBUILD}/ttcp \ + ${WRKBUILD}/ttcp.c do-install: ${INSTALL_DIR} ${IDIR_TTCP}/usr/bin diff --git a/package/ttcp/src/ttcp.c b/package/ttcp/src/ttcp.c new file mode 100644 index 000000000..3b1f07adf --- /dev/null +++ b/package/ttcp/src/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); + } + + memset((char *)&sinhim, 0, 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; + memcpy((char*)&addr_tmp, addr->h_addr, 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/package/ttcp/ttcp.c b/package/ttcp/ttcp.c deleted file mode 100644 index 3b1f07adf..000000000 --- a/package/ttcp/ttcp.c +++ /dev/null @@ -1,2374 +0,0 @@ -/* - * 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); - } - - memset((char *)&sinhim, 0, 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; - memcpy((char*)&addr_tmp, addr->h_addr, 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/package/uclibc++/Makefile b/package/uclibc++/Makefile index 0041fc146..e4b58b198 100644 --- a/package/uclibc++/Makefile +++ b/package/uclibc++/Makefile @@ -18,7 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,UCLIBCXX,uclibc++,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= TOPDIR="${WRKBUILD}/" \ ${TARGET_CONFIGURE_OPTS} \ ARCH_CFLAGS="${TARGET_CFLAGS}" \ diff --git a/package/uclibc/Makefile b/package/uclibc/Makefile index 5ee7b280c..aeffb3563 100644 --- a/package/uclibc/Makefile +++ b/package/uclibc/Makefile @@ -14,6 +14,10 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,UCLIBC,uclibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,UCLIBC_DEV,uclibc-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + SUB_INSTALLS-y:= SUB_INSTALLS-m:= SUB_INSTALLS-${ADK_PACKAGE_UCLIBC_DEV}+= uclibc-dev-install @@ -34,6 +38,7 @@ do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} done uclibc-dev-install: + ${INSTALL_DIR} ${IDIR_UCLIBC_DEV}/usr/lib ${CP} ${STAGING_DIR}/lib/crt* ${IDIR_UCLIBC_DEV}/usr/lib # header package $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \ diff --git a/package/udev/Makefile b/package/udev/Makefile index 4f329db6b..d3c33b962 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= udev -PKG_VERSION:= 149 +PKG_VERSION:= 151 PKG_RELEASE:= 1 -PKG_MD5SUM:= b218bd15939e8afc6368e1907a48bb26 +PKG_MD5SUM:= aeae0e6273dcbec246c3c1b9868ebed1 PKG_DESCR:= Dynamic device management subsystem PKG_SECTION:= base PKG_URL:= http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -14,16 +14,15 @@ PKG_SITES:= ${MASTER_SITE_KERNEL:=utils/kernel/hotplug/} DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 +CFLINE_UDEV:= depends on ADK_TARGET_LIB_EGLIBC || ADK_TARGET_LIB_GLIBC\n\t + include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,UDEV,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-extras \ --disable-logging \ --disable-introspection -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_UDEV}/usr/sbin ${IDIR_UDEV}/etc/udev diff --git a/package/udp-broadcast-relay/Makefile b/package/udp-broadcast-relay/Makefile index cae0bb095..d2d4bd86b 100644 --- a/package/udp-broadcast-relay/Makefile +++ b/package/udp-broadcast-relay/Makefile @@ -16,11 +16,17 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,UDP_BROADCAST_RELAY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-build: - ${TARGET_CC} ${TARGET_CFLAGS} ${WRKBUILD}/main.c -o ${WRKBUILD}/${PKG_NAME} + ${TARGET_CC} -Wall ${TARGET_CFLAGS} ${WRKBUILD}/main.c \ + -o ${WRKBUILD}/udp-broadcast-relay do-install: ${INSTALL_DIR} ${IDIR_UDP_BROADCAST_RELAY}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/${PKG_NAME} ${IDIR_UDP_BROADCAST_RELAY}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/udp-broadcast-relay \ + ${IDIR_UDP_BROADCAST_RELAY}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ulogd/Makefile b/package/ulogd/Makefile index 7679b0318..cfb002702 100644 --- a/package/ulogd/Makefile +++ b/package/ulogd/Makefile @@ -53,9 +53,6 @@ SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_SQLITE}+= ulogd-mod-sqlite-install SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_EXTRA}+= ulogd-mod-extra-install TCFLAGS+= -fPIC -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto ifneq (${ADK_PACKAGE_ULOGD_MOD_PCAP},) CONFIGURE_ENV+= ac_cv_header_pcap_h=yes @@ -79,7 +76,8 @@ post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} ${INSTALL_DIR} ${IDIR_ULOGD}/usr/sbin ${IDIR_ULOGD}/usr/lib/ulogd/ ${INSTALL_DIR} ${IDIR_ULOGD}/etc ${INSTALL_DATA} ${WRKINST}/etc/ulogd.conf ${IDIR_ULOGD}/etc/ - ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_BASE.so ${IDIR_ULOGD}/usr/lib/ulogd/ + ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_BASE.so \ + ${IDIR_ULOGD}/usr/lib/ulogd/ ${INSTALL_BIN} ${WRKINST}/usr/sbin/ulogd ${IDIR_ULOGD}/usr/sbin/ ulogd-mod-extra-install: diff --git a/package/updatedd/Makefile b/package/updatedd/Makefile index f13bee501..6859dd6df 100644 --- a/package/updatedd/Makefile +++ b/package/updatedd/Makefile @@ -32,10 +32,7 @@ $(eval $(call PKG_template,UPDATEDD_MOD_OVH,updatedd-mod-ovh,${PKG_VERSION}-${PK $(eval $(call PKG_template,UPDATEDD_MOD_REGFISH,updatedd-mod-regfish,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,UPDATEDD_MOD_TZO,updatedd-mod-tzo,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= ac_cv_lib_nsl_gethostbyname=no -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_UPDATEDD}/usr/bin diff --git a/package/usbutils/Makefile b/package/usbutils/Makefile index 01507694b..8d8cba862 100644 --- a/package/usbutils/Makefile +++ b/package/usbutils/Makefile @@ -6,21 +6,17 @@ include ${TOPDIR}/rules.mk PKG_NAME:= usbutils PKG_VERSION:= 0.73 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libusb libusb-compat PKG_MD5SUM:= 88978b4ad891f610620b1b8e5e0f43eb PKG_DESCR:= A program to list USB devices PKG_SECTION:= misc PKG_DEPENDS:= libusb libusb-compat libpthread +PKG_BUILDDEP+= libusb libusb-compat PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=linux-usb/} include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LSUSB,lsusb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_LSUSB}/usr/share ${INSTALL_DATA} ${WRKINST}/usr/share/usb.ids.gz ${IDIR_LSUSB}/usr/share/ diff --git a/package/ussp-push/Makefile b/package/ussp-push/Makefile index f22f474fb..db71ffad0 100644 --- a/package/ussp-push/Makefile +++ b/package/ussp-push/Makefile @@ -6,20 +6,17 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ussp-push PKG_VERSION:= 0.11 PKG_RELEASE:= 1 -PKG_BUILDDEP+= openobex PKG_MD5SUM:= 5c44983ee27809867041feff6bb4423a PKG_DESCR:= OBEX push command PKG_SECTION:= bluetooth PKG_DEPENDS:= openobex +PKG_BUILDDEP+= openobex PKG_SITES:= http://xmailserver.org/ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,USSP_PUSH,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto MAKE_FLAGS+= OBEXINC="${TCPPFLAGS}" \ OBEXLIB="${TLDFLAGS} -lopenobex -lbluetooth" diff --git a/package/ustl/Makefile b/package/ustl/Makefile index 8f9266c4b..c1d8943b4 100644 --- a/package/ustl/Makefile +++ b/package/ustl/Makefile @@ -17,8 +17,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,USTL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual + XAKE_FLAGS+= CROSS="${TARGET_CROSS}" \ OPTFLAGS="${TARGET_CFLAGS}" diff --git a/package/util-linux-ng/Makefile b/package/util-linux-ng/Makefile index b73689687..513c8e22b 100644 --- a/package/util-linux-ng/Makefile +++ b/package/util-linux-ng/Makefile @@ -27,14 +27,11 @@ $(eval $(call PKG_template,SFDISK,sfdisk,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEP $(eval $(call PKG_template,SWAP_UTILS,swap-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_SWAP},${PKG_DESCR_SWAP},${PKG_SECTION})) $(eval $(call PKG_template,LOSETUP,losetup,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_LOOP},${PKG_DESCR_LOOP},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-use-tty-group \ --disable-schedutils \ --disable-cramfs \ --disable-libblkid \ --disable-libuuid -BUILD_STYLE:= auto -INSTALL_STYLE:= auto MAKE_FLAGS+= OPT="${TCFLAGS}" ARCH="${ARCH}" FAKE_FLAGS+= INSTALLSUID="install -m 4755" TCFLAGS+= -DSWAPON_HAS_TWO_ARGS -DHAVE_LLSEEK diff --git a/package/valgrind/Makefile b/package/valgrind/Makefile index a5950a7c1..a7dfe2886 100644 --- a/package/valgrind/Makefile +++ b/package/valgrind/Makefile @@ -20,13 +20,10 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,VALGRIND,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu CONFIGURE_ENV+= ac_cv_file__proc_self_fd=yes \ ac_cv_file__proc_self_exe=yes \ ac_cv_file__proc_self_maps=yes CONFIGURE_ARGS+= --disable-tls -BUILD_STYLE= auto -INSTALL_STYLE= auto post-install: $(INSTALL_DIR) $(IDIR_VALGRIND)/usr/bin diff --git a/package/vgp/Makefile b/package/vgp/Makefile index 2b8651130..616108c50 100755 --- a/package/vgp/Makefile +++ b/package/vgp/Makefile @@ -16,9 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VGP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_VGP}/usr/bin/ ${INSTALL_BIN} ${WRKINST}/usr/bin/vgpd ${IDIR_VGP}/usr/bin/ diff --git a/package/videoproto/Makefile b/package/videoproto/Makefile index ebda348e4..c28b0a4da 100644 --- a/package/videoproto/Makefile +++ b/package/videoproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 888543493cd69c6c78002ac59c3f077f PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/vilistextum/Makefile b/package/vilistextum/Makefile index 95cdbaa92..0beb9ce2d 100644 --- a/package/vilistextum/Makefile +++ b/package/vilistextum/Makefile @@ -17,12 +17,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VILISTEXTUM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: ${INSTALL_DIR} ${IDIR_VILISTEXTUM}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/${PKG_NAME} ${IDIR_VILISTEXTUM}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/vilistextum \ + ${IDIR_VILISTEXTUM}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/vim/Makefile b/package/vim/Makefile index a831bf041..e27c76ff7 100644 --- a/package/vim/Makefile +++ b/package/vim/Makefile @@ -22,7 +22,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VIM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= vim_cv_toupper_broken=no \ vim_cv_getcwd_broken=no \ vim_cv_stat_ignores_slash=yes \ @@ -54,8 +53,6 @@ CONFIGURE_ARGS+= --disable-darwin \ --without-x \ --with-tlib=ncurses \ --disable-multibyte -BUILD_STYLE= auto -INSTALL_STYLE= auto XAKE_FLAGS+= prefix=/usr \ DESTDIR=${WRKINST} \ STRIP=: diff --git a/package/vnc-reflector/Makefile b/package/vnc-reflector/Makefile index b83ff00f8..48158a886 100644 --- a/package/vnc-reflector/Makefile +++ b/package/vnc-reflector/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= vnc-reflector PKG_VERSION:= 1.2.4 PKG_RELEASE:= 1 -PKG_BUILDDEP+= jpeg zlib PKG_MD5SUM:= c3f88bc62f228b335c25c07f9744ab0c PKG_DESCR:= specialized VNC server which acts as a proxy PKG_SECTION:= net PKG_DEPENDS:= libjpeg zlib +PKG_BUILDDEP+= jpeg zlib PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=vnc-reflector/} DISTFILES:= vnc_reflector-${PKG_VERSION}.tar.gz @@ -20,7 +20,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VNC_REFLECTOR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + TCPPFLAGS+= -I. TLDFLAGS+= -lz -ljpeg MAKE_FLAGS+= CC="${TARGET_CC}" CFLAGS="${TCFLAGS} ${TCPPFLAGS} ${TLDFLAGS}" diff --git a/package/vnstat/Makefile b/package/vnstat/Makefile index f273378dc..59f88090f 100644 --- a/package/vnstat/Makefile +++ b/package/vnstat/Makefile @@ -15,7 +15,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VNSTAT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= ${TARGET_CONFIGURE_OPTS} ALL_TARGET:= vnstat diff --git a/package/vpnc/Makefile b/package/vpnc/Makefile index c6129d9b2..24a54787c 100644 --- a/package/vpnc/Makefile +++ b/package/vpnc/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= vpnc -PKG_VERSION:= 0.4.0 -PKG_RELEASE:= 2 -PKG_BUILDDEP+= libgcrypt libgpg-error -PKG_MD5SUM:= 604807e7dd90fce00a4e2344ee29c76d +PKG_VERSION:= 0.5.3 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 4378f9551d5b077e1770bbe09995afb3 PKG_DESCR:= client for cisco3000 VPN Concentrator. PKG_SECTION:= net PKG_DEPENDS:= libgcrypt libgpg-error kmod-tun +PKG_BUILDDEP+= libgcrypt libgpg-error PKG_URL:= http://www.unix-ag.uni-kl.de/~massar/vpnc/ PKG_SITES:= http://www.unix-ag.uni-kl.de/~massar/vpnc/ @@ -18,13 +18,11 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VPNC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual XAKE_FLAGS+= CC="${TARGET_CC}" \ OFLAGS="${TARGET_CFLAGS}" \ OS="Linux" \ - STAGING_DIR=${STAGING_DIR} \ PREFIX=/usr -INSTALL_STYLE:= auto post-install: ${CP} ${WRKINST}/* ${IDIR_VPNC}/ diff --git a/package/vpnc/patches/patch-Makefile b/package/vpnc/patches/patch-Makefile index bb3a255a3..563b653c2 100644 --- a/package/vpnc/patches/patch-Makefile +++ b/package/vpnc/patches/patch-Makefile @@ -1,51 +1,22 @@ -$Id$ ---- vpnc-0.4.0.orig/Makefile 2007-02-19 21:51:12.000000000 +0100 -+++ vpnc-0.4.0/Makefile 2007-04-21 18:39:46.000000000 +0200 -@@ -35,12 +35,11 @@ VERSION := $(shell sh mk-version) - RELEASE_VERSION := $(shell cat VERSION) - - CC=gcc --CFLAGS += -W -Wall -O3 -Wmissing-declarations -Wwrite-strings -g -+CFLAGS += -W -Wall -O3 -Wmissing-declarations -Wwrite-strings -g -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include $(OFLAGS) - CPPFLAGS = -DVERSION=\"$(VERSION)\" --LDFLAGS = -g $(shell libgcrypt-config --libs) --CFLAGS += $(shell libgcrypt-config --cflags) -+LDFLAGS = -g -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lgcrypt -lgpg-error - --ifeq ($(shell uname -s), SunOS) -+ifeq ($(OS), SunOS) - LDFLAGS += -lnsl -lresolv -lsocket +--- vpnc-0.5.3.orig/Makefile 2008-11-19 21:36:12.000000000 +0100 ++++ vpnc-0.5.3/Makefile 2010-02-06 04:36:54.194334252 +0100 +@@ -66,7 +66,7 @@ ifneq (,$(findstring Apple,$(shell $(CC) + CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock endif -@@ -84,21 +83,21 @@ distclean : clean - -rm -f vpnc-debug.c vpnc-debug.h vpnc.ps .depend - - install : all -- install -d $(DESTDIR)$(ETCDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(MANDIR)/man8 -- install vpnc-script $(DESTDIR)$(ETCDIR) -- install -m 600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf -+ install -d $(DESTDIR)$(ETCDIR) $(DESTDIR)$(SBINDIR) -+# install vpnc-script $(DESTDIR)$(ETCDIR) -+# install -m 600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf - install vpnc vpnc-disconnect $(DESTDIR)$(SBINDIR) -- install pcf2vpnc $(DESTDIR)$(BINDIR) -- install vpnc.8 $(DESTDIR)$(MANDIR)/man8 -+# install pcf2vpnc $(DESTDIR)$(BINDIR) -+# install vpnc.8 $(DESTDIR)$(MANDIR)/man8 +-all : $(BINS) vpnc.8 vpnc-script ++all : $(BINS) vpnc-script - install-strip : all -- install -d $(DESTDIR)$(ETCDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(MANDIR)/man8 -- install vpnc-script $(DESTDIR)$(ETCDIR) -- install -m 600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf -- install pcf2vpnc $(DESTDIR)$(BINDIR) -+ install -d $(DESTDIR)$(ETCDIR) $(DESTDIR)$(SBINDIR) -+# install vpnc-script $(DESTDIR)$(ETCDIR) -+# install -m 600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf -+# install pcf2vpnc $(DESTDIR)$(BINDIR) - install -s vpnc $(DESTDIR)$(SBINDIR) - install vpnc-disconnect $(DESTDIR)$(SBINDIR) -- install vpnc.8 $(DESTDIR)$(MANDIR)/man8 -+# install vpnc.8 $(DESTDIR)$(MANDIR)/man8 + vpnc : $(OBJS) vpnc.o + $(CC) -o $@ $^ $(LDFLAGS) +@@ -122,10 +122,6 @@ install-common: all + install -m600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf + install -m755 vpnc-disconnect $(DESTDIR)$(SBINDIR) + install -m755 pcf2vpnc $(DESTDIR)$(BINDIR) +- install -m644 vpnc.8 $(DESTDIR)$(MANDIR)/man8 +- install -m644 pcf2vpnc.1 $(DESTDIR)$(MANDIR)/man1 +- install -m644 cisco-decrypt.1 $(DESTDIR)$(MANDIR)/man1 +- install -m644 COPYING $(DESTDIR)$(DOCDIR) - uninstall : - rm -f $(DESTDIR)$(SBINDIR)/vpnc \ + install : install-common + install -m755 vpnc $(DESTDIR)$(SBINDIR) diff --git a/package/vpnc/patches/patch-config_c b/package/vpnc/patches/patch-config_c index ce5cb30e9..9dfbdee43 100644 --- a/package/vpnc/patches/patch-config_c +++ b/package/vpnc/patches/patch-config_c @@ -1,7 +1,6 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- vpnc-0.4.0.orig/config.c 2007-02-16 18:22:06.000000000 +0100 -+++ vpnc-0.4.0/config.c 2008-10-16 12:55:57.000000000 +0200 -@@ -485,7 +485,7 @@ static char *get_config_filename(const c +--- vpnc-0.5.3.orig/config.c 2008-11-19 21:36:12.000000000 +0100 ++++ vpnc-0.5.3/config.c 2010-02-06 04:35:05.394334473 +0100 +@@ -456,7 +456,7 @@ static char *get_config_filename(const c { char *realname; diff --git a/package/vrrpd/Makefile b/package/vrrpd/Makefile index e6b557eb5..cda12887f 100644 --- a/package/vrrpd/Makefile +++ b/package/vrrpd/Makefile @@ -15,7 +15,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VRRPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS:= CC="${TARGET_CC}" \ DBG_OPT="" \ MAIN_OPT="${TARGET_CFLAGS}" diff --git a/package/vsftpd/Makefile b/package/vsftpd/Makefile index 8456fac83..c295af14e 100644 --- a/package/vsftpd/Makefile +++ b/package/vsftpd/Makefile @@ -16,9 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VSFTPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual + ALL_TARGET:= vsftpd -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_VSFTPD}/etc ${IDIR_VSFTPD}/usr/sbin diff --git a/package/vtun/Makefile b/package/vtun/Makefile index 460e4c08d..194c94893 100644 --- a/package/vtun/Makefile +++ b/package/vtun/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= vtun PKG_VERSION:= 3.0.1 PKG_RELEASE:= 1 -PKG_BUILDDEP+= zlib openssl liblzo PKG_MD5SUM:= c342ffe77055d4248a38f0b380f28c1b PKG_DESCR:= A VPN tunnel daemon PKG_SECTION:= net -PKG_DEPENDS:= libopenssl zlib kmod-tun +PKG_DEPENDS:= zlib libopenssl liblzo kmod-tun +PKG_BUILDDEP+= zlib openssl liblzo PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=vtun/} PKG_HOST_DEPENDS:= !freebsd @@ -19,10 +19,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VTUN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu +INSTALL_STYLE:= manual + CONFIGURE_ARGS+= --with-ssl-headers=$(STAGING_DIR)/usr/include/openssl \ --disable-lzo -BUILD_STYLE:= auto ALL_TARGET:= vtund do-install: diff --git a/package/watchdog/Makefile b/package/watchdog/Makefile index eda6f83cb..14abf0ca3 100644 --- a/package/watchdog/Makefile +++ b/package/watchdog/Makefile @@ -15,10 +15,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WATCHDOG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_WATCHDOG}/usr/sbin ${IDIR_WATCHDOG}/etc/ ${INSTALL_DATA} ./files/watchdog.conf ${IDIR_WATCHDOG}/etc/ diff --git a/package/watchdog/patches/patch-src_mntent_c b/package/watchdog/patches/patch-src_mntent_c new file mode 100644 index 000000000..f2277bdbf --- /dev/null +++ b/package/watchdog/patches/patch-src_mntent_c @@ -0,0 +1,11 @@ +--- watchdog-5.7.orig/src/mntent.c 2010-01-06 13:42:08.000000000 +0100 ++++ watchdog-5.7/src/mntent.c 2010-02-06 04:39:34.804334839 +0100 +@@ -157,7 +157,7 @@ my_getmntent (mntFILE *mfp) { + if (fgets (buf, sizeof(buf), mfp->mntent_fp) == NULL) + return NULL; + +- s = index (buf, '\n'); ++ s = strchr (buf, '\n'); + if (s == NULL) { + /* extremely long line - assume file was corrupted */ + mfp->mntent_errs = 1; diff --git a/package/watchdog/patches/patch-src_umount_c b/package/watchdog/patches/patch-src_umount_c new file mode 100644 index 000000000..6b5a82c1f --- /dev/null +++ b/package/watchdog/patches/patch-src_umount_c @@ -0,0 +1,11 @@ +--- watchdog-5.7.orig/src/umount.c 2010-01-06 13:42:08.000000000 +0100 ++++ watchdog-5.7/src/umount.c 2010-02-06 04:39:47.664334843 +0100 +@@ -212,7 +212,7 @@ umount_one (const char *spec, const char + if (res < 0) + umnt_err2 = errno; + /* Do not complain about remote NFS mount points */ +- if (errno == ENOENT && index(spec, ':')) ++ if (errno == ENOENT && strchr(spec, ':')) + umnt_err2 = 0; + } + } diff --git a/package/wccpd/Makefile b/package/wccpd/Makefile index b55011567..9763248f2 100644 --- a/package/wccpd/Makefile +++ b/package/wccpd/Makefile @@ -15,11 +15,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WCCPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu # uClibc setpgrp does not take arguments CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_WCCPD}/usr/sbin diff --git a/package/wdfs/Makefile b/package/wdfs/Makefile index a9abb551b..bdc8ae8d4 100644 --- a/package/wdfs/Makefile +++ b/package/wdfs/Makefile @@ -17,10 +17,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WDFS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= gnu -BUILD_STYLE= auto -INSTALL_STYLE= auto - post-install: ${INSTALL_DIR} ${IDIR_WDFS}/usr/bin ${CP} ${WRKINST}/usr/bin/wdfs ${IDIR_WDFS}/usr/bin diff --git a/package/weechat/Makefile b/package/weechat/Makefile index 804657cf8..6fd545c95 100644 --- a/package/weechat/Makefile +++ b/package/weechat/Makefile @@ -6,23 +6,25 @@ include ${TOPDIR}/rules.mk PKG_NAME:= weechat PKG_VERSION:= 0.1.8 PKG_RELEASE:= 2 -PKG_BUILDDEP+= ncurses gnutls lua libiconv PKG_MD5SUM:= 73d6bc211ac32c597f0d278506480a20 PKG_DESCR:= Lightweight IRC client PKG_SECTION:= net PKG_DEPENDS:= libncurses libiconv -PKG_URL:= http://weechat.flashtux.org/download/ -PKG_SITES:= http://weechat.flashtux.org/download/ - -include ${TOPDIR}/mk/package.mk - +PKG_BUILDDEP+= ncurses libiconv ifeq (${ADK_COMPILE_WEECHAT_WITH_TLS},y) PKG_DEPENDS+= gnutls +PKG_BUILDDEP+= gnutls endif ifeq (${ADK_COMPILE_WEECHAT_WITH_LUA},y) PKG_DEPENDS+= liblua +PKG_BUILDDEP+= lua endif +PKG_URL:= http://weechat.flashtux.org/download/ +PKG_SITES:= http://weechat.flashtux.org/download/ + +include ${TOPDIR}/mk/package.mk + $(eval $(call PKG_template,WEECHAT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) @@ -36,7 +38,6 @@ ifneq (${ADK_COMPILE_WEECHAT_WITH_LUA},y) DISABLE_LUA:= --disable-lua endif -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= ${ENABLE_TLS} \ --with-debug=0 \ --disable-perl \ @@ -44,11 +45,10 @@ CONFIGURE_ARGS+= ${ENABLE_TLS} \ --disable-ruby \ --with-libiconv-prefix='${STAGING_DIR}/usr' \ ${DISABLE_LUA} -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_WEECHAT}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/weechat-curses ${IDIR_WEECHAT}/usr/bin/ + ${INSTALL_BIN} ${WRKINST}/usr/bin/weechat-curses \ + ${IDIR_WEECHAT}/usr/bin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/wget/Makefile b/package/wget/Makefile index 6a4e37a76..8269ef55b 100644 --- a/package/wget/Makefile +++ b/package/wget/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WGET,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_WGET}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/wget ${IDIR_WGET}/usr/bin diff --git a/package/wifidog/Makefile b/package/wifidog/Makefile index 3f179810b..9acd5624b 100644 --- a/package/wifidog/Makefile +++ b/package/wifidog/Makefile @@ -17,17 +17,15 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WIFIDOG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= ac_cv_func_memcmp_working=yes \ ac_cv_lib_nsl_main=no \ ac_cv_func_setvbuf_reversed=no -BUILD_STYLE+= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_WIFIDOG}/usr/{bin,lib} ${IDIR_WIFIDOG}/etc ${INSTALL_DATA} ./files/wifidog.conf ${IDIR_WIFIDOG}/etc/ - ${INSTALL_BIN} ${WRKBUILD}/scripts/init.d/wifidog ${IDIR_WIFIDOG}/usr/bin/wifidog-init + ${INSTALL_BIN} ${WRKBUILD}/scripts/init.d/wifidog \ + ${IDIR_WIFIDOG}/usr/bin/wifidog-init ${INSTALL_BIN} ${WRKINST}/usr/bin/wifidog \ ${WRKINST}/usr/bin/wdctl ${IDIR_WIFIDOG}/usr/bin/ ${CP} ${WRKINST}/usr/lib/libhttpd.so* ${IDIR_WIFIDOG}/usr/lib/ diff --git a/package/wireless-firmware/Makefile b/package/wireless-firmware/Makefile index 3d0999637..25de67aff 100644 --- a/package/wireless-firmware/Makefile +++ b/package/wireless-firmware/Makefile @@ -18,7 +18,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WIRELESS_FIRMWARE_RT61,wireless-firmware-rt61,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -INSTALL_STYLE= manual +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_WIRELESS_FIRMWARE_RT61}/lib/firmware diff --git a/package/wol/Makefile b/package/wol/Makefile index 9279ba9e0..5df4c6b56 100644 --- a/package/wol/Makefile +++ b/package/wol/Makefile @@ -15,12 +15,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WOL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= ac_cv_func_mmap_fixed_mapped=yes \ jm_cv_func_working_malloc=yes \ ac_cv_func_alloca_works=yes -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_WOL}/usr/bin diff --git a/package/wondershaper/Makefile b/package/wondershaper/Makefile index 870e0ab61..2e8fe6bb2 100644 --- a/package/wondershaper/Makefile +++ b/package/wondershaper/Makefile @@ -16,9 +16,14 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WONDERSHAPER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + do-install: ${INSTALL_DIR} ${IDIR_WONDERSHAPER}/usr/sbin ${IDIR_WONDERSHAPER}/etc - ${INSTALL_BIN} ${WRKBUILD}/wshaper.htb ${IDIR_WONDERSHAPER}/usr/sbin/wshaper + ${INSTALL_BIN} ${WRKBUILD}/wshaper.htb \ + ${IDIR_WONDERSHAPER}/usr/sbin/wshaper ${INSTALL_DATA} ${WRKBUILD}/wshaper.conf ${IDIR_WONDERSHAPER}/etc/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/wpa_supplicant/Makefile b/package/wpa_supplicant/Makefile index 9e4ae77ff..6d6b49f2a 100644 --- a/package/wpa_supplicant/Makefile +++ b/package/wpa_supplicant/Makefile @@ -6,13 +6,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= wpa_supplicant PKG_VERSION:= 0.6.9 PKG_RELEASE:= 1 -ifeq (${ADK_COMPILE_WPA_SUPPLICANT_WITH_OPENSSL},y) -PKG_BUILDDEP+= openssl -endif PKG_MD5SUM:= 0efb8fcedf0a8acf6f423dfdb0658fdd PKG_DESCR:= WPA Supplicant with support for WPA and WPA2 PKG_SECTION:= net PKG_DEPENDS:= libopenssl +ifeq (${ADK_COMPILE_WPA_SUPPLICANT_WITH_OPENSSL},y) +PKG_BUILDDEP+= openssl +endif PKG_SITES:= http://hostap.epitest.fi/releases/ WRKSRC= ${WRKDIST}/${PKG_NAME} @@ -21,7 +21,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WPA_SUPPLICANT,wpa-supplicant,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -BUILD_STYLE:= auto +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + MAKE_FLAGS+= CPPFLAGS='${TCPPFLAGS}' \ LDFLAGS='${TLDFLAGS}' \ OPT_FLAGS='${TCFLAGS}' \ @@ -32,8 +34,11 @@ do-configure: do-install: ${INSTALL_DIR} ${IDIR_WPA_SUPPLICANT}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/wpa_cli ${IDIR_WPA_SUPPLICANT}/usr/sbin/ - ${INSTALL_BIN} ${WRKBUILD}/wpa_passphrase ${IDIR_WPA_SUPPLICANT}/usr/sbin/ - ${INSTALL_BIN} ${WRKBUILD}/wpa_supplicant ${IDIR_WPA_SUPPLICANT}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/wpa_cli \ + ${IDIR_WPA_SUPPLICANT}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/wpa_passphrase \ + ${IDIR_WPA_SUPPLICANT}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/wpa_supplicant \ + ${IDIR_WPA_SUPPLICANT}/usr/sbin/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/wput/Makefile b/package/wput/Makefile index cb25e10ae..40649b3e4 100644 --- a/package/wput/Makefile +++ b/package/wput/Makefile @@ -4,23 +4,20 @@ include ${TOPDIR}/rules.mk PKG_NAME:= wput -PKG_VERSION:= 0.5 +PKG_VERSION:= 0.6.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= 441b2e07219f78167b29a7ac33488fff +PKG_MD5SUM:= 92b41efed4db8eb4f3443c23bf7ceecf PKG_DESCR:= a wget-like command-line FTP client PKG_SECTION:= net PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=wput/} DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz -WRKDIST= ${WRKDIR}/${PKG_NAME} include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,WPUT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --disable-g-switch -BUILD_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_WPUT}/usr/bin diff --git a/package/wput/patches/patch-Makefile b/package/wput/patches/patch-Makefile new file mode 100644 index 000000000..a4b70f58c --- /dev/null +++ b/package/wput/patches/patch-Makefile @@ -0,0 +1,21 @@ +--- wput-0.6.1.orig/Makefile 2007-12-12 18:30:04.000000000 +0100 ++++ wput-0.6.1/Makefile 2010-02-06 04:45:45.273084356 +0100 +@@ -1,6 +1,6 @@ + #wput makefile + PACKAGE = wput +-prefix = /usr/local ++prefix = /usr + datadir = $(prefix)/share + mandir = $(datadir)/man/man1 + exec_prefix = ${prefix} +@@ -16,8 +16,8 @@ win-clean: + + install: all + cd po && $(MAKE) $(MAKEDEFS) $@ +- install -m0755 wput $(bindir) +- install -m0644 doc/wput.1.gz $(mandir) ++ install -m0755 wput $(DESTDIR)$(bindir) ++ install -m0644 doc/wput.1.gz $(DESTDIR)$(mandir) + @echo "----------------" + @echo "Wput installed. See 'wput -h' or 'man wput' for usage information." + @echo "Further documentation is located in the doc/USAGE.* files." diff --git a/package/wput/patches/patch-Makefile_in b/package/wput/patches/patch-Makefile_in new file mode 100644 index 000000000..da30515f6 --- /dev/null +++ b/package/wput/patches/patch-Makefile_in @@ -0,0 +1,12 @@ +--- wput-0.6.1.orig/Makefile.in 2007-12-12 18:30:04.000000000 +0100 ++++ wput-0.6.1/Makefile.in 2010-02-06 04:46:02.964324514 +0100 +@@ -16,8 +16,7 @@ win-clean: + + install: all + cd po && $(MAKE) $(MAKEDEFS) $@ +- install -m0755 wput $(bindir) +- install -m0644 doc/wput.1.gz $(mandir) ++ install -m0755 wput $(DESTDIR)$(bindir) + @echo "----------------" + @echo "Wput installed. See 'wput -h' or 'man wput' for usage information." + @echo "Further documentation is located in the doc/USAGE.* files." diff --git a/package/wput/patches/patch-Makefile_in.orig b/package/wput/patches/patch-Makefile_in.orig new file mode 100644 index 000000000..4d6db67ab --- /dev/null +++ b/package/wput/patches/patch-Makefile_in.orig @@ -0,0 +1,13 @@ +--- wput-0.6.1.orig/Makefile.in 2007-12-12 18:30:04.000000000 +0100 ++++ wput-0.6.1/Makefile.in 2010-02-06 04:45:29.434334308 +0100 +@@ -16,8 +16,8 @@ win-clean: + + install: all + cd po && $(MAKE) $(MAKEDEFS) $@ +- install -m0755 wput $(bindir) +- install -m0644 doc/wput.1.gz $(mandir) ++ install -m0755 wput $(DESTDIR)$(bindir) ++ install -m0644 doc/wput.1.gz $(DESTDIR)$(mandir) + @echo "----------------" + @echo "Wput installed. See 'wput -h' or 'man wput' for usage information." + @echo "Further documentation is located in the doc/USAGE.* files." diff --git a/package/wput/patches/patch-config_status b/package/wput/patches/patch-config_status new file mode 100644 index 000000000..176dcb666 --- /dev/null +++ b/package/wput/patches/patch-config_status @@ -0,0 +1,160 @@ +--- wput-0.6.1.orig/config.status 2007-12-12 18:30:04.000000000 +0100 ++++ wput-0.6.1/config.status 2010-02-06 04:45:45.083075667 +0100 +@@ -334,14 +334,14 @@ Report bugs to ." + + ac_cs_version="\ + wput config.status 0.6 +-configured by ./configure, generated by GNU Autoconf 2.61, +- with options \"\" ++configured by /home/wbx/openadk/build_qemu-x86_uclibc/w-wput-0.6.1-1/wput-0.6.1/configure, generated by GNU Autoconf 2.61, ++ with options \"'--build=x86_64-linux-gnu' '--host=i586-linux' '--target=i586-linux' '--program-prefix=' '--program-suffix=' '--prefix=/usr' '--datadir=/usr/share' '--mandir=/usr/share/man' '--libexecdir=/usr/sbin' '--localstatedir=/var' '--sysconfdir=/etc' '--disable-nls' '--enable-shared' '--enable-static' '--disable-dependency-tracking' '--disable-libtool-lock' '--disable-debug' '--disable-g-switch' 'build_alias=x86_64-linux-gnu' 'host_alias=i586-linux' 'target_alias=i586-linux' 'CC=/home/wbx/openadk/cross_qemu-x86_uclibc/host/bin/i586-linux-uclibc-gcc' 'CFLAGS=-fno-ident -Os -pipe -march=i586 -fomit-frame-pointer' 'LDFLAGS=-Wl,-O2 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib -L/home/wbx/openadk/cross_qemu-x86_uclibc/target/lib -L/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib' 'CPPFLAGS=-I/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/include -DNDEBUG'\" + + 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='/home/hagen/studium/projects/wput' ++ac_pwd='/home/wbx/openadk/build_qemu-x86_uclibc/w-wput-0.6.1-1/wput-0.6.1' + srcdir='.' + INSTALL='/usr/bin/install -c' + # If no file are specified by the user, then we need to provide default +@@ -409,10 +409,10 @@ if $ac_cs_silent; then + fi + + if $ac_cs_recheck; then +- echo "running CONFIG_SHELL=/bin/bash /bin/bash ./configure " $ac_configure_extra_args " --no-create --no-recursion" >&6 ++ echo "running CONFIG_SHELL=/bin/bash /bin/bash /home/wbx/openadk/build_qemu-x86_uclibc/w-wput-0.6.1-1/wput-0.6.1/configure " '--build=x86_64-linux-gnu' '--host=i586-linux' '--target=i586-linux' '--program-prefix=' '--program-suffix=' '--prefix=/usr' '--datadir=/usr/share' '--mandir=/usr/share/man' '--libexecdir=/usr/sbin' '--localstatedir=/var' '--sysconfdir=/etc' '--disable-nls' '--enable-shared' '--enable-static' '--disable-dependency-tracking' '--disable-libtool-lock' '--disable-debug' '--disable-g-switch' 'build_alias=x86_64-linux-gnu' 'host_alias=i586-linux' 'target_alias=i586-linux' 'CC=/home/wbx/openadk/cross_qemu-x86_uclibc/host/bin/i586-linux-uclibc-gcc' 'CFLAGS=-fno-ident -Os -pipe -march=i586 -fomit-frame-pointer' 'LDFLAGS=-Wl,-O2 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib -L/home/wbx/openadk/cross_qemu-x86_uclibc/target/lib -L/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib' 'CPPFLAGS=-I/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/include -DNDEBUG' $ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=/bin/bash + export CONFIG_SHELL +- exec /bin/bash "./configure" $ac_configure_extra_args --no-create --no-recursion ++ exec /bin/bash "/home/wbx/openadk/build_qemu-x86_uclibc/w-wput-0.6.1-1/wput-0.6.1/configure" '--build=x86_64-linux-gnu' '--host=i586-linux' '--target=i586-linux' '--program-prefix=' '--program-suffix=' '--prefix=/usr' '--datadir=/usr/share' '--mandir=/usr/share/man' '--libexecdir=/usr/sbin' '--localstatedir=/var' '--sysconfdir=/etc' '--disable-nls' '--enable-shared' '--enable-static' '--disable-dependency-tracking' '--disable-libtool-lock' '--disable-debug' '--disable-g-switch' 'build_alias=x86_64-linux-gnu' 'host_alias=i586-linux' 'target_alias=i586-linux' 'CC=/home/wbx/openadk/cross_qemu-x86_uclibc/host/bin/i586-linux-uclibc-gcc' 'CFLAGS=-fno-ident -Os -pipe -march=i586 -fomit-frame-pointer' 'LDFLAGS=-Wl,-O2 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib -L/home/wbx/openadk/cross_qemu-x86_uclibc/target/lib -L/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib' 'CPPFLAGS=-I/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/include -DNDEBUG' $ac_configure_extra_args --no-create --no-recursion + fi + + exec 5>>config.log +@@ -510,16 +510,16 @@ s,@PACKAGE_VERSION@,|#_!!_#|0.6,g + s,@PACKAGE_STRING@,|#_!!_#|wput 0.6,g + s,@PACKAGE_BUGREPORT@,|#_!!_#|,g + s,@exec_prefix@,|#_!!_#|${prefix},g +-s,@prefix@,|#_!!_#|/usr/local,g ++s,@prefix@,|#_!!_#|/usr,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,@libexecdir@,|#_!!_#|/usr/sbin,g + s,@datarootdir@,|#_!!_#|${prefix}/share,g +-s,@datadir@,|#_!!_#|${datarootdir},g +-s,@sysconfdir@,|#_!!_#|${prefix}/etc,g ++s,@datadir@,|#_!!_#|/usr/share,g ++s,@sysconfdir@,|#_!!_#|/etc,g + s,@sharedstatedir@,|#_!!_#|${prefix}/com,g +-s,@localstatedir@,|#_!!_#|${prefix}/var,g ++s,@localstatedir@,|#_!!_#|/var,g + s,@includedir@,|#_!!_#|${prefix}/include,g + s,@oldincludedir@,|#_!!_#|/usr/include,g + s,@docdir@,|#_!!_#|${datarootdir}/doc/${PACKAGE_TARNAME},g +@@ -530,25 +530,25 @@ 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,@mandir@,|#_!!_#|/usr/share/man,g + s,@DEFS@,|#_!!_#|-DHAVE_CONFIG_H,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,@build_alias@,|#_!!_#|x86_64-linux-gnu,g ++s,@host_alias@,|#_!!_#|i586-linux,g ++s,@target_alias@,|#_!!_#|i586-linux,g + s,@PACKAGE@,|#_!!_#|wput,g + s,@VERSION@,|#_!!_#|0.6,g +-s,@CC@,|#_!!_#|gcc,g +-s,@CFLAGS@,|#_!!_#| -Wall -g,g +-s,@LDFLAGS@,|#_!!_#|,g +-s,@CPPFLAGS@,|#_!!_#|,g +-s,@ac_ct_CC@,|#_!!_#|gcc,g ++s,@CC@,|#_!!_#|/home/wbx/openadk/cross_qemu-x86_uclibc/host/bin/i586-linux-uclibc-gcc,g ++s,@CFLAGS@,|#_!!_#|-fno-ident -Os -pipe -march=i586 -fomit-frame-pointer -Wall,g ++s,@LDFLAGS@,|#_!!_#|-Wl\,-O2 -Wl\,-rpath -Wl\,/usr/lib -Wl\,-rpath-link -Wl\,/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib -L/home/wbx/openadk/cross_qemu-x86_uclibc/target/lib -L/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib,g ++s,@CPPFLAGS@,|#_!!_#|-I/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/include -DNDEBUG,g ++s,@ac_ct_CC@,|#_!!_#|,g + s,@EXEEXT@,|#_!!_#|,g + s,@OBJEXT@,|#_!!_#|o,g +-s,@CPP@,|#_!!_#|gcc -E,g ++s,@CPP@,|#_!!_#|/home/wbx/openadk/cross_qemu-x86_uclibc/host/bin/i586-linux-uclibc-gcc -E,g + s,@GREP@,|#_!!_#|/bin/grep,g + s,@EGREP@,|#_!!_#|/bin/grep -E,g + s,@SET_MAKE@,|#_!!_#|,g +@@ -556,29 +556,29 @@ s,@INSTALL_PROGRAM@,|#_!!_#|${INSTALL},g + s,@INSTALL_SCRIPT@,|#_!!_#|${INSTALL},g + s,@INSTALL_DATA@,|#_!!_#|${INSTALL} -m 644,g + s,@MKINSTALLDIRS@,|#_!!_#|$(top_builddir)/./mkinstalldirs,g +-s,@USE_NLS@,|#_!!_#|yes,g ++s,@USE_NLS@,|#_!!_#|no,g + s,@MSGFMT@,|#_!!_#|/usr/bin/msgfmt,g + s,@GMSGFMT@,|#_!!_#|/usr/bin/msgfmt,g + s,@XGETTEXT@,|#_!!_#|/usr/bin/xgettext,g + s,@MSGMERGE@,|#_!!_#|/usr/bin/msgmerge,g +-s,@build@,|#_!!_#|i686-pc-linux-gnu,g +-s,@build_cpu@,|#_!!_#|i686,g ++s,@build@,|#_!!_#|x86_64-pc-linux-gnu,g ++s,@build_cpu@,|#_!!_#|x86_64,g + s,@build_vendor@,|#_!!_#|pc,g + s,@build_os@,|#_!!_#|linux-gnu,g +-s,@host@,|#_!!_#|i686-pc-linux-gnu,g +-s,@host_cpu@,|#_!!_#|i686,g ++s,@host@,|#_!!_#|i586-pc-linux-gnu,g ++s,@host_cpu@,|#_!!_#|i586,g + s,@host_vendor@,|#_!!_#|pc,g + s,@host_os@,|#_!!_#|Linux,g +-s,@LIBICONV@,|#_!!_#|-liconv,g +-s,@LTLIBICONV@,|#_!!_#|-liconv,g ++s,@LIBICONV@,|#_!!_#|/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib/libiconv.so -Wl\,-rpath -Wl\,/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib,g ++s,@LTLIBICONV@,|#_!!_#|-L/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib -liconv -R/home/wbx/openadk/cross_qemu-x86_uclibc/target/usr/lib,g + s,@INTLLIBS@,|#_!!_#|,g + s,@LIBINTL@,|#_!!_#|,g + s,@LTLIBINTL@,|#_!!_#|,g +-s,@POSUB@,|#_!!_#|po,g ++s,@POSUB@,|#_!!_#|,g + s,@GETOPT@,|#_!!_#|,g + s,@MEMDBG@,|#_!!_#|,g +-s,@GNUTLS_CFLAGS@,|#_!!_#|-INONE/include,g +-s,@GNUTLS_LIBS@,|#_!!_#| -lgnutls-openssl,g ++s,@GNUTLS_CFLAGS@,|#_!!_#|,g ++s,@GNUTLS_LIBS@,|#_!!_#|,g + s,@LIBOBJS@,|#_!!_#|,g + s,@LTLIBOBJS@,|#_!!_#|,g + :end +@@ -776,11 +776,11 @@ case `sed -n '/datarootdir/ { + { 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&@datadir@&/usr/share&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&${datarootdir}/locale&g +- s&@mandir@&${datarootdir}/man&g ++ s&@mandir@&/usr/share/man&g + s&\${datarootdir}&${prefix}/share&g' ;; + esac + sed "/^[ ]*VPATH[ ]*=/{ +@@ -852,14 +852,7 @@ s,^\([ #]*\)[^ ]*\([ ]*HAVE_IOCTL\)[ + s,^\([ #]*\)[^ ]*\([ ]*HAVE_TERMIO_H\)[ (].*,\1define\2 1 , + s,^\([ #]*\)[^ ]*\([ ]*HAVE_TERMIO\)[ (].*,\1define\2 1 , + s,^\([ #]*\)[^ ]*\([ ]*HAVE_LOCALE_H\)[ (].*,\1define\2 1 , +-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LIBINTL_H\)[ (].*,\1define\2 1 , + s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETOPT_H\)[ (].*,\1define\2 1 , +-s,^\([ #]*\)[^ ]*\([ ]*ENABLE_NLS\)[ (].*,\1define\2 1 , +-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETTEXT\)[ (].*,\1define\2 1 , +-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DCGETTEXT\)[ (].*,\1define\2 1 , +-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GNUTLS_OPENSSL_H\)[ (].*,\1define\2 1 , +-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GNUTLS\)[ (].*,\1define\2 1 , +-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SSL\)[ (].*,\1define\2 1 , + s,^\([ #]*\)[^ ]*\([ ]*HAVE_LONG_LONG\)[ (].*,\1define\2 1 , + s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNSIGNED_LONG_LONG\)[ (].*,\1define\2 1 , + s,^\([ #]*\)[^ ]*\([ ]*HAVE_LONG_LONG\)[ (].*,\1define\2 1 , diff --git a/package/wput/patches/patch-po_Makefile b/package/wput/patches/patch-po_Makefile new file mode 100644 index 000000000..f636bff65 --- /dev/null +++ b/package/wput/patches/patch-po_Makefile @@ -0,0 +1,50 @@ +--- wput-0.6.1.orig/po/Makefile 2007-12-12 18:30:04.000000000 +0100 ++++ wput-0.6.1/po/Makefile 2010-02-06 04:45:45.653081691 +0100 +@@ -20,9 +20,9 @@ srcdir = . + top_srcdir = .. + + +-prefix = /usr/local ++prefix = /usr + exec_prefix = ${prefix} +-datadir = ${prefix}/share ++datadir = /usr/share + localedir = $(datadir)/locale + gettextsrcdir = $(datadir)/gettext/po + +@@ -124,7 +124,7 @@ EXTRA_LOCALE_CATEGORIES = + mv t-$@ $@ + + +-all: all-yes ++all: all-no + + all-yes: stamp-po + all-no: +@@ -191,7 +191,7 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot + + install: install-exec install-data + install-exec: +-install-data: install-data-yes ++install-data: install-data-no + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ +@@ -250,7 +250,7 @@ install-strip: install + + installdirs: installdirs-exec installdirs-data + installdirs-exec: +-installdirs-data: installdirs-data-yes ++installdirs-data: installdirs-data-no + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ +@@ -295,7 +295,7 @@ installcheck: + + uninstall: uninstall-exec uninstall-data + uninstall-exec: +-uninstall-data: uninstall-data-yes ++uninstall-data: uninstall-data-no + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ diff --git a/package/wput/patches/patch-po_Makefile_in b/package/wput/patches/patch-po_Makefile_in new file mode 100644 index 000000000..45610ddbb --- /dev/null +++ b/package/wput/patches/patch-po_Makefile_in @@ -0,0 +1,50 @@ +--- wput-0.6.1.orig/po/Makefile.in 2007-12-12 18:30:04.000000000 +0100 ++++ wput-0.6.1/po/Makefile.in 2010-02-06 04:45:45.453076297 +0100 +@@ -20,9 +20,9 @@ srcdir = . + top_srcdir = .. + + +-prefix = /usr/local ++prefix = /usr + exec_prefix = ${prefix} +-datadir = ${prefix}/share ++datadir = /usr/share + localedir = $(datadir)/locale + gettextsrcdir = $(datadir)/gettext/po + +@@ -74,7 +74,7 @@ CATALOGS = @CATALOGS@ + mv t-$@ $@ + + +-all: all-yes ++all: all-no + + all-yes: stamp-po + all-no: +@@ -141,7 +141,7 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot + + install: install-exec install-data + install-exec: +-install-data: install-data-yes ++install-data: install-data-no + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ +@@ -200,7 +200,7 @@ install-strip: install + + installdirs: installdirs-exec installdirs-data + installdirs-exec: +-installdirs-data: installdirs-data-yes ++installdirs-data: installdirs-data-no + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ +@@ -245,7 +245,7 @@ installcheck: + + uninstall: uninstall-exec uninstall-data + uninstall-exec: +-uninstall-data: uninstall-data-yes ++uninstall-data: uninstall-data-no + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ diff --git a/package/wput/patches/patch-src_Makefile b/package/wput/patches/patch-src_Makefile new file mode 100644 index 000000000..42f51da44 --- /dev/null +++ b/package/wput/patches/patch-src_Makefile @@ -0,0 +1,19 @@ +--- wput-0.6.1.orig/src/Makefile 2007-12-12 18:30:04.000000000 +0100 ++++ wput-0.6.1/src/Makefile 2010-02-06 04:45:45.363075315 +0100 +@@ -1,12 +1,12 @@ + #wput.mk + #mm make file for wput + SHELL=/bin/bash +-prefix=/usr/local ++prefix=/usr + bindir=${exec_prefix}/bin + localedir=$(prefix)/share/locale +-CC=gcc +-CFLAGS= -Wall -g -DLOCALEDIR=\"$(localedir)\" -INONE/include +-LIBS= -lgnutls-openssl ++CC=/home/wbx/openadk/cross_qemu-x86_uclibc/host/bin/i586-linux-uclibc-gcc ++CFLAGS= -fno-ident -Os -pipe -march=i586 -fomit-frame-pointer -Wall -DLOCALEDIR=\"$(localedir)\" ++LIBS= + EXE=../wput + GETOPT= + MEMDBG= diff --git a/package/wput/patches/patch-src_config_h b/package/wput/patches/patch-src_config_h new file mode 100644 index 000000000..52a23c2ed --- /dev/null +++ b/package/wput/patches/patch-src_config_h @@ -0,0 +1,27 @@ +--- wput-0.6.1.orig/src/config.h 2007-12-12 18:30:04.000000000 +0100 ++++ wput-0.6.1/src/config.h 2010-02-06 04:45:45.543084453 +0100 +@@ -7,13 +7,13 @@ + #define HAVE_IOCTL 1 + + /* Define if you have the header file. */ +-#define HAVE_LIBINTL_H 1 ++/* #undef HAVE_LIBINTL_H */ + + /* Define if you have the header file. */ + #define HAVE_LOCALE_H 1 + + /* Define this if you want the NLS support. */ +-#define ENABLE_NLS 1 ++/* #undef ENABLE_NLS */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_GNUGETOPT_GETOPT_H */ +@@ -64,7 +64,7 @@ + #define STDC_HEADERS 1 + + /* Define if all libs needed for ssl support are existing */ +-#define HAVE_SSL 1 ++/* #undef HAVE_SSL */ + + /* Define to 1 if you have the long long type */ + #define HAVE_LONG_LONG 1 diff --git a/package/xauth/Makefile b/package/xauth/Makefile index c18f936d0..a12c62f34 100644 --- a/package/xauth/Makefile +++ b/package/xauth/Makefile @@ -18,10 +18,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XAUTH,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: $(INSTALL_DIR) $(IDIR_XAUTH)/usr/bin $(INSTALL_BIN) $(WRKINST)/usr/bin/xauth $(IDIR_XAUTH)/usr/bin diff --git a/package/xcmiscproto/Makefile b/package/xcmiscproto/Makefile index f4e299044..df4b324c2 100644 --- a/package/xcmiscproto/Makefile +++ b/package/xcmiscproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= bacfb0f3cb4d6e1a71770307bfdba129 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xextproto/Makefile b/package/xextproto/Makefile index 50780b44c..8d61db142 100644 --- a/package/xextproto/Makefile +++ b/package/xextproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 6c55283718dbeb826bcf899b9e89faba PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xf86-input-evtouch/Makefile b/package/xf86-input-evtouch/Makefile index 4f7506523..6dbab29d9 100644 --- a/package/xf86-input-evtouch/Makefile +++ b/package/xf86-input-evtouch/Makefile @@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:= xf86-input-evtouch PKG_VERSION:= 0.8.8 PKG_RELEASE:= 1 -PKG_BUILDDEP+= xorg-server PKG_MD5SUM:= 4d8e092356d8353002f60a4907046c13 PKG_DESCR:= X11 driver for touchscreen PKG_SECTION:= x11 PKG_DEPENDS:= xorg-server kmod-input-evdev +PKG_BUILDDEP+= xorg-server PKG_SITES:= http://www.conan.de/touchscreen/ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 @@ -21,10 +21,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XF86_INPUT_EVTOUCH,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XF86_INPUT_EVTOUCH}/usr/lib/xorg/modules/input ${CP} ${WRKINST}/usr/lib/xorg/modules/input/evtouch_drv.so \ diff --git a/package/xf86-input-keyboard/Makefile b/package/xf86-input-keyboard/Makefile index 062624fdc..0b66eea6e 100644 --- a/package/xf86-input-keyboard/Makefile +++ b/package/xf86-input-keyboard/Makefile @@ -19,14 +19,9 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XF86_INPUT_KEYBOARD,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XF86_INPUT_KEYBOARD}/usr/lib/xorg/modules/input ${CP} ${WRKINST}/usr/lib/xorg/modules/input/kbd_drv.so \ ${IDIR_XF86_INPUT_KEYBOARD}/usr/lib/xorg/modules/input/ include ${TOPDIR}/mk/pkg-bottom.mk - diff --git a/package/xf86-input-mouse/Makefile b/package/xf86-input-mouse/Makefile index 093f1bec8..4755fedc1 100644 --- a/package/xf86-input-mouse/Makefile +++ b/package/xf86-input-mouse/Makefile @@ -19,10 +19,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XF86_INPUT_MOUSE,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XF86_INPUT_MOUSE}/usr/lib/xorg/modules/input ${CP} ${WRKINST}/usr/lib/xorg/modules/input/mouse_drv.so \ diff --git a/package/xf86-video-cirrus/Makefile b/package/xf86-video-cirrus/Makefile index a86ba2730..22e4b24e3 100644 --- a/package/xf86-video-cirrus/Makefile +++ b/package/xf86-video-cirrus/Makefile @@ -19,10 +19,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XF86_VIDEO_CIRRUS,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XF86_VIDEO_CIRRUS}/usr/lib/xorg/modules/drivers ${CP} ${WRKINST}/usr/lib/xorg/modules/drivers/cirrus_*.so \ diff --git a/package/xf86-video-geode/Makefile b/package/xf86-video-geode/Makefile index b98613082..837c76954 100644 --- a/package/xf86-video-geode/Makefile +++ b/package/xf86-video-geode/Makefile @@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:= xf86-video-geode PKG_VERSION:= 2.11.6 PKG_RELEASE:= 1 -PKG_BUILDDEP+= xorg-server PKG_MD5SUM:= a673c0f88037d12fbb96d9fefc82785b PKG_DESCR:= X11 driver for AMD Geode VGA chip PKG_SECTION:= x11 PKG_DEPENDS:= xorg-server +PKG_BUILDDEP+= xorg-server PKG_SITES:= http://xorg.freedesktop.org/releases/individual/driver/ PKG_TARGET_DEPENDS:= alix1c @@ -19,10 +19,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XF86_VIDEO_GEODE,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XF86_VIDEO_GEODE}/usr/lib/xorg/modules/drivers ${CP} ${WRKINST}/usr/lib/xorg/modules/drivers/geode_drv.so \ diff --git a/package/xf86dga/Makefile b/package/xf86dga/Makefile index 1adb287ae..c3e7e5e86 100644 --- a/package/xf86dga/Makefile +++ b/package/xf86dga/Makefile @@ -11,9 +11,4 @@ PKG_MD5SUM:= ac30b5705f487554c5de0b466e846c31 PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xf86dgaproto/Makefile b/package/xf86dgaproto/Makefile index 88979a522..34009118f 100644 --- a/package/xf86dgaproto/Makefile +++ b/package/xf86dgaproto/Makefile @@ -10,9 +10,4 @@ PKG_MD5SUM:= 1fe79dc07857ad3e1fb8b8f2bdd70d1b PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xfsprogs/Makefile b/package/xfsprogs/Makefile index f323ef9e6..6b86959ad 100644 --- a/package/xfsprogs/Makefile +++ b/package/xfsprogs/Makefile @@ -19,12 +19,10 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,XFSPROGS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE= autoconf gnu +AUTOTOOL_STYLE:= autoconf CONFIGURE_ARGS+= --enable-gettext=no \ --with-gnu-ld CONFIGURE_ENV+= DEBUG=" " OPTIMIZER=" " -BUILD_STYLE= auto -INSTALL_STYLE= auto ALL_TARGET= post-install: diff --git a/package/xinetd/Makefile b/package/xinetd/Makefile index b210a8c76..7147efbdb 100644 --- a/package/xinetd/Makefile +++ b/package/xinetd/Makefile @@ -16,12 +16,9 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XINETD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --without-libwrap \ --with-loadavg -BUILD_STYLE:= auto ALL_TARGET:= build -INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_XINETD}/etc/xinetd.d ${IDIR_XINETD}/usr/sbin diff --git a/package/xkbcomp/Makefile b/package/xkbcomp/Makefile index ca3b8a9e2..a52d74957 100644 --- a/package/xkbcomp/Makefile +++ b/package/xkbcomp/Makefile @@ -15,10 +15,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XKBCOMP,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XKBCOMP}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/xkbcomp ${IDIR_XKBCOMP}/usr/bin diff --git a/package/xkeyboard-config/Makefile b/package/xkeyboard-config/Makefile index cb105a795..7f5f258f4 100644 --- a/package/xkeyboard-config/Makefile +++ b/package/xkeyboard-config/Makefile @@ -16,13 +16,10 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XKEYBOARD_CONFIG,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XKEYBOARD_CONFIG}/usr/share/X11/xkb - ${CP} ${WRKINST}/usr/share/X11/xkb/* ${IDIR_XKEYBOARD_CONFIG}/usr/share/X11/xkb + ${CP} ${WRKINST}/usr/share/X11/xkb/* \ + ${IDIR_XKEYBOARD_CONFIG}/usr/share/X11/xkb rm ${IDIR_XKEYBOARD_CONFIG}/usr/share/X11/xkb/rules/*.lst rm ${IDIR_XKEYBOARD_CONFIG}/usr/share/X11/xkb/rules/*.xml rm -rf ${IDIR_XKEYBOARD_CONFIG}/usr/share/X11/xkb/symbols/sun_vndr diff --git a/package/xlsfonts/Makefile b/package/xlsfonts/Makefile index c85687366..d76e6c722 100644 --- a/package/xlsfonts/Makefile +++ b/package/xlsfonts/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,XLSFONTS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XLSFONTS}/usr/bin ${CP} ${WRKINST}/usr/bin/xlsfonts \ diff --git a/package/xorg-server/Makefile b/package/xorg-server/Makefile index 1b604fbe4..35b7597a6 100644 --- a/package/xorg-server/Makefile +++ b/package/xorg-server/Makefile @@ -9,8 +9,14 @@ PKG_RELEASE:= 2 PKG_MD5SUM:= 913a672cbd6da516de15965d594e20b9 PKG_DESCR:= Xorg server PKG_SECTION:= x11 -PKG_DEPENDS:= libopenssl libxfont pixman libpciaccess libxkbfile libfontenc xkeyboard-config xkbcomp libxau libxaw libxmu libxpm libxrender libxt libxxf86dga libxext libxdmcp libxv libsm libice libx11 -PKG_BUILDDEP+= libX11 randrproto renderproto fixesproto damageproto scrnsaverproto resourceproto fontsproto videoproto compositeproto evieext libxkbfile libXfont pixman libpciaccess openssl xf86dgaproto +PKG_DEPENDS:= libopenssl libxfont pixman libpciaccess libxkbfile \ + libfontenc xkeyboard-config xkbcomp libxau libxaw \ + libxmu libxpm libxrender libxt libxxf86dga libxext \ + libxdmcp libxv libsm libice libx11 +PKG_BUILDDEP+= libX11 randrproto renderproto fixesproto damageproto \ + scrnsaverproto resourceproto fontsproto videoproto \ + compositeproto evieext libxkbfile libXfont pixman \ + libpciaccess openssl xf86dgaproto PKG_URL:= http://www.x.org PKG_SITES:= ${MASTER_SITE_XORG} @@ -20,7 +26,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XORG_SERVER,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= V=1 CONFIGURE_ARGS+= \ --with-fontdir=/usr/share/fonts/X11 \ @@ -49,12 +54,13 @@ CONFIGURE_ARGS+= \ --with-xkb-output=/tmp \ --with-os-vendor=OpenADK \ --with-vendor-web="http://openadk.org" -BUILD_STYLE:= auto -INSTALL_STYLE:= auto post-install: $(INSTALL_DIR) $(IDIR_XORG_SERVER)/usr/bin - $(INSTALL_DIR) $(IDIR_XORG_SERVER)/usr/lib/xorg/modules/{extensions,fonts,linux,multimedia} + $(INSTALL_DIR) $(IDIR_XORG_SERVER)/usr/lib/xorg/modules/linux + $(INSTALL_DIR) $(IDIR_XORG_SERVER)/usr/lib/xorg/modules/extensions + $(INSTALL_DIR) $(IDIR_XORG_SERVER)/usr/lib/xorg/modules/fonts + $(INSTALL_DIR) $(IDIR_XORG_SERVER)/usr/lib/xorg/modules/multimedia ${CP} ${WRKINST}/usr/lib/xorg/protocol.txt \ $(IDIR_XORG_SERVER)/usr/lib/xorg/ ${CP} ${WRKINST}/usr/bin/* $(IDIR_XORG_SERVER)/usr/bin diff --git a/package/xproto/Makefile b/package/xproto/Makefile index 9f8207fca..a3c76afe2 100644 --- a/package/xproto/Makefile +++ b/package/xproto/Makefile @@ -11,10 +11,6 @@ PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - # workaround for makekeys compile on non-Linux systems post-install: ${INSTALL_DIR} ${STAGING_DIR}/usr/include/xproto diff --git a/package/xtrans/Makefile b/package/xtrans/Makefile index b71477dfb..7928210f4 100644 --- a/package/xtrans/Makefile +++ b/package/xtrans/Makefile @@ -13,11 +13,8 @@ PKG_SITES:= ${MASTER_SITE_XORG} include $(TOPDIR)/mk/package.mk -#$(eval $(call PKG_template,XTRANS,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,XTRANS,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --datadir=/usr/lib -BUILD_STYLE:= auto -INSTALL_STYLE:= auto include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xz/Makefile b/package/xz/Makefile index 0caa69fca..58d3379cb 100644 --- a/package/xz/Makefile +++ b/package/xz/Makefile @@ -16,10 +16,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,XZ,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto - post-install: ${INSTALL_DIR} ${IDIR_XZ}/usr/bin ${IDIR_XZ}/usr/lib ${CP} ${WRKINST}/usr/bin/* ${IDIR_XZ}/usr/bin diff --git a/package/zlib/Makefile b/package/zlib/Makefile index 1d3b0489c..e031baf0a 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -24,9 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ZLIB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,ZLIB_DEV,${PKG_NAME}-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_STYLE:= manual -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +CONFIG_STYLE:= manual ifeq ($(ADK_NATIVE),) COPTS:= $(TARGET_CONFIGURE_OPTS) diff --git a/package/zsh/Makefile b/package/zsh/Makefile index 7d44e0f85..cca1e71d9 100644 --- a/package/zsh/Makefile +++ b/package/zsh/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= zsh -PKG_VERSION:= 4.3.9 +PKG_VERSION:= 4.3.10 PKG_RELEASE:= 1 -PKG_MD5SUM:= 1b08c063f02d595709eaad1548c4e392 +PKG_MD5SUM:= 031efc8c8efb9778ffa8afbcd75f0152 PKG_DESCR:= Z Shell PKG_SECTION:= shells PKG_URL:= http://www.zsh.org/ @@ -14,11 +14,7 @@ PKG_SITES:= ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/ include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,ZSH,zsh,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_STYLE:= gnu -BUILD_STYLE:= auto -INSTALL_STYLE:= auto +$(eval $(call PKG_template,ZSH,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) post-install: $(INSTALL_DIR) $(IDIR_ZSH)/bin -- cgit v1.2.3