diff -Nru ruby1.8-1.8.7.249/bignum.c ruby1.8-1.8.7.302/bignum.c --- ruby1.8-1.8.7.249/bignum.c 2009-07-30 00:31:59.000000000 +0000 +++ ruby1.8-1.8.7.302/bignum.c 2010-06-08 08:42:55.000000000 +0000 @@ -3,7 +3,7 @@ bignum.c - $Author: shyouhei $ - $Date: 2009-07-30 09:31:59 +0900 (Thu, 30 Jul 2009) $ + $Date: 2010-06-08 17:42:55 +0900 (Tue, 08 Jun 2010) $ created at: Fri Jun 10 00:48:55 JST 1994 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -222,7 +222,110 @@ return rb_int2big(n); } -#ifdef HAVE_LONG_LONG +#if SIZEOF_LONG % SIZEOF_BDIGITS != 0 +# error unexpected SIZEOF_LONG : SIZEOF_BDIGITS ratio +#endif + +/* + * buf is an array of long integers. + * buf is ordered from least significant word to most significant word. + * buf[0] is the least significant word and + * buf[num_longs-1] is the most significant word. + * This means words in buf is little endian. + * However each word in buf is native endian. + * (buf[i]&1) is the least significant bit and + * (buf[i]&(1<<(SIZEOF_LONG*CHAR_BIT-1))) is the most significant bit + * for each 0 <= i < num_longs. + * So buf is little endian at whole on a little endian machine. + * But buf is mixed endian on a big endian machine. + */ +void +rb_big_pack(VALUE val, unsigned long *buf, long num_longs) +{ + val = rb_to_int(val); + if (num_longs == 0) + return; + if (FIXNUM_P(val)) { + long i; + long tmp = FIX2LONG(val); + buf[0] = (unsigned long)tmp; + tmp = tmp < 0 ? ~0L : 0; + for (i = 1; i < num_longs; i++) + buf[i] = (unsigned long)tmp; + return; + } + else { + long len = RBIGNUM_LEN(val); + BDIGIT *ds = BDIGITS(val), *dend = ds + len; + long i, j; + for (i = 0; i < num_longs && ds < dend; i++) { + unsigned long l = 0; + for (j = 0; j < DIGSPERLONG && ds < dend; j++, ds++) { + l |= ((unsigned long)*ds << (j * BITSPERDIG)); + } + buf[i] = l; + } + for (; i < num_longs; i++) + buf[i] = 0; + if (RBIGNUM_NEGATIVE_P(val)) { + for (i = 0; i < num_longs; i++) { + buf[i] = ~buf[i]; + } + for (i = 0; i < num_longs; i++) { + buf[i]++; + if (buf[i] != 0) + return; + } + } + } +} + +/* See rb_big_pack comment for endianness of buf. */ +VALUE +rb_big_unpack(unsigned long *buf, long num_longs) +{ + while (2 <= num_longs) { + if (buf[num_longs-1] == 0 && (long)buf[num_longs-2] >= 0) + num_longs--; + else if (buf[num_longs-1] == ~0UL && (long)buf[num_longs-2] < 0) + num_longs--; + else + break; + } + if (num_longs == 0) + return INT2FIX(0); + else if (num_longs == 1) + return LONG2NUM((long)buf[0]); + else { + VALUE big; + BDIGIT *ds; + long len = num_longs * DIGSPERLONG; + long i; + big = bignew(len, 1); + ds = BDIGITS(big); + for (i = 0; i < num_longs; i++) { + unsigned long d = buf[i]; +#if SIZEOF_LONG == SIZEOF_BDIGITS + *ds++ = d; +#else + int j; + for (j = 0; j < DIGSPERLONG; j++) { + *ds++ = BIGLO(d); + d = BIGDN(d); + } +#endif + } + if ((long)buf[num_longs-1] < 0) { + get2comp(big); + RBIGNUM_SET_SIGN(big, 0); + } + return bignorm(big); + } +} + +#define QUAD_SIZE 8 + +#if SIZEOF_LONG_LONG == QUAD_SIZE && SIZEOF_BDIGITS*2 == SIZEOF_LONG_LONG void rb_quad_pack(buf, val) @@ -295,7 +398,19 @@ #else -#define QUAD_SIZE 8 +static int +quad_buf_complement(char *buf, size_t len) +{ + size_t i; + for (i = 0; i < len; i++) + buf[i] = ~buf[i]; + for (i = 0; i < len; i++) { + buf[i]++; + if (buf[i] != 0) + return 0; + } + return 1; +} void rb_quad_pack(buf, val) @@ -314,12 +429,8 @@ rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'"); } memcpy(buf, (char*)BDIGITS(val), len); - if (!RBIGNUM(val)->sign) { - len = QUAD_SIZE; - while (len--) { - *buf = ~*buf; - buf++; - } + if (RBIGNUM_NEGATIVE_P(val)) { + quad_buf_complement(buf, QUAD_SIZE); } } @@ -334,14 +445,10 @@ memcpy((char*)BDIGITS(big), buf, QUAD_SIZE); if (sign && BNEG(buf)) { - long len = QUAD_SIZE; char *tmp = (char*)BDIGITS(big); RBIGNUM(big)->sign = 0; - while (len--) { - *tmp = ~*tmp; - tmp++; - } + quad_buf_complement(tmp, QUAD_SIZE); } return bignorm(big); diff -Nru ruby1.8-1.8.7.249/ChangeLog ruby1.8-1.8.7.302/ChangeLog --- ruby1.8-1.8.7.249/ChangeLog 2010-01-10 10:30:06.000000000 +0000 +++ ruby1.8-1.8.7.302/ChangeLog 2010-08-16 03:41:12.000000000 +0000 @@ -1,3 +1,529 @@ +Sun Aug 15 19:59:58 2010 Yuki Sonoda (Yugui) + + * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#set_error): + Fix for possible cross-site scripting (CVE-2010-0541). + Found by Apple, reported by Hideki Yamane. + Patch by Hirokazu Nishio . + +Sat Jul 17 15:19:58 2010 KOSAKI Motohiro + + * configure.in: Change AC_PREREQ from 2.58 to 2.60 because + AC_CASE macro require 2.60 or later. Thanks, Mitsuru SHIMAMURA. + [Bug #3579] [ruby-dev:41856] + +Wed Jun 23 22:22:42 2010 Nobuyoshi Nakada + + * test/optparse/test_summary.rb: fixed superclass so that it run + solely. + +Wed Jun 23 21:54:17 2010 URABE Shyouhei + + * marshal.c, test/ruby/test_marshal.rb: Revert r25230. This test + is troublesome. + +Mon Jun 21 18:12:15 2010 NAKAMURA Usaku + + * ext/openssl/extconf.rb: check some functions added at OpenSSL 1.0.0. + + * ext/openssl/ossl_engine.c (ossl_engine_s_load): use engines which + exists. + +Mon Jun 21 18:12:15 2010 NAKAMURA, Hiroshi + + * ext/openssl/ossl_config.c: defined own IMPLEMENT_LHASH_DOALL_ARG_FN_098 + macro according to IMPLEMENT_LHASH_DOALL_ARG_FN in OpenSSL 0.9.8m. + OpenSSL 1.0.0beta5 has a slightly different definiton so it could + be a temporal workaround for 0.9.8 and 1.0.0 dual support. + + * ext/openssl/ossl_pkcs5.c (ossl_pkcs5_pbkdf2_hmac): follows function + definition in OpenSSL 1.0.0beta5. PKCS5_PBKDF2_HMAC is from 1.0.0 + (0.9.8 only has PKCS5_PBKDF2_HMAC_SHA1) + + * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_eq): do not use + SSL_SESSION_cmp and implement equality func by ousrself. See the + comment. + +Mon Jun 21 18:12:15 2010 NAKAMURA, Hiroshi + + * ext/openssl/ossl_ssl_session.c + (ossl_ssl_session_{get,set}_time{,out}): fixed a bug introduced by + backporting. (see [ruby-dev:40573]) use long in according to + OpenSSL API. (SSL_SESSION_{get,set}_time{,out}) + +Mon Jun 21 18:12:15 2010 NAKAMURA, Hiroshi + + * ext/openssl/ossl_x509name.c: added X509::Name#hash_old as a wrapper + for X509_NAME_hash_old in OpenSSL 1.0.0. + + * test/openssl/test_x509name.rb (test_hash): make test pass with + OpenSSL 1.0.0. + +Mon Jun 21 18:12:15 2010 NAKAMURA, Hiroshi + + * test/openssl/test_x509*: make tests pass with OpenSSL 1.0.0b5. + * PKey::PKey#verify raises an exception when a given PKey does not + match with signature. + * PKey::DSA#sign accepts SHA1, SHA256 other than DSS1. + +Mon Jun 21 18:12:15 2010 NAKAMURA, Hiroshi + + * backport the commit from trunk: + Sun Feb 28 11:49:35 2010 NARUSE, Yui + + * openssl/ossl.c (OSSL_IMPL_SK2ARY): for OpenSSL 1.0. + patched by Jeroen van Meeuwen at [ruby-core:25210] + fixed by Nobuyoshi Nakada [ruby-core:25238], + Hongli Lai [ruby-core:27417], + and Motohiro KOSAKI [ruby-core:28063] + + * ext/openssl/ossl_ssl.c (ossl_ssl_method_tab), + (ossl_ssl_cipher_to_ary): constified. + + * ext/openssl/ossl_pkcs7.c (pkcs7_get_certs, pkcs7_get_crls): + split pkcs7_get_certs_or_crls. + +Mon Jun 21 18:12:15 2010 NAKAMURA, Hiroshi + + * test/openssl/test_ec.rb: added test_dsa_sign_asn1_FIPS186_3. dgst is + truncated with ec_key.group.order.size after openssl 0.9.8m for + FIPS 186-3 compliance. + + WARNING: ruby-openssl aims to wrap an OpenSSL so when you're using + openssl 0.9.8l or earlier version, EC.dsa_sign_asn1 raises + OpenSSL::PKey::ECError as before and EC.dsa_verify_asn1 just returns + false when you pass dgst longer than expected (no truncation + performed). + + * ext/openssl/ossl_pkey_ec.c: rdoc typo fixed. + +Wed Jun 16 16:01:42 2010 Tanaka Akira + + * lib/pathname.rb (Pathname#sub): suppress a warning. + [ruby-dev:38488] + +Wed Jun 16 15:21:12 2010 Nobuyoshi Nakada + + * test/webrick/utils.rb (TestWEBrick#start_server): add log for + test_filehandler.rb + +Wed Jun 16 15:21:12 2010 Nobuyoshi Nakada + + * lib/net/http.rb (Net::HTTPHeader#{content_range,range_length}): + use inclusive range same as the header representation. + +Thu Jun 10 14:39:35 2010 Nobuyoshi Nakada + + * test/iconv/test_option.rb: removed particular implementation specific tests. + [ruby-dev:40078] + +Thu Jun 10 14:22:09 2010 URABE Shyouhei + + * lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::Status::initialize): + accept 0 or more arguments. [ruby-core:28692] + +Thu Jun 10 13:37:35 2010 Nobuyoshi Nakada + + * eval.c (rb_load): initialize orig_func. [ruby-core:27296] + +Tue Jun 8 18:57:48 2010 NAKAMURA Usaku + + * win32/Makefile.sub (config.status): no need to embbed manifest if not exist. + +Tue Jun 8 18:38:36 2010 NAKAMURA Usaku + + * include/ruby/win32.h: include errno.h before defining errnos. + + * include/ruby/win32.h: check definition existance before defining + errno macros. + + * win32/win32.c (errmap): define winsock errors mappings. + these are VC++10 support, merge from trunk (r27236, r27258). + +Tue Jun 8 18:31:02 2010 NARUSE, Yui + + * regexp.c (re_compile_pattern): allow zero times match for + non-greedy range repeatation. [ruby-core:30613] + +Tue Jun 8 18:08:18 2010 URABE Shyouhei + + * Makefile.in (fake.rb): double the backslash. + +Tue Jun 8 18:08:15 2010 NAKAMURA Usaku + + * configure.in: should replace COMMON_HEADERS if --with-winsock2 is + specified. [ruby-dev:41521] + +Tue Jun 8 17:49:18 2010 KOSAKI Motohiro + + * io.c, eval.c, process.c: remove all condition of r26371. + now, all platform use the same way. [Bug #3278][ruby-core:30167] + +Tue Jun 8 17:45:36 2010 Nobuyoshi Nakada + + * ext/iconv/iconv.c (rb_iconv_sys_fail): fix number of arguments. + a patch by Masaya TARUI . + +Tue Jun 8 17:45:36 2010 Nobuyoshi Nakada + + * ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if + errno is not set. [ruby-dev:41317] + +Tue Jun 8 17:32:37 2010 Tanaka Akira + + * pack.c (pack_pack): call rb_quad_pack to preserve RangeError. + +Tue Jun 8 17:32:37 2010 Tanaka Akira + + * pack.c: backport integer pack/unpack from 1.9 for [ruby-core:21937]. + + * configure.in: backport RUBY_DEFINT and fixed size integer checks. + + * ruby.h: include stdint.h if available. + + * bignum.c (rb_big_pack): defined.. + (rb_big_unpack): defined. + + * intern.h (rb_big_pack): declared. + (rb_big_unpack): declared. + +Tue Jun 8 16:52:35 2010 Nobuyoshi Nakada + + * regex.c (read_special): get rid of overrun. + +Tue Jun 8 16:51:48 2010 Shugo Maeda + + * lib/net/imap.rb: backported exception handling from trunk. + [ruby-core:29745] + +Tue Jun 8 16:42:48 2010 Nobuyoshi Nakada + + * ext/bigdecimal/bigdecimal.c (VpAlloc): ensure buf does not get + collected. based on a patch masaya tarui at [ruby-dev:41213]. + +Tue Jun 8 16:08:00 2010 Shugo Maeda + + * lib/net/imap.rb (fetch_internal): do not quote message data item + names. Thanks, Eric Hodel. [ruby-core:23508] backported form + trunk. + +Tue Jun 8 15:45:52 2010 Shugo Maeda + + * lib/net/imap (encode_utf7): encode & properly. Thanks, Kengo + Matsuyama. [ruby-dev:38063] backported from trunk. + +Tue Jun 8 15:43:43 2010 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_val2variant): fix the core dump + when converting Array object to VT_ARRAY variant. [ruby-core:28446] + [Bug #2836] + +Tue Jun 8 15:34:15 2010 Nobuyoshi Nakada + + * file.c (rb_file_s_extname): skip last directory separators. + [ruby-core:29627] + +Tue Jun 8 15:33:30 2010 URABE Shyouhei + + * lib/fileutils.rb (FileUtils::cp_r): dup needed here; options are + destroyed otherwise. + +Tue Jun 8 15:27:00 2010 Nobuyoshi Nakada + + * eval.c (search_required): expand home relative path first. + [ruby-core:29610] + +Tue Jun 8 15:23:10 2010 Nobuyoshi Nakada + + * lib/timeout.rb (Timeout#timeout): propagate errors to the + caller. [ruby-dev:41010]' + +Tue Jun 8 15:15:18 2010 Nobuyoshi Nakada + + * lib/net/smtp.rb (Net::SMTP#rcptto_list): fixed typo. + [ruby-core:29809] + +Tue Jun 8 15:15:18 2010 Nobuyoshi Nakada + + * lib/net/smtp.rb (Net::SMTP#rcptto_list): continue when at least + one RCPT is accepted. based on a patch from Kero van Gelder at + [ruby-core:26190]. + +Tue Jun 8 15:14:11 2010 Nobuyoshi Nakada + + * LEGAL: separated the section for parse.c. contributed by Paul + Betteridge in [ruby-core:29472]. + +Tue Jun 8 14:00:33 2010 Keiju Ishitsuka + + * ext/rational/lib/rational.rb: fix [Bug #1397]. + +Tue Jun 8 13:40:04 2010 Tadayoshi Funaba + + * lib/date.rb (Date#>>): fixed. [ruby-core:28011] + +Tue Jun 8 12:37:56 2010 NARUSE, Yui + + * io.c, eval.c, process.c: add linux to r26371's condition. + patched by Motohiro KOSAKI [ruby-core:28151] + +Tue Jun 8 12:37:56 2010 NAKAMURA Usaku + + * eval.c (thread_timer, rb_thread_stop_timer): check the timing of + stopping timer. patch from KOSAKI Motohiro via IRC. + + * eval.c (rb_thread_start_timer): NetBSD5 seems to be hung when calling + pthread_create() from pthread_atfork()'s parent handler. + + * io.c (pipe_open): workaround for NetBSD5. stop timer thread before + fork(), and restart it after fork() on parent, and on child if + needed. + + * process.c (rb_f_fork, rb_f_system): ditto. + + these changes are tested by naruse. fixed [ruby-dev:40074] + +Mon Jun 7 19:23:04 2010 Nobuyoshi Nakada + + * ext/nkf/nkf-utf8/nkf.c (numchar_getc): get rid of buffer + overflow. [ruby-dev:40606] + +Mon Jun 7 18:57:02 2010 NAKAMURA, Hiroshi + + * ext/openssl/ossl_ssl_session.c + (ossl_ssl_session_{get,set}_time{,out}): fixed a bug introduced by + backporting. (see [ruby-dev:40573]) use long in according to + OpenSSL API. (SSL_SESSION_{get,set}_time{,out}) + +Tue May 25 08:42:42 2010 NAKAMURA, Hiroshi + + * ext/openssl: backport fixes in 1.9. + + * r25019 by marcandre + * ossl_ocsp.c (ossl_ocspres_to_der): Bug fix in Response#to_def. + Patch by Chris Chandler [ruby-core:18411] + + * r25017 by marcandre + * ossl_config.c (ossl_config_add_value_m, + ossl_config_set_section): Check if frozen (or untrusted for + $SECURE >= 4) [ruby-core:18377] + + * r22925 by nobu + * ext/openssl/openssl_missing.h (i2d_of_void): cast for callbacks. + [ruby-core:22860] + + * ext/openssl/ossl_engine.c (ossl_engine_s_by_id): suppress a + warning. + + * ext/openssl/ossl_ssl.c (ossl_sslctx_flush_sessions): time_t may + be larger than long. + + * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_get_time), + (ossl_ssl_session_get_timeout): use TIMET2NUM() to convert + time_t. + + * r22924 by nobu + * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): should use + OPENSSL_free instead of free. a patch from Charlie Savage at + [ruby-core:22858]. + + * r22918 by akr + * ext/openssl: suppress warnings. + + * ext/openssl/ossl.h (OSSL_Debug): don't use gcc extention for + variadic macro. + + * r22666 by akr + * ext/openssl/lib/openssl/buffering.rb: define Buffering module + under OpenSSL. [ruby-dev:37906] + + * r22440 by nobu + * ext/openssl/ossl_ocsp.c (ossl_ocspbres_verify): OCSP_basic_verify + returns positive value on success, not non-zero. + [ruby-core:21762] + + * r22378 by akr + * ext/openssl: avoid cyclic require. + + * ext/openssl/lib/openssl/ssl-internal.rb: renamed from ssl.rb + + * ext/openssl/lib/openssl/x509-internal.rb: renamed from x509.rb. + [ruby-dev:38018] + + * r22101 by nobu + * ext/openssl/ossl_cipher.c (add_cipher_name_to_ary): used + conditionally. + + * r21510 by akr + * ext/openssl/ossl.c (ossl_raise): abolish a warning. + + * r21208 by akr + * ext/openssl/ossl_digest.c (GetDigestPtr): use StringValueCStr + instead of STR2CSTR. + + * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize): ditto. + (ossl_ec_group_initialize): ditto. + + * r19420 by mame + * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out + fragments of unused code. + + * r18975 by nobu + * ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): fix for + initialization of r18168. + + * r18971 by nobu + * ext/openssl/ossl_config.c (Init_ossl_config): removed C99ism. + + * r18944 by matz + * ext/openssl/ossl_config.c (Init_ossl_config): memory leak fixed. + a patch in [ruby-dev:35880]. + + * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto. + + * r18917 by nobu + * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): fix for + initialization of r18168. + + * ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): ditto. + + * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): ditto. + + * r18283 by nobu + * ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): suppress + warnings on platforms which int size differs from pointer size. + + * r18181 by nobu + * ext/openssl/openssl_missing.h (d2i_of_void): define for older + versions. [ruby-dev:35637] + + * r18168 by nobu + * ext/openssl: suppress warnings. + +Sat May 22 22:31:36 2010 Tanaka Akira + + * lib/resolv.rb: fix [ruby-core:28320] reported by Paul Clegg. + (Resolv::DNS::Requester#request): raise ResolvTimeout consistently + for timeout. + +Sat May 22 22:14:11 2010 NARUSE, Yui + + * ext/readline/readline.c (Init_readline): initialize + check rl_catch_signals and rl_catch_sigwinch. + [ruby-core:28238] [ruby-core:28242] + + * ext/readline/extconf.rb: check rl_catch_signals and + rl_catch_sigwinch. + +Sat May 22 21:54:58 2010 URABE Shyouhei + + * test/net/http/test_connection.rb (TestHTTP::HTTPConnectionTest#test_connection_refused_in_request): + Wrong exception to assert. + +Sat May 22 21:03:16 2010 Tanaka Akira + + * io.c (rb_io_modenum_mode): return "r" for O_RDONLY|O_APPEND. + [ruby-dev:40379] + +Sat May 22 20:51:39 2010 URABE Shyouhei + + * lib/resolv.rb (Resolv::DNS::Config#nameserver_port): 1.8.7 + specific tweaks + +Sat May 22 20:51:09 2010 Tanaka Akira + + * lib/resolv.rb: fix [ruby-core:28144] reported by Hans de Graaff. + (Resolv::DNS#make_requester): pass nameserver_port to + UnconnectedUDP.new. + (Resolv::DNS.bind_random_port): change the is_ipv6 argument to + bind_host. + (Resolv::DNS::Requester#initialize): change instance variable to + store multiple sockets. + (Resolv::DNS::Requester#request): pass readable sockets to + recv_reply. + (Resolv::DNS::Requester#close): close all sockets. + (Resolv::DNS::Requester::UnconnectedUDP#initialize): allocate + a socket for each address family of name servers. + (Resolv::DNS::Requester::UnconnectedUDP#recv_reply): read from the + passwd readable socket. + (Resolv::DNS::Requester::UnconnectedUDP#sender): use appropriate + socket for the target nameserver. + (Resolv::DNS::Requester::ConnectedUDP): follow the instance variable + change. + (Resolv::DNS::Requester::TCP#sender): ditto. + (Resolv::DNS::Config#nameserver_port): new method. + +Sat May 22 19:46:27 2010 Nobuyoshi Nakada + + * lib/net/http.rb (Net::HTTP#request): close @socket only after + started. [ruby-core:28028] + +Sat May 22 19:36:38 2010 Nobuyoshi Nakada + + * eval.c (proc_invoke): reverted r25975. [ruby-dev:39931] + [ruby-dev:40059] + + * eval.c (rb_mod_define_method): return original block but not + bound block. [ruby-core:26984] + +Thu May 20 16:28:17 2010 Nobuyoshi Nakada + + * lib/webrick/httpservlet/filehandler.rb (make_partial_content): + add bytes-unit. [ruby-dev:40030] + +Thu May 20 16:17:37 2010 NAKAMURA, Hiroshi + + * ext/zlib/zlib.c: backport r18029 and r21861 from trunk. + * r18029 ext/zlib/zlib.c (rb_deflate_params): flush before + deflateParams. [ruby-core:17675] (by mame) + * r21861 ext/zlib/zlib.c (zstream_run): desperately guard the + variable. [ruby-core:20576] (by usa) + + * test/zlib/test_zlib.rb: backport deflate tests from trunk. + +Thu May 20 15:59:14 2010 Kouhei Sutou + + * lib/rss/maker/base.rb, test/rss/test_maker_0.9.rb: + accept any time format in maker. [ruby-core:26923] + +Thu May 20 15:54:08 2010 Akinori MUSHA + + * eval.c (recursive_push): Taint internal hash to prevent + unexpected SecurityError; fixes #1864. + +Thu May 20 15:39:26 2010 Nobuyoshi Nakada + + * io.c (io_fwrite): preserve errno. [ruby-core:27425] + +Tue Apr 20 08:04:37 2010 NAKAMURA Usaku + + * io.c (rb_io_s_read): close the IO if an exception is raised on + seeking. [ruby-core:27429] + +Mon Apr 19 22:43:28 2010 Nobuyoshi Nakada + + * ruby.h (RB_GC_GUARD_PTR): workaround for gcc optimization. + [ruby-core:27402] + +Tue Apr 20 06:40:53 2010 Marc-Andre Lafortune + + * lib/uri/generic.rb (URI::Generic::eql): Check the class of the + compared object. Based on a patch by Peter McLain [ruby-core:27019] + +Fri Apr 2 03:27:22 2010 NAKAMURA, Hiroshi + + * lib/net/http.rb (HTTPGenericRequest#send_request_with_body_stream): + increased encoding chunk size for POST request with body_stream + (1K -> 16K). patched by Brian Candler. #1284. + + * test/net/http/test_post_io.rb: added for the patch. It's good if a + patch comes with a test. + +Thu Apr 1 05:32:17 2010 NAKAMURA Usaku + + * string.c (rb_str_inspect): wrong result of UTF-8 inspect because of + the mistake of calculation. reported by eban via IRC. + Sun Jan 10 19:00:31 2010 Nobuyoshi Nakada * lib/webrick/accesslog.rb : Escape needed. @@ -209,7 +735,7 @@ * lib/cgi.rb (CGI.unescapeHTML): fix for hex values 80-FF, single-byte hex entity encodings from 80-FF are valid HTML. - [ruby-core:25702] + [ruby-core:25702] Thu Nov 19 15:34:40 2009 Yukihiro Matsumoto diff -Nru ruby1.8-1.8.7.249/configure ruby1.8-1.8.7.302/configure --- ruby1.8-1.8.7.249/configure 2010-01-10 10:32:23.000000000 +0000 +++ ruby1.8-1.8.7.302/configure 2010-08-16 07:32:19.000000000 +0000 @@ -1,60 +1,83 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.65. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -63,20 +86,18 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -87,354 +108,321 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -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 - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi -if ( set x; as_func_ret_success y && test x = "$1" ); then - : +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. + as_expr=false fi -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -451,8 +439,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -462,49 +449,40 @@ exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -512,7 +490,7 @@ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -529,12 +507,12 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -548,8 +526,8 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -567,7 +545,6 @@ subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -575,6 +552,7 @@ PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= # Factoring default headers for most tests. ac_includes_default="\ @@ -612,158 +590,181 @@ # 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 +ac_subst_vars='LTLIBOBJS +MANTYPE +NROFF +configure_args +vendordir +sitedir +sitearch +arch +MAKEFILES +MINIOBJS +EXPORT_PREFIX +COMMON_HEADERS +COMMON_MACROS +COMMON_LIBS +MAINLIBS +ENABLE_SHARED +DLDLIBS +SOLIBS +LIBRUBYARG_SHARED +LIBRUBYARG_STATIC +LIBRUBYARG +LIBRUBY +LIBRUBY_ALIASES +LIBRUBY_SO +LIBRUBY_A +RUBY_SO_NAME +RUBYW_INSTALL_NAME +rubyw_install_name +RUBY_INSTALL_NAME +LIBRUBY_DLDFLAGS +LIBRUBY_LDSHARED +XLDFLAGS +XCFLAGS +debugflags +optflags +cflags +cppflags +RDOCTARGET +ARCHFILE +EXTOUT +RUNRUBY +PREP +MINIRUBY +setup +EXTSTATIC +STRIP +TRY_LINK +LIBPATHENV +RPATHFLAG +LIBPATHFLAG +LINK_SO +LIBEXT +DLEXT2 +DLEXT +LDSHARED +CCDLFLAGS +STATIC +ARCH_FLAG +DLDFLAGS +ALLOCA +LIBOBJS +MAKEDIRS +CP +RM +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +SET_MAKE +LN_S +OBJDUMP +DLLWRAP +WINDRES +NM +ASFLAGS +AS +AR +RANLIB +YFLAGS +YACC +OUTFLAG +CPPOUTFILE +GNU_LD +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +TEENY +MINOR +MAJOR +target_alias +host_alias build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_gcc +enable_frame_address +with_winsock2 +enable_largefile +with_libc_r +enable_pthread +enable_fastthread +with_setjmp_type +enable_setreuid +with_default_kcode +with_dln_a_out +enable_rpath +with_static_linked_ext +enable_shared +enable_install_doc +with_sitedir +with_vendordir +with_search_path +with_mantype +' + ac_precious_vars='build_alias host_alias target_alias -MAJOR -MINOR -TEENY -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -target -target_cpu -target_vendor -target_os CC CFLAGS LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -GNU_LD -CPPOUTFILE -OUTFLAG -YACC -YFLAGS -RANLIB -AR -AS -ASFLAGS -NM -WINDRES -DLLWRAP -OBJDUMP -LN_S -SET_MAKE -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -RM -CP -MAKEDIRS -LIBOBJS -ALLOCA -DLDFLAGS -ARCH_FLAG -STATIC -CCDLFLAGS -LDSHARED -DLEXT -DLEXT2 -LIBEXT -LINK_SO -LIBPATHFLAG -RPATHFLAG -LIBPATHENV -TRY_LINK -STRIP -EXTSTATIC -setup -MINIRUBY -PREP -RUNRUBY -EXTOUT -ARCHFILE -RDOCTARGET -cppflags -cflags -optflags -debugflags -XCFLAGS -XLDFLAGS -LIBRUBY_LDSHARED -LIBRUBY_DLDFLAGS -RUBY_INSTALL_NAME -rubyw_install_name -RUBYW_INSTALL_NAME -RUBY_SO_NAME -LIBRUBY_A -LIBRUBY_SO -LIBRUBY_ALIASES -LIBRUBY -LIBRUBYARG -LIBRUBYARG_STATIC -LIBRUBYARG_SHARED -SOLIBS -DLDLIBS -ENABLE_SHARED -MAINLIBS -COMMON_LIBS -COMMON_MACROS -COMMON_HEADERS -EXPORT_PREFIX -MINIOBJS -MAKEFILES -arch -sitearch -sitedir -vendordir -configure_args -NROFF -MANTYPE -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS +LIBS CPPFLAGS CPP YACC @@ -773,6 +774,8 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -871,13 +874,20 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -890,13 +900,20 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1087,22 +1104,36 @@ ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1122,25 +1153,25 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1149,23 +1180,36 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac fi -# Be sure to have absolute directory names. +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1179,7 +1223,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1195,23 +1239,21 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1238,13 +1280,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1292,9 +1332,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1304,25 +1344,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1344,6 +1384,7 @@ cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-frame-address use GCC __builtin_frame_address(). @@ -1376,7 +1417,7 @@ 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 + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor YACC The `Yet Another C Compiler' implementation to use. Defaults to @@ -1388,6 +1429,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1395,15 +1437,17 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1439,7 +1483,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1449,9577 +1493,4759 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.65 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi -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. Invocation command line was +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - $ $0 $@ + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -_ACEOF -exec 5>>config.log +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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` + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +} # ac_fn_c_try_cpp -/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` +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -_ASUNAME + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -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 +} # ac_fn_c_try_link -} >&5 +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -cat >&5 <<_ACEOF +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -## ----------- ## -## Core tests. ## -## ----------- ## +} # ac_fn_c_check_header_mongrel -_ACEOF +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -# 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; } +} # ac_fn_c_try_run -# 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 +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - 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 +} # ac_fn_c_check_header_compile - 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 +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - 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 +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +} # ac_fn_c_check_type -# Predefined preprocessor variables. +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + 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 + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + ; + return 0; +} _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" +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ -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 + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file + ac_retval=1 fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.val -# 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 - - - - + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval +} # ac_fn_c_compute_int +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 +$as_echo_n "checking whether $2 is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $2 + (void) $2; +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_decl +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_member +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $2 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -ac_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_fn_c_check_func +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.65. 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=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS +} >&5 +cat >&5 <<_ACEOF -unset GREP_OPTIONS -rb_version=`grep RUBY_VERSION $srcdir/version.h` -MAJOR=`expr "$rb_version" : '#define RUBY_VERSION "\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*"'` -MINOR=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*"'` -TEENY=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)"'` -if test "$MAJOR" = ""; then - { { echo "$as_me:$LINENO: error: could not determine MAJOR number from version.h" >&5 -echo "$as_me: error: could not determine MAJOR number from version.h" >&2;} - { (exit 1); exit 1; }; } -fi -if test "$MINOR" = ""; then - { { echo "$as_me:$LINENO: error: could not determine MINOR number from version.h" >&5 -echo "$as_me: error: could not determine MINOR number from version.h" >&2;} - { (exit 1); exit 1; }; } -fi -if test "$TEENY" = ""; then - { { echo "$as_me:$LINENO: error: could not determine TEENY number from version.h" >&5 -echo "$as_me: error: could not determine TEENY number from version.h" >&2;} - { (exit 1); exit 1; }; } -fi +## ----------- ## +## Core tests. ## +## ----------- ## +_ACEOF -# Check whether --with-gcc was given. -if test "${with_gcc+set}" = set; then - withval=$with_gcc; - case $withval in - no) : ${CC=cc} - ;; - yes) : ${CC=gcc} - ;; - *) CC=$withval - ;; +# 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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + 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 - -if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" -then - { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file -(it is also a good idea to do 'make clean' before compiling)" >&5 -echo "$as_me: error: cached CC is different -- throw away $cache_file -(it is also a good idea to do 'make clean' before compiling)" >&2;} - { (exit 1); exit 1; }; } -fi -test -z "$CC" || ac_cv_prog_CC="$CC" - -if test "$program_prefix" = NONE; then - program_prefix= -fi -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -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. +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# 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 -# 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 - - -{ echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6; } -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- -target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'` -ac_install_sh='' # unusable for extension libraries. - -fat_binary=no - -case $target_cpu in - i?86) frame_address=yes;; - *) frame_address=no;; -esac -# Check whether --enable-frame-address was given. -if test "${enable_frame_address+set}" = set; then - enableval=$enable_frame_address; frame_address=$enableval -fi - -if test $frame_address = yes; then - cat >>confdefs.h <<\_ACEOF -#define USE_BUILTIN_FRAME_ADDRESS 1 -_ACEOF - -fi - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed - - - -if test x"${build}" != x"${host}"; then - 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 - -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 - - -{ 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" - - -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 - -if test "$GCC" = yes; then - linker_flag=-Wl, -else - linker_flag= -fi - -{ echo "$as_me:$LINENO: checking whether the linker is GNU ld" >&5 -echo $ECHO_N "checking whether the linker is GNU ld... $ECHO_C" >&6; } -if test "${rb_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if `$CC $CFLAGS $CPPFLAGS $LDFLAGS --print-prog-name=ld 2>&1` -v 2>&1 | grep "GNU ld" > /dev/null; then - rb_cv_prog_gnu_ld=yes -else - rb_cv_prog_gnu_ld=no -fi - -fi -{ echo "$as_me:$LINENO: result: $rb_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$rb_cv_prog_gnu_ld" >&6; } -GNU_LD=$rb_cv_prog_gnu_ld - -{ echo "$as_me:$LINENO: checking whether ${CPP} accepts -o" >&5 -echo $ECHO_N "checking whether ${CPP} accepts -o... $ECHO_C" >&6; } -if test "${rb_cv_cppoutfile+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cppflags=$CPPFLAGS -CPPFLAGS='-o conftest.i' -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -_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 - rb_cv_cppoutfile=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_cppoutfile=no -fi - -rm -f conftest.err conftest.$ac_ext -CPPFLAGS=$cppflags -rm -f conftest* -fi -{ echo "$as_me:$LINENO: result: $rb_cv_cppoutfile" >&5 -echo "${ECHO_T}$rb_cv_cppoutfile" >&6; } -if test "$rb_cv_cppoutfile" = yes; then - CPPOUTFILE='-o conftest.i' -elif test "$rb_cv_cppoutfile" = no; then - CPPOUTFILE='> conftest.i' -elif test -n "$rb_cv_cppoutfile"; then - CPPOUTFILE="$rb_cv_cppoutfile" -fi - - -: ${OUTFLAG='-o '} - - -case "$host_os" in -cygwin*) -{ echo "$as_me:$LINENO: checking for mingw32 environment" >&5 -echo $ECHO_N "checking for mingw32 environment... $ECHO_C" >&6; } -if test "${rb_cv_mingw32+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. */ - -#ifndef __MINGW32__ -# error -#endif - -_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 - rb_cv_mingw32=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_mingw32=no -fi - -rm -f conftest.err conftest.$ac_ext -rm -f conftest* -fi -{ echo "$as_me:$LINENO: result: $rb_cv_mingw32" >&5 -echo "${ECHO_T}$rb_cv_mingw32" >&6; } -test "$rb_cv_mingw32" = yes && target_os="mingw32" - ;; -esac - -for ac_prog in 'bison -y' byacc -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_YACC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # 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_YACC="$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 -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { echo "$as_me:$LINENO: result: $YACC" >&5 -echo "${ECHO_T}$YACC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -if test "$YACC" = "yacc"; then - cat >>confdefs.h <<\_ACEOF -#define OLD_YACC 1 -_ACEOF - -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - 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 - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="" - 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 - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -z "$AR"; then - for ac_prog in aal -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_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="$ac_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 -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$AR" && break -done -test -n "$AR" || AR="ar" - -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; 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_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { echo "$as_me:$LINENO: result: $AS" >&5 -echo "${ECHO_T}$AS" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; 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_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as" - 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_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 -echo "${ECHO_T}$ac_ct_AS" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="" - 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 - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - -ASFLAGS=$ASFLAGS - - -case "$target_os" in -cygwin*|mingw*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. -set dummy ${ac_tool_prefix}nm; 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_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - ac_cv_prog_NM="$NM" # 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_NM="${ac_tool_prefix}nm" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NM=$ac_cv_prog_NM -if test -n "$NM"; then - { echo "$as_me:$LINENO: result: $NM" >&5 -echo "${ECHO_T}$NM" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NM"; then - ac_ct_NM=$NM - # Extract the first word of "nm", so it can be a program name with args. -set dummy nm; 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_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_NM"; then - ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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_NM="nm" - 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_NM=$ac_cv_prog_ac_ct_NM -if test -n "$ac_ct_NM"; then - { echo "$as_me:$LINENO: result: $ac_ct_NM" >&5 -echo "${ECHO_T}$ac_ct_NM" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_NM" = x; then - NM="" - 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 - NM=$ac_ct_NM - fi -else - NM="$ac_cv_prog_NM" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. -set dummy ${ac_tool_prefix}windres; 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_WINDRES+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$WINDRES"; then - ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ac_tool_prefix}windres" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -WINDRES=$ac_cv_prog_WINDRES -if test -n "$WINDRES"; then - { echo "$as_me:$LINENO: result: $WINDRES" >&5 -echo "${ECHO_T}$WINDRES" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_WINDRES"; then - ac_ct_WINDRES=$WINDRES - # Extract the first word of "windres", so it can be a program name with args. -set dummy windres; 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_WINDRES+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_WINDRES"; then - ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # 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_WINDRES="windres" - 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_WINDRES=$ac_cv_prog_ac_ct_WINDRES -if test -n "$ac_ct_WINDRES"; then - { echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5 -echo "${ECHO_T}$ac_ct_WINDRES" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_WINDRES" = x; then - WINDRES="" - 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 - WINDRES=$ac_ct_WINDRES - fi -else - WINDRES="$ac_cv_prog_WINDRES" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args. -set dummy ${ac_tool_prefix}dllwrap; 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_DLLWRAP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DLLWRAP"; then - ac_cv_prog_DLLWRAP="$DLLWRAP" # 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_DLLWRAP="${ac_tool_prefix}dllwrap" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DLLWRAP=$ac_cv_prog_DLLWRAP -if test -n "$DLLWRAP"; then - { echo "$as_me:$LINENO: result: $DLLWRAP" >&5 -echo "${ECHO_T}$DLLWRAP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLWRAP"; then - ac_ct_DLLWRAP=$DLLWRAP - # Extract the first word of "dllwrap", so it can be a program name with args. -set dummy dllwrap; 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_DLLWRAP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DLLWRAP"; then - ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # 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_DLLWRAP="dllwrap" - 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_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP -if test -n "$ac_ct_DLLWRAP"; then - { echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5 -echo "${ECHO_T}$ac_ct_DLLWRAP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_DLLWRAP" = x; then - DLLWRAP="" - 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 - DLLWRAP=$ac_ct_DLLWRAP - fi -else - DLLWRAP="$ac_cv_prog_DLLWRAP" -fi - - target_cpu=`echo $target_cpu | sed s/i.86/i386/` - case "$target_os" in - mingw*) - test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -echo "${ECHO_T}$OBJDUMP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ 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_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - 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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="" - 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 - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - { echo "$as_me:$LINENO: checking for mingw32 runtime DLL" >&5 -echo $ECHO_N "checking for mingw32 runtime DLL... $ECHO_C" >&6; } -if test "${rb_cv_msvcrt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -FILE* volatile f = stdin; return 0; - ; - 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 - rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext | - tr A-Z a-z | - sed -n '/^[ ]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'` -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_msvcrt=msvcrt -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - test "$rb_cv_msvcrt" = "" && rb_cv_msvcrt=msvcrt -fi -{ echo "$as_me:$LINENO: result: $rb_cv_msvcrt" >&5 -echo "${ECHO_T}$rb_cv_msvcrt" >&6; } - -# Check whether --with-winsock2 was given. -if test "${with_winsock2+set}" = set; then - withval=$with_winsock2; - case $withval in - yes) with_winsock2=yes;; - *) with_winsock2=no;; - esac -else - with_winsock2=no -fi - - if test "$with_winsock2" = yes; then - cat >>confdefs.h <<\_ACEOF -#define USE_WINSOCK2 1 -_ACEOF - - fi - esac - : ${enable_shared=yes} - ;; -aix*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. -set dummy ${ac_tool_prefix}nm; 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_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - ac_cv_prog_NM="$NM" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="/usr/ccs/bin:$PATH" -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_prog_NM="${ac_tool_prefix}nm" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NM=$ac_cv_prog_NM -if test -n "$NM"; then - { echo "$as_me:$LINENO: result: $NM" >&5 -echo "${ECHO_T}$NM" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NM"; then - ac_ct_NM=$NM - # Extract the first word of "nm", so it can be a program name with args. -set dummy nm; 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_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_NM"; then - ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="/usr/ccs/bin:$PATH" -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_prog_ac_ct_NM="nm" - 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_NM=$ac_cv_prog_ac_ct_NM -if test -n "$ac_ct_NM"; then - { echo "$as_me:$LINENO: result: $ac_ct_NM" >&5 -echo "${ECHO_T}$ac_ct_NM" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_NM" = x; then - NM="/usr/ccs/bin/nm" - 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 - NM=$ac_ct_NM - fi -else - NM="$ac_cv_prog_NM" -fi - - ;; -hiuxmpp*) - # by TOYODA Eizi - cat >>confdefs.h <<\_ACEOF -#define __HIUX_MPP__ 1 -_ACEOF - - ;; -esac - -{ 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 - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -# checks for UNIX variants that set C preprocessor variables - -{ echo "$as_me:$LINENO: checking for AIX" >&5 -echo $ECHO_N "checking for AIX... $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. */ -#ifdef _AIX - yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define _ALL_SOURCE 1 -_ACEOF - -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -rm -f conftest* - - -{ 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_minix_config_h+set}" = set; then - { echo "$as_me:$LINENO: checking for minix/config.h" >&5 -echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } -if test "${ac_cv_header_minix_config_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5 -echo $ECHO_N "checking minix/config.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 minix/config.h presence" >&5 -echo $ECHO_N "checking minix/config.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: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for minix/config.h" >&5 -echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } -if test "${ac_cv_header_minix_config_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_minix_config_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } - -fi -if test $ac_cv_header_minix_config_h = yes; then - MINIX=yes -else - MINIX= -fi - - -if test "$MINIX" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define _POSIX_SOURCE 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define _POSIX_1_SOURCE 2 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define _MINIX 1 -_ACEOF - -fi - - -RM='rm -f' - -CP='cp' - -if $as_mkdir_p; then - MAKEDIRS='mkdir -p' - -else - MAKEDIRS='install -d' - -fi - -mv confdefs.h confdefs1.h -: > confdefs.h -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -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 - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - 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_sys_largefile_CC=' -n32'; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -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_sys_file_offset_bits=no; break -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 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -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_sys_file_offset_bits=64; break -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 - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -f conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -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_sys_large_files=no; break -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 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -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_sys_large_files=1; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; 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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo -fi + 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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -f conftest* - fi -fi - -mv confdefs.h largefile.h -mv confdefs1.h confdefs.h -cat largefile.h >> confdefs.h +ac_signal=0 -{ 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 +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h - ac_cv_type_long_long=no -fi +$as_echo "/* confdefs.h */" > confdefs.h -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; } -if test $ac_cv_type_long_long = yes; then +# Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF -#define HAVE_LONG_LONG 1 -_ACEOF - - -fi -{ echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef off_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define PACKAGE_NAME "$PACKAGE_NAME" _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_off_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_off_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6; } -if test $ac_cv_type_off_t = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_OFF_T 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; -} +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" _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 +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" _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. */ + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _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; -} +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" _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 +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file 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 +# 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,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## - ; - 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_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_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 + + + + + + +unset GREP_OPTIONS +rb_version=`grep RUBY_VERSION $srcdir/version.h` +MAJOR=`expr "$rb_version" : '#define RUBY_VERSION "\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*"'` +MINOR=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*"'` +TEENY=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)"'` +if test "$MAJOR" = ""; then + as_fn_error "could not determine MAJOR number from version.h" "$LINENO" 5 fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +if test "$MINOR" = ""; then + as_fn_error "could not determine MINOR number from version.h" "$LINENO" 5 fi -rm -f conftest.val +if test "$TEENY" = ""; then + as_fn_error "could not determine TEENY number from version.h" "$LINENO" 5 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 +# Check whether --with-gcc was given. +if test "${with_gcc+set}" = set; then : + withval=$with_gcc; + case $withval in + no) : ${CC=cc} + ;; + yes) : ${CC=gcc} + ;; + *) CC=$withval + ;; + esac +fi -{ echo "$as_me:$LINENO: checking for short" >&5 -echo $ECHO_N "checking for short... $ECHO_C" >&6; } -if test "${ac_cv_type_short+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 short 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_short=yes +if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" +then + as_fn_error "cached CC is different -- throw away $cache_file +(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5 +fi +test -z "$CC" || ac_cv_prog_CC="$CC" + +if test "$program_prefix" = NONE; then + program_prefix= +fi +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# 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 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + 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 && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - ac_cv_type_short=no fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +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 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&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 short" >&5 -echo $ECHO_N "checking size of short... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$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 short ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 + 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` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi - ; - 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;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; 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 short ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 +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 - ; - 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 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 +fi - 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac -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 short ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 0 +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'` +ac_install_sh='' # unusable for extension libraries. - ; - 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 short ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 0 +fat_binary=no - ; - 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;; +case $target_cpu in + i?86) frame_address=yes;; + *) frame_address=no;; 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` +# Check whether --enable-frame-address was given. +if test "${enable_frame_address+set}" = set; then : + enableval=$enable_frame_address; frame_address=$enableval 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 +if test $frame_address = yes; then + $as_echo "#define USE_BUILTIN_FRAME_ADDRESS 1" >>confdefs.h -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 short ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - ; - 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_short=$ac_lo;; -'') if test "$ac_cv_type_short" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_short=0 - fi ;; -esac +if test x"${build}" != x"${host}"; then + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - 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 short 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_short=`cat conftest.val` + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +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" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( exit $ac_status ) -if test "$ac_cv_type_short" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_short=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 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_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 +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - 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 + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +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" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - 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 +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - 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;; + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac -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 + CC=$ac_ct_CC + fi 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` + CC="$ac_cv_prog_CC" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +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" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - 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 +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +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" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ; - 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 +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - 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` + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +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" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +IFS=$as_save_IFS - ac_lo= ac_hi= fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } 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 + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + 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" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_lo=`expr '(' $ac_mid ')' + 1` +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 - -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 +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&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_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 () -{ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - 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` +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + 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" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( 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 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } 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 + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - 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 + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +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" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - 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 +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - 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;; + 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:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac -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 + CC=$ac_ct_CC + fi +fi - 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 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - 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 + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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" +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.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_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? - 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 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# 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 | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + 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= -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 + ac_file='' fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext -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" +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 ac_status=$? - 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 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `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 | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac 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 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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; +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - 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 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for __int64" >&5 -echo $ECHO_N "checking for __int64... $ECHO_C" >&6; } -if test "${ac_cv_type___int64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef __int64 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" +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>conftest.er1 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - 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___int64=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type___int64=no +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 -echo "${ECHO_T}$ac_cv_type___int64" >&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 __int64" >&5 -echo $ECHO_N "checking size of __int64... $ECHO_C" >&6; } -if test "${ac_cv_sizeof___int64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef __int64 ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 +#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_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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef __int64 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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - 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 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -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 +int +main () +{ - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef __int64 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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef __int64 ac__type_sizeof_; +#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 () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 0 - +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[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;; +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +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) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 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 +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : - 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` +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.$ac_ext -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 +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : - ac_lo= ac_hi= +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -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 __int64 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;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +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 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + 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 -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 + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_path_GREP=$GREP +fi - ac_lo=`expr '(' $ac_mid ')' + 1` fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof___int64=$ac_lo;; -'') if test "$ac_cv_type___int64" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (__int64) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" else - ac_cv_sizeof___int64=0 - fi ;; + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +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 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + 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 -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 __int64 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___int64=`cat conftest.val` + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_path_EGREP=$EGREP +fi -( exit $ac_status ) -if test "$ac_cv_type___int64" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (__int64) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof___int64=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___int64" >&5 -echo "${ECHO_T}$ac_cv_sizeof___int64" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF___INT64 $ac_cv_sizeof___int64 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -{ echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test $ac_cv_c_compiler_gnu = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +$as_echo_n "checking whether $CC needs -traditional... " >&6; } +if test "${ac_cv_prog_gcc_traditional+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_pattern="Autoconf.*'x'" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef off_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#include +Autoconf TIOCGETP _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_off_t=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then : + ac_cv_prog_gcc_traditional=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_off_t=no + ac_cv_prog_gcc_traditional=no fi +rm -f conftest* -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6; } -# 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 off_t" >&5 -echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$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 + if test $ac_cv_prog_gcc_traditional = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef off_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. */ +#include +Autoconf TCGETA _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef off_t ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 +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* - ; - 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 + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +$as_echo "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi - 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` +if test "$GCC" = yes; then + linker_flag=-Wl, +else + linker_flag= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker is GNU ld" >&5 +$as_echo_n "checking whether the linker is GNU ld... " >&6; } +if test "${rb_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if `$CC $CFLAGS $CPPFLAGS $LDFLAGS --print-prog-name=ld 2>&1` -v 2>&1 | grep "GNU ld" > /dev/null; then + rb_cv_prog_gnu_ld=yes +else + rb_cv_prog_gnu_ld=no +fi - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_prog_gnu_ld" >&5 +$as_echo "$rb_cv_prog_gnu_ld" >&6; } +GNU_LD=$rb_cv_prog_gnu_ld + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CPP} accepts -o" >&5 +$as_echo_n "checking whether ${CPP} accepts -o... " >&6; } +if test "${rb_cv_cppoutfile+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cppflags=$CPPFLAGS +CPPFLAGS='-o conftest.i' +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef off_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 +if ac_fn_c_try_cpp "$LINENO"; then : + rb_cv_cppoutfile=yes +else + rb_cv_cppoutfile=no +fi +rm -f conftest.err conftest.$ac_ext +CPPFLAGS=$cppflags +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_cppoutfile" >&5 +$as_echo "$rb_cv_cppoutfile" >&6; } +if test "$rb_cv_cppoutfile" = yes; then + CPPOUTFILE='-o conftest.i' +elif test "$rb_cv_cppoutfile" = no; then + CPPOUTFILE='> conftest.i' +elif test -n "$rb_cv_cppoutfile"; then + CPPOUTFILE="$rb_cv_cppoutfile" +fi + + +: ${OUTFLAG='-o '} + + +case "$host_os" in +cygwin*) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mingw32 environment" >&5 +$as_echo_n "checking for mingw32 environment... " >&6; } +if test "${rb_cv_mingw32+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef off_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; -} +#ifndef __MINGW32__ +# error +#endif + _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 +if ac_fn_c_try_cpp "$LINENO"; then : + rb_cv_mingw32=yes 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` + rb_cv_mingw32=no fi +rm -f conftest.err conftest.$ac_ext +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_mingw32" >&5 +$as_echo "$rb_cv_mingw32" >&6; } +test "$rb_cv_mingw32" = yes && target_os="mingw32" + ;; +esac -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # 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_YACC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_lo= ac_hi= fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } 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 off_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 + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +if test "$YACC" = "yacc"; then + $as_echo "#define OLD_YACC 1" >>confdefs.h + +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_lo=`expr '(' $ac_mid ')' + 1` +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +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_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done -case $ac_lo in -?*) ac_cv_sizeof_off_t=$ac_lo;; -'') if test "$ac_cv_type_off_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_off_t=0 - fi ;; -esac + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&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 off_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 () -{ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - 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); - } + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" 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_off_t=`cat conftest.val` + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +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_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( exit $ac_status ) -if test "$ac_cv_type_off_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_off_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 +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; } +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +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_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF_T $ac_cv_sizeof_off_t -_ACEOF +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi -{ echo "$as_me:$LINENO: checking for void*" >&5 -echo $ECHO_N "checking for void*... $ECHO_C" >&6; } -if test "${ac_cv_type_voidp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z "$AR"; then + for ac_prog in aal +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef void* 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_voidp=yes + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +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_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_cv_type_voidp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_voidp" >&5 -echo "${ECHO_T}$ac_cv_type_voidp" >&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 void*" >&5 -echo $ECHO_N "checking size of void*... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_voidp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&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 void* ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - 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 void* 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 + test -n "$AR" && break +done +test -n "$AR" || AR="ar" - 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 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AS+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - 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 void* ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 0 +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - 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 void* 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 +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - 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 +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "x$ac_ct_AS" = x; then + AS="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" 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 void* ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 +ASFLAGS=$ASFLAGS - ; - 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 + +case "$target_os" in +cygwin*|mingw*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. +set dummy ${ac_tool_prefix}nm; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NM+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # 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_NM="${ac_tool_prefix}nm" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_lo=`expr '(' $ac_mid ')' + 1` +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +if test -z "$ac_cv_prog_NM"; then + ac_ct_NM=$NM + # Extract the first word of "nm", so it can be a program name with args. +set dummy nm; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NM+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NM"; then + ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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_NM="nm" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done -case $ac_lo in -?*) ac_cv_sizeof_voidp=$ac_lo;; -'') if test "$ac_cv_type_voidp" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void*) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void*) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_voidp=0 - fi ;; -esac + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NM=$ac_cv_prog_ac_ct_NM +if test -n "$ac_ct_NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 +$as_echo "$ac_ct_NM" >&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 void* 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 () -{ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - 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); - } + if test "x$ac_ct_NM" = x; then + NM="" 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;; + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac -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_voidp=`cat conftest.val` + NM=$ac_ct_NM + fi else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + NM="$ac_cv_prog_NM" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_WINDRES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ac_tool_prefix}windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( exit $ac_status ) -if test "$ac_cv_type_voidp" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void*) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void*) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_voidp=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 +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_voidp" >&5 -echo "${ECHO_T}$ac_cv_sizeof_voidp" >&6; } +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # 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_WINDRES="windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOIDP $ac_cv_sizeof_voidp -_ACEOF +fi +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi -{ echo "$as_me:$LINENO: checking for float" >&5 -echo $ECHO_N "checking for float... $ECHO_C" >&6; } -if test "${ac_cv_type_float+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args. +set dummy ${ac_tool_prefix}dllwrap; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLWRAP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef float 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_float=yes + if test -n "$DLLWRAP"; then + ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test. else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +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_DLLWRAP="${ac_tool_prefix}dllwrap" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_cv_type_float=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5 -echo "${ECHO_T}$ac_cv_type_float" >&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 float" >&5 -echo $ECHO_N "checking size of float... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_float+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +DLLWRAP=$ac_cv_prog_DLLWRAP +if test -n "$DLLWRAP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5 +$as_echo "$DLLWRAP" >&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 float ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - 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 float 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 +fi +if test -z "$ac_cv_prog_DLLWRAP"; then + ac_ct_DLLWRAP=$DLLWRAP + # Extract the first word of "dllwrap", so it can be a program name with args. +set dummy dllwrap; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$ac_ct_DLLWRAP"; then + ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # 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_DLLWRAP="dllwrap" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - 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 +fi +ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP +if test -n "$ac_ct_DLLWRAP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5 +$as_echo "$ac_ct_DLLWRAP" >&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. */ -$ac_includes_default - typedef float 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 float ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 0 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - 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;; + if test "x$ac_ct_DLLWRAP" = x; then + DLLWRAP="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac -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 + DLLWRAP=$ac_ct_DLLWRAP + fi 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` + DLLWRAP="$ac_cv_prog_DLLWRAP" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done + target_cpu=`echo $target_cpu | sed s/i.86/i386/` + case "$target_os" in + mingw*) + test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_lo= ac_hi= fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -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 float 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 +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_lo=`expr '(' $ac_mid ')' + 1` +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_float=$ac_lo;; -'') if test "$ac_cv_type_float" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (float) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_float=0 - fi ;; + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + OBJDUMP=$ac_ct_OBJDUMP + fi else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mingw32 runtime DLL" >&5 +$as_echo_n "checking for mingw32 runtime DLL... " >&6; } +if test "${rb_cv_msvcrt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef float 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; - +FILE* volatile f = stdin; return 0; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_float=`cat conftest.val` +if ac_fn_c_try_link "$LINENO"; then : + rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext | + tr A-Z a-z | + sed -n '/^[ ]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'` 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_float" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (float) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_float=0 - fi + rb_cv_msvcrt=msvcrt fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + test "$rb_cv_msvcrt" = "" && rb_cv_msvcrt=msvcrt fi -rm -f conftest.val +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_msvcrt" >&5 +$as_echo "$rb_cv_msvcrt" >&6; } + +# Check whether --with-winsock2 was given. +if test "${with_winsock2+set}" = set; then : + withval=$with_winsock2; + case $withval in + yes) with_winsock2=yes;; + *) with_winsock2=no;; + esac +else + with_winsock2=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 -echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } + if test "$with_winsock2" = yes; then + $as_echo "#define USE_WINSOCK2 1" >>confdefs.h + COMMON_HEADERS="ws2tcpip.h winsock2.h windows.h" + else + COMMON_HEADERS="windows.h winsock.h" + fi + esac + : ${enable_shared=yes} + ;; +aix*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. +set dummy ${ac_tool_prefix}nm; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NM+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="/usr/ccs/bin:$PATH" +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_prog_NM="${ac_tool_prefix}nm" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -cat >>confdefs.h <<_ACEOF -#define SIZEOF_FLOAT $ac_cv_sizeof_float -_ACEOF +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -{ echo "$as_me:$LINENO: checking for double" >&5 -echo $ECHO_N "checking for double... $ECHO_C" >&6; } -if test "${ac_cv_type_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +if test -z "$ac_cv_prog_NM"; then + ac_ct_NM=$NM + # Extract the first word of "nm", so it can be a program name with args. +set dummy nm; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NM+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef double 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_double=yes + if test -n "$ac_ct_NM"; then + ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="/usr/ccs/bin:$PATH" +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_prog_ac_ct_NM="nm" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_cv_type_double=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5 -echo "${ECHO_T}$ac_cv_type_double" >&6; } +ac_ct_NM=$ac_cv_prog_ac_ct_NM +if test -n "$ac_ct_NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 +$as_echo "$ac_ct_NM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# 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 double" >&5 -echo $ECHO_N "checking size of double... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "x$ac_ct_NM" = x; then + NM="/usr/ccs/bin/nm" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NM=$ac_ct_NM + fi 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 double ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 + NM="$ac_cv_prog_NM" +fi - ; - 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;; + ;; +hiuxmpp*) + # by TOYODA Eizi + $as_echo "#define __HIUX_MPP__ 1" >>confdefs.h + + ;; 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 double 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; -} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' _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;; +# 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 -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 +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi - 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` +# 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. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /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 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } -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 +# 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}' - 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 double ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 0 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - ; - 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 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +# checks for UNIX variants that set C preprocessor variables +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef double ac__type_sizeof_; +#include +#include +#include +#include + 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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# 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 +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef double ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 +#include - ; - 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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest* - 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_double=$ac_lo;; -'') if test "$ac_cv_type_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (double) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_double=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef double 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_double=`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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : -( exit $ac_status ) -if test "$ac_cv_type_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (double) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_double=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 +else + ac_cv_header_stdc=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_DOUBLE $ac_cv_sizeof_double -_ACEOF +rm -f conftest* +fi -{ echo "$as_me:$LINENO: checking for time_t" >&5 -echo $ECHO_N "checking for time_t... $ECHO_C" >&6; } -if test "${ac_cv_type_time_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef time_t ac__type_new_; +#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 () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; + 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_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_time_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_time_t=no +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 -echo "${ECHO_T}$ac_cv_type_time_t" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -# 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 time_t" >&5 -echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_time_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 time_t ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 +$as_echo "#define STDC_HEADERS 1" >>confdefs.h - ; - 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 time_t ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 +fi - ; - return 0; -} +# 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _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 +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = x""yes; then : + MINIX=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + MINIX= +fi - 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 time_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 + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef time_t ac__type_sizeof_; + +# define __EXTENSIONS__ 1 + $ac_includes_default 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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes 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` + ac_cv_safe_to_define___extensions__=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + + + + +RM='rm -f' + +CP='cp' + +if $as_mkdir_p; then + MAKEDIRS='mkdir -p' + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + MAKEDIRS='install -d' - ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +mv confdefs.h confdefs1.h +: > confdefs.h +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; 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 +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef time_t ac__type_sizeof_; +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; 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` + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_time_t=$ac_lo;; -'') if test "$ac_cv_type_time_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (time_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_time_t=0 - fi ;; -esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - typedef time_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 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; 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_time_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_time_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (time_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_time_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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_TIME_T $ac_cv_sizeof_time_t -_ACEOF - - - -for id in pid_t gid_t uid_t; do - as_ac_Type=`echo "ac_cv_type_$id" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $id" >&5 -echo $ECHO_N "checking for $id... $ECHO_C" >&6; } -if { as_var=$as_ac_Type; 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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef $id ac__type_new_; +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; 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 - eval "$as_ac_Type=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Type=no" +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done fi -ac_res=`eval echo '${'$as_ac_Type'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Type'}'` = yes; then - typ=$id -else - typ=int -fi - - cat >>confdefs.h <<_ACEOF -#define rb_$id $typ +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF - -done - -{ echo "$as_me:$LINENO: checking for prototypes" >&5 -echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; } -if test "${rb_cv_have_prototypes+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(int x) { return 0; } +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { -return foo(10); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - rb_cv_have_prototypes=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_have_prototypes=no +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $rb_cv_have_prototypes" >&5 -echo "${ECHO_T}$rb_cv_have_prototypes" >&6; } -if test "$rb_cv_have_prototypes" = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_PROTOTYPES 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking token paste string" >&5 -echo $ECHO_N "checking token paste string... $ECHO_C" >&6; } -if test "${rb_cv_tokenpaste+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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define paste(a,b) a##b +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { -int xy = 1; return paste(x,y); + ; 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 - rb_cv_tokenpaste=ansi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_tokenpaste=knr +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done fi -{ echo "$as_me:$LINENO: result: $rb_cv_tokenpaste" >&5 -echo "${ECHO_T}$rb_cv_tokenpaste" >&6; } -if test "$rb_cv_tokenpaste" = ansi; then - cat >>confdefs.h <<\_ACEOF -#define TOKEN_PASTE(x,y) x##y -_ACEOF - -else - cat >>confdefs.h <<\_ACEOF -#define TOKEN_PASTE(x,y) x/**/y +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files _ACEOF - +;; +esac +rm -rf conftest* + fi fi -{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5 -echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; } -if test "${rb_cv_stdarg+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. */ +mv confdefs.h largefile.h +mv confdefs1.h confdefs.h +cat largefile.h >> confdefs.h -#include -int foo(int x, ...) { - va_list va; - va_start(va, x); - va_arg(va, int); - va_arg(va, char *); - va_arg(va, double); - return 0; -} +ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" +if test "x$ac_cv_type_long_long" = x""yes; then : -int -main () -{ -return foo(10, "", 3.14); - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define HAVE_LONG_LONG 1 _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 - rb_cv_stdarg=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rb_cv_stdarg=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv_stdarg" >&5 -echo "${ECHO_T}$rb_cv_stdarg" >&6; } -if test "$rb_cv_stdarg" = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_STDARG_PROTOTYPES 1 +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_OFF_T 1 _ACEOF + fi +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - { echo "$as_me:$LINENO: checking for noreturn function attribute" >&5 -echo $ECHO_N "checking for noreturn function attribute... $ECHO_C" >&6; } -if test "${rb_cv_func_noreturn+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rb_cv_func_noreturn=x -if test "${ac_c_werror_flag+set}"; then - rb_c_werror_flag="$ac_c_werror_flag" else - unset rb_c_werror_flag + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int=0 + fi fi -ac_c_werror_flag=yes -for mac in "__attribute__ ((noreturn)) x" "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define NORETURN(x) $mac - NORETURN(void conftest_attribute_check(void)); -int -main () -{ - ; - return 0; -} +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int _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 - rb_cv_func_noreturn="$mac"; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if test "${ac_cv_sizeof_short+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -if test "${rb_c_werror_flag+set}"; then - ac_c_werror_flag="$rb_c_werror_flag" else - unset ac_c_werror_flag + if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (short) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_short=0 + fi fi fi -{ echo "$as_me:$LINENO: result: $rb_cv_func_noreturn" >&5 -echo "${ECHO_T}$rb_cv_func_noreturn" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } + + + cat >>confdefs.h <<_ACEOF -#define NORETURN(x) $rb_cv_func_noreturn +#define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - - { echo "$as_me:$LINENO: checking for noinline function attribute" >&5 -echo $ECHO_N "checking for noinline function attribute... $ECHO_C" >&6; } -if test "${rb_cv_func_noinline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rb_cv_func_noinline=x -if test "${ac_c_werror_flag+set}"; then - rb_c_werror_flag="$ac_c_werror_flag" else - unset rb_c_werror_flag + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long=0 + fi fi -ac_c_werror_flag=yes -for mac in "__attribute__ ((noinline)) x" "x __attribute__ ((noinline))" "__declspec(noinline) x" x; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define NOINLINE(x) $mac - NOINLINE(void conftest_attribute_check(void)); -int -main () -{ - ; - return 0; -} +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long _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 - rb_cv_func_noinline="$mac"; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if test "${ac_cv_sizeof_long_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -if test "${rb_c_werror_flag+set}"; then - ac_c_werror_flag="$rb_c_werror_flag" else - unset ac_c_werror_flag + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long_long=0 + fi fi fi -{ echo "$as_me:$LINENO: result: $rb_cv_func_noinline" >&5 -echo "${ECHO_T}$rb_cv_func_noinline" >&6; } -cat >>confdefs.h <<_ACEOF -#define NOINLINE(x) $rb_cv_func_noinline -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } - - -{ echo "$as_me:$LINENO: checking for RUBY_EXTERN" >&5 -echo $ECHO_N "checking for RUBY_EXTERN... $ECHO_C" >&6; } -if test "${rb_cv_ruby_extern+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rb_cv_ruby_extern=no -for mac in "__attribute__((dllimport))" "__declspec(dllimport)"; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern $mac void conftest(void); -int -main () -{ -rb_cv_ruby_extern="extern $mac"; break - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _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 +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 +$as_echo_n "checking size of __int64... " >&6; } +if test "${ac_cv_sizeof___int64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : + +else + if test "$ac_cv_type___int64" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (__int64) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof___int64=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done fi -{ echo "$as_me:$LINENO: result: $rb_cv_ruby_extern" >&5 -echo "${ECHO_T}$rb_cv_ruby_extern" >&6; } -test "x$rb_cv_ruby_extern" = xno || cat >>confdefs.h <<_ACEOF -#define RUBY_EXTERN $rb_cv_ruby_extern -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 +$as_echo "$ac_cv_sizeof___int64" >&6; } -XCFLAGS="$XCFLAGS -DRUBY_EXPORT" -{ echo "$as_me:$LINENO: checking whether sys_nerr is declared" >&5 -echo $ECHO_N "checking whether sys_nerr is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_sys_nerr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define SIZEOF___INT64 $ac_cv_sizeof___int64 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -int -main () -{ -#ifndef sys_nerr - (void) sys_nerr; -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_sys_nerr=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if test "${ac_cv_sizeof_off_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : - ac_cv_have_decl_sys_nerr=no +else + if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (off_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_off_t=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_nerr" >&5 -echo "${ECHO_T}$ac_cv_have_decl_sys_nerr" >&6; } -if test $ac_cv_have_decl_sys_nerr = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } + + cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SYS_NERR 1 +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SYS_NERR 0 -_ACEOF +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5 +$as_echo_n "checking size of void*... " >&6; } +if test "${ac_cv_sizeof_voidp+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp" "$ac_includes_default"; then : +else + if test "$ac_cv_type_voidp" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (void*) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_voidp=0 + fi +fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5 +$as_echo "$ac_cv_sizeof_voidp" >&6; } +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOIDP $ac_cv_sizeof_voidp +_ACEOF -# Check whether --with-libc_r was given. -if test "${with_libc_r+set}" = set; then - withval=$with_libc_r; - case $withval in - yes) with_libc_r=yes;; - *) with_libc_r=no;; - esac -else - with_libc_r=no -fi +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 +$as_echo_n "checking size of float... " >&6; } +if test "${ac_cv_sizeof_float+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : -# Check whether --enable-pthread was given. -if test "${enable_pthread+set}" = set; then - enableval=$enable_pthread; enable_pthread=$enableval else - enable_pthread=no + if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (float) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_float=0 + fi fi - -# Check whether --enable-fastthread was given. -if test "${enable_fastthread+set}" = set; then - enableval=$enable_fastthread; - : handled by ext/thread/extconf.rb - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 +$as_echo "$ac_cv_sizeof_float" >&6; } -case "$target_os" in -nextstep*) ;; -openstep*) ;; -rhapsody*) ;; -darwin*) LIBS="-lobjc $LIBS" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 - #error pre OS X 10.4 - [!<===== pre OS X 10.4 =====>] - #endif +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float _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 - test "x$target_cpu" = xpowerpc && ac_cv_header_ucontext_h=no + +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 +$as_echo_n "checking size of double... " >&6; } +if test "${ac_cv_sizeof_double+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (double) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_double=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&6; } - cat >>confdefs.h <<\_ACEOF -#define BROKEN_SETREUID 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define BROKEN_SETREGID 1 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_DOUBLE $ac_cv_sizeof_double _ACEOF +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if test "${ac_cv_sizeof_time_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (time_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_time_t=0 + fi +fi + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } -rm -f conftest.err conftest.$ac_ext - ;; -hpux*) LIBS="-lm $LIBS" - ac_cv_c_inline=no;; -human*) ac_cv_func_getpgrp_void=yes - ac_cv_func_setitimer=no - ;; -beos*) ac_cv_func_link=no;; -cygwin*) ;; -mingw*) if test "$with_winsock2" = yes; then - LIBS="-lws2_32 $LIBS" - else - LIBS="-lwsock32 $LIBS" - fi - LIBS="-lshell32 $LIBS" - ac_cv_header_a_out_h=no - ac_cv_header_pwd_h=no - ac_cv_header_utime_h=no - ac_cv_header_sys_ioctl_h=no - ac_cv_header_sys_param_h=no - ac_cv_header_sys_resource_h=no - ac_cv_header_sys_select_h=no - ac_cv_header_sys_time_h=no - ac_cv_header_sys_times_h=no - ac_cv_func_times=yes - ac_cv_func_waitpid=yes - ac_cv_func_fsync=yes - ac_cv_func_vsnprintf=yes - ac_cv_func_seekdir=yes - ac_cv_func_telldir=yes - ac_cv_func_isinf=yes - ac_cv_func_isnan=yes - ac_cv_func_finite=yes - ac_cv_func_link=yes - ac_cv_lib_crypt_crypt=no - ac_cv_func_getpgrp_void=no - ac_cv_func_setpgrp_void=yes - ac_cv_func_memcmp_working=yes - ac_cv_lib_dl_dlopen=no - rb_cv_binary_elf=no - rb_cv_negative_time_t=no - enable_pthread=no - ac_cv_func_fcntl=yes - ;; -os2-emx*) LIBS="-lm $LIBS" - ac_cv_lib_dir_opendir=no;; -msdosdjgpp*) LIBS="-lm $LIBS" - ac_cv_func_getpgrp_void=yes - ac_cv_func_setitimer=no - ac_cv_sizeof_rlim_t=4 - ac_cv_func_setrlimit=no - ;; -bsdi*) LIBS="-lm $LIBS" - cat >>confdefs.h <<\_ACEOF -#define BROKEN_SETREUID 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define BROKEN_SETREGID 1 -_ACEOF - ac_cv_sizeof_rlim_t=8;; -freebsd*) LIBS="-lm $LIBS" - { echo "$as_me:$LINENO: checking whether -lxpg4 has to be linked" >&5 -echo $ECHO_N "checking whether -lxpg4 has to be linked... $ECHO_C" >&6; } -if test "${rb_cv_lib_xpg4_needed+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if __FreeBSD_version < 400020 || \ - (__FreeBSD_version >= 500000 && __FreeBSD_version < 500005) -#error needs libxpg4 -#endif -_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 - rb_cv_lib_xpg4_needed=no -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - rb_cv_lib_xpg4_needed=yes +for id in pid_t gid_t uid_t; do + as_ac_Type=`$as_echo "ac_cv_type_$id" | $as_tr_sh` +ac_fn_c_check_type "$LINENO" "$id" "$as_ac_Type" "$ac_includes_default" +eval as_val=\$$as_ac_Type + if test "x$as_val" = x""yes; then : + typ=$id +else + typ=int fi -rm -f conftest.err conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $rb_cv_lib_xpg4_needed" >&5 -echo "${ECHO_T}$rb_cv_lib_xpg4_needed" >&6; } - if test "$rb_cv_lib_xpg4_needed" = yes; then + cat >>confdefs.h <<_ACEOF +#define rb_$id $typ +_ACEOF + +done -{ echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5 -echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6; } -if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5 +$as_echo_n "checking for prototypes... " >&6; } +if test "${rb_cv_have_prototypes+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lxpg4 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - 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 setlocale (); +int foo(int x) { return 0; } int main () { -return setlocale (); +return foo(10); ; 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_xpg4_setlocale=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_have_prototypes=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_xpg4_setlocale=no + rb_cv_have_prototypes=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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4_setlocale" >&5 -echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6; } -if test $ac_cv_lib_xpg4_setlocale = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBXPG4 1 -_ACEOF - - LIBS="-lxpg4 $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_have_prototypes" >&5 +$as_echo "$rb_cv_have_prototypes" >&6; } +if test "$rb_cv_have_prototypes" = yes; then + $as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h fi - fi - if test "$with_libc_r" = yes; then - { echo "$as_me:$LINENO: checking whether libc_r is supplementary to libc" >&5 -echo $ECHO_N "checking whether libc_r is supplementary to libc... $ECHO_C" >&6; } -if test "${rb_cv_supplementary_lib_c_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking token paste string" >&5 +$as_echo_n "checking token paste string... " >&6; } +if test "${rb_cv_tokenpaste+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#if 500016 <= __FreeBSD_version -#error libc_r is supplementary to libc -#endif - +#define paste(a,b) a##b +int +main () +{ +int xy = 1; return paste(x,y); + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - rb_cv_supplementary_lib_c_r=no +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_tokenpaste=ansi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_supplementary_lib_c_r=yes + rb_cv_tokenpaste=knr +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_tokenpaste" >&5 +$as_echo "$rb_cv_tokenpaste" >&6; } +if test "$rb_cv_tokenpaste" = ansi; then + $as_echo "#define TOKEN_PASTE(x,y) x##y" >>confdefs.h + +else + $as_echo "#define TOKEN_PASTE(x,y) x/**/y" >>confdefs.h -rm -f conftest.err conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv_supplementary_lib_c_r" >&5 -echo "${ECHO_T}$rb_cv_supplementary_lib_c_r" >&6; } - if test "$rb_cv_supplementary_lib_c_r" = yes; then - MAINLIBS="-lc_r $MAINLIBS" - fi - fi - ;; -dragonfly*) LIBS="-lm $LIBS" - ;; -bow) ac_cv_func_setitimer=no - ;; -superux*) ac_cv_func_setitimer=no - ;; -solaris*2.1*) if test -z "$GCC"; then - ac_cv_func_isinf=yes - fi - LIBS="-lm $LIBS" - ;; -*) LIBS="-lm $LIBS";; -esac -{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 -echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; } -if test "${ac_cv_lib_crypt_crypt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5 +$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } +if test "${rb_cv_stdarg+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - 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 crypt (); +#include +int foo(int x, ...) { + va_list va; + va_start(va, x); + va_arg(va, int); + va_arg(va, char *); + va_arg(va, double); + return 0; +} + int main () { -return crypt (); +return foo(10, "", 3.14); ; 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_crypt_crypt=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_stdarg=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_crypt_crypt=no + rb_cv_stdarg=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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 -echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; } -if test $ac_cv_lib_crypt_crypt = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCRYPT 1 -_ACEOF - - LIBS="-lcrypt $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_stdarg" >&5 +$as_echo "$rb_cv_stdarg" >&6; } +if test "$rb_cv_stdarg" = yes; then + $as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for noreturn function attribute" >&5 +$as_echo_n "checking for noreturn function attribute... " >&6; } +if test "${rb_cv_func_noreturn+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + rb_cv_func_noreturn=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ ((noreturn)) x" "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dlopen (); +#define NORETURN(x) $mac + NORETURN(void conftest_attribute_check(void)); int main () { -return dlopen (); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_func_noreturn="$mac"; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + unset ac_c_werror_flag 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_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_func_noreturn" >&5 +$as_echo "$rb_cv_func_noreturn" >&6; } +cat >>confdefs.h <<_ACEOF +#define NORETURN(x) $rb_cv_func_noreturn _ACEOF - LIBS="-ldl $LIBS" -fi - # Dynamic linking for SunOS/Solaris and SYSV -{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for noinline function attribute" >&5 +$as_echo_n "checking for noinline function attribute... " >&6; } +if test "${rb_cv_func_noinline+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + rb_cv_func_noinline=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ ((noinline)) x" "x __attribute__ ((noinline))" "__declspec(noinline) x" x; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 shl_load (); +#define NOINLINE(x) $mac + NOINLINE(void conftest_attribute_check(void)); int main () { -return shl_load (); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_func_noinline="$mac"; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no + unset ac_c_werror_flag 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_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDLD 1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_func_noinline" >&5 +$as_echo "$rb_cv_func_noinline" >&6; } +cat >>confdefs.h <<_ACEOF +#define NOINLINE(x) $rb_cv_func_noinline _ACEOF - LIBS="-ldld $LIBS" -fi - # Dynamic linking for HP-UX -{ echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5 -echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6; } -if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RUBY_EXTERN" >&5 +$as_echo_n "checking for RUBY_EXTERN... " >&6; } +if test "${rb_cv_ruby_extern+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + rb_cv_ruby_extern=no +for mac in "__attribute__((dllimport))" "__declspec(dllimport)"; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 clock_gettime (); +extern $mac void conftest(void); int main () { -return clock_gettime (); +rb_cv_ruby_extern="extern $mac"; break ; 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_rt_clock_gettime=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_lib_rt_clock_gettime=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_ruby_extern" >&5 +$as_echo "$rb_cv_ruby_extern" >&6; } +test "x$rb_cv_ruby_extern" = xno || cat >>confdefs.h <<_ACEOF +#define RUBY_EXTERN $rb_cv_ruby_extern +_ACEOF -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + +XCFLAGS="$XCFLAGS -DRUBY_EXPORT" + +ac_fn_c_check_decl "$LINENO" "sys_nerr" "ac_cv_have_decl_sys_nerr" "$ac_includes_default +#include +" +if test "x$ac_cv_have_decl_sys_nerr" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5 -echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6; } -if test $ac_cv_lib_rt_clock_gettime = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRT 1 + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_NERR $ac_have_decl _ACEOF - LIBS="-lrt $LIBS" + +# Check whether --with-libc_r was given. +if test "${with_libc_r+set}" = set; then : + withval=$with_libc_r; + case $withval in + yes) with_libc_r=yes;; + *) with_libc_r=no;; + esac +else + with_libc_r=no fi - # GNU/Linux -case "$target_cpu" in -alpha*) case "$target_os"::"$GCC" in - *::yes) CFLAGS="-mieee $CFLAGS" ;; # gcc - osf*) CFLAGS="-ieee $CFLAGS" ;; # ccc - esac ;; -esac +# Check whether --enable-pthread was given. +if test "${enable_pthread+set}" = set; then : + enableval=$enable_pthread; enable_pthread=$enableval +else + enable_pthread=no +fi +# Check whether --enable-fastthread was given. +if test "${enable_fastthread+set}" = set; then : + enableval=$enable_fastthread; + : handled by ext/thread/extconf.rb +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 +case "$target_os" in +nextstep*) ;; +openstep*) ;; +rhapsody*) ;; +darwin*) LIBS="-lobjc $LIBS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include <$ac_hdr> +#include + #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 + #error pre OS X 10.4 + [!<===== pre OS X 10.4 =====>] + #endif -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" +if ac_fn_c_try_cpp "$LINENO"; then : + + test "x$target_cpu" = xpowerpc && ac_cv_header_ucontext_h=no + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -fi + $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h + + $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h -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 +rm -f conftest.err conftest.$ac_ext + ;; +hpux*) LIBS="-lm $LIBS" + ac_cv_c_inline=no;; +human*) ac_cv_func_getpgrp_void=yes + ac_cv_func_setitimer=no + ;; +beos*) ac_cv_func_link=no;; +cygwin*) ;; +mingw*) if test "$with_winsock2" = yes; then + LIBS="-lws2_32 $LIBS" + else + LIBS="-lwsock32 $LIBS" + fi + LIBS="-lshell32 $LIBS" + ac_cv_header_a_out_h=no + ac_cv_header_pwd_h=no + ac_cv_header_utime_h=no + ac_cv_header_sys_ioctl_h=no + ac_cv_header_sys_param_h=no + ac_cv_header_sys_resource_h=no + ac_cv_header_sys_select_h=no + ac_cv_header_sys_time_h=no + ac_cv_header_sys_times_h=no + ac_cv_func_times=yes + ac_cv_func_waitpid=yes + ac_cv_func_fsync=yes + ac_cv_func_vsnprintf=yes + ac_cv_func_seekdir=yes + ac_cv_func_telldir=yes + ac_cv_func_isinf=yes + ac_cv_func_isnan=yes + ac_cv_func_finite=yes + ac_cv_func_link=yes + ac_cv_lib_crypt_crypt=no + ac_cv_func_getpgrp_void=no + ac_cv_func_setpgrp_void=yes + ac_cv_func_memcmp_working=yes + ac_cv_lib_dl_dlopen=no + rb_cv_binary_elf=no + rb_cv_negative_time_t=no + enable_pthread=no + ac_cv_func_fcntl=yes + ;; +os2-emx*) LIBS="-lm $LIBS" + ac_cv_lib_dir_opendir=no;; +msdosdjgpp*) LIBS="-lm $LIBS" + ac_cv_func_getpgrp_void=yes + ac_cv_func_setitimer=no + ac_cv_sizeof_rlim_t=4 + ac_cv_func_setrlimit=no + ;; +bsdi*) LIBS="-lm $LIBS" + $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h -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 + $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h + + ac_cv_sizeof_rlim_t=8;; +freebsd*) LIBS="-lm $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lxpg4 has to be linked" >&5 +$as_echo_n "checking whether -lxpg4 has to be linked... " >&6; } +if test "${rb_cv_lib_xpg4_needed+set}" = set; then : + $as_echo_n "(cached) " >&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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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" +#include +#if __FreeBSD_version < 400020 || \ + (__FreeBSD_version >= 500000 && __FreeBSD_version < 500005) +#error needs libxpg4 #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 - : +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + rb_cv_lib_xpg4_needed=no else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + rb_cv_lib_xpg4_needed=yes 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" - +rm -f conftest.err conftest.$ac_ext 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_lib_xpg4_needed" >&5 +$as_echo "$rb_cv_lib_xpg4_needed" >&6; } + if test "$rb_cv_lib_xpg4_needed" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setlocale in -lxpg4" >&5 +$as_echo_n "checking for setlocale in -lxpg4... " >&6; } +if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then : + $as_echo_n "(cached) " >&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 + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxpg4 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11028,898 +6254,607 @@ #ifdef __cplusplus extern "C" #endif -char opendir (); +char setlocale (); int main () { -return opendir (); +return setlocale (); ; 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 +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_xpg4_setlocale=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_xpg4_setlocale=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4_setlocale" >&5 +$as_echo "$ac_cv_lib_xpg4_setlocale" >&6; } +if test "x$ac_cv_lib_xpg4_setlocale" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXPG4 1 +_ACEOF + LIBS="-lxpg4 $LIBS" 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 - : + fi + if test "$with_libc_r" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libc_r is supplementary to libc" >&5 +$as_echo_n "checking whether libc_r is supplementary to libc... " >&6; } +if test "${rb_cv_supplementary_lib_c_r+set}" = set; then : + $as_echo_n "(cached) " >&6 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" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi +#include +#if 500016 <= __FreeBSD_version +#error libc_r is supplementary to libc +#endif +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + rb_cv_supplementary_lib_c_r=no +else + rb_cv_supplementary_lib_c_r=yes fi - -{ 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 +rm -f conftest.err conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_supplementary_lib_c_r" >&5 +$as_echo "$rb_cv_supplementary_lib_c_r" >&6; } + if test "$rb_cv_supplementary_lib_c_r" = yes; then + MAINLIBS="-lc_r $MAINLIBS" + fi + fi + ;; +dragonfly*) LIBS="-lm $LIBS" + ;; +bow) ac_cv_func_setitimer=no + ;; +superux*) ac_cv_func_setitimer=no + ;; +solaris*2.1*) if test -z "$GCC"; then + ac_cv_func_isinf=yes + fi + LIBS="-lm $LIBS" + ;; +*) LIBS="-lm $LIBS";; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 +$as_echo_n "checking for crypt in -lcrypt... " >&6; } +if test "${ac_cv_lib_crypt_crypt+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 crypt (); int main () { - +return crypt (); ; 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 - : +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypt_crypt=yes else - ac_cv_header_stdc=no + ac_cv_lib_crypt_crypt=no fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS 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. */ +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 +$as_echo "$ac_cv_lib_crypt_crypt" >&6; } +if test "x$ac_cv_lib_crypt_crypt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPT 1 _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* + LIBS="-lcrypt $LIBS" 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 - : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +return dlopen (); + ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - + ac_cv_lib_dl_dlopen=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 _ACEOF -fi + LIBS="-ldl $LIBS" -{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 -echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi + # Dynamic linking for SunOS/Solaris and SYSV +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); int main () { - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +return shl_load (); ; 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_sys_wait_h=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_sys_wait_h=no + ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_WAIT_H 1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDLD 1 _ACEOF -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + LIBS="-ldld $LIBS" -for ac_header in stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h sys/syscall.h\ - fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ - syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \ - sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \ - ucontext.h intrinsics.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; } +fi + # Dynamic linking for HP-UX +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then : + $as_echo_n "(cached) " >&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 + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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> +/* 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 clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -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 +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_clock_gettime=yes else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_lib_rt_clock_gettime=no fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LIBRT 1 _ACEOF -fi + LIBS="-lrt $LIBS" -done +fi + # GNU/Linux +case "$target_cpu" in +alpha*) case "$target_os"::"$GCC" in + *::yes) CFLAGS="-mieee $CFLAGS" ;; # gcc + osf*) CFLAGS="-ieee $CFLAGS" ;; # ccc + esac ;; +esac -{ echo "$as_me:$LINENO: checking for rlim_t" >&5 -echo $ECHO_N "checking for rlim_t... $ECHO_C" >&6; } -if test "${ac_cv_type_rlim_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include <$ac_hdr> - #ifdef HAVE_SYS_TYPES_H - # include - #endif - #ifdef HAVE_SYS_TIME_H - # include - #endif - #ifdef HAVE_SYS_RESOURCE_H - # include - #endif - #ifdef HAVE_UNISTD_H - # include - #endif - #include - - -typedef rlim_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +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 - ac_cv_type_rlim_t=yes +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_rlim_t=no + eval "$as_ac_Header=no" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_rlim_t" >&5 -echo "${ECHO_T}$ac_cv_type_rlim_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 rlim_t" >&5 -echo $ECHO_N "checking size of rlim_t... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_rlim_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. */ +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - #ifdef HAVE_SYS_TYPES_H - # include - #endif - #ifdef HAVE_SYS_TIME_H - # include - #endif - #ifdef HAVE_SYS_RESOURCE_H - # include - #endif - #ifdef HAVE_UNISTD_H - # include - #endif - #include +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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - typedef rlim_t ac__type_sizeof_; +/* 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 () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 - +return opendir (); ; 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. */ +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 + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then : - #ifdef HAVE_SYS_TYPES_H - # include - #endif - #ifdef HAVE_SYS_TIME_H - # include - #endif - #ifdef HAVE_SYS_RESOURCE_H - # include - #endif - #ifdef HAVE_UNISTD_H - # include - #endif - #include +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - typedef rlim_t ac__type_sizeof_; +/* 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 () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 - +return opendir (); ; 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` +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 + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then : -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_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$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" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +fi - #ifdef HAVE_SYS_TYPES_H - # include - #endif - #ifdef HAVE_SYS_TIME_H - # include - #endif - #ifdef HAVE_SYS_RESOURCE_H - # include - #endif - #ifdef HAVE_UNISTD_H - # include - #endif - #include +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include - typedef rlim_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. */ +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include - #ifdef HAVE_SYS_TYPES_H - # include - #endif - #ifdef HAVE_SYS_TIME_H - # include - #endif - #ifdef HAVE_SYS_RESOURCE_H - # include - #endif - #ifdef HAVE_UNISTD_H - # include - #endif - #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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif - typedef rlim_t ac__type_sizeof_; +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 0 - - ; + 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_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 +if ac_fn_c_try_run "$LINENO"; then : -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= + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -rm -f 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. */ +$as_echo "#define STDC_HEADERS 1" >>confdefs.h - #ifdef HAVE_SYS_TYPES_H - # include - #endif - #ifdef HAVE_SYS_TIME_H - # include - #endif - #ifdef HAVE_SYS_RESOURCE_H - # include - #endif - #ifdef HAVE_UNISTD_H - # include - #endif - #include +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif - typedef rlim_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 - + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 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_hi=$ac_mid +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_sys_wait_h=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_sys_wait_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - 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_rlim_t=$ac_lo;; -'') if test "$ac_cv_type_rlim_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (rlim_t) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (rlim_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_rlim_t=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +for ac_header in stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h sys/syscall.h\ + fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ + syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \ + sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \ + ucontext.h intrinsics.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +fi + +done + + +# 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of rlim_t" >&5 +$as_echo_n "checking size of rlim_t... " >&6; } +if test "${ac_cv_sizeof_rlim_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (rlim_t))" "ac_cv_sizeof_rlim_t" " #ifdef HAVE_SYS_TYPES_H # include #endif @@ -11934,82 +6869,23 @@ #endif #include +"; then : - typedef rlim_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_rlim_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_rlim_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (rlim_t) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (rlim_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + if test "$ac_cv_type_rlim_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (rlim_t) +See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_rlim_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_rlim_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_rlim_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_rlim_t" >&5 +$as_echo "$ac_cv_sizeof_rlim_t" >&6; } @@ -12019,1530 +6895,1524 @@ -{ 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 +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : + else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int _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 +ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 _ACEOF + +$as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h + fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (ac_aggr.st_blksize) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_blksize=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (sizeof ac_aggr.st_blksize) -return 0; - ; - return 0; -} +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_blksize=yes + + +$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case " $LIBOBJS " in + *" fileblocks.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" + ;; +esac - ac_cv_member_struct_stat_st_blksize=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } -if test $ac_cv_member_struct_stat_st_blksize = yes; then +ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +#define HAVE_STRUCT_STAT_ST_RDEV 1 _ACEOF -cat >>confdefs.h <<\_ACEOF -#define HAVE_ST_BLKSIZE 1 -_ACEOF +$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int8_t" >&5 +$as_echo_n "checking for int8_t... " >&6; } +if test "${rb_cv_type_int8_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default +typedef int8_t t; int s = sizeof(t) == 42; int main () { -static struct stat ac_aggr; -if (ac_aggr.st_blocks) -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;; +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_int8_t=yes +else + case 1 in #( + "1") : + rb_cv_type_int8_t="signed char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_int8_t="short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_int8_t="int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_int8_t="long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_int8_t="long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_int8_t="__int64" ;; #( + *) : + rb_cv_type_int8_t=no ;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_blocks=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_int8_t" >&5 +$as_echo "$rb_cv_type_int8_t" >&6; } +if test "${rb_cv_type_int8_t}" != no; then + $as_echo "#define HAVE_INT8_T 1" >>confdefs.h + + if test "${rb_cv_type_int8_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int8_t" >&5 +$as_echo_n "checking size of int8_t... " >&6; } +if test "${ac_cv_sizeof_int8_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int8_t))" "ac_cv_sizeof_int8_t" "$ac_includes_default +"; then : + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test "$ac_cv_type_int8_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int8_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int8_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int8_t" >&5 +$as_echo "$ac_cv_sizeof_int8_t" >&6; } + + - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT8_T $ac_cv_sizeof_int8_t +_ACEOF + + + else + cat >>confdefs.h <<_ACEOF +#define int8_t $rb_cv_type_int8_t +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT8_T SIZEOF_`$as_echo "$rb_cv_type_int8_t" | $as_tr_cpp` _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint8_t" >&5 +$as_echo_n "checking for uint8_t... " >&6; } +if test "${rb_cv_type_uint8_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default +typedef uint8_t t; int s = sizeof(t) == 42; int main () { -static struct stat ac_aggr; -if (sizeof ac_aggr.st_blocks) -return 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_blocks=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_uint8_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_stat_st_blocks=no + case 1 in #( + "1") : + rb_cv_type_uint8_t="unsigned char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_uint8_t="unsigned short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_uint8_t="unsigned int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_uint8_t="unsigned long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_uint8_t="unsigned long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_uint8_t="unsigned __int64" ;; #( + *) : + rb_cv_type_uint8_t=no ;; +esac fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_uint8_t" >&5 +$as_echo "$rb_cv_type_uint8_t" >&6; } +if test "${rb_cv_type_uint8_t}" != no; then + $as_echo "#define HAVE_UINT8_T 1" >>confdefs.h + + if test "${rb_cv_type_uint8_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint8_t" >&5 +$as_echo_n "checking size of uint8_t... " >&6; } +if test "${ac_cv_sizeof_uint8_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint8_t))" "ac_cv_sizeof_uint8_t" "$ac_includes_default +"; then : + +else + if test "$ac_cv_type_uint8_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (uint8_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_uint8_t=0 + fi +fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } -if test $ac_cv_member_struct_stat_st_blocks = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint8_t" >&5 +$as_echo "$ac_cv_sizeof_uint8_t" >&6; } + + cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +#define SIZEOF_UINT8_T $ac_cv_sizeof_uint8_t _ACEOF -cat >>confdefs.h <<\_ACEOF -#define HAVE_ST_BLOCKS 1 + else + cat >>confdefs.h <<_ACEOF +#define uint8_t $rb_cv_type_uint8_t _ACEOF -else - case " $LIBOBJS " in - *" fileblocks.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" - ;; -esac + cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT8_T SIZEOF_`$as_echo "$rb_cv_type_uint8_t" | $as_tr_cpp` +_ACEOF + fi fi - -{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int16_t" >&5 +$as_echo_n "checking for int16_t... " >&6; } +if test "${rb_cv_type_int16_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default +typedef int16_t t; int s = sizeof(t) == 42; int main () { -static struct stat ac_aggr; -if (ac_aggr.st_rdev) -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;; +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_int16_t=yes +else + case 2 in #( + "1") : + rb_cv_type_int16_t="signed char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_int16_t="short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_int16_t="int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_int16_t="long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_int16_t="long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_int16_t="__int64" ;; #( + *) : + rb_cv_type_int16_t=no ;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_rdev=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_int16_t" >&5 +$as_echo "$rb_cv_type_int16_t" >&6; } +if test "${rb_cv_type_int16_t}" != no; then + $as_echo "#define HAVE_INT16_T 1" >>confdefs.h + + if test "${rb_cv_type_int16_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int16_t" >&5 +$as_echo_n "checking size of int16_t... " >&6; } +if test "${ac_cv_sizeof_int16_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int16_t))" "ac_cv_sizeof_int16_t" "$ac_includes_default +"; then : + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test "$ac_cv_type_int16_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int16_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int16_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int16_t" >&5 +$as_echo "$ac_cv_sizeof_int16_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT16_T $ac_cv_sizeof_int16_t +_ACEOF + + + else + cat >>confdefs.h <<_ACEOF +#define int16_t $rb_cv_type_int16_t +_ACEOF - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT16_T SIZEOF_`$as_echo "$rb_cv_type_int16_t" | $as_tr_cpp` _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint16_t" >&5 +$as_echo_n "checking for uint16_t... " >&6; } +if test "${rb_cv_type_uint16_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default +typedef uint16_t t; int s = sizeof(t) == 42; int main () { -static struct stat ac_aggr; -if (sizeof ac_aggr.st_rdev) -return 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_rdev=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_uint16_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_stat_st_rdev=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + case 2 in #( + "1") : + rb_cv_type_uint16_t="unsigned char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_uint16_t="unsigned short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_uint16_t="unsigned int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_uint16_t="unsigned long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_uint16_t="unsigned long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_uint16_t="unsigned __int64" ;; #( + *) : + rb_cv_type_uint16_t=no ;; +esac fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; } -if test $ac_cv_member_struct_stat_st_rdev = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_RDEV 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_uint16_t" >&5 +$as_echo "$rb_cv_type_uint16_t" >&6; } +if test "${rb_cv_type_uint16_t}" != no; then + $as_echo "#define HAVE_UINT16_T 1" >>confdefs.h + if test "${rb_cv_type_uint16_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint16_t" >&5 +$as_echo_n "checking size of uint16_t... " >&6; } +if test "${ac_cv_sizeof_uint16_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint16_t))" "ac_cv_sizeof_uint16_t" "$ac_includes_default +"; then : -cat >>confdefs.h <<\_ACEOF -#define HAVE_ST_RDEV 1 -_ACEOF - +else + if test "$ac_cv_type_uint16_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (uint16_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_uint16_t=0 + fi fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint16_t" >&5 +$as_echo "$ac_cv_sizeof_uint16_t" >&6; } -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT16_T $ac_cv_sizeof_uint16_t _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no -fi -rm -f conftest* -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then -cat >>confdefs.h <<\_ACEOF -#define uid_t int + else + cat >>confdefs.h <<_ACEOF +#define uint16_t $rb_cv_type_uint16_t _ACEOF - -cat >>confdefs.h <<\_ACEOF -#define gid_t int + cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT16_T SIZEOF_`$as_echo "$rb_cv_type_uint16_t" | $as_tr_cpp` _ACEOF + fi fi -{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 -echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; } -if test "${ac_cv_type_getgroups+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32_t" >&5 +$as_echo_n "checking for int32_t... " >&6; } +if test "${rb_cv_type_int32_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Thanks to Mike Rendell for this test. */ $ac_includes_default -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) - +typedef int32_t t; int s = sizeof(t) == 42; int main () { - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long int lval; } val; - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short int but getgroups modifies an array - of ints. */ - return n > 0 && gidset[n] != val.gval; + ; + 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_type_getgroups=gid_t +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_int32_t=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_type_getgroups=int + case 4 in #( + "1") : + rb_cv_type_int32_t="signed char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_int32_t="short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_int32_t="int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_int32_t="long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_int32_t="long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_int32_t="__int64" ;; #( + *) : + rb_cv_type_int32_t=no ;; +esac fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_int32_t" >&5 +$as_echo "$rb_cv_type_int32_t" >&6; } +if test "${rb_cv_type_int32_t}" != no; then + $as_echo "#define HAVE_INT32_T 1" >>confdefs.h + if test "${rb_cv_type_int32_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int32_t" >&5 +$as_echo_n "checking size of int32_t... " >&6; } +if test "${ac_cv_sizeof_int32_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int32_t))" "ac_cv_sizeof_int32_t" "$ac_includes_default +"; then : -if test $ac_cv_type_getgroups = cross; 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 "getgroups.*int.*gid_t" >/dev/null 2>&1; then - ac_cv_type_getgroups=gid_t else - ac_cv_type_getgroups=int + if test "$ac_cv_type_int32_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int32_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int32_t=0 + fi fi -rm -f conftest* fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 -echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int32_t" >&5 +$as_echo "$ac_cv_sizeof_int32_t" >&6; } + + cat >>confdefs.h <<_ACEOF -#define GETGROUPS_T $ac_cv_type_getgroups +#define SIZEOF_INT32_T $ac_cv_sizeof_int32_t _ACEOF -{ 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. */ + else + cat >>confdefs.h <<_ACEOF +#define int32_t $rb_cv_type_int32_t +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT32_T SIZEOF_`$as_echo "$rb_cv_type_int32_t" | $as_tr_cpp` _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5 +$as_echo_n "checking for uint32_t... " >&6; } +if test "${rb_cv_type_uint32_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +typedef uint32_t t; int s = sizeof(t) == 42; 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 +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_uint32_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case 4 in #( + "1") : + rb_cv_type_uint32_t="unsigned char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_uint32_t="unsigned short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_uint32_t="unsigned int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_uint32_t="unsigned long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_uint32_t="unsigned long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_uint32_t="unsigned __int64" ;; #( + *) : + rb_cv_type_uint32_t=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_uint32_t" >&5 +$as_echo "$rb_cv_type_uint32_t" >&6; } +if test "${rb_cv_type_uint32_t}" != no; then + $as_echo "#define HAVE_UINT32_T 1" >>confdefs.h + + if test "${rb_cv_type_uint32_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint32_t" >&5 +$as_echo_n "checking size of uint32_t... " >&6; } +if test "${ac_cv_sizeof_uint32_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint32_t))" "ac_cv_sizeof_uint32_t" "$ac_includes_default +"; then : - ac_cv_type_signal=void +else + if test "$ac_cv_type_uint32_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (uint32_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_uint32_t=0 + fi 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint32_t" >&5 +$as_echo "$ac_cv_sizeof_uint32_t" >&6; } -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF -case "${target_cpu}-${target_os}" in -powerpc-darwin*) +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT32_T $ac_cv_sizeof_uint32_t +_ACEOF - ALLOCA=\${LIBOBJDIR}alloca.${ac_objext} - cat >>confdefs.h <<\_ACEOF -#define C_ALLOCA 1 + else + cat >>confdefs.h <<_ACEOF +#define uint32_t $rb_cv_type_uint32_t _ACEOF - cat >>confdefs.h <<_ACEOF -#define alloca alloca + cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT32_T SIZEOF_`$as_echo "$rb_cv_type_uint32_t" | $as_tr_cpp` _ACEOF - ;; -*) - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ echo "$as_me:$LINENO: checking for working alloca.h" >&5 -echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t" >&5 +$as_echo_n "checking for int64_t... " >&6; } +if test "${rb_cv_type_int64_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +$ac_includes_default +typedef int64_t t; int s = sizeof(t) == 42; int main () { -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; + ; 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_working_alloca_h=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_int64_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case 8 in #( + "1") : + rb_cv_type_int64_t="signed char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_int64_t="short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_int64_t="int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_int64_t="long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_int64_t="long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_int64_t="__int64" ;; #( + *) : + rb_cv_type_int64_t=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_int64_t" >&5 +$as_echo "$rb_cv_type_int64_t" >&6; } +if test "${rb_cv_type_int64_t}" != no; then + $as_echo "#define HAVE_INT64_T 1" >>confdefs.h + + if test "${rb_cv_type_int64_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int64_t" >&5 +$as_echo_n "checking size of int64_t... " >&6; } +if test "${ac_cv_sizeof_int64_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int64_t))" "ac_cv_sizeof_int64_t" "$ac_includes_default +"; then : - ac_cv_working_alloca_h=no +else + if test "$ac_cv_type_int64_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int64_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int64_t=0 + fi 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_working_alloca_h" >&5 -echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int64_t" >&5 +$as_echo "$ac_cv_sizeof_int64_t" >&6; } + + -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_H 1 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT64_T $ac_cv_sizeof_int64_t +_ACEOF + + + else + cat >>confdefs.h <<_ACEOF +#define int64_t $rb_cv_type_int64_t +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT64_T SIZEOF_`$as_echo "$rb_cv_type_int64_t" | $as_tr_cpp` _ACEOF + fi fi -{ echo "$as_me:$LINENO: checking for alloca" >&5 -echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint64_t" >&5 +$as_echo_n "checking for uint64_t... " >&6; } +if test "${rb_cv_type_uint64_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - +$ac_includes_default +typedef uint64_t t; int s = sizeof(t) == 42; int main () { -char *p = (char *) alloca (1); - if (p) return 0; + ; 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_alloca_works=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_uint64_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case 8 in #( + "1") : + rb_cv_type_uint64_t="unsigned char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_uint64_t="unsigned short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_uint64_t="unsigned int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_uint64_t="unsigned long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_uint64_t="unsigned long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_uint64_t="unsigned __int64" ;; #( + *) : + rb_cv_type_uint64_t=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_uint64_t" >&5 +$as_echo "$rb_cv_type_uint64_t" >&6; } +if test "${rb_cv_type_uint64_t}" != no; then + $as_echo "#define HAVE_UINT64_T 1" >>confdefs.h + + if test "${rb_cv_type_uint64_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint64_t" >&5 +$as_echo_n "checking size of uint64_t... " >&6; } +if test "${ac_cv_sizeof_uint64_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint64_t))" "ac_cv_sizeof_uint64_t" "$ac_includes_default +"; then : - ac_cv_func_alloca_works=no +else + if test "$ac_cv_type_uint64_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (uint64_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_uint64_t=0 + fi 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_alloca_works" >&5 -echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint64_t" >&5 +$as_echo "$ac_cv_sizeof_uint64_t" >&6; } + -if test $ac_cv_func_alloca_works = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA 1 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT64_T $ac_cv_sizeof_uint64_t _ACEOF -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + else + cat >>confdefs.h <<_ACEOF +#define uint64_t $rb_cv_type_uint64_t +_ACEOF -cat >>confdefs.h <<\_ACEOF -#define C_ALLOCA 1 + cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT64_T SIZEOF_`$as_echo "$rb_cv_type_uint64_t" | $as_tr_cpp` _ACEOF + fi +fi -{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } -if test "${ac_cv_os_cray+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int128_t" >&5 +$as_echo_n "checking for int128_t... " >&6; } +if test "${rb_cv_type_int128_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif +$ac_includes_default +typedef int128_t t; int s = sizeof(t) == 42; +int +main () +{ + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then - ac_cv_os_cray=yes +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_int128_t=yes else - ac_cv_os_cray=no + case 16 in #( + "1") : + rb_cv_type_int128_t="signed char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_int128_t="short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_int128_t="int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_int128_t="long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_int128_t="long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_int128_t="__int64" ;; #( + *) : + rb_cv_type_int128_t=no ;; +esac fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -echo "${ECHO_T}$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_int128_t" >&5 +$as_echo "$rb_cv_type_int128_t" >&6; } +if test "${rb_cv_type_int128_t}" != no; then + $as_echo "#define HAVE_INT128_T 1" >>confdefs.h + + if test "${rb_cv_type_int128_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int128_t" >&5 +$as_echo_n "checking size of int128_t... " >&6; } +if test "${ac_cv_sizeof_int128_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int128_t))" "ac_cv_sizeof_int128_t" "$ac_includes_default +"; then : + else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + if test "$ac_cv_type_int128_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int128_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int128_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int128_t" >&5 +$as_echo "$ac_cv_sizeof_int128_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT128_T $ac_cv_sizeof_int128_t _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 + else + cat >>confdefs.h <<_ACEOF +#define int128_t $rb_cv_type_int128_t +_ACEOF -#undef $ac_func + cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT128_T SIZEOF_`$as_echo "$rb_cv_type_int128_t" | $as_tr_cpp` +_ACEOF -/* 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 + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint128_t" >&5 +$as_echo_n "checking for uint128_t... " >&6; } +if test "${rb_cv_type_uint128_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +typedef uint128_t t; int s = sizeof(t) == 42; int main () { -return $ac_func (); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if ac_fn_c_try_compile "$LINENO"; then : + rb_cv_type_uint128_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case 16 in #( + "1") : + rb_cv_type_uint128_t="unsigned char" ;; #( + "$ac_cv_sizeof_short") : + rb_cv_type_uint128_t="unsigned short" ;; #( + "$ac_cv_sizeof_int") : + rb_cv_type_uint128_t="unsigned int" ;; #( + "$ac_cv_sizeof_long") : + rb_cv_type_uint128_t="unsigned long" ;; #( + "$ac_cv_sizeof_long_long") : + rb_cv_type_uint128_t="unsigned long long" ;; #( + "$ac_cv_sizeof___int64") : + rb_cv_type_uint128_t="unsigned __int64" ;; #( + *) : + rb_cv_type_uint128_t=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_type_uint128_t" >&5 +$as_echo "$rb_cv_type_uint128_t" >&6; } +if test "${rb_cv_type_uint128_t}" != no; then + $as_echo "#define HAVE_UINT128_T 1" >>confdefs.h + + if test "${rb_cv_type_uint128_t}" = yes; then + # 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. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint128_t" >&5 +$as_echo_n "checking size of uint128_t... " >&6; } +if test "${ac_cv_sizeof_uint128_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint128_t))" "ac_cv_sizeof_uint128_t" "$ac_includes_default +"; then : - eval "$as_ac_var=no" +else + if test "$ac_cv_type_uint128_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (uint128_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_uint128_t=0 + fi 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; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint128_t" >&5 +$as_echo "$ac_cv_sizeof_uint128_t" >&6; } + + cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func +#define SIZEOF_UINT128_T $ac_cv_sizeof_uint128_t _ACEOF - break -fi - done + else + cat >>confdefs.h <<_ACEOF +#define uint128_t $rb_cv_type_uint128_t +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT128_T SIZEOF_`$as_echo "$rb_cv_type_uint128_t" | $as_tr_cpp` +_ACEOF + + fi fi -{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} +#include -int -main () -{ - return find_stack_direction () < 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_c_stack_direction=1 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_cv_type_uid_t=no fi - +rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +$as_echo "#define uid_t int" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF +$as_echo "#define gid_t int" >>confdefs.h fi - ;; -esac -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } -if test "${ac_cv_func_memcmp_working+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +$as_echo_n "checking type of array argument to getgroups... " >&6; } +if test "${ac_cv_type_getgroups+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_working=no + if test "$cross_compiling" = yes; then : + ac_cv_type_getgroups=cross else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Thanks to Mike Rendell for this test. */ $ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + int main () { + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; - /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; - if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; - - /* The Next x86 OpenStep bug shows up only when comparing 16 bytes - or more and with at least one buffer not starting on a 4-byte boundary. - William Lewis provided this test program. */ - { - char foo[21]; - char bar[21]; - int i; - for (i = 0; i < 4; i++) - { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - if (memcmp (a, b, 16) >= 0) - return 1; - } - return 0; - } - - ; - return 0; + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; } _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_memcmp_working=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_type_getgroups=gid_t 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_memcmp_working=no + ac_cv_type_getgroups=int fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +if test $ac_cv_type_getgroups = cross; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; -esac +rm -f conftest* +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +$as_echo "$ac_cv_type_getgroups" >&6; } -{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define GETGROUPS_T $ac_cv_type_getgroups _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include /* for off_t */ - #include +#include +#include + int main () { -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); +return *(signal (0, 0)) (0) == 1; ; 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_sys_largefile_source=no; break +if ac_fn_c_try_compile "$LINENO"; 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF -fi +case "${target_cpu}-${target_os}" in +powerpc-darwin*) + + ALLOCA=\${LIBOBJDIR}alloca.${ac_objext} -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + $as_echo "#define C_ALLOCA 1" >>confdefs.h + + cat >>confdefs.h <<_ACEOF +#define alloca alloca _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + ;; +*) + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include +#include int main () { -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; ; 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_sys_largefile_source=1; break +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - + ac_cv_working_alloca_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF -;; -esac -rm -f conftest* - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_FSEEKO 1 -_ACEOF +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi - -for ac_func in ftello -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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* 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 +#ifdef __GNUC__ +# define alloca __builtin_alloca #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 +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif #endif int main () { -return $ac_func (); +char *p = (char *) alloca (1); + if (p) return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif - eval "$as_ac_var=no" +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no fi +rm -f conftest* -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func _ACEOF + break fi -done + done +fi -# http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html -# Debian GNU/Linux Etch's libc6.1 2.3.6.ds1-13etch5 has this problem. -# Debian GNU/Linux Lenny's libc6.1 2.7-10 has no problem. -{ echo "$as_me:$LINENO: checking for broken erfc of glibc-2.3.6 on IA64" >&5 -echo $ECHO_N "checking for broken erfc of glibc-2.3.6 on IA64... $ECHO_C" >&6; } -if test "${rb_cv_broken_glibc_ia64_erfc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - rb_cv_broken_glibc_ia64_erfc=no + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include +$ac_includes_default int -main() +find_stack_direction () { - erfc(10000.0); - return 0; + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; } +int +main () +{ + return find_stack_direction () < 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 - rb_cv_broken_glibc_ia64_erfc=no +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rb_cv_broken_glibc_ia64_erfc=yes + ac_cv_c_stack_direction=-1 fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_broken_glibc_ia64_erfc" >&5 -echo "${ECHO_T}$rb_cv_broken_glibc_ia64_erfc" >&6; } -case $rb_cv_broken_glibc_ia64_erfc in - yes) ac_cv_func_erf=no;; -esac - - - - - - - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF +fi + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 +$as_echo_n "checking for working memcmp... " >&6; } +if test "${ac_cv_func_memcmp_working+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_memcmp_working=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = '\100', c1 = '\200', c2 = '\201'; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + return 1; + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + return 1; + } + return 0; + } + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_memcmp_working=yes +else + ac_cv_func_memcmp_working=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 +$as_echo "$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in + *" memcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; +esac -for ac_func in dup2 memmove strcasecmp strncasecmp strerror strftime\ - strchr strstr strtoul crypt flock vsnprintf\ - isnan finite isinf hypot acosh erf -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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_source+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=no; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 - +#define _LARGEFILE_SOURCE 1 +#include /* for off_t */ + #include int main () { -return $ac_func (); +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; 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" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=1; break fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 +$as_echo "$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF - -else - case " $LIBOBJS " in - *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; +;; esac +rm -rf conftest* -fi -done - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then +$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h +fi +for ac_func in ftello +do : + ac_fn_c_check_func "$LINENO" "ftello" "ac_cv_func_ftello" +if test "x$ac_cv_func_ftello" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FTELLO 1 +_ACEOF +fi +done +# http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html +# Debian GNU/Linux Etch's libc6.1 2.3.6.ds1-13etch5 has this problem. +# Debian GNU/Linux Lenny's libc6.1 2.7-10 has no problem. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken erfc of glibc-2.3.6 on IA64" >&5 +$as_echo_n "checking for broken erfc of glibc-2.3.6 on IA64... " >&6; } +if test "${rb_cv_broken_glibc_ia64_erfc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + rb_cv_broken_glibc_ia64_erfc=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main() +{ + erfc(10000.0); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + rb_cv_broken_glibc_ia64_erfc=no +else + rb_cv_broken_glibc_ia64_erfc=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_broken_glibc_ia64_erfc" >&5 +$as_echo "$rb_cv_broken_glibc_ia64_erfc" >&6; } +case $rb_cv_broken_glibc_ia64_erfc in + yes) ac_cv_func_erf=no;; +esac +for ac_func in dup2 memmove strcasecmp strncasecmp strerror strftime\ + strchr strstr strtoul crypt flock vsnprintf\ + isnan finite isinf hypot acosh erf +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac +fi +done for ac_func in fmod killpg wait4 waitpid syscall chroot fsync getcwd eaccess\ @@ -13555,109 +8425,25 @@ sigaction sigsetjmp _setjmp _longjmp setsid telldir seekdir fchmod\ mktime timegm gettimeofday\ cosh sinh tanh round setuid setgid setenv unsetenv -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -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; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ echo "$as_me:$LINENO: checking for __builtin_setjmp" >&5 -echo $ECHO_N "checking for __builtin_setjmp... $ECHO_C" >&6; } -if test "${ac_cv_func___builtin_setjmp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_setjmp" >&5 +$as_echo_n "checking for __builtin_setjmp... " >&6; } +if test "${ac_cv_func___builtin_setjmp+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include jmp_buf jb; void t(v) int v; {__builtin_longjmp(jb, v);} @@ -13669,46 +8455,25 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func___builtin_setjmp=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func___builtin_setjmp=no + ac_cv_func___builtin_setjmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func___builtin_setjmp" >&5 -echo "${ECHO_T}$ac_cv_func___builtin_setjmp" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func___builtin_setjmp" >&5 +$as_echo "$ac_cv_func___builtin_setjmp" >&6; } test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no -{ echo "$as_me:$LINENO: checking for setjmp type" >&5 -echo $ECHO_N "checking for setjmp type... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setjmp type" >&5 +$as_echo_n "checking for setjmp type... " >&6; } # Check whether --with-setjmp-type was given. -if test "${with_setjmp_type+set}" = set; then +if test "${with_setjmp_type+set}" = set; then : withval=$with_setjmp_type; case $withval in __builtin_setjmp) setjmp_prefix=__builtin_;; @@ -13716,9 +8481,7 @@ sigsetjmp) setjmp_prefix=sig;; setjmp) setjmp_prefix=;; '') unset setjmp_prefix;; - *) { { echo "$as_me:$LINENO: error: invalid setjmp type: $withval" >&5 -echo "$as_me: error: invalid setjmp type: $withval" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error "invalid setjmp type: $withval" "$LINENO" 5;; esac else unset setjmp_prefix @@ -13726,9 +8489,7 @@ if test ${setjmp_prefix+set}; then if test "${setjmp_prefix}" && eval test '$ac_cv_func_'${setjmp_prefix}setjmp = no; then - { { echo "$as_me:$LINENO: error: ${setjmp_prefix}setjmp is not available" >&5 -echo "$as_me: error: ${setjmp_prefix}setjmp is not available" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "${setjmp_prefix}setjmp is not available" "$LINENO" 5 fi elif test "$ac_cv_func___builtin_setjmp" = yes; then setjmp_prefix=__builtin_ @@ -13749,8 +8510,8 @@ else unset setjmp_sigmask fi -{ echo "$as_me:$LINENO: result: ${setjmp_prefix}setjmp" >&5 -echo "${ECHO_T}${setjmp_prefix}setjmp" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${setjmp_prefix}setjmp" >&5 +$as_echo "${setjmp_prefix}setjmp" >&6; } cat >>confdefs.h <<_ACEOF #define RUBY_SETJMP(env) ${setjmp_prefix}setjmp(env${setjmp_sigmask+,0}) _ACEOF @@ -13765,30 +8526,22 @@ # Check whether --enable-setreuid was given. -if test "${enable_setreuid+set}" = set; then +if test "${enable_setreuid+set}" = set; then : enableval=$enable_setreuid; use_setreuid=$enableval fi if test "$use_setreuid" = yes; then - cat >>confdefs.h <<\_ACEOF -#define USE_SETREUID 1 -_ACEOF + $as_echo "#define USE_SETREUID 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define USE_SETREGID 1 -_ACEOF + $as_echo "#define USE_SETREGID 1" >>confdefs.h 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test "${ac_cv_struct_tm+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -13798,148 +8551,31 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + 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 +if ac_fn_c_try_compile "$LINENO"; 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 + 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$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 +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_tm_tm_zone+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_cv_struct_tm> - - -int -main () -{ -static struct tm ac_aggr; -if (ac_aggr.tm_zone) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_tm_tm_zone=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include #include <$ac_cv_struct_tm> - -int -main () -{ -static struct tm ac_aggr; -if (sizeof ac_aggr.tm_zone) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_tm_tm_zone=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_tm_tm_zone=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } -if test $ac_cv_member_struct_tm_tm_zone = yes; then +" +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -13950,90 +8586,27 @@ if test "$ac_cv_member_struct_tm_tm_zone" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TM_ZONE 1 -_ACEOF +$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef tzname - (void) tzname; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes + ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include +" +if test "x$ac_cv_have_decl_tzname" = x""yes; then : + ac_have_decl=1 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_tzname=no + ac_have_decl=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } -if test $ac_cv_have_decl_tzname = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 +#define HAVE_DECL_TZNAME $ac_have_decl _ACEOF - -fi - - - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } -if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } +if test "${ac_cv_var_tzname+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !HAVE_DECL_TZNAME @@ -14048,56 +8621,29 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_var_tzname=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_var_tzname=no + ac_cv_var_tzname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 -_ACEOF +$as_echo "#define HAVE_TZNAME 1" >>confdefs.h fi fi -{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 -echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; } -if test "${rb_cv_member_struct_tm_tm_gmtoff+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tm.tm_gmtoff" >&5 +$as_echo_n "checking for struct tm.tm_gmtoff... " >&6; } +if test "${rb_cv_member_struct_tm_tm_gmtoff+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -14108,51 +8654,25 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_member_struct_tm_tm_gmtoff=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_member_struct_tm_tm_gmtoff=no + rb_cv_member_struct_tm_tm_gmtoff=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv_member_struct_tm_tm_gmtoff" >&5 -echo "${ECHO_T}$rb_cv_member_struct_tm_tm_gmtoff" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_member_struct_tm_tm_gmtoff" >&5 +$as_echo "$rb_cv_member_struct_tm_tm_gmtoff" >&6; } if test "$rb_cv_member_struct_tm_tm_gmtoff" = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_TM_TM_GMTOFF 1 -_ACEOF + $as_echo "#define HAVE_STRUCT_TM_TM_GMTOFF 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for external int daylight" >&5 -echo $ECHO_N "checking for external int daylight... $ECHO_C" >&6; } -if test "${rb_cv_have_daylight+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external int daylight" >&5 +$as_echo_n "checking for external int daylight... " >&6; } +if test "${rb_cv_have_daylight+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int i; @@ -14164,55 +8684,28 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : rb_cv_have_daylight=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_have_daylight=no + rb_cv_have_daylight=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv_have_daylight" >&5 -echo "${ECHO_T}$rb_cv_have_daylight" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_have_daylight" >&5 +$as_echo "$rb_cv_have_daylight" >&6; } if test "$rb_cv_have_daylight" = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_DAYLIGHT 1 -_ACEOF + $as_echo "#define HAVE_DAYLIGHT 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for external timezone" >&5 -echo $ECHO_N "checking for external timezone... $ECHO_C" >&6; } -if test "${rb_cv_var_timezone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external timezone" >&5 +$as_echo_n "checking for external timezone... " >&6; } +if test "${rb_cv_var_timezone+set}" = set; then : + $as_echo_n "(cached) " >&6 else rb_cv_var_timezone=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _XOPEN_SOURCE @@ -14226,32 +8719,12 @@ { t = &(&timezone)[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 - for t in long int; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + for t in long int; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _XOPEN_SOURCE @@ -14269,65 +8742,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_var_timezone=$t; break -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 done -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 -{ echo "$as_me:$LINENO: result: $rb_cv_var_timezone" >&5 -echo "${ECHO_T}$rb_cv_var_timezone" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_var_timezone" >&5 +$as_echo "$rb_cv_var_timezone" >&6; } if test "$rb_cv_var_timezone" != no; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_VAR_TIMEZONE 1 -_ACEOF + $as_echo "#define HAVE_VAR_TIMEZONE 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define TYPEOF_VAR_TIMEZONE $rb_cv_var_timezone _ACEOF fi -{ echo "$as_me:$LINENO: checking for external altzone" >&5 -echo $ECHO_N "checking for external altzone... $ECHO_C" >&6; } -if test "${rb_cv_var_altzone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external altzone" >&5 +$as_echo_n "checking for external altzone... " >&6; } +if test "${rb_cv_var_altzone+set}" = set; then : + $as_echo_n "(cached) " >&6 else rb_cv_var_altzone=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _XOPEN_SOURCE @@ -14344,29 +8783,9 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : for t in long int; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _XOPEN_SOURCE @@ -14384,48 +8803,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_var_altzone=$t; break -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 done -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 -{ echo "$as_me:$LINENO: result: $rb_cv_var_altzone" >&5 -echo "${ECHO_T}$rb_cv_var_altzone" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_var_altzone" >&5 +$as_echo "$rb_cv_var_altzone" >&6; } if test "$rb_cv_var_altzone" != no; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_VAR_ALTZONE 1 -_ACEOF + $as_echo "#define HAVE_VAR_ALTZONE 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define TYPEOF_VAR_ALTZONE $rb_cv_var_altzone @@ -14433,111 +8822,24 @@ fi if test "$rb_cv_var_timezone" = no; then - -for ac_func in timezone -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -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; } -if test `eval echo '${'$as_ac_var'}'` = yes; then + for ac_func in timezone +do : + ac_fn_c_check_func "$LINENO" "timezone" "ac_cv_func_timezone" +if test "x$ac_cv_func_timezone" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_TIMEZONE 1 _ACEOF fi done if test "$ac_cv_func_timezone" = yes; then - { echo "$as_me:$LINENO: checking whether timezone requires zero arguments" >&5 -echo $ECHO_N "checking whether timezone requires zero arguments... $ECHO_C" >&6; } -if test "${rb_cv_func_timezone_void+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether timezone requires zero arguments" >&5 +$as_echo_n "checking whether timezone requires zero arguments... " >&6; } +if test "${rb_cv_func_timezone_void+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -14548,58 +8850,32 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_func_timezone_void=no else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_func_timezone_void=yes + rb_cv_func_timezone_void=yes fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv_func_timezone_void" >&5 -echo "${ECHO_T}$rb_cv_func_timezone_void" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_func_timezone_void" >&5 +$as_echo "$rb_cv_func_timezone_void" >&6; } if test $rb_cv_func_timezone_void = yes; then - cat >>confdefs.h <<\_ACEOF -#define TIMEZONE_VOID 1 -_ACEOF + $as_echo "#define TIMEZONE_VOID 1" >>confdefs.h fi fi fi -{ echo "$as_me:$LINENO: checking for negative time_t for gmtime(3)" >&5 -echo $ECHO_N "checking for negative time_t for gmtime(3)... $ECHO_C" >&6; } -if test "${rb_cv_negative_time_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for negative time_t for gmtime(3)" >&5 +$as_echo_n "checking for negative time_t for gmtime(3)... " >&6; } +if test "${rb_cv_negative_time_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : rb_cv_negative_time_t=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -14632,162 +8908,47 @@ } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : rb_cv_negative_time_t=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rb_cv_negative_time_t=no + rb_cv_negative_time_t=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_negative_time_t" >&5 -echo "${ECHO_T}$rb_cv_negative_time_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_negative_time_t" >&5 +$as_echo "$rb_cv_negative_time_t" >&6; } if test "$rb_cv_negative_time_t" = yes; then - cat >>confdefs.h <<\_ACEOF -#define NEGATIVE_TIME_T 1 -_ACEOF + $as_echo "#define NEGATIVE_TIME_T 1" >>confdefs.h fi if test "$ac_cv_func_sigprocmask" = yes && test "$ac_cv_func_sigaction" = yes; then - cat >>confdefs.h <<\_ACEOF -#define POSIX_SIGNAL 1 -_ACEOF + $as_echo "#define POSIX_SIGNAL 1" >>confdefs.h else - -for ac_func in sigsetmask -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -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; } -if test `eval echo '${'$as_ac_var'}'` = yes; then + for ac_func in sigsetmask +do : + ac_fn_c_check_func "$LINENO" "sigsetmask" "ac_cv_func_sigsetmask" +if test "x$ac_cv_func_sigsetmask" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_SIGSETMASK 1 _ACEOF fi done - { echo "$as_me:$LINENO: checking for BSD signal semantics" >&5 -echo $ECHO_N "checking for BSD signal semantics... $ECHO_C" >&6; } -if test "${rb_cv_bsd_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD signal semantics" >&5 +$as_echo_n "checking for BSD signal semantics... " >&6; } +if test "${rb_cv_bsd_signal+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : rb_cv_bsd_signal=$ac_cv_func_sigsetmask else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -14809,61 +8970,31 @@ } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : rb_cv_bsd_signal=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rb_cv_bsd_signal=no + rb_cv_bsd_signal=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_bsd_signal" >&5 -echo "${ECHO_T}$rb_cv_bsd_signal" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_bsd_signal" >&5 +$as_echo "$rb_cv_bsd_signal" >&6; } if test "$rb_cv_bsd_signal" = yes; then - cat >>confdefs.h <<\_ACEOF -#define BSD_SIGNAL 1 -_ACEOF + $as_echo "#define BSD_SIGNAL 1" >>confdefs.h fi fi -{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 -echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; } -if test "${ac_cv_func_getpgrp_void+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 +$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } +if test "${ac_cv_func_getpgrp_void+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Use it with a single arg. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -14874,59 +9005,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_getpgrp_void=no else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_getpgrp_void=yes + ac_cv_func_getpgrp_void=yes fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 -echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 +$as_echo "$ac_cv_func_getpgrp_void" >&6; } if test $ac_cv_func_getpgrp_void = yes; then -cat >>confdefs.h <<\_ACEOF -#define GETPGRP_VOID 1 -_ACEOF +$as_echo "#define GETPGRP_VOID 1" >>confdefs.h 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 +$as_echo_n "checking whether setpgrp takes no argument... " >&6; } +if test "${ac_cv_func_setpgrp_void+set}" = set; then : + $as_echo_n "(cached) " >&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; }; } + if test "$cross_compiling" = yes; then : + as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -14940,297 +9043,255 @@ return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_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 + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 -echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 +$as_echo "$ac_cv_func_setpgrp_void" >&6; } if test $ac_cv_func_setpgrp_void = yes; then -cat >>confdefs.h <<\_ACEOF -#define SETPGRP_VOID 1 -_ACEOF +$as_echo "#define SETPGRP_VOID 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +#include int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) - bogus endian macros -#endif +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +#include int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif +#ifndef _BIG_ENDIAN + not big endian + #endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # It does not; compile a test program. -if test "$cross_compiling" = yes; then - # try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + int main () { - _ascii (); _ebcdic (); +return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_bigendian=yes + ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } -case $ac_cv_c_bigendian in - yes) +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; -esac - -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + ;; #( + *) + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15290,54 +9351,27 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no + ac_cv_c_const=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF +$as_echo "#define const /**/" >>confdefs.h fi - -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } -if test "${ac_cv_c_char_unsigned+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } +if test "${ac_cv_c_char_unsigned+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -15350,54 +9384,28 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_char_unsigned=no else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - cat >>confdefs.h <<\_ACEOF -#define __CHAR_UNSIGNED__ 1 -_ACEOF + $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; @@ -15406,39 +9414,16 @@ #endif _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw -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 test "$ac_cv_c_inline" != no && break done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -15455,16 +9440,12 @@ ;; esac -{ echo "$as_me:$LINENO: checking for working volatile" >&5 -echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } -if test "${ac_cv_c_volatile+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 +$as_echo_n "checking for working volatile... " >&6; } +if test "${ac_cv_c_volatile+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15478,40 +9459,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_volatile=no + ac_cv_c_volatile=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 -echo "${ECHO_T}$ac_cv_c_volatile" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 +$as_echo "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then -cat >>confdefs.h <<\_ACEOF -#define volatile -_ACEOF +$as_echo "#define volatile /**/" >>confdefs.h fi @@ -15523,17 +9482,13 @@ ;; esac - { echo "$as_me:$LINENO: checking for __libc_ia64_register_backing_store_base" >&5 -echo $ECHO_N "checking for __libc_ia64_register_backing_store_base... $ECHO_C" >&6; } -if test "${rb_cv___libc_ia64_register_backing_store_base+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __libc_ia64_register_backing_store_base" >&5 +$as_echo_n "checking for __libc_ia64_register_backing_store_base... " >&6; } +if test "${rb_cv___libc_ia64_register_backing_store_base+set}" = set; then : + $as_echo_n "(cached) " >&6 else rb_cv___libc_ia64_register_backing_store_base=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern unsigned long __libc_ia64_register_backing_store_base; int @@ -15545,58 +9500,29 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : rb_cv___libc_ia64_register_backing_store_base=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_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv___libc_ia64_register_backing_store_base" >&5 -echo "${ECHO_T}$rb_cv___libc_ia64_register_backing_store_base" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv___libc_ia64_register_backing_store_base" >&5 +$as_echo "$rb_cv___libc_ia64_register_backing_store_base" >&6; } if test $rb_cv___libc_ia64_register_backing_store_base = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE___LIBC_IA64_REGISTER_BACKING_STORE_BASE 1 -_ACEOF + $as_echo "#define HAVE___LIBC_IA64_REGISTER_BACKING_STORE_BASE 1" >>confdefs.h fi fi -{ echo "$as_me:$LINENO: checking whether right shift preserve sign bit" >&5 -echo $ECHO_N "checking whether right shift preserve sign bit... $ECHO_C" >&6; } -if test "${rb_cv_rshift_sign+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift preserve sign bit" >&5 +$as_echo_n "checking whether right shift preserve sign bit... " >&6; } +if test "${rb_cv_rshift_sign+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : rb_cv_rshift_sign=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15608,65 +9534,33 @@ } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : rb_cv_rshift_sign=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rb_cv_rshift_sign=no + rb_cv_rshift_sign=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_rshift_sign" >&5 -echo "${ECHO_T}$rb_cv_rshift_sign" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_rshift_sign" >&5 +$as_echo "$rb_cv_rshift_sign" >&6; } if test "$rb_cv_rshift_sign" = yes; then - cat >>confdefs.h <<\_ACEOF -#define RSHIFT(x,y) ((x)>>(int)y) -_ACEOF + $as_echo "#define RSHIFT(x,y) ((x)>>(int)y)" >>confdefs.h else - cat >>confdefs.h <<\_ACEOF -#define RSHIFT(x,y) (((x)<0) ? ~((~(x))>>y) : (x)>>y) -_ACEOF + $as_echo "#define RSHIFT(x,y) (((x)<0) ? ~((~(x))>>y) : (x)>>y)" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking read count field in FILE structures" >&5 -echo $ECHO_N "checking read count field in FILE structures... $ECHO_C" >&6; } -if test "${rb_cv_fcnt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking read count field in FILE structures" >&5 +$as_echo_n "checking read count field in FILE structures... " >&6; } +if test "${rb_cv_fcnt+set}" = set; then : + $as_echo_n "(cached) " >&6 else for fcnt in _cnt __cnt _r readCount _rcount ; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15678,58 +9572,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_fcnt="$fcnt"; break else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_fcnt="not found" + rb_cv_fcnt="not found" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done fi if test "$rb_cv_fcnt" = "not found"; then - { echo "$as_me:$LINENO: result: not found(OK if using GNU libc)" >&5 -echo "${ECHO_T}not found(OK if using GNU libc)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found(OK if using GNU libc)" >&5 +$as_echo "not found(OK if using GNU libc)" >&6; } else - { echo "$as_me:$LINENO: result: $rb_cv_fcnt" >&5 -echo "${ECHO_T}$rb_cv_fcnt" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_fcnt" >&5 +$as_echo "$rb_cv_fcnt" >&6; } cat >>confdefs.h <<_ACEOF #define FILE_COUNT $rb_cv_fcnt _ACEOF fi -{ echo "$as_me:$LINENO: checking read buffer ptr field in FILE structures" >&5 -echo $ECHO_N "checking read buffer ptr field in FILE structures... $ECHO_C" >&6; } -if test "${rb_cv_frptr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking read buffer ptr field in FILE structures" >&5 +$as_echo_n "checking read buffer ptr field in FILE structures... " >&6; } +if test "${rb_cv_frptr+set}" = set; then : + $as_echo_n "(cached) " >&6 else for frptr in _IO_read_ptr _ptr __ptr bufpos _p ; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15741,58 +9611,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_frptr="$frptr"; break else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_frptr="not found" + rb_cv_frptr="not found" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done fi if test "$rb_cv_frptr" = "not found"; then - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } else - { echo "$as_me:$LINENO: result: $rb_cv_frptr" >&5 -echo "${ECHO_T}$rb_cv_frptr" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_frptr" >&5 +$as_echo "$rb_cv_frptr" >&6; } cat >>confdefs.h <<_ACEOF #define FILE_READPTR $rb_cv_frptr _ACEOF if test "$rb_cv_fcnt" = "not found"; then - { echo "$as_me:$LINENO: checking read buffer end field in FILE structures" >&5 -echo $ECHO_N "checking read buffer end field in FILE structures... $ECHO_C" >&6; } - if test "${rb_cv_frend+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking read buffer end field in FILE structures" >&5 +$as_echo_n "checking read buffer end field in FILE structures... " >&6; } + if test "${rb_cv_frend+set}" = set; then : + $as_echo_n "(cached) " >&6 else for frend in _IO_read_end bufread ; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15804,41 +9650,21 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_frend="$frend"; break else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_frend="not found" + rb_cv_frend="not found" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done fi if test "$rb_cv_frend" = "not found"; then - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } else - { echo "$as_me:$LINENO: result: $rb_cv_frend" >&5 -echo "${ECHO_T}$rb_cv_frend" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_frend" >&5 +$as_echo "$rb_cv_frend" >&6; } cat >>confdefs.h <<_ACEOF #define FILE_READEND $rb_cv_frend _ACEOF @@ -15848,19 +9674,15 @@ fi -{ echo "$as_me:$LINENO: checking whether need to seek between R/W" >&5 -echo $ECHO_N "checking whether need to seek between R/W... $ECHO_C" >&6; } -if test "${rb_cv_need_io_seek_between_rw+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether need to seek between R/W" >&5 +$as_echo_n "checking whether need to seek between R/W... " >&6; } +if test "${rb_cv_need_io_seek_between_rw+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : rb_cv_need_io_seek_between_rw=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15915,59 +9737,29 @@ } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : rb_cv_need_io_seek_between_rw=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 ) -rb_cv_need_io_seek_between_rw=yes + rb_cv_need_io_seek_between_rw=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_need_io_seek_between_rw" >&5 -echo "${ECHO_T}$rb_cv_need_io_seek_between_rw" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_need_io_seek_between_rw" >&5 +$as_echo "$rb_cv_need_io_seek_between_rw" >&6; } if test "$rb_cv_need_io_seek_between_rw" = yes; then - cat >>confdefs.h <<\_ACEOF -#define NEED_IO_SEEK_BETWEEN_RW 1 -_ACEOF + $as_echo "#define NEED_IO_SEEK_BETWEEN_RW 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking whether st_ino is huge" >&5 -echo $ECHO_N "checking whether st_ino is huge... $ECHO_C" >&6; } -if test "${rb_cv_huge_st_ino+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether st_ino is huge" >&5 +$as_echo_n "checking whether st_ino is huge... " >&6; } +if test "${rb_cv_huge_st_ino+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15983,55 +9775,29 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_huge_st_ino=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_huge_st_ino=no + rb_cv_huge_st_ino=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv_huge_st_ino" >&5 -echo "${ECHO_T}$rb_cv_huge_st_ino" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_huge_st_ino" >&5 +$as_echo "$rb_cv_huge_st_ino" >&6; } if test $rb_cv_huge_st_ino = yes; then - cat >>confdefs.h <<\_ACEOF -#define HUGE_ST_INO 1 -_ACEOF + $as_echo "#define HUGE_ST_INO 1" >>confdefs.h fi if test "$ac_cv_func_sysconf" = yes; then - { echo "$as_me:$LINENO: checking whether _SC_CLK_TCK is supported" >&5 -echo $ECHO_N "checking whether _SC_CLK_TCK is supported... $ECHO_C" >&6; } -if test "${rb_cv_have_sc_clk_tck+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _SC_CLK_TCK is supported" >&5 +$as_echo_n "checking whether _SC_CLK_TCK is supported... " >&6; } +if test "${rb_cv_have_sc_clk_tck+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -16043,40 +9809,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_have_sc_clk_tck=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_have_sc_clk_tck=no + rb_cv_have_sc_clk_tck=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv_have_sc_clk_tck" >&5 -echo "${ECHO_T}$rb_cv_have_sc_clk_tck" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_have_sc_clk_tck" >&5 +$as_echo "$rb_cv_have_sc_clk_tck" >&6; } if test "$rb_cv_have_sc_clk_tck" = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE__SC_CLK_TCK 1 -_ACEOF + $as_echo "#define HAVE__SC_CLK_TCK 1" >>confdefs.h fi @@ -16086,19 +9830,15 @@ m68*|i?86|ia64|sparc*|alpha*) rb_cv_stack_grow_dir=-1;; hppa*) rb_cv_stack_grow_dir=+1;; esac -{ echo "$as_me:$LINENO: checking stack growing direction" >&5 -echo $ECHO_N "checking stack growing direction... $ECHO_C" >&6; } -if test "${rb_cv_stack_grow_dir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack growing direction" >&5 +$as_echo_n "checking stack growing direction... " >&6; } +if test "${rb_cv_stack_grow_dir+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : rb_cv_stack_grow_dir=0 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* recurse to get rid of inlining */ @@ -16119,42 +9859,18 @@ } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : rb_cv_stack_grow_dir=-1 -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rb_cv_stack_grow_dir=+1 +else + rb_cv_stack_grow_dir=+1 fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_stack_grow_dir" >&5 -echo "${ECHO_T}$rb_cv_stack_grow_dir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_stack_grow_dir" >&5 +$as_echo "$rb_cv_stack_grow_dir" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_GROW_DIRECTION $rb_cv_stack_grow_dir _ACEOF @@ -16162,19 +9878,15 @@ if test x"$enable_pthread" = xyes; then for pthread_lib in pthread pthreads c c_r; do - as_ac_Lib=`echo "ac_cv_lib_$pthread_lib''_pthread_kill" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for pthread_kill in -l$pthread_lib" >&5 -echo $ECHO_N "checking for pthread_kill in -l$pthread_lib... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_Lib=`$as_echo "ac_cv_lib_$pthread_lib''_pthread_kill" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -l$pthread_lib" >&5 +$as_echo_n "checking for pthread_kill in -l$pthread_lib... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$pthread_lib $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -16192,40 +9904,20 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" + eval "$as_ac_Lib=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval as_val=\$$as_ac_Lib + if test "x$as_val" = x""yes; then : rb_with_pthread=yes else rb_with_pthread=no @@ -16234,17 +9926,11 @@ if test "$rb_with_pthread" = "yes"; then break; fi done if test x"$rb_with_pthread" = xyes; then - cat >>confdefs.h <<\_ACEOF -#define _REENTRANT 1 -_ACEOF + $as_echo "#define _REENTRANT 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _THREAD_SAFE 1 -_ACEOF + $as_echo "#define _THREAD_SAFE 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF + $as_echo "#define HAVE_LIBPTHREAD 1" >>confdefs.h case $pthread_lib in c) @@ -16257,117 +9943,29 @@ ;; esac else - { echo "$as_me:$LINENO: WARNING: \"Don't know how to find pthread library on your system -- thread support disabled\"" >&5 -echo "$as_me: WARNING: \"Don't know how to find pthread library on your system -- thread support disabled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Don't know how to find pthread library on your system -- thread support disabled\"" >&5 +$as_echo "$as_me: WARNING: \"Don't know how to find pthread library on your system -- thread support disabled\"" >&2;} fi - -for ac_func in nanosleep -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -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; } -if test `eval echo '${'$as_ac_var'}'` = yes; then + for ac_func in nanosleep +do : + ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" +if test "x$ac_cv_func_nanosleep" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_NANOSLEEP 1 _ACEOF fi done if test x"$ac_cv_func_nanosleep" = xno; then - -{ echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5 -echo $ECHO_N "checking for nanosleep in -lrt... $ECHO_C" >&6; } -if test "${ac_cv_lib_rt_nanosleep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 +$as_echo_n "checking for nanosleep in -lrt... " >&6; } +if test "${ac_cv_lib_rt_nanosleep+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -16385,39 +9983,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_nanosleep=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_rt_nanosleep=no + ac_cv_lib_rt_nanosleep=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_nanosleep" >&5 -echo "${ECHO_T}$ac_cv_lib_rt_nanosleep" >&6; } -if test $ac_cv_lib_rt_nanosleep = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 +$as_echo "$ac_cv_lib_rt_nanosleep" >&6; } +if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF @@ -16427,105 +10004,21 @@ fi if test x"$ac_cv_lib_rt_nanosleep" = xyes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_NANOSLEEP 1 -_ACEOF + $as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h fi fi fi if test x"$ac_cv_header_ucontext_h" = xyes; then if test x"$rb_with_pthread" = xyes; then - - -for ac_func in getcontext setcontext -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -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; } -if test `eval echo '${'$as_ac_var'}'` = yes; then + for ac_func in getcontext setcontext +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -16538,14 +10031,14 @@ # Check whether --with-default-kcode was given. -if test "${with_default_kcode+set}" = set; then +if test "${with_default_kcode+set}" = set; then : withval=$with_default_kcode; case $withval in utf8) DEFAULT_KCODE="KCODE_UTF8";; euc) DEFAULT_KCODE="KCODE_EUC";; sjis) DEFAULT_KCODE="KCODE_SJIS";; none) DEFAULT_KCODE="KCODE_NONE";; - *) { echo "$as_me:$LINENO: WARNING: $withval is not valid kcode; ignored" >&5 -echo "$as_me: WARNING: $withval is not valid kcode; ignored" >&2;};; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $withval is not valid kcode; ignored" >&5 +$as_echo "$as_me: WARNING: $withval is not valid kcode; ignored" >&2;};; esac fi @@ -16556,7 +10049,7 @@ # Check whether --with-dln-a-out was given. -if test "${with_dln_a_out+set}" = set; then +if test "${with_dln_a_out+set}" = set; then : withval=$with_dln_a_out; case $withval in yes) with_dln_a_out=yes;; @@ -16567,19 +10060,15 @@ fi -{ echo "$as_me:$LINENO: checking whether ELF binaries are produced" >&5 -echo $ECHO_N "checking whether ELF binaries are produced... $ECHO_C" >&6; } -if test "${rb_cv_binary_elf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ELF binaries are produced" >&5 +$as_echo_n "checking whether ELF binaries are produced... " >&6; } +if test "${rb_cv_binary_elf+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : rb_cv_binary_elf=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Test for whether ELF binaries are produced */ @@ -16599,47 +10088,21 @@ } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : rb_cv_binary_elf=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rb_cv_binary_elf=no + rb_cv_binary_elf=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_binary_elf" >&5 -echo "${ECHO_T}$rb_cv_binary_elf" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_binary_elf" >&5 +$as_echo "$rb_cv_binary_elf" >&6; } if test "$rb_cv_binary_elf" = yes; then - cat >>confdefs.h <<\_ACEOF -#define USE_ELF 1 -_ACEOF + $as_echo "#define USE_ELF 1" >>confdefs.h fi @@ -16660,8 +10123,8 @@ if test "$with_dln_a_out" != yes; then rb_cv_dlopen=unknown - { echo "$as_me:$LINENO: checking whether OS depend dynamic link works" >&5 -echo $ECHO_N "checking whether OS depend dynamic link works... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OS depend dynamic link works" >&5 +$as_echo_n "checking whether OS depend dynamic link works... " >&6; } if test "$GCC" = yes; then case "$target_os" in nextstep*) CCDLFLAGS="$CCDLFLAGS -fno-common";; @@ -16683,7 +10146,7 @@ # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then +if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; enable_rpath=$enableval else enable_rpath="$rb_cv_binary_elf" @@ -16809,8 +10272,8 @@ ;; *) : ${LDSHARED='ld'} ;; esac - { echo "$as_me:$LINENO: result: $rb_cv_dlopen" >&5 -echo "${ECHO_T}$rb_cv_dlopen" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_dlopen" >&5 +$as_echo "$rb_cv_dlopen" >&6; } fi case ${RPATHFLAG} in *'%1$'*) @@ -16829,16 +10292,12 @@ if test "$ac_cv_header_a_out_h" = yes; then if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then cat confdefs.h > config.h - { echo "$as_me:$LINENO: checking whether matz's dln works" >&5 -echo $ECHO_N "checking whether matz's dln works... $ECHO_C" >&6; } -if test "${rb_cv_dln_a_out+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether matz's dln works" >&5 +$as_echo_n "checking whether matz's dln works... " >&6; } +if test "${rb_cv_dln_a_out+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define USE_DLN_A_OUT @@ -16852,40 +10311,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : rb_cv_dln_a_out=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - rb_cv_dln_a_out=no + rb_cv_dln_a_out=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $rb_cv_dln_a_out" >&5 -echo "${ECHO_T}$rb_cv_dln_a_out" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_dln_a_out" >&5 +$as_echo "$rb_cv_dln_a_out" >&6; } if test "$rb_cv_dln_a_out" = yes; then dln_a_out_works=yes - cat >>confdefs.h <<\_ACEOF -#define USE_DLN_A_OUT 1 -_ACEOF + $as_echo "#define USE_DLN_A_OUT 1" >>confdefs.h fi fi @@ -16948,7 +10385,7 @@ EXTSTATIC= # Check whether --with-static-linked-ext was given. -if test "${with_static_linked_ext+set}" = set; then +if test "${with_static_linked_ext+set}" = set; then : withval=$with_static_linked_ext; case $withval in yes) STATIC= EXTSTATIC=static;; @@ -16959,19 +10396,14 @@ case "$target_os" in human*) - -{ echo "$as_me:$LINENO: checking for _harderr in -lsignal" >&5 -echo $ECHO_N "checking for _harderr in -lsignal... $ECHO_C" >&6; } -if test "${ac_cv_lib_signal__harderr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _harderr in -lsignal" >&5 +$as_echo_n "checking for _harderr in -lsignal... " >&6; } +if test "${ac_cv_lib_signal__harderr+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsignal $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -16989,39 +10421,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_signal__harderr=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_signal__harderr=no + ac_cv_lib_signal__harderr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_signal__harderr" >&5 -echo "${ECHO_T}$ac_cv_lib_signal__harderr" >&6; } -if test $ac_cv_lib_signal__harderr = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_signal__harderr" >&5 +$as_echo "$ac_cv_lib_signal__harderr" >&6; } +if test "x$ac_cv_lib_signal__harderr" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSIGNAL 1 _ACEOF @@ -17030,19 +10441,14 @@ fi - -{ echo "$as_me:$LINENO: checking for hmemset in -lhmem" >&5 -echo $ECHO_N "checking for hmemset in -lhmem... $ECHO_C" >&6; } -if test "${ac_cv_lib_hmem_hmemset+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hmemset in -lhmem" >&5 +$as_echo_n "checking for hmemset in -lhmem... " >&6; } +if test "${ac_cv_lib_hmem_hmemset+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhmem $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -17060,39 +10466,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_hmem_hmemset=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_hmem_hmemset=no + ac_cv_lib_hmem_hmemset=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_hmem_hmemset" >&5 -echo "${ECHO_T}$ac_cv_lib_hmem_hmemset" >&6; } -if test $ac_cv_lib_hmem_hmemset = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hmem_hmemset" >&5 +$as_echo "$ac_cv_lib_hmem_hmemset" >&6; } +if test "x$ac_cv_lib_hmem_hmemset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBHMEM 1 _ACEOF @@ -17101,179 +10486,62 @@ fi - -for ac_func in select -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -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; } -if test `eval echo '${'$as_ac_var'}'` = yes; then + for ac_func in select +do : + ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" +if test "x$ac_cv_func_select" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_SELECT 1 _ACEOF fi done - { echo "$as_me:$LINENO: checking whether PD libc _dtos18 fail to convert big number" >&5 -echo $ECHO_N "checking whether PD libc _dtos18 fail to convert big number... $ECHO_C" >&6; } -if test "${rb_cv_missing__dtos18+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PD libc _dtos18 fail to convert big number" >&5 +$as_echo_n "checking whether PD libc _dtos18 fail to convert big number... " >&6; } +if test "${rb_cv_missing__dtos18+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : rb_cv_missing__dtos18=no else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -main () -{ - char buf[256]; - sprintf (buf, "%g", 1e+300); - exit (strcmp (buf, "1e+300") ? 0 : 1); -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +main () +{ + char buf[256]; + sprintf (buf, "%g", 1e+300); + exit (strcmp (buf, "1e+300") ? 0 : 1); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : rb_cv_missing__dtos18=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rb_cv_missing__dtos18=no + rb_cv_missing__dtos18=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_missing__dtos18" >&5 -echo "${ECHO_T}$rb_cv_missing__dtos18" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_missing__dtos18" >&5 +$as_echo "$rb_cv_missing__dtos18" >&6; } if test "$rb_cv_missing__dtos18" = yes; then - cat >>confdefs.h <<\_ACEOF -#define MISSING__DTOS18 1 -_ACEOF + $as_echo "#define MISSING__DTOS18 1" >>confdefs.h fi - { echo "$as_me:$LINENO: checking whether PD libc fconvert fail to round" >&5 -echo $ECHO_N "checking whether PD libc fconvert fail to round... $ECHO_C" >&6; } -if test "${rb_cv_missing_fconvert+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PD libc fconvert fail to round" >&5 +$as_echo_n "checking whether PD libc fconvert fail to round... " >&6; } +if test "${rb_cv_missing_fconvert+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : rb_cv_missing_fconvert=no else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -17286,46 +10554,20 @@ } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : rb_cv_missing_fconvert=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rb_cv_missing_fconvert=no + rb_cv_missing_fconvert=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $rb_cv_missing_fconvert" >&5 -echo "${ECHO_T}$rb_cv_missing_fconvert" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rb_cv_missing_fconvert" >&5 +$as_echo "$rb_cv_missing_fconvert" >&6; } if test "$rb_cv_missing_fconvert" = yes; then - cat >>confdefs.h <<\_ACEOF -#define MISSING_FCONVERT 1 -_ACEOF + $as_echo "#define MISSING_FCONVERT 1" >>confdefs.h fi case " $LIBOBJS " in @@ -17407,7 +10649,7 @@ ENABLE_SHARED=no # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; enable_shared=$enableval fi @@ -17498,7 +10740,7 @@ RDOCTARGET="" # Check whether --enable-install-doc was given. -if test "${enable_install_doc+set}" = set; then +if test "${enable_install_doc+set}" = set; then : enableval=$enable_install_doc; install_doc=$enableval else install_doc=no @@ -17585,7 +10827,6 @@ COMMON_LIBS=m # COMMON_MACROS="WIN32_LEAN_AND_MEAN=" - COMMON_HEADERS="windows.h winsock.h" ;; esac LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)' @@ -17666,7 +10907,7 @@ # Check whether --with-sitedir was given. -if test "${with_sitedir+set}" = set; then +if test "${with_sitedir+set}" = set; then : withval=$with_sitedir; sitedir=$withval else sitedir='${libdir}/ruby/site_ruby' @@ -17702,7 +10943,7 @@ # Check whether --with-vendordir was given. -if test "${with_vendordir+set}" = set; then +if test "${with_vendordir+set}" = set; then : withval=$with_vendordir; vendordir=$withval else vendordir='${libdir}/ruby/vendor_ruby' @@ -17779,7 +11020,7 @@ # Check whether --with-search-path was given. -if test "${with_search_path+set}" = set; then +if test "${with_search_path+set}" = set; then : withval=$with_search_path; search_path=$withval fi @@ -17792,16 +11033,14 @@ # Check whether --with-mantype was given. -if test "${with_mantype+set}" = set; then +if test "${with_mantype+set}" = set; then : withval=$with_mantype; case "$withval" in man|doc) MANTYPE=$withval ;; *) - { { echo "$as_me:$LINENO: error: invalid man type: $withval" >&5 -echo "$as_me: error: invalid man type: $withval" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "invalid man type: $withval" "$LINENO" 5 ;; esac @@ -17812,10 +11051,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_NROFF+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_NROFF+set}" = set; then : + $as_echo_n "(cached) " >&6 else case $NROFF in [\\/]* | ?:[\\/]*) @@ -17828,14 +11067,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -17843,11 +11082,11 @@ fi NROFF=$ac_cv_path_NROFF if test -n "$NROFF"; then - { echo "$as_me:$LINENO: result: $NROFF" >&5 -echo "${ECHO_T}$NROFF" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5 +$as_echo "$NROFF" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17903,12 +11142,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -17916,8 +11156,8 @@ (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -17940,12 +11180,12 @@ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -17962,6 +11202,12 @@ # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g @@ -17991,11 +11237,11 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -18003,12 +11249,15 @@ + : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -18018,59 +11267,79 @@ debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -18079,20 +11348,18 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -18103,32 +11370,111 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -18142,13 +11488,17 @@ as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -18163,104 +11513,103 @@ } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -18277,12 +11626,12 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -18297,13 +11646,19 @@ exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18316,51 +11671,61 @@ _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files -Report bugs to ." +Report bugs to the package provider." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -18382,25 +11747,29 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -18415,27 +11784,29 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # @@ -18443,7 +11814,7 @@ _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -18452,9 +11823,7 @@ "$FIRSTMAKEFILE") CONFIG_FILES="$CONFIG_FILES $FIRSTMAKEFILE" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -18479,7 +11848,7 @@ trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -18490,251 +11859,139 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAJOR!$MAJOR$ac_delim -MINOR!$MINOR$ac_delim -TEENY!$TEENY$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 -target!$target$ac_delim -target_cpu!$target_cpu$ac_delim -target_vendor!$target_vendor$ac_delim -target_os!$target_os$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 -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -GNU_LD!$GNU_LD$ac_delim -CPPOUTFILE!$CPPOUTFILE$ac_delim -OUTFLAG!$OUTFLAG$ac_delim -YACC!$YACC$ac_delim -YFLAGS!$YFLAGS$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -AS!$AS$ac_delim -ASFLAGS!$ASFLAGS$ac_delim -NM!$NM$ac_delim -WINDRES!$WINDRES$ac_delim -DLLWRAP!$DLLWRAP$ac_delim -OBJDUMP!$OBJDUMP$ac_delim -LN_S!$LN_S$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -RM!$RM$ac_delim -CP!$CP$ac_delim -MAKEDIRS!$MAKEDIRS$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -ALLOCA!$ALLOCA$ac_delim -DLDFLAGS!$DLDFLAGS$ac_delim -ARCH_FLAG!$ARCH_FLAG$ac_delim -STATIC!$STATIC$ac_delim -CCDLFLAGS!$CCDLFLAGS$ac_delim -LDSHARED!$LDSHARED$ac_delim -DLEXT!$DLEXT$ac_delim -DLEXT2!$DLEXT2$ac_delim -LIBEXT!$LIBEXT$ac_delim -LINK_SO!$LINK_SO$ac_delim -LIBPATHFLAG!$LIBPATHFLAG$ac_delim -RPATHFLAG!$RPATHFLAG$ac_delim -LIBPATHENV!$LIBPATHENV$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr fi -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TRY_LINK!$TRY_LINK$ac_delim -STRIP!$STRIP$ac_delim -EXTSTATIC!$EXTSTATIC$ac_delim -setup!$setup$ac_delim -MINIRUBY!$MINIRUBY$ac_delim -PREP!$PREP$ac_delim -RUNRUBY!$RUNRUBY$ac_delim -EXTOUT!$EXTOUT$ac_delim -ARCHFILE!$ARCHFILE$ac_delim -RDOCTARGET!$RDOCTARGET$ac_delim -cppflags!$cppflags$ac_delim -cflags!$cflags$ac_delim -optflags!$optflags$ac_delim -debugflags!$debugflags$ac_delim -XCFLAGS!$XCFLAGS$ac_delim -XLDFLAGS!$XLDFLAGS$ac_delim -LIBRUBY_LDSHARED!$LIBRUBY_LDSHARED$ac_delim -LIBRUBY_DLDFLAGS!$LIBRUBY_DLDFLAGS$ac_delim -RUBY_INSTALL_NAME!$RUBY_INSTALL_NAME$ac_delim -rubyw_install_name!$rubyw_install_name$ac_delim -RUBYW_INSTALL_NAME!$RUBYW_INSTALL_NAME$ac_delim -RUBY_SO_NAME!$RUBY_SO_NAME$ac_delim -LIBRUBY_A!$LIBRUBY_A$ac_delim -LIBRUBY_SO!$LIBRUBY_SO$ac_delim -LIBRUBY_ALIASES!$LIBRUBY_ALIASES$ac_delim -LIBRUBY!$LIBRUBY$ac_delim -LIBRUBYARG!$LIBRUBYARG$ac_delim -LIBRUBYARG_STATIC!$LIBRUBYARG_STATIC$ac_delim -LIBRUBYARG_SHARED!$LIBRUBYARG_SHARED$ac_delim -SOLIBS!$SOLIBS$ac_delim -DLDLIBS!$DLDLIBS$ac_delim -ENABLE_SHARED!$ENABLE_SHARED$ac_delim -MAINLIBS!$MAINLIBS$ac_delim -COMMON_LIBS!$COMMON_LIBS$ac_delim -COMMON_MACROS!$COMMON_MACROS$ac_delim -COMMON_HEADERS!$COMMON_HEADERS$ac_delim -EXPORT_PREFIX!$EXPORT_PREFIX$ac_delim -MINIOBJS!$MINIOBJS$ac_delim -MAKEFILES!$MAKEFILES$ac_delim -arch!$arch$ac_delim -sitearch!$sitearch$ac_delim -sitedir!$sitedir$ac_delim -vendordir!$vendordir$ac_delim -configure_args!$configure_args$ac_delim -NROFF!$NROFF$ac_delim -MANTYPE!$MANTYPE$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 47; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 +_ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and @@ -18751,20 +12008,20 @@ }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -for ac_tag in :F $CONFIG_FILES +eval set X " :F $CONFIG_FILES " +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -18792,26 +12049,34 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -18821,42 +12086,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -18874,20 +12104,15 @@ q } s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -18927,12 +12152,12 @@ esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -18940,36 +12165,37 @@ /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' $ac_file_inputs` in +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -18979,21 +12205,24 @@ 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" | sed -f "$tmp/subs-2.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; @@ -19013,11 +12242,13 @@ done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -19037,6 +12268,10 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff -Nru ruby1.8-1.8.7.249/configure.in ruby1.8-1.8.7.302/configure.in --- ruby1.8-1.8.7.249/configure.in 2009-12-24 09:10:03.000000000 +0000 +++ ruby1.8-1.8.7.302/configure.in 2010-07-17 06:23:26.000000000 +0000 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT() -AC_PREREQ(2.58) +AC_PREREQ(2.60) AC_DEFUN([RUBY_MINGW32], [case "$host_os" in @@ -217,6 +217,9 @@ esac], [with_winsock2=no]) if test "$with_winsock2" = yes; then AC_DEFINE(USE_WINSOCK2) + COMMON_HEADERS="ws2tcpip.h winsock2.h windows.h" + else + COMMON_HEADERS="windows.h winsock.h" fi esac : ${enable_shared=yes} @@ -544,6 +547,43 @@ AC_STRUCT_ST_BLOCKS AC_STRUCT_ST_RDEV +dnl RUBY_DEFINT TYPENAME, SIZE, [SIGNED-OR-UNSIGNED], [INCLUDES = DEFAULT-INCLUDES] +AC_DEFUN([RUBY_DEFINT], [dnl +AC_CACHE_CHECK([for $1], [rb_cv_type_$1], +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4]) +typedef $1 t; int s = sizeof(t) == 42;])], + [rb_cv_type_$1=yes], + [AS_CASE([m4_bmatch([$2], [^[1-9][0-9]*$], $2, [$ac_cv_sizeof_]AS_TR_SH($2))], + ["1"], [ rb_cv_type_$1="m4_if([$3], [], [signed ], [$3 ])char"], + ["$ac_cv_sizeof_short"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])short"], + ["$ac_cv_sizeof_int"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])int"], + ["$ac_cv_sizeof_long"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long"], + ["$ac_cv_sizeof_long_long"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long long"], + ["$ac_cv_sizeof___int64"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])__int64"], + [ rb_cv_type_$1=no])])]) +if test "${rb_cv_type_$1}" != no; then + AC_DEFINE([HAVE_]AS_TR_CPP($1), 1) + if test "${rb_cv_type_$1}" = yes; then + m4_bmatch([$2], [^[1-9][0-9]*$], [AC_CHECK_SIZEOF([$1], 0, [AC_INCLUDES_DEFAULT([$4])])], + [RUBY_CHECK_SIZEOF([$1], [$2], [], [AC_INCLUDES_DEFAULT([$4])])]) + else + AC_DEFINE_UNQUOTED($1, [$rb_cv_type_$1]) + AC_DEFINE_UNQUOTED([SIZEOF_]AS_TR_CPP($1), [SIZEOF_]AS_TR_CPP([$rb_cv_type_$1])) + fi +fi +]) + +RUBY_DEFINT(int8_t, 1) +RUBY_DEFINT(uint8_t, 1, unsigned) +RUBY_DEFINT(int16_t, 2) +RUBY_DEFINT(uint16_t, 2, unsigned) +RUBY_DEFINT(int32_t, 4) +RUBY_DEFINT(uint32_t, 4, unsigned) +RUBY_DEFINT(int64_t, 8) +RUBY_DEFINT(uint64_t, 8, unsigned) +RUBY_DEFINT(int128_t, 16) +RUBY_DEFINT(uint128_t, 16, unsigned) + dnl Checks for library functions. AC_TYPE_GETGROUPS AC_TYPE_SIGNAL @@ -1630,7 +1670,6 @@ AC_LIBOBJ([win32]) COMMON_LIBS=m # COMMON_MACROS="WIN32_LEAN_AND_MEAN=" - COMMON_HEADERS="windows.h winsock.h" ;; esac LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)' diff -Nru ruby1.8-1.8.7.249/debian/changelog ruby1.8-1.8.7.302/debian/changelog --- ruby1.8-1.8.7.249/debian/changelog 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/changelog 2011-04-20 10:36:44.000000000 +0000 @@ -1,3 +1,84 @@ +ruby1.8 (1.8.7.302-4lucid1) lucid; urgency=high + + * Uploaded to launchpad + + -- Hossein Ansari Wed, 20 Apr 2011 12:28:08 +0430 + +ruby1.8 (1.8.7.302-2) unstable; urgency=high + + * Add debian/patches/100901_threading_fixes.patch. Fixes threading + problems on Debian GNU/kFreeBSD exhibited by puppet. + Thanks to Petr Salinger and Aurélien Jarno. Closes: #595034 + + -- Lucas Nussbaum Wed, 01 Sep 2010 12:08:48 +0200 + +ruby1.8 (1.8.7.302-1) unstable; urgency=high + + * New upstream release in the stable 1.8.7 branch (very minor changes only). + + Fixes CVE-2010-0541. + + -- Lucas Nussbaum Mon, 16 Aug 2010 11:23:16 +0200 + +ruby1.8 (1.8.7.299-2) unstable; urgency=low + + * Convert from dpatch to quilt using dpatch2quilt.sh + * Add patch 100730_disable_getsetcontext_on_nptl: disable getsetcontext on + NPTL. LP: #307462, Closes: #579229 + * Added 100730_verbose-tests.patch: run tests in verbose mode. + * Run make test-all, but do not consider failures fatal for now. + * Upgrade to Standards-Version: 3.9.1. No changes needed. + * Deal with Ubuntu changing the GCC target to i686-linux-gnu: search + for libs in i486-linux too. LP: #611322. + + -- Lucas Nussbaum Fri, 30 Jul 2010 17:45:14 -0400 + +ruby1.8 (1.8.7.299-1) unstable; urgency=low + + * New upstream release + * Removed patches that the upstrem has applied: + - debian/patches/100312_timeout-fix.dpatch + - debian/patches/100620_fix_pathname_warning.dpatch + - debian/patches/100620_fix_super_called_outside_of_method.dpatch + + -- Daigo Moriwaki Sun, 27 Jun 2010 22:16:44 +0900 + +ruby1.8 (1.8.7.249-4) unstable; urgency=low + + [ Lucas Nussbaum ] + * Make ruby1.8 depend on exactly the same version of libruby1.8 after + private discussion with Alex Legler. This avoids confusing situations + for users. + * Update debian/patches/100312_timeout-fix.dpatch after discussion with + Petr Salinger. Treat FreeBSD the same as Linux. Closes: #580464 + + [ Daigo Moriwaki ] + * Removed debian/patches/091125_gc_check.dpatch, which the upstream has + applied. (Closes: #586374) + * Added debian/patches/100620_fix_pathname_warning.dpatch, which was + backported from the upstream r23485. + (Closes: #566611) + * Added debian/patches/100620_fix_super_called_outside_of_method.dpatch, + which was backported from the upstream r26534:26536. (Closes: #568597) + + -- Daigo Moriwaki Sun, 20 Jun 2010 17:30:27 +0900 + +ruby1.8 (1.8.7.249-3) unstable; urgency=low + + * Fix sections. Agree with ftpmasters. + * Update debian/copyright. Clarify that Ruby is GPLv2, not just "GPL". + * Merge lib{dbm,gdbm,readline,openssl}-ruby1.8 into libruby1.8. + * Merge irb1.8 and rdoc1.8 into ruby1.8. + * Update lintian override. + * Update debian/copyright. + * Upgrade to Standards-Version: 3.8.4. No changes needed. + * Add README.source. + * Fix not-binnmuable-all-depends-any lintian warning. + * Add lintian override for package-name-doesnt-match-sonames. + * Remove duplicate section/priority stanzas. + * Fix a few minor problems in manpages. + + -- Lucas Nussbaum Tue, 23 Mar 2010 13:21:22 +0100 + ruby1.8 (1.8.7.249-2) unstable; urgency=low * Add 100312_timeout-fix.dpatch: Backport upstream change to fix diff -Nru ruby1.8-1.8.7.249/debian/control ruby1.8-1.8.7.302/debian/control --- ruby1.8-1.8.7.249/debian/control 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/control 2011-04-20 10:36:44.000000000 +0000 @@ -3,17 +3,19 @@ Priority: optional Maintainer: akira yamada Uploaders: Daigo Moriwaki , Lucas Nussbaum -Build-Depends: cdbs, debhelper (>= 5), autotools-dev, autoconf, m4, dpatch, patch, bison, binutils (>= 2.14.90.0.7), libgdbm-dev, libncurses5-dev, libreadline5-dev, tcl8.4-dev, tk8.4-dev, zlib1g-dev, libssl-dev (>= 0.9.6b), file -Standards-Version: 3.8.2 +Build-Depends: cdbs, debhelper (>= 5), autotools-dev, autoconf, m4, quilt (>= 0.40), patch, bison, binutils (>= 2.14.90.0.7), libgdbm-dev, libncurses5-dev, libreadline5-dev, tcl8.4-dev, tk8.4-dev, zlib1g-dev, libssl-dev (>= 0.9.6b), file +Standards-Version: 3.9.1 Homepage: http://www.ruby-lang.org/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-ruby/ruby1.8/trunk/ Vcs-Svn: svn://svn.debian.org/pkg-ruby/ruby1.8/trunk/ Package: ruby1.8 -Section: ruby Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Suggests: ruby1.8-examples, rdoc1.8, ri1.8 +Depends: ${shlibs:Depends}, ${misc:Depends}, libruby1.8 (= ${binary:Version}) +Conflicts: irb1.8, rdoc1.8 +Replaces: irb1.8, rdoc1.8 +Provides: irb1.8, rdoc1.8 +Suggests: ruby1.8-examples, ri1.8 Description: Interpreter of object-oriented scripting language Ruby 1.8 Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text @@ -25,17 +27,16 @@ On Debian, Ruby 1.8 is provided as separate packages. You can get full Ruby 1.8 distribution by installing following packages. . - ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp - ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8 - libopenssl-ruby1.8 libreadline-ruby1.8 + ruby1.8 ruby1.8-dev ri1.8 ruby1.8-elisp ruby1.8-examples + libtcltk-ruby1.8 Package: libruby1.8 -Section: ruby +Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: libsdbm-ruby1.8, libdl-ruby1.8, libpty-ruby1.8, libbigdecimal-ruby1.8, libsyslog-ruby1.8, libstrscan-ruby1.8, libiconv-ruby1.8, libracc-runtime-ruby1.8, libdrb-ruby1.8, liberb-ruby1.8, libtest-unit-ruby1.8, librexml-ruby1.8, libxmlrpc-ruby1.8, libsoap-ruby1.8, libwebrick-ruby1.8, libyaml-ruby1.8, libzlib-ruby1.8, libcurses-ruby1.8, libopenssl-ruby1.8 (<< 1.8.6) -Replaces: libsdbm-ruby1.8, libdl-ruby1.8, libpty-ruby1.8, libbigdecimal-ruby1.8, libsyslog-ruby1.8, libstrscan-ruby1.8, libiconv-ruby1.8, libracc-runtime-ruby1.8, libdrb-ruby1.8, liberb-ruby1.8, libtest-unit-ruby1.8, librexml-ruby1.8, libxmlrpc-ruby1.8, libsoap-ruby1.8, libwebrick-ruby1.8, libyaml-ruby1.8, libzlib-ruby1.8, libcurses-ruby1.8 -Provides: libsdbm-ruby1.8, libdl-ruby1.8, libpty-ruby1.8, libbigdecimal-ruby1.8, libsyslog-ruby1.8, libstrscan-ruby1.8, libiconv-ruby1.8, libracc-runtime-ruby1.8, libdrb-ruby1.8, liberb-ruby1.8, libtest-unit-ruby1.8, librexml-ruby1.8, libxmlrpc-ruby1.8, libsoap-ruby1.8, libwebrick-ruby1.8, libyaml-ruby1.8, libzlib-ruby1.8, libcurses-ruby1.8 +Conflicts: libsdbm-ruby1.8, libdl-ruby1.8, libpty-ruby1.8, libbigdecimal-ruby1.8, libsyslog-ruby1.8, libstrscan-ruby1.8, libiconv-ruby1.8, libracc-runtime-ruby1.8, libdrb-ruby1.8, liberb-ruby1.8, libtest-unit-ruby1.8, librexml-ruby1.8, libxmlrpc-ruby1.8, libsoap-ruby1.8, libwebrick-ruby1.8, libyaml-ruby1.8, libzlib-ruby1.8, libcurses-ruby1.8, libopenssl-ruby1.8 (<< 1.8.6), libdbm-ruby1.8, libgdbm-ruby1.8, libreadline-ruby1.8, libopenssl-ruby1.8 +Replaces: libsdbm-ruby1.8, libdl-ruby1.8, libpty-ruby1.8, libbigdecimal-ruby1.8, libsyslog-ruby1.8, libstrscan-ruby1.8, libiconv-ruby1.8, libracc-runtime-ruby1.8, libdrb-ruby1.8, liberb-ruby1.8, libtest-unit-ruby1.8, librexml-ruby1.8, libxmlrpc-ruby1.8, libsoap-ruby1.8, libwebrick-ruby1.8, libyaml-ruby1.8, libzlib-ruby1.8, libcurses-ruby1.8, libdbm-ruby1.8, libgdbm-ruby1.8, libreadline-ruby1.8, libopenssl-ruby1.8 +Provides: libsdbm-ruby1.8, libdl-ruby1.8, libpty-ruby1.8, libbigdecimal-ruby1.8, libsyslog-ruby1.8, libstrscan-ruby1.8, libiconv-ruby1.8, libracc-runtime-ruby1.8, libdrb-ruby1.8, liberb-ruby1.8, libtest-unit-ruby1.8, librexml-ruby1.8, libxmlrpc-ruby1.8, libsoap-ruby1.8, libwebrick-ruby1.8, libyaml-ruby1.8, libzlib-ruby1.8, libcurses-ruby1.8, libdbm-ruby1.8, libgdbm-ruby1.8, libreadline-ruby1.8, libopenssl-ruby1.8 Description: Libraries necessary to run Ruby 1.8 Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text @@ -57,7 +58,6 @@ dumps. Most people will not need this package. Package: ruby1.8-dev -Section: ruby Architecture: any Depends: libruby1.8 (= ${binary:Version}), libc6-dev, ${misc:Depends} Recommends: ruby1.8 (= ${binary:Version}) @@ -70,35 +70,7 @@ This package contains the header files and the mkmf library, necessary to make extension library for Ruby 1.8. -Package: libdbm-ruby1.8 -Section: ruby -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: DBM interface for Ruby 1.8 - This package provides an extension library "dbm" for Ruby 1.8. The - library makes Ruby programs to be able to access to a DBM file. - . - On Debian, the extension library is built with GDBM. - -Package: libgdbm-ruby1.8 -Section: ruby -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: GDBM interface for Ruby 1.8 - This package provides an extension library "gdbm" for Ruby 1.8. The - library makes Ruby 1.8 programs to be able to access to a DBM file. - -Package: libreadline-ruby1.8 -Section: ruby -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Readline interface for Ruby 1.8 - This package provides an extension library "readline" for Ruby 1.8. - The library makes Ruby programs to be able to use functions (line - editing, history, completion, etc.) of the readline library(3). - Package: libtcltk-ruby1.8 -Section: ruby Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libtk-ruby1.8 @@ -108,18 +80,7 @@ tcltklib is an extension library for Ruby 1.8. It makes Ruby 1.8 programs to be able to use low level interface for the Tcl/Tk. -Package: libopenssl-ruby1.8 -Section: ruby -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: libruby1.8 (<< 1.8.6) -Replaces: libruby1.8 (<< 1.8.6) -Description: OpenSSL interface for Ruby 1.8 - This package provides OpenSSL support for Ruby 1.8. It includes SSL and - TLS support for the HTTP and TELNET protocols. - Package: ruby1.8-examples -Section: ruby Architecture: all Depends: ${misc:Depends} Suggests: ruby1.8 (>= ${source:Version}) @@ -132,20 +93,17 @@ straight-forward, and extensible. Package: ruby1.8-elisp -Section: lisp Architecture: all Depends: emacs | emacsen, ${misc:Depends} -Suggests: ruby1.8 (>= ${source:Version}), irb1.8 (>= ${source:Version}) +Suggests: ruby1.8 (>= ${source:Version}) Conflicts: ruby-elisp (<< 1.8), ruby1.6-elisp, ruby1.7-elisp, ruby-beta-elisp Description: ruby-mode for Emacsen This package provides major-mode for editing Ruby scripts and some emacs-lisp programs for Ruby programmers. Package: ri1.8 -Priority: optional -Section: doc Architecture: all -Depends: ruby1.8, rdoc1.8 (= ${source:Version}), ${misc:Depends} +Depends: ruby1.8 (>= ${source:Version}), ${misc:Depends} Description: Ruby Interactive reference (for Ruby 1.8) ri is a command line tool that displays descriptions of built-in Ruby methods, classes, and modules. For methods, it shows you the calling @@ -154,33 +112,3 @@ implements. . This package provides ri command and descriptions about Ruby 1.8. - -Package: rdoc1.8 -Section: doc -Architecture: all -Depends: ruby1.8 (>= ${source:Version}), irb1.8 (>= ${source:Version}), libruby1.8 (>= ${source:Version}), ${misc:Depends} -Suggests: graphviz -Replaces: rdoc (<= 0.9.0-5) -Conflicts: rdoc (<= 0.9.0-5) -Description: Generate documentation from Ruby source files (for Ruby 1.8) - RDoc - Documentation from Ruby Source Files: - * Generates structured HTML and XML documentation from Ruby source - and C extensions. - * Automatically extracts class, module, method, and attribute - definitions. These can be annotated using inline comments. - * Analyzes method visibility. - * Handles aliasing. - * Uses non-intrusive and implicit markup in the comments. Readers of - the original source needn't know that it is marked up at all. - . - This package provides the RDoc tool which uses Ruby 1.8. - -Package: irb1.8 -Section: ruby -Architecture: all -Depends: ruby1.8 (>= ${source:Version}), libreadline-ruby1.8 (>= ${source:Version}), ${misc:Depends} -Description: Interactive Ruby (for Ruby 1.8) - The irb is acronym for Interactive RuBy. It evaluates Ruby expression from - the terminal. - . - This package provides the irb which uses Ruby 1.8. diff -Nru ruby1.8-1.8.7.249/debian/copyright ruby1.8-1.8.7.302/debian/copyright --- ruby1.8-1.8.7.249/debian/copyright 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/copyright 2011-04-20 10:36:44.000000000 +0000 @@ -11,7 +11,7 @@ Ruby is copyrighted free software by Yukihiro Matsumoto . You can redistribute it and/or modify it under either the terms of the GPL -(see the file GPL), or the conditions below: +version 2 (see the file GPL), or the conditions below: 1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the @@ -70,7 +70,7 @@ GNU General Public License: On Debian systems, the complete text of the GNU General Public License can -be found in `/usr/share/common-licenses/GPL'. +be found in `/usr/share/common-licenses/GPL-2'. Note for using libopenssl-ruby1.8 (openssl.so): @@ -84,4 +84,4 @@ The Debian packging: The Debian packaging is (C) 2003-2007, akira yamada and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. +is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. diff -Nru ruby1.8-1.8.7.249/debian/irb1.8.menu ruby1.8-1.8.7.302/debian/irb1.8.menu --- ruby1.8-1.8.7.249/debian/irb1.8.menu 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/irb1.8.menu 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -?package(irb1.8):needs="text" section="Applications/Programming"\ - title="Ruby (irb1.8)" command="/usr/bin/irb1.8" diff -Nru ruby1.8-1.8.7.249/debian/libopenssl-ruby1.8.lintian-overrides ruby1.8-1.8.7.302/debian/libopenssl-ruby1.8.lintian-overrides --- ruby1.8-1.8.7.249/debian/libopenssl-ruby1.8.lintian-overrides 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/libopenssl-ruby1.8.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# After discussions at Bug#367024, a note is mentioned in debian/copyright. -libopenssl-ruby1.8 binary: possible-gpl-code-linked-with-openssl diff -Nru ruby1.8-1.8.7.249/debian/libruby1.8.lintian-overrides ruby1.8-1.8.7.302/debian/libruby1.8.lintian-overrides --- ruby1.8-1.8.7.249/debian/libruby1.8.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/libruby1.8.lintian-overrides 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,4 @@ +# After discussions at Bug#367024, a note is mentioned in debian/copyright. +libruby1.8 binary: possible-gpl-code-linked-with-openssl +# known & ignored. +libruby1.8 binary: package-name-doesnt-match-sonames diff -Nru ruby1.8-1.8.7.249/debian/patches/00list ruby1.8-1.8.7.302/debian/patches/00list --- ruby1.8-1.8.7.249/debian/patches/00list 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/00list 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -# Debian specific patch -102_configure.in-crosscompile -803_soap_massmem -808_rexml_document_transitive -809_update_lib_README -901_ri_pager.dpatch -902_extra_search_path.dpatch -903_rdoc_documents.dpatch -090613_exclude_rdoc.dpatch -090812_openssl_x509_warning -# Back ported patch or fixes before the upstream's new release -091125_gc_check -100312_timeout-fix.dpatch diff -Nru ruby1.8-1.8.7.249/debian/patches/090613_exclude_rdoc.dpatch ruby1.8-1.8.7.302/debian/patches/090613_exclude_rdoc.dpatch --- ruby1.8-1.8.7.249/debian/patches/090613_exclude_rdoc.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/090613_exclude_rdoc.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 090613_exclude_rdoc.dpatch by Daigo Moriwaki -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Exclude files from the RDoc generation. -## DP: - mkconfig.rb, which causes an error. -## DP: - test_*.rb, which are test cases. - -@DPATCH@ -diff -urNad trunk~/common.mk trunk/common.mk ---- trunk~/common.mk 2008-08-04 14:05:38.000000000 +0900 -+++ trunk/common.mk 2009-06-13 16:02:44.000000000 +0900 -@@ -260,7 +260,7 @@ - - rdoc: $(PROGRAM) PHONY - @echo Generating RDoc documentation -- $(RUNRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" "$(srcdir)" -+ $(RUNRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" --exclude mkconfig.rb --exclude test_ "$(srcdir)" - - what-where-doc: no-install-doc - no-install-doc: pre-no-install-doc dont-install-doc post-no-install-doc diff -Nru ruby1.8-1.8.7.249/debian/patches/090613_exclude_rdoc.patch ruby1.8-1.8.7.302/debian/patches/090613_exclude_rdoc.patch --- ruby1.8-1.8.7.249/debian/patches/090613_exclude_rdoc.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/090613_exclude_rdoc.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,15 @@ +Author: Daigo Moriwaki +Description: Exclude files from the RDoc generation. +- mkconfig.rb, which causes an error. +- test_*.rb, which are test cases. +--- a/common.mk ++++ b/common.mk +@@ -261,7 +261,7 @@ post-install-doc:: + + rdoc: $(PROGRAM) PHONY + @echo Generating RDoc documentation +- $(RUNRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" "$(srcdir)" ++ $(RUNRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" --exclude mkconfig.rb --exclude test_ "$(srcdir)" + + what-where-doc: no-install-doc + no-install-doc: pre-no-install-doc dont-install-doc post-no-install-doc diff -Nru ruby1.8-1.8.7.249/debian/patches/090812_openssl_x509_warning.dpatch ruby1.8-1.8.7.302/debian/patches/090812_openssl_x509_warning.dpatch --- ruby1.8-1.8.7.249/debian/patches/090812_openssl_x509_warning.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/090812_openssl_x509_warning.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 090812_openssl_x509_warning.dpatch by akira yamada -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: suppress warning. -## DP: this is backport of a part of r21772. - -@DPATCH@ -diff -urNad ruby1.8-1.8.7.174~/ext/openssl/ossl_x509ext.c ruby1.8-1.8.7.174/ext/openssl/ossl_x509ext.c ---- ruby1.8-1.8.7.174~/ext/openssl/ossl_x509ext.c 2007-06-09 00:02:04.000000000 +0900 -+++ ruby1.8-1.8.7.174/ext/openssl/ossl_x509ext.c 2009-08-12 19:45:16.000000000 +0900 -@@ -110,6 +110,7 @@ - VALUE obj; - - MakeX509ExtFactory(klass, obj, ctx); -+ rb_iv_set(obj, "@config", Qnil); - - return obj; - } diff -Nru ruby1.8-1.8.7.249/debian/patches/090812_openssl_x509_warning.patch ruby1.8-1.8.7.302/debian/patches/090812_openssl_x509_warning.patch --- ruby1.8-1.8.7.249/debian/patches/090812_openssl_x509_warning.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/090812_openssl_x509_warning.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,13 @@ +Author: akira yamada +Description: suppress warning. +this is backport of a part of r21772. +--- a/ext/openssl/ossl_x509ext.c ++++ b/ext/openssl/ossl_x509ext.c +@@ -110,6 +110,7 @@ ossl_x509extfactory_alloc(VALUE klass) + VALUE obj; + + MakeX509ExtFactory(klass, obj, ctx); ++ rb_iv_set(obj, "@config", Qnil); + + return obj; + } diff -Nru ruby1.8-1.8.7.249/debian/patches/091125_gc_check.dpatch ruby1.8-1.8.7.302/debian/patches/091125_gc_check.dpatch --- ruby1.8-1.8.7.249/debian/patches/091125_gc_check.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/091125_gc_check.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 091125_gc_check.dpatch by Bryan McLellan -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Expand GC check per upstream issue #2326 - -@DPATCH@ -diff -urNad ruby1.8-1.8.7.174~/gc.c ruby1.8-1.8.7.174/gc.c ---- ruby1.8-1.8.7.174~/gc.c 2009-03-27 10:25:23.000000000 +0000 -+++ ruby1.8-1.8.7.174/gc.c 2009-11-25 10:35:42.000000000 +0000 -@@ -433,7 +433,7 @@ - if (during_gc) - rb_bug("object allocation during garbage collection phase"); - -- if (ruby_gc_stress || !freelist) garbage_collect(); -+ if (ruby_gc_stress || !freelist || !freelist->as.free.next) garbage_collect(); - - obj = (VALUE)freelist; - freelist = freelist->as.free.next; diff -Nru ruby1.8-1.8.7.249/debian/patches/100312_timeout-fix.dpatch ruby1.8-1.8.7.302/debian/patches/100312_timeout-fix.dpatch --- ruby1.8-1.8.7.249/debian/patches/100312_timeout-fix.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/100312_timeout-fix.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,154 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## timeout-fix.dpatch by Lucas Nussbaum -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Fix problem with threads+timeouts. -## DP: Backports from upstream. See http://redmine.ruby-lang.org/issues/show/2739, https://bugs.launchpad.net/ubuntu/lucid/+source/eglibc/+bug/520715, Debian#539987 - -@DPATCH@ -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' ruby1.8-1.8.7.249~/ChangeLog ruby1.8-1.8.7.249/ChangeLog ---- ruby1.8-1.8.7.249~/ChangeLog 2010-01-10 11:30:06.000000000 +0100 -+++ ruby1.8-1.8.7.249/ChangeLog 2010-03-12 07:07:47.000000000 +0100 -@@ -1,3 +1,18 @@ -+Fri Jan 22 01:22:27 2010 NAKAMURA Usaku -+ -+ * eval.c (thread_timer, rb_thread_stop_timer): check the timing of -+ stopping timer. patch from KOSAKI Motohiro -+ -+ * eval.c (rb_thread_start_timer): NetBSD5 seems to be hung when calling -+ pthread_create() from pthread_atfork()'s parent handler. -+ -+ * io.c (pipe_open): workaround for NetBSD5. stop timer thread before -+ fork(), and start it if needed. -+ -+ * process.c (rb_f_fork, rb_f_system): ditto. -+ fixed [ruby-dev:40074] -+ - Sun Jan 10 19:00:31 2010 Nobuyoshi Nakada - - * lib/webrick/accesslog.rb : Escape needed. -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' ruby1.8-1.8.7.249~/eval.c ruby1.8-1.8.7.249/eval.c ---- ruby1.8-1.8.7.249~/eval.c 2009-12-21 09:11:42.000000000 +0100 -+++ ruby1.8-1.8.7.249/eval.c 2010-03-12 07:07:49.000000000 +0100 -@@ -12292,6 +12292,8 @@ - pthread_t thread; - } time_thread = {PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER}; - -+static int timer_stopping; -+ - #define safe_mutex_lock(lock) \ - pthread_mutex_lock(lock); \ - pthread_cleanup_push((void (*)_((void *)))pthread_mutex_unlock, lock) -@@ -12316,6 +12318,9 @@ - #define WAIT_FOR_10MS() \ - pthread_cond_timedwait(&running->cond, &running->lock, get_ts(&to, PER_NANO/100)) - while ((err = WAIT_FOR_10MS()) == EINTR || err == ETIMEDOUT) { -+ if (timer_stopping) -+ break; -+ - if (!rb_thread_critical) { - rb_thread_pending = 1; - if (rb_trap_immediate) { -@@ -12343,7 +12348,9 @@ - safe_mutex_lock(&time_thread.lock); - if (pthread_create(&time_thread.thread, 0, thread_timer, args) == 0) { - thread_init = 1; -+#if !defined(__NetBSD__) && !defined(linux) - pthread_atfork(0, 0, rb_thread_stop_timer); -+#endif - pthread_cond_wait(&start, &time_thread.lock); - } - pthread_cleanup_pop(1); -@@ -12354,10 +12361,12 @@ - { - if (!thread_init) return; - safe_mutex_lock(&time_thread.lock); -+ timer_stopping = 1; - pthread_cond_signal(&time_thread.cond); - thread_init = 0; - pthread_cleanup_pop(1); - pthread_join(time_thread.thread, NULL); -+ timer_stopping = 0; - } - #elif defined(HAVE_SETITIMER) - static void -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' ruby1.8-1.8.7.249~/io.c ruby1.8-1.8.7.249/io.c ---- ruby1.8-1.8.7.249~/io.c 2009-11-25 09:45:13.000000000 +0100 -+++ ruby1.8-1.8.7.249/io.c 2010-03-12 07:07:49.000000000 +0100 -@@ -3245,6 +3245,9 @@ - } - - retry: -+#if defined(__NetBSD__) || defined(linux) -+ rb_thread_stop_timer(); -+#endif - switch ((pid = fork())) { - case 0: /* child */ - if (modef & FMODE_READABLE) { -@@ -3272,11 +3275,17 @@ - ruby_sourcefile, ruby_sourceline, pname); - _exit(127); - } -+#if defined(__NetBSD__) || defined(linux) -+ rb_thread_start_timer(); -+#endif - rb_io_synchronized(RFILE(orig_stdout)->fptr); - rb_io_synchronized(RFILE(orig_stderr)->fptr); - return Qnil; - - case -1: /* fork failed */ -+#if defined(__NetBSD__) || defined(linux) -+ rb_thread_start_timer(); -+#endif - if (errno == EAGAIN) { - rb_thread_sleep(1); - goto retry; -@@ -3297,6 +3306,9 @@ - break; - - default: /* parent */ -+#if defined(__NetBSD__) || defined(linux) -+ rb_thread_start_timer(); -+#endif - if (pid < 0) rb_sys_fail(pname); - else { - VALUE port = io_alloc(rb_cIO); -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' ruby1.8-1.8.7.249~/process.c ruby1.8-1.8.7.249/process.c ---- ruby1.8-1.8.7.249~/process.c 2008-06-29 11:34:43.000000000 +0200 -+++ ruby1.8-1.8.7.249/process.c 2010-03-12 07:07:49.000000000 +0100 -@@ -1330,7 +1330,14 @@ - fflush(stderr); - #endif - -+#if defined(__NetBSD__) || defined(linux) -+ before_exec(); -+ pid = fork(); -+ after_exec(); -+ switch (pid) { -+#else - switch (pid = fork()) { -+#endif - case 0: - #ifdef linux - after_exec(); -@@ -1570,6 +1577,9 @@ - - chfunc = signal(SIGCHLD, SIG_DFL); - retry: -+#if defined(__NetBSD__) || defined(linux) -+ before_exec(); -+#endif - pid = fork(); - if (pid == 0) { - /* child process */ -@@ -1577,6 +1587,9 @@ - rb_protect(proc_exec_args, (VALUE)&earg, NULL); - _exit(127); - } -+#if defined(__NetBSD__) || defined(linux) -+ after_exec(); -+#endif - if (pid < 0) { - if (errno == EAGAIN) { - rb_thread_sleep(1); diff -Nru ruby1.8-1.8.7.249/debian/patches/100730_disable_getsetcontext_on_nptl.patch ruby1.8-1.8.7.302/debian/patches/100730_disable_getsetcontext_on_nptl.patch --- ruby1.8-1.8.7.249/debian/patches/100730_disable_getsetcontext_on_nptl.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/100730_disable_getsetcontext_on_nptl.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,41 @@ +Author: Lucas Nussbaum +Description: backport upstream commits 28404 and 28595 from ruby_1_8 branch +Upstream-bug: http://redmine.ruby-lang.org/issues/show/2553 +Ubuntu-bug: https://bugs.launchpad.net/ubuntu/+source/ruby1.8/+bug/307462 + +--- a/configure.in ++++ b/configure.in +@@ -522,7 +522,7 @@ AC_CHECK_HEADERS(stdlib.h string.h unist + fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ + syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \ + sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \ +- ucontext.h intrinsics.h) ++ intrinsics.h) + + dnl Check additional types. + AC_CHECK_SIZEOF(rlim_t, 0, [ +@@ -1097,8 +1097,22 @@ if test x"$enable_pthread" = xyes; then + fi + fi + fi +-if test x"$ac_cv_header_ucontext_h" = xyes; then +- if test x"$rb_with_pthread" = xyes; then ++ ++use_context=no ++if test x"$rb_with_pthread" = xyes; then ++ AS_CASE("$target_cpu:$target_os:$cross_compiling", ++ [*:linux*:no], [ ++ if test -n "`(/lib/libc.so.6 2>/dev/null | fgrep 'linuxthreads') 2> /dev/null`"; then ++ use_context=yes ++ fi ++ ], ++ [sparc*], [ ++ use_context=yes ++ ]) ++fi ++if test x"$use_context" = xyes; then ++ AC_CHECK_HEADERS(ucontext.h) ++ if test x"$ac_cv_header_ucontext_h" = xyes; then + AC_CHECK_FUNCS(getcontext setcontext) + fi + fi diff -Nru ruby1.8-1.8.7.249/debian/patches/100730_verbose-tests.patch ruby1.8-1.8.7.302/debian/patches/100730_verbose-tests.patch --- ruby1.8-1.8.7.249/debian/patches/100730_verbose-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/100730_verbose-tests.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,13 @@ +Author: Lucas Nussbaum +Description: run tests in verbose mode +--- a/common.mk ++++ b/common.mk +@@ -306,7 +306,7 @@ test: miniruby$(EXEEXT) $(RBCONFIG) $(PR + @$(MINIRUBY) $(srcdir)/rubytest.rb + + test-all: +- $(RUNRUBY) "$(srcdir)/test/runner.rb" --basedir="$(TESTSDIR)" --runner=$(TESTUI) $(TESTS) ++ $(RUNRUBY) "$(srcdir)/test/runner.rb" --basedir="$(TESTSDIR)" --runner=$(TESTUI) -v $(TESTS) + + extconf: + $(MINIRUBY) -run -e mkdir -- -p "$(EXTCONFDIR)" diff -Nru ruby1.8-1.8.7.249/debian/patches/100901_threading_fixes.patch ruby1.8-1.8.7.302/debian/patches/100901_threading_fixes.patch --- ruby1.8-1.8.7.249/debian/patches/100901_threading_fixes.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/100901_threading_fixes.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,94 @@ +Debian-bug: #595034 +Upstream-bug: http://redmine.ruby-lang.org/issues/show/3779 + +- in process.c (re-)start timer thread (after_exec) only in parent, + as in child we know for sure that there is only one thread. + The fix-up in child is performed slightly later in rb_thread_atfork(). + Also unify linux with rest of the systems. + In 1.9 series the code is completely reworked. + +- in signal.c use pthread_sigmask instead of sigprocmask, + behaviour of sigprocmask is undefined in threaded programs, as stated in POSIX + (http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html). + In 1.9 series the code already uses pthread_sigmask: + + Sat Apr 24 00:41:52 2010 Yusuke Endoh + + * signal.c: use pthread_sigmask() instead of sigprocmask(). + sigprocmask() is unspecified behavior on multi-thread programs. + [ruby-core:25217] + +--- a/process.c ++++ b/process.c +@@ -1332,13 +1332,11 @@ rb_f_fork(obj) + + before_exec(); + pid = fork(); +- after_exec(); ++ if (pid != 0) ++ after_exec(); + + switch (pid) { + case 0: +-#ifdef linux +- after_exec(); +-#endif + rb_thread_atfork(); + if (rb_block_given_p()) { + int status; +--- a/signal.c ++++ b/signal.c +@@ -545,7 +545,7 @@ sigsend_to_ruby_thread(int sig) + + # ifdef HAVE_SIGPROCMASK + sigfillset(&mask); +- sigprocmask(SIG_BLOCK, &mask, &old_mask); ++ pthread_sigmask(SIG_BLOCK, &mask, &old_mask); + # else + mask = sigblock(~0); + sigsetmask(mask); +@@ -843,7 +843,7 @@ trap_ensure(arg) + { + /* enable interrupt */ + #ifdef HAVE_SIGPROCMASK +- sigprocmask(SIG_SETMASK, &arg->mask, NULL); ++ pthread_sigmask(SIG_SETMASK, &arg->mask, NULL); + #else + sigsetmask(arg->mask); + #endif +@@ -857,7 +857,7 @@ rb_trap_restore_mask() + { + #if USE_TRAP_MASK + # ifdef HAVE_SIGPROCMASK +- sigprocmask(SIG_SETMASK, &trap_last_mask, NULL); ++ pthread_sigmask(SIG_SETMASK, &trap_last_mask, NULL); + # else + sigsetmask(trap_last_mask); + # endif +@@ -919,7 +919,7 @@ sig_trap(argc, argv) + /* disable interrupt */ + # ifdef HAVE_SIGPROCMASK + sigfillset(&arg.mask); +- sigprocmask(SIG_BLOCK, &arg.mask, &arg.mask); ++ pthread_sigmask(SIG_BLOCK, &arg.mask, &arg.mask); + # else + arg.mask = sigblock(~0); + # endif +@@ -1011,7 +1011,7 @@ init_sigchld(sig) + /* disable interrupt */ + # ifdef HAVE_SIGPROCMASK + sigfillset(&mask); +- sigprocmask(SIG_BLOCK, &mask, &mask); ++ pthread_sigmask(SIG_BLOCK, &mask, &mask); + # else + mask = sigblock(~0); + # endif +@@ -1027,7 +1027,7 @@ init_sigchld(sig) + #if USE_TRAP_MASK + #ifdef HAVE_SIGPROCMASK + sigdelset(&mask, sig); +- sigprocmask(SIG_SETMASK, &mask, NULL); ++ pthread_sigmask(SIG_SETMASK, &mask, NULL); + #else + mask &= ~sigmask(sig); + sigsetmask(mask); diff -Nru ruby1.8-1.8.7.249/debian/patches/102_configure.in-crosscompile.dpatch ruby1.8-1.8.7.302/debian/patches/102_configure.in-crosscompile.dpatch --- ruby1.8-1.8.7.249/debian/patches/102_configure.in-crosscompile.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/102_configure.in-crosscompile.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 102_configure.in-crosscompile.dpatch by Lucas Nussbaum -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: patch for Debian bug #341256 -## DP: replace AC_FUNC_SETPGRP with something that works when cross-compiling - -@DPATCH@ -diff -urNad trunk~/configure.in trunk/configure.in ---- trunk~/configure.in 2007-09-07 09:38:51.000000000 +0200 -+++ trunk/configure.in 2008-03-21 10:52:50.000000000 +0100 -@@ -635,7 +635,25 @@ - fi - - AC_FUNC_GETPGRP --AC_FUNC_SETPGRP -+ -+dnl AC_FUNC_SETPGRP does not work if cross compiling -+dnl Instead, assume we will have a prototype for setpgrp if cross compiling. -+if test "$cross_compiling" = no; then -+ AC_FUNC_SETPGRP -+else -+ AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void, -+ [AC_TRY_COMPILE([ -+#include -+], [ -+ if (setpgrp(1,1) == -1) -+ exit (0); -+ else -+ exit (1); -+], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)]) -+if test $ac_cv_func_setpgrp_void = yes; then -+ AC_DEFINE(SETPGRP_VOID, 1) -+fi -+fi - - AC_C_BIGENDIAN - AC_C_CONST - diff -Nru ruby1.8-1.8.7.249/debian/patches/102_configure.in-crosscompile.patch ruby1.8-1.8.7.302/debian/patches/102_configure.in-crosscompile.patch --- ruby1.8-1.8.7.249/debian/patches/102_configure.in-crosscompile.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/102_configure.in-crosscompile.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,32 @@ +Author: Lucas Nussbaum +Description: patch for Debian bug #341256 +replace AC_FUNC_SETPGRP with something that works when cross-compiling +--- a/configure.in ++++ b/configure.in +@@ -825,7 +825,25 @@ main() + fi + + AC_FUNC_GETPGRP +-AC_FUNC_SETPGRP ++ ++dnl AC_FUNC_SETPGRP does not work if cross compiling ++dnl Instead, assume we will have a prototype for setpgrp if cross compiling. ++if test "$cross_compiling" = no; then ++ AC_FUNC_SETPGRP ++else ++ AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void, ++ [AC_TRY_COMPILE([ ++#include ++], [ ++ if (setpgrp(1,1) == -1) ++ exit (0); ++ else ++ exit (1); ++], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)]) ++if test $ac_cv_func_setpgrp_void = yes; then ++ AC_DEFINE(SETPGRP_VOID, 1) ++fi ++fi + + AC_C_BIGENDIAN + AC_C_CONST diff -Nru ruby1.8-1.8.7.249/debian/patches/803_soap_massmem.dpatch ruby1.8-1.8.7.302/debian/patches/803_soap_massmem.dpatch --- ruby1.8-1.8.7.249/debian/patches/803_soap_massmem.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/803_soap_massmem.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,305 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 803_soap_massmem.dpatch by akira yamada -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Fix for Debian bug #393685 - SOAP4R consumes too much memory -## DP: This was not backported into ruby 1.8 upstream (and soap is no -## DP: longer shipped with ruby 1.9) -## DP: refreshed for 1.8.7.72 so it can unapply - only whitespace changes. - -@DPATCH@ -diff -burN ruby1.8-1.8.7.72.orig/lib/soap/baseData.rb ruby1.8-1.8.7.72/lib/soap/baseData.rb ---- ruby1.8-1.8.7.72.orig/lib/soap/baseData.rb 2008-09-10 07:36:30.000000000 +0200 -+++ ruby1.8-1.8.7.72/lib/soap/baseData.rb 2008-09-10 07:36:40.000000000 +0200 -@@ -1,5 +1,5 @@ - # soap/baseData.rb: SOAP4R - Base type library --# Copyright (C) 2000, 2001, 2003-2005 NAKAMURA, Hiroshi . -+# Copyright (C) 2000, 2001, 2003-2006 NAKAMURA, Hiroshi . - - # This program is copyrighted free software by NAKAMURA, Hiroshi. You can - # redistribute it and/or modify it under the same terms of Ruby's license; -@@ -657,37 +657,30 @@ - value - end - -- if RUBY_VERSION > "1.7.0" -+ # Mapping.define_singleton_method calls define_method with proc and it -+ # exhausts much memory for each singleton Object. just instance_eval instead -+ # of it. - def add_accessor(name) -- methodname = name -- if self.respond_to?(methodname) -- methodname = safe_accessor_name(methodname) -- end -- Mapping.define_singleton_method(self, methodname) do -- @data[@array.index(name)] -- end -- Mapping.define_singleton_method(self, methodname + '=') do |value| -- @data[@array.index(name)] = value -- end -- end -- else -- def add_accessor(name) -- methodname = safe_accessor_name(name) -+ # untaint depends GenSupport.safemethodname -+ methodname = XSD::CodeGen::GenSupport.safemethodname(name).untaint -+ methodname = "var_#{methodname}" if self.respond_to?(methodname) # XXX: Debian: compatiblity with original SOAP4R of Ruby 1.8.x. -+ # untaint depends String#dump and Array#index -+ namedump = name.dump.untaint -+ unless self.respond_to?(methodname) - instance_eval <<-EOS - def #{methodname} -- @data[@array.index(#{name.dump})] -+ @data[@array.index(#{namedump})] - end -- -+ EOS -+ end -+ unless self.respond_to?(methodname + "=") -+ instance_eval <<-EOS - def #{methodname}=(value) -- @data[@array.index(#{name.dump})] = value -+ @data[@array.index(#{namedump})] = value - end - EOS - end - end -- -- def safe_accessor_name(name) -- "var_" << name.gsub(/[^a-zA-Z0-9_]/, '') -- end - end - - -diff -burN ruby1.8-1.8.7.72.orig/lib/soap/mapping/mapping.rb ruby1.8-1.8.7.72/lib/soap/mapping/mapping.rb ---- ruby1.8-1.8.7.72.orig/lib/soap/mapping/mapping.rb 2008-09-10 07:36:30.000000000 +0200 -+++ ruby1.8-1.8.7.72/lib/soap/mapping/mapping.rb 2008-09-10 07:36:40.000000000 +0200 -@@ -42,7 +42,8 @@ - soap_obj = nil - protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do - Thread.current[:SOAPMarshalDataKey] = {} -- Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE -+ Thread.current[:SOAPExternalCES] = -+ opt[:external_ces] || XSD::Charset.encoding - Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] - soap_obj = _obj2soap(obj, registry, type) - end -@@ -54,7 +55,8 @@ - obj = nil - protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do - Thread.current[:SOAPMarshalDataKey] = {} -- Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE -+ Thread.current[:SOAPExternalCES] = -+ opt[:external_ces] || XSD::Charset.encoding - Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] - obj = _soap2obj(node, registry, klass) - end -@@ -67,7 +69,8 @@ - soap_ary = SOAPArray.new(ValueArrayName, 1, type) - protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do - Thread.current[:SOAPMarshalDataKey] = {} -- Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE -+ Thread.current[:SOAPExternalCES] = -+ opt[:external_ces] || XSD::Charset.encoding - Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] - ary.each do |ele| - soap_ary.add(_obj2soap(ele, registry, type)) -@@ -82,7 +85,8 @@ - md_ary = SOAPArray.new(ValueArrayName, rank, type) - protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do - Thread.current[:SOAPMarshalDataKey] = {} -- Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE -+ Thread.current[:SOAPExternalCES] = -+ opt[:external_ces] || XSD::Charset.encoding - Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] - add_md_ary(md_ary, ary, [], registry) - end -@@ -292,16 +296,28 @@ - end - else - values.each do |attr_name, value| -- name = XSD::CodeGen::GenSupport.safevarname(attr_name) -+ # untaint depends GenSupport.safevarname -+ name = XSD::CodeGen::GenSupport.safevarname(attr_name).untaint - setter = name + "=" - if obj.respond_to?(setter) - obj.__send__(setter, value) - else - obj.instance_variable_set('@' + name, value) - begin -- define_attr_accessor(obj, name, -- proc { instance_variable_get('@' + name) }, -- proc { |value| instance_variable_set('@' + name, value) }) -+ unless obj.respond_to?(name) -+ obj.instance_eval <<-EOS -+ def #{name} -+ @#{name} -+ end -+ EOS -+ end -+ unless self.respond_to?(name + "=") -+ obj.instance_eval <<-EOS -+ def #{name}=(value) -+ @#{name} = value -+ end -+ EOS -+ end - rescue TypeError - # singleton class may not exist (e.g. Float) - end -@@ -310,11 +326,6 @@ - end - end - -- def self.define_attr_accessor(obj, name, getterproc, setterproc = nil) -- define_singleton_method(obj, name, &getterproc) -- define_singleton_method(obj, name + '=', &setterproc) if setterproc -- end -- - def self.schema_type_definition(klass) - class_schema_variable(:schema_type, klass) - end -diff -burN ruby1.8-1.8.7.72.orig/lib/soap/mapping/registry.rb ruby1.8-1.8.7.72/lib/soap/mapping/registry.rb ---- ruby1.8-1.8.7.72.orig/lib/soap/mapping/registry.rb 2008-09-10 07:36:30.000000000 +0200 -+++ ruby1.8-1.8.7.72/lib/soap/mapping/registry.rb 2008-09-10 07:36:40.000000000 +0200 -@@ -133,23 +133,24 @@ - - private - -- if RUBY_VERSION > "1.7.0" -+ # Mapping.define_attr_accessor calls define_method with proc and it exhausts -+ # much memory for each singleton Object. just instance_eval instead of it. - def __define_attr_accessor(qname) -- name = XSD::CodeGen::GenSupport.safemethodname(qname.name) -- Mapping.define_attr_accessor(self, name, -- proc { self[qname] }, -- proc { |value| self[qname] = value }) -- end -- else -- def __define_attr_accessor(qname) -- name = XSD::CodeGen::GenSupport.safemethodname(qname.name) -+ # untaint depends GenSupport.safemethodname -+ name = XSD::CodeGen::GenSupport.safemethodname(qname.name).untaint -+ # untaint depends QName#dump -+ qnamedump = qname.dump.untaint -+ unless self.respond_to?(name) - instance_eval <<-EOS - def #{name} -- self[#{qname.dump}] -+ self[#{qnamedump}] - end -- -+ EOS -+ end -+ unless self.respond_to?(name + "=") -+ instance_eval <<-EOS - def #{name}=(value) -- self[#{qname.dump}] = value -+ self[#{qnamedump}] = value - end - EOS - end -diff -burN ruby1.8-1.8.7.72.orig/lib/soap/mapping/wsdlliteralregistry.rb ruby1.8-1.8.7.72/lib/soap/mapping/wsdlliteralregistry.rb ---- ruby1.8-1.8.7.72.orig/lib/soap/mapping/wsdlliteralregistry.rb 2008-09-10 07:36:30.000000000 +0200 -+++ ruby1.8-1.8.7.72/lib/soap/mapping/wsdlliteralregistry.rb 2008-09-10 07:36:40.000000000 +0200 -@@ -360,36 +360,27 @@ - end - end - -- if RUBY_VERSION > "1.7.0" -- def define_xmlattr_accessor(obj, qname) -- name = XSD::CodeGen::GenSupport.safemethodname(qname.name) -- Mapping.define_attr_accessor(obj, 'xmlattr_' + name, -- proc { @__xmlattr[qname] }, -- proc { |value| @__xmlattr[qname] = value }) -- end -- else -+ -+ # Mapping.define_attr_accessor calls define_method with proc and it exhausts -+ # much memory for each singleton Object. just instance_eval instead of it. - def define_xmlattr_accessor(obj, qname) -- name = XSD::CodeGen::GenSupport.safemethodname(qname.name) -+ # untaint depends GenSupport.safemethodname -+ name = XSD::CodeGen::GenSupport.safemethodname('xmlattr_' + qname.name).untaint -+ # untaint depends QName#dump -+ qnamedump = qname.dump.untaint - obj.instance_eval <<-EOS - def #{name} -- @__xmlattr[#{qname.dump}] -+ @__xmlattr[#{qnamedump}] - end - - def #{name}=(value) -- @__xmlattr[#{qname.dump}] = value -+ @__xmlattr[#{qnamedump}] = value - end - EOS - end -- end - -- if RUBY_VERSION > "1.7.0" -- def define_xmlattr(obj) -- obj.instance_variable_set('@__xmlattr', {}) -- unless obj.respond_to?(:__xmlattr) -- Mapping.define_attr_accessor(obj, :__xmlattr, proc { @__xmlattr }) -- end -- end -- else -+ # Mapping.define_attr_accessor calls define_method with proc and it exhausts -+ # much memory for each singleton Object. just instance_eval instead of it. - def define_xmlattr(obj) - obj.instance_variable_set('@__xmlattr', {}) - unless obj.respond_to?(:__xmlattr) -@@ -400,7 +391,6 @@ - EOS - end - end -- end - - # it caches @@schema_element. this means that @@schema_element must not be - # changed while a lifetime of a WSDLLiteralRegistry. -diff -burN ruby1.8-1.8.7.72.orig/lib/soap/rpc/driver.rb ruby1.8-1.8.7.72/lib/soap/rpc/driver.rb ---- ruby1.8-1.8.7.72.orig/lib/soap/rpc/driver.rb 2008-09-10 07:36:30.000000000 +0200 -+++ ruby1.8-1.8.7.72/lib/soap/rpc/driver.rb 2008-09-10 07:36:40.000000000 +0200 -@@ -222,18 +222,9 @@ - add_method_interface(name, param_count) - end - -- if RUBY_VERSION > "1.7.0" -- def add_method_interface(name, param_count) -- ::SOAP::Mapping.define_singleton_method(self, name) do |*arg| -- unless arg.size == param_count -- raise ArgumentError.new( -- "wrong number of arguments (#{arg.size} for #{param_count})") -- end -- call(name, *arg) -- end -- self.method(name) -- end -- else -+ # Mapping.define_singleton_method calls define_method with proc and it -+ # exhausts much memory for each singleton Object. just instance_eval instead -+ # of it. - def add_method_interface(name, param_count) - instance_eval <<-EOS - def #{name}(*arg) -@@ -246,7 +237,6 @@ - EOS - self.method(name) - end -- end - end - - -diff -burN ruby1.8-1.8.7.72.orig/lib/xsd/charset.rb ruby1.8-1.8.7.72/lib/xsd/charset.rb ---- ruby1.8-1.8.7.72.orig/lib/xsd/charset.rb 2008-09-10 07:36:30.000000000 +0200 -+++ ruby1.8-1.8.7.72/lib/xsd/charset.rb 2008-09-10 07:36:40.000000000 +0200 -@@ -167,7 +167,7 @@ - SJISRegexp =~ str - end - -- def Charset.is_ces(str, code = $KCODE) -+ def Charset.is_ces(str, code = @internal_encoding) - case code - when 'NONE' - is_us_ascii(str) diff -Nru ruby1.8-1.8.7.249/debian/patches/803_soap_massmem.patch ruby1.8-1.8.7.302/debian/patches/803_soap_massmem.patch --- ruby1.8-1.8.7.249/debian/patches/803_soap_massmem.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/803_soap_massmem.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,294 @@ +Author: akira yamada +Description: Fix for Debian bug #393685 - SOAP4R consumes too much memory +This was not backported into ruby 1.8 upstream (and soap is no +longer shipped with ruby 1.9) +refreshed for 1.8.7.72 so it can unapply - only whitespace changes. +--- a/lib/soap/baseData.rb ++++ b/lib/soap/baseData.rb +@@ -1,5 +1,5 @@ + # soap/baseData.rb: SOAP4R - Base type library +-# Copyright (C) 2000, 2001, 2003-2005 NAKAMURA, Hiroshi . ++# Copyright (C) 2000, 2001, 2003-2006 NAKAMURA, Hiroshi . + + # This program is copyrighted free software by NAKAMURA, Hiroshi. You can + # redistribute it and/or modify it under the same terms of Ruby's license; +@@ -657,37 +657,30 @@ private + value + end + +- if RUBY_VERSION > "1.7.0" ++ # Mapping.define_singleton_method calls define_method with proc and it ++ # exhausts much memory for each singleton Object. just instance_eval instead ++ # of it. + def add_accessor(name) +- methodname = name +- if self.respond_to?(methodname) +- methodname = safe_accessor_name(methodname) +- end +- Mapping.define_singleton_method(self, methodname) do +- @data[@array.index(name)] +- end +- Mapping.define_singleton_method(self, methodname + '=') do |value| +- @data[@array.index(name)] = value +- end +- end +- else +- def add_accessor(name) +- methodname = safe_accessor_name(name) ++ # untaint depends GenSupport.safemethodname ++ methodname = XSD::CodeGen::GenSupport.safemethodname(name).untaint ++ methodname = "var_#{methodname}" if self.respond_to?(methodname) # XXX: Debian: compatiblity with original SOAP4R of Ruby 1.8.x. ++ # untaint depends String#dump and Array#index ++ namedump = name.dump.untaint ++ unless self.respond_to?(methodname) + instance_eval <<-EOS + def #{methodname} +- @data[@array.index(#{name.dump})] ++ @data[@array.index(#{namedump})] + end +- ++ EOS ++ end ++ unless self.respond_to?(methodname + "=") ++ instance_eval <<-EOS + def #{methodname}=(value) +- @data[@array.index(#{name.dump})] = value ++ @data[@array.index(#{namedump})] = value + end + EOS + end + end +- +- def safe_accessor_name(name) +- "var_" << name.gsub(/[^a-zA-Z0-9_]/, '') +- end + end + + +--- a/lib/soap/mapping/mapping.rb ++++ b/lib/soap/mapping/mapping.rb +@@ -42,7 +42,8 @@ module Mapping + soap_obj = nil + protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do + Thread.current[:SOAPMarshalDataKey] = {} +- Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE ++ Thread.current[:SOAPExternalCES] = ++ opt[:external_ces] || XSD::Charset.encoding + Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] + soap_obj = _obj2soap(obj, registry, type) + end +@@ -54,7 +55,8 @@ module Mapping + obj = nil + protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do + Thread.current[:SOAPMarshalDataKey] = {} +- Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE ++ Thread.current[:SOAPExternalCES] = ++ opt[:external_ces] || XSD::Charset.encoding + Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] + obj = _soap2obj(node, registry, klass) + end +@@ -67,7 +69,8 @@ module Mapping + soap_ary = SOAPArray.new(ValueArrayName, 1, type) + protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do + Thread.current[:SOAPMarshalDataKey] = {} +- Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE ++ Thread.current[:SOAPExternalCES] = ++ opt[:external_ces] || XSD::Charset.encoding + Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] + ary.each do |ele| + soap_ary.add(_obj2soap(ele, registry, type)) +@@ -82,7 +85,8 @@ module Mapping + md_ary = SOAPArray.new(ValueArrayName, rank, type) + protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do + Thread.current[:SOAPMarshalDataKey] = {} +- Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE ++ Thread.current[:SOAPExternalCES] = ++ opt[:external_ces] || XSD::Charset.encoding + Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] + add_md_ary(md_ary, ary, [], registry) + end +@@ -292,16 +296,28 @@ module Mapping + end + else + values.each do |attr_name, value| +- name = XSD::CodeGen::GenSupport.safevarname(attr_name) ++ # untaint depends GenSupport.safevarname ++ name = XSD::CodeGen::GenSupport.safevarname(attr_name).untaint + setter = name + "=" + if obj.respond_to?(setter) + obj.__send__(setter, value) + else + obj.instance_variable_set('@' + name, value) + begin +- define_attr_accessor(obj, name, +- proc { instance_variable_get('@' + name) }, +- proc { |value| instance_variable_set('@' + name, value) }) ++ unless obj.respond_to?(name) ++ obj.instance_eval <<-EOS ++ def #{name} ++ @#{name} ++ end ++ EOS ++ end ++ unless self.respond_to?(name + "=") ++ obj.instance_eval <<-EOS ++ def #{name}=(value) ++ @#{name} = value ++ end ++ EOS ++ end + rescue TypeError + # singleton class may not exist (e.g. Float) + end +@@ -310,11 +326,6 @@ module Mapping + end + end + +- def self.define_attr_accessor(obj, name, getterproc, setterproc = nil) +- define_singleton_method(obj, name, &getterproc) +- define_singleton_method(obj, name + '=', &setterproc) if setterproc +- end +- + def self.schema_type_definition(klass) + class_schema_variable(:schema_type, klass) + end +--- a/lib/soap/mapping/registry.rb ++++ b/lib/soap/mapping/registry.rb +@@ -133,23 +133,24 @@ class Object; include Marshallable + + private + +- if RUBY_VERSION > "1.7.0" ++ # Mapping.define_attr_accessor calls define_method with proc and it exhausts ++ # much memory for each singleton Object. just instance_eval instead of it. + def __define_attr_accessor(qname) +- name = XSD::CodeGen::GenSupport.safemethodname(qname.name) +- Mapping.define_attr_accessor(self, name, +- proc { self[qname] }, +- proc { |value| self[qname] = value }) +- end +- else +- def __define_attr_accessor(qname) +- name = XSD::CodeGen::GenSupport.safemethodname(qname.name) ++ # untaint depends GenSupport.safemethodname ++ name = XSD::CodeGen::GenSupport.safemethodname(qname.name).untaint ++ # untaint depends QName#dump ++ qnamedump = qname.dump.untaint ++ unless self.respond_to?(name) + instance_eval <<-EOS + def #{name} +- self[#{qname.dump}] ++ self[#{qnamedump}] + end +- ++ EOS ++ end ++ unless self.respond_to?(name + "=") ++ instance_eval <<-EOS + def #{name}=(value) +- self[#{qname.dump}] = value ++ self[#{qnamedump}] = value + end + EOS + end +--- a/lib/soap/mapping/wsdlliteralregistry.rb ++++ b/lib/soap/mapping/wsdlliteralregistry.rb +@@ -360,36 +360,27 @@ private + end + end + +- if RUBY_VERSION > "1.7.0" +- def define_xmlattr_accessor(obj, qname) +- name = XSD::CodeGen::GenSupport.safemethodname(qname.name) +- Mapping.define_attr_accessor(obj, 'xmlattr_' + name, +- proc { @__xmlattr[qname] }, +- proc { |value| @__xmlattr[qname] = value }) +- end +- else ++ ++ # Mapping.define_attr_accessor calls define_method with proc and it exhausts ++ # much memory for each singleton Object. just instance_eval instead of it. + def define_xmlattr_accessor(obj, qname) +- name = XSD::CodeGen::GenSupport.safemethodname(qname.name) ++ # untaint depends GenSupport.safemethodname ++ name = XSD::CodeGen::GenSupport.safemethodname('xmlattr_' + qname.name).untaint ++ # untaint depends QName#dump ++ qnamedump = qname.dump.untaint + obj.instance_eval <<-EOS + def #{name} +- @__xmlattr[#{qname.dump}] ++ @__xmlattr[#{qnamedump}] + end + + def #{name}=(value) +- @__xmlattr[#{qname.dump}] = value ++ @__xmlattr[#{qnamedump}] = value + end + EOS + end +- end + +- if RUBY_VERSION > "1.7.0" +- def define_xmlattr(obj) +- obj.instance_variable_set('@__xmlattr', {}) +- unless obj.respond_to?(:__xmlattr) +- Mapping.define_attr_accessor(obj, :__xmlattr, proc { @__xmlattr }) +- end +- end +- else ++ # Mapping.define_attr_accessor calls define_method with proc and it exhausts ++ # much memory for each singleton Object. just instance_eval instead of it. + def define_xmlattr(obj) + obj.instance_variable_set('@__xmlattr', {}) + unless obj.respond_to?(:__xmlattr) +@@ -400,7 +391,6 @@ private + EOS + end + end +- end + + # it caches @@schema_element. this means that @@schema_element must not be + # changed while a lifetime of a WSDLLiteralRegistry. +--- a/lib/soap/rpc/driver.rb ++++ b/lib/soap/rpc/driver.rb +@@ -222,18 +222,9 @@ private + add_method_interface(name, param_count) + end + +- if RUBY_VERSION > "1.7.0" +- def add_method_interface(name, param_count) +- ::SOAP::Mapping.define_singleton_method(self, name) do |*arg| +- unless arg.size == param_count +- raise ArgumentError.new( +- "wrong number of arguments (#{arg.size} for #{param_count})") +- end +- call(name, *arg) +- end +- self.method(name) +- end +- else ++ # Mapping.define_singleton_method calls define_method with proc and it ++ # exhausts much memory for each singleton Object. just instance_eval instead ++ # of it. + def add_method_interface(name, param_count) + instance_eval <<-EOS + def #{name}(*arg) +@@ -246,7 +237,6 @@ private + EOS + self.method(name) + end +- end + end + + +--- a/lib/xsd/charset.rb ++++ b/lib/xsd/charset.rb +@@ -167,7 +167,7 @@ public + SJISRegexp =~ str + end + +- def Charset.is_ces(str, code = $KCODE) ++ def Charset.is_ces(str, code = @internal_encoding) + case code + when 'NONE' + is_us_ascii(str) diff -Nru ruby1.8-1.8.7.249/debian/patches/808_rexml_document_transitive.dpatch ruby1.8-1.8.7.302/debian/patches/808_rexml_document_transitive.dpatch --- ruby1.8-1.8.7.249/debian/patches/808_rexml_document_transitive.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/808_rexml_document_transitive.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 808_rexml_document_transitive.dpatch by akira yamada -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: REXML::Document#write(io, 1, true, true) raises NameError/ArgumentError - -@DPATCH@ -diff -urNad ruby1.8-1.8.7.22~/lib/rexml/document.rb ruby1.8-1.8.7.22/lib/rexml/document.rb ---- ruby1.8-1.8.7.22~/lib/rexml/document.rb 2008-06-06 17:05:24.000000000 +0900 -+++ ruby1.8-1.8.7.22/lib/rexml/document.rb 2008-09-09 22:06:37.000000000 +0900 -@@ -185,6 +185,7 @@ - end - formatter = if indent > -1 - if trans -+ require "rexml/formatters/transitive" - REXML::Formatters::Transitive.new( indent, ie_hack ) - else - REXML::Formatters::Pretty.new( indent, ie_hack ) -diff -urNad ruby1.8-1.8.7.22~/lib/rexml/element.rb ruby1.8-1.8.7.22/lib/rexml/element.rb ---- ruby1.8-1.8.7.22~/lib/rexml/element.rb 2008-06-06 17:05:24.000000000 +0900 -+++ ruby1.8-1.8.7.22/lib/rexml/element.rb 2008-09-09 22:06:57.000000000 +0900 -@@ -675,6 +675,7 @@ - Kernel.warn("#{self.class.name}.write is deprecated. See REXML::Formatters") - formatter = if indent > -1 - if transitive -+ require "rexml/formatters/transitive" - REXML::Formatters::Transitive.new( indent, ie_hack ) - else - REXML::Formatters::Pretty.new( indent, ie_hack ) -diff -urNad ruby1.8-1.8.7.22~/lib/rexml/formatters/transitive.rb ruby1.8-1.8.7.22/lib/rexml/formatters/transitive.rb ---- ruby1.8-1.8.7.22~/lib/rexml/formatters/transitive.rb 2007-07-30 11:26:17.000000000 +0900 -+++ ruby1.8-1.8.7.22/lib/rexml/formatters/transitive.rb 2008-09-09 22:07:33.000000000 +0900 -@@ -12,9 +12,10 @@ - # formatted. Since this formatter does not alter whitespace nodes, the - # results of formatting already formatted XML will be odd. - class Transitive < Default -- def initialize( indentation=2 ) -+ def initialize( indentation=2, ie_hack=false ) - @indentation = indentation - @level = 0 -+ @ie_hack = ie_hack - end - - protected -@@ -29,6 +30,7 @@ - output << "\n" - output << ' '*@level - if node.children.empty? -+ output << " " if @ie_hack - output << "/" - else - output << ">" diff -Nru ruby1.8-1.8.7.249/debian/patches/808_rexml_document_transitive.patch ruby1.8-1.8.7.302/debian/patches/808_rexml_document_transitive.patch --- ruby1.8-1.8.7.249/debian/patches/808_rexml_document_transitive.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/808_rexml_document_transitive.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,44 @@ +Author: akira yamada +Description: REXML::Document#write(io, 1, true, true) raises NameError/ArgumentError +--- a/lib/rexml/document.rb ++++ b/lib/rexml/document.rb +@@ -186,6 +186,7 @@ module REXML + end + formatter = if indent > -1 + if trans ++ require "rexml/formatters/transitive" + REXML::Formatters::Transitive.new( indent, ie_hack ) + else + REXML::Formatters::Pretty.new( indent, ie_hack ) +--- a/lib/rexml/element.rb ++++ b/lib/rexml/element.rb +@@ -675,6 +675,7 @@ module REXML + Kernel.warn("#{self.class.name}.write is deprecated. See REXML::Formatters") + formatter = if indent > -1 + if transitive ++ require "rexml/formatters/transitive" + REXML::Formatters::Transitive.new( indent, ie_hack ) + else + REXML::Formatters::Pretty.new( indent, ie_hack ) +--- a/lib/rexml/formatters/transitive.rb ++++ b/lib/rexml/formatters/transitive.rb +@@ -12,9 +12,10 @@ module REXML + # formatted. Since this formatter does not alter whitespace nodes, the + # results of formatting already formatted XML will be odd. + class Transitive < Default +- def initialize( indentation=2 ) ++ def initialize( indentation=2, ie_hack=false ) + @indentation = indentation + @level = 0 ++ @ie_hack = ie_hack + end + + protected +@@ -29,6 +30,7 @@ module REXML + output << "\n" + output << ' '*@level + if node.children.empty? ++ output << " " if @ie_hack + output << "/" + else + output << ">" diff -Nru ruby1.8-1.8.7.249/debian/patches/809_update_lib_README.dpatch ruby1.8-1.8.7.302/debian/patches/809_update_lib_README.dpatch --- ruby1.8-1.8.7.249/debian/patches/809_update_lib_README.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/809_update_lib_README.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 809_update_lib_README.dpatch by Lucas Nussbaum -## -## Fixes bug #414727 -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/lib/README trunk/lib/README ---- trunk~/lib/README 2007-08-22 05:30:19.000000000 +0200 -+++ trunk/lib/README 2008-02-01 17:50:42.000000000 +0100 -@@ -33,7 +33,6 @@ - mailread.rb reads mail headers - mathn.rb extended math operation - matrix.rb matrix calculation library --mkmf.rb Makefile maker - monitor.rb exclusive region monitor for thread - mutex_m.rb mutex mixin - net/ftp.rb ftp access diff -Nru ruby1.8-1.8.7.249/debian/patches/809_update_lib_README.patch ruby1.8-1.8.7.302/debian/patches/809_update_lib_README.patch --- ruby1.8-1.8.7.249/debian/patches/809_update_lib_README.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/809_update_lib_README.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,12 @@ +Author: Lucas Nussbaum +Description: No description. +--- a/lib/README ++++ b/lib/README +@@ -33,7 +33,6 @@ logger.rb simple logging utility + mailread.rb reads mail headers + mathn.rb extended math operation + matrix.rb matrix calculation library +-mkmf.rb Makefile maker + monitor.rb exclusive region monitor for thread + mutex_m.rb mutex mixin + net/ftp.rb ftp access diff -Nru ruby1.8-1.8.7.249/debian/patches/901_ri_pager.dpatch ruby1.8-1.8.7.302/debian/patches/901_ri_pager.dpatch --- ruby1.8-1.8.7.249/debian/patches/901_ri_pager.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/901_ri_pager.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 901_ri_pager.dpatch by akira yamada -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Debian specific patch - -@DPATCH@ -diff -urNad ruby1.8-1.8.6~/lib/rdoc/ri/ri_display.rb ruby1.8-1.8.6/lib/rdoc/ri/ri_display.rb ---- ruby1.8-1.8.6~/lib/rdoc/ri/ri_display.rb 2007-02-13 08:01:19.000000000 +0900 -+++ ruby1.8-1.8.6/lib/rdoc/ri/ri_display.rb 2007-03-13 16:31:31.000000000 +0900 -@@ -210,7 +210,7 @@ - - def setup_pager - unless @options.use_stdout -- for pager in [ ENV['PAGER'], "less", "more", 'pager' ].compact.uniq -+ for pager in [ ENV['PAGER'], 'pager', "less", "more" ].compact.uniq - return IO.popen(pager, "w") rescue nil - end - @options.use_stdout = true diff -Nru ruby1.8-1.8.7.249/debian/patches/901_ri_pager.patch ruby1.8-1.8.7.302/debian/patches/901_ri_pager.patch --- ruby1.8-1.8.7.249/debian/patches/901_ri_pager.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/901_ri_pager.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,13 @@ +Author: akira yamada +Description: Debian specific patch +--- a/lib/rdoc/ri/ri_display.rb ++++ b/lib/rdoc/ri/ri_display.rb +@@ -210,7 +210,7 @@ class DefaultDisplay + + def setup_pager + unless @options.use_stdout +- for pager in [ ENV['PAGER'], "less", "more", 'pager' ].compact.uniq ++ for pager in [ ENV['PAGER'], 'pager', "less", "more" ].compact.uniq + return IO.popen(pager, "w") rescue nil + end + @options.use_stdout = true diff -Nru ruby1.8-1.8.7.249/debian/patches/902_extra_search_path.dpatch ruby1.8-1.8.7.302/debian/patches/902_extra_search_path.dpatch --- ruby1.8-1.8.7.249/debian/patches/902_extra_search_path.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/902_extra_search_path.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 902_extra_search_path.dpatch by akira yamada -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Debian specific patch - -@DPATCH@ -diff -urNad ruby1.8-1.8.6~/configure.in ruby1.8-1.8.6/configure.in ---- ruby1.8-1.8.6~/configure.in 2007-02-28 22:23:42.000000000 +0900 -+++ ruby1.8-1.8.6/configure.in 2007-03-13 16:33:00.000000000 +0900 -@@ -1618,6 +1618,19 @@ - AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path") - fi - -+AC_ARG_WITH(extra-site-search-path, -+ [ --with-extra-site-search-path=DIR specify the extra site search path], -+ [extra_site_search_path=$withval]) -+if test "$extra_site_search_path" != ""; then -+ AC_DEFINE_UNQUOTED(RUBY_EXTRA_SITE_SEARCH_PATH,"$extra_site_search_path") -+fi -+AC_ARG_WITH(extra-search-path, -+ [ --with--site-search-path=DIR specify the extra search path], -+ [extra_search_path=$withval]) -+if test "$extra_search_path" != ""; then -+ AC_DEFINE_UNQUOTED(RUBY_EXTRA_SEARCH_PATH,"$extra_search_path") -+fi -+ - AC_ARG_WITH(mantype, - [ --with-mantype=TYPE specify man page type; TYPE is one of man and doc], - [ -diff -urNad ruby1.8-1.8.6~/ruby.c ruby1.8-1.8.6/ruby.c ---- ruby1.8-1.8.6.111~/ruby.c 2007-02-13 08:01:19.000000000 +0900 -+++ ruby1.8-1.8.6.111/ruby.c 2007-03-13 16:33:11.000000000 +0900 -@@ -320,6 +320,9 @@ - incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB)); - #endif - incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); -+#ifdef RUBY_EXTRA_SITE_SEARCH_PATH -+ ruby_incpush(RUBY_RELATIVE(RUBY_EXTRA_SITE_SEARCH_PATH)); -+#endif - incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); - - incpush(RUBY_RELATIVE(RUBY_LIB)); -@@ -327,6 +330,9 @@ - incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB)); - #endif - incpush(RUBY_RELATIVE(RUBY_ARCHLIB)); -+#ifdef RUBY_EXTRA_SEARCH_PATH -+ ruby_incpush(RUBY_RELATIVE(RUBY_EXTRA_SEARCH_PATH)); -+#endif - - if (rb_safe_level() == 0) { - incpush("."); diff -Nru ruby1.8-1.8.7.249/debian/patches/902_extra_search_path.patch ruby1.8-1.8.7.302/debian/patches/902_extra_search_path.patch --- ruby1.8-1.8.7.249/debian/patches/902_extra_search_path.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/902_extra_search_path.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,46 @@ +Author: akira yamada +Description: Debian specific patch +--- a/configure.in ++++ b/configure.in +@@ -1852,6 +1852,19 @@ if test "$search_path" != ""; then + AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path") + fi + ++AC_ARG_WITH(extra-site-search-path, ++ [ --with-extra-site-search-path=DIR specify the extra site search path], ++ [extra_site_search_path=$withval]) ++if test "$extra_site_search_path" != ""; then ++ AC_DEFINE_UNQUOTED(RUBY_EXTRA_SITE_SEARCH_PATH,"$extra_site_search_path") ++fi ++AC_ARG_WITH(extra-search-path, ++ [ --with--site-search-path=DIR specify the extra search path], ++ [extra_search_path=$withval]) ++if test "$extra_search_path" != ""; then ++ AC_DEFINE_UNQUOTED(RUBY_EXTRA_SEARCH_PATH,"$extra_search_path") ++fi ++ + AC_ARG_WITH(mantype, + [ --with-mantype=TYPE specify man page type; TYPE is one of man and doc], + [ +--- a/ruby.c ++++ b/ruby.c +@@ -320,6 +320,9 @@ ruby_init_loadpath() + incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB)); + #endif + incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); ++#ifdef RUBY_EXTRA_SITE_SEARCH_PATH ++ ruby_incpush(RUBY_RELATIVE(RUBY_EXTRA_SITE_SEARCH_PATH)); ++#endif + incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); + + incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2)); +@@ -334,6 +337,9 @@ ruby_init_loadpath() + incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB)); + #endif + incpush(RUBY_RELATIVE(RUBY_ARCHLIB)); ++#ifdef RUBY_EXTRA_SEARCH_PATH ++ ruby_incpush(RUBY_RELATIVE(RUBY_EXTRA_SEARCH_PATH)); ++#endif + + if (rb_safe_level() == 0) { + incpush("."); diff -Nru ruby1.8-1.8.7.249/debian/patches/903_rdoc_documents.dpatch ruby1.8-1.8.7.302/debian/patches/903_rdoc_documents.dpatch --- ruby1.8-1.8.7.249/debian/patches/903_rdoc_documents.dpatch 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/903_rdoc_documents.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 903_rdoc_documents.dpatch by akira yamada -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Some files in the ruby source provide RDoc comments, but are not -## DP: included in a default rdoc run. This patch allows to generate the doc -## DP: for those files as well. -## DP: Debian specific patch - -@DPATCH@ -diff -urNad ruby1.8-1.8.6~/ext/.document ruby1.8-1.8.6/ext/.document ---- ruby1.8-1.8.6~/ext/.document 2007-02-13 08:01:19.000000000 +0900 -+++ ruby1.8-1.8.6/ext/.document 2007-03-13 16:39:20.000000000 +0900 -@@ -1,6 +1,8 @@ - # Add files to this as they become documented - -+bigdecimal/bigdecimal.c - enumerator/enumerator.c -+gdbm/gdbm.c - iconv/iconv.c - nkf/lib/kconv.rb - nkf/nkf.c -diff -urNad ruby1.8-1.8.6~/lib/cgi/.document ruby1.8-1.8.6/lib/cgi/.document ---- ruby1.8-1.8.6~/lib/cgi/.document 2007-02-13 08:01:19.000000000 +0900 -+++ ruby1.8-1.8.6/lib/cgi/.document 2007-03-13 16:40:00.000000000 +0900 -@@ -1,2 +1,2 @@ -+session - session.rb -- diff -Nru ruby1.8-1.8.7.249/debian/patches/903_rdoc_documents.patch ruby1.8-1.8.7.302/debian/patches/903_rdoc_documents.patch --- ruby1.8-1.8.7.249/debian/patches/903_rdoc_documents.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/903_rdoc_documents.patch 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,22 @@ +Author: akira yamada +Description: Some files in the ruby source provide RDoc comments, but are not +included in a default rdoc run. This patch allows to generate the doc +for those files as well. +Debian specific patch +--- a/ext/.document ++++ b/ext/.document +@@ -1,6 +1,8 @@ + # Add files to this as they become documented + ++bigdecimal/bigdecimal.c + enumerator/enumerator.c ++gdbm/gdbm.c + iconv/iconv.c + nkf/lib/kconv.rb + nkf/nkf.c +--- a/lib/cgi/.document ++++ b/lib/cgi/.document +@@ -1,2 +1,2 @@ ++session + session.rb +- diff -Nru ruby1.8-1.8.7.249/debian/patches/series ruby1.8-1.8.7.302/debian/patches/series --- ruby1.8-1.8.7.249/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/patches/series 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,12 @@ +102_configure.in-crosscompile.patch +803_soap_massmem.patch +808_rexml_document_transitive.patch +809_update_lib_README.patch +901_ri_pager.patch +902_extra_search_path.patch +903_rdoc_documents.patch +090613_exclude_rdoc.patch +090812_openssl_x509_warning.patch +100730_disable_getsetcontext_on_nptl.patch +100730_verbose-tests.patch +100901_threading_fixes.patch diff -Nru ruby1.8-1.8.7.249/debian/rdoc1.8.1 ruby1.8-1.8.7.302/debian/rdoc1.8.1 --- ruby1.8-1.8.7.249/debian/rdoc1.8.1 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/rdoc1.8.1 2011-04-20 10:36:44.000000000 +0000 @@ -205,6 +205,6 @@ .B \-\-webcvs, \-W url specify a URL for linking to a web frontend to CVS. If the URL contains a -'%s', the name of the current file will be substituted; if the URL doesn't +\'%s', the name of the current file will be substituted; if the URL doesn't contain a '%s', the filename will be appended to it. diff -Nru ruby1.8-1.8.7.249/debian/README.source ruby1.8-1.8.7.302/debian/README.source --- ruby1.8-1.8.7.249/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/README.source 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,2 @@ +This package uses dpatch. See /usr/share/doc/dpatch/README.source.gz +It also uses cdbs. diff -Nru ruby1.8-1.8.7.249/debian/ri1.8.1 ruby1.8-1.8.7.302/debian/ri1.8.1 --- ruby1.8-1.8.7.249/debian/ri1.8.1 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/ri1.8.1 2011-04-20 10:36:44.000000000 +0000 @@ -49,7 +49,7 @@ .B \-\-format, \-f name Format to use when displaying output: ansi, bs, html, plain, simple. Use -'bs' (backspace) with most pager programs. To use ANSI, either also use +\'bs' (backspace) with most pager programs. To use ANSI, either also use the \-T option, or tell your pager to allow control characters. (for example using the \-R option to less.) .TP diff -Nru ruby1.8-1.8.7.249/debian/ruby1.8.menu ruby1.8-1.8.7.302/debian/ruby1.8.menu --- ruby1.8-1.8.7.249/debian/ruby1.8.menu 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/ruby1.8.menu 2011-04-20 10:36:44.000000000 +0000 @@ -0,0 +1,2 @@ +?package(ruby1.8):needs="text" section="Applications/Programming"\ + title="Ruby (irb1.8)" command="/usr/bin/irb1.8" diff -Nru ruby1.8-1.8.7.249/debian/rules ruby1.8-1.8.7.302/debian/rules --- ruby1.8-1.8.7.249/debian/rules 2011-04-20 10:36:43.000000000 +0000 +++ ruby1.8-1.8.7.302/debian/rules 2011-04-20 10:36:44.000000000 +0000 @@ -17,24 +17,26 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/makefile.mk include /usr/share/cdbs/1/class/autotools.mk -include /usr/share/cdbs/1/rules/dpatch.mk -include /usr/share/dpatch/dpatch.make +include /usr/share/cdbs/1/rules/patchsys-quilt.mk DEB_AUTO_UPDATE_AUTOCONF = YES -CFLAGS := -fno-strict-aliasing -g -CXXFLAGS := -fno-strict-aliasing -g +CFLAGS := -fno-strict-aliasing +CXXFLAGS := -fno-strict-aliasing ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -O0 + CFLAGS += -O3 -DNDEBUG else - CFLAGS += -g -O2 + CFLAGS += -O3 -DNDEBUG endif -ifeq ($(DEB_BUILD_GNU_CPU),i386) +ifneq (,$(filter $(DEB_BUILD_GNU_CPU),i386 i486 i586 i686)) DEB_CONFIGURE_USER_FLAGS += --enable-frame-address endif -ifneq (,$(filter $(DEB_BUILD_GNU_CPU),i486 i586 i686)) - DEB_CONFIGURE_USER_FLAGS += --enable-frame-address +ifeq ($(DEB_BUILD_GNU_CPU),i686) + DEB_CONFIGURE_USER_FLAGS += --with-extra-site-search-path='/usr/local/lib/site_ruby/$(ruby_ver)/i486-linux' + DEB_CONFIGURE_USER_FLAGS += --with-extra-search-path='/usr/lib/ruby/$(ruby_ver)/i486-linux' +endif +ifeq ($(DEB_BUILD_GNU_CPU),i486) DEB_CONFIGURE_USER_FLAGS += --with-extra-site-search-path='/usr/local/lib/site_ruby/$(ruby_ver)/i386-linux' DEB_CONFIGURE_USER_FLAGS += --with-extra-search-path='/usr/lib/ruby/$(ruby_ver)/i386-linux' endif @@ -56,7 +58,11 @@ DEB_CONFIGURE_USER_FLAGS += --with-bundled-rmd160 DEB_MAKE_BUILD_TARGET = all test -#DEB_MAKE_BUILD_TARGET = all test test-all + +common-post-build-arch:: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + -make test-all +endif DEB_INSTALL_DIRS_ruby$(ruby_ver)-elisp += $(el_dir) DEB_INSTALL_DIRS_ruby$(ruby_ver)-elisp += $(el_etc) @@ -66,22 +72,6 @@ DEB_INSTALL_DIRS_ri$(ruby_ver) += $(man_dir) DEB_INSTALL_MANPAGES_ri$(ruby_ver) += debian/ri$(ruby_ver).1 -DEB_INSTALL_DIRS_rdoc$(ruby_ver) += $(bin_dir) -DEB_INSTALL_DIRS_rdoc$(ruby_ver) += $(man_dir) -DEB_INSTALL_DIRS_rdoc$(ruby_ver) += $(ruby_libdir) -DEB_INSTALL_DOCS_rdoc$(ruby_ver) += $(DEB_SRCDIR)/lib/rdoc/README -DEB_INSTALL_MANPAGES_rdoc$(ruby_ver) += debian/rdoc$(ruby_ver).1 - -DEB_INSTALL_DIRS_irb$(ruby_ver) += $(bin_dir) -DEB_INSTALL_DIRS_irb$(ruby_ver) += $(man_dir) -DEB_INSTALL_DIRS_irb$(ruby_ver) += $(ruby_libdir) -DEB_INSTALL_DOCS_irb$(ruby_ver) += $(DEB_SRCDIR)/doc/irb/* -DEB_INSTALL_MANPAGES_irb$(ruby_ver) += debian/irb$(ruby_ver).1 - -DEB_INSTALL_DOCS_libgdbm-ruby$(ruby_ver) += $(DEB_SRCDIR)/ext/gdbm/README* - -DEB_INSTALL_DOCS_libreadline-ruby$(ruby_ver) += $(DEB_SRCDIR)/ext/readline/README* - DEB_INSTALL_DOCS_libtcltk-ruby$(ruby_ver) += $(DEB_SRCDIR)/ext/tk/README* DEB_INSTALL_DOCS_libtcltk-ruby$(ruby_ver) += $(DEB_SRCDIR)/ext/tk/MANUAL* @@ -96,6 +86,8 @@ DEB_INSTALL_DOCS_ruby$(ruby_ver) += $(DEB_SRCDIR)/doc/NEWS-1.8.0 DEB_INSTALL_MANPAGES_ruby$(ruby_ver) += debian/testrb$(ruby_ver).1 DEB_INSTALL_MANPAGES_ruby$(ruby_ver) += debian/erb$(ruby_ver).1 +DEB_INSTALL_MANPAGES_ruby$(ruby_ver) += debian/rdoc$(ruby_ver).1 +DEB_INSTALL_MANPAGES_ruby$(ruby_ver) += debian/irb$(ruby_ver).1 DEB_INSTALL_DOCS_libruby$(ruby_ver) += $(DEB_SRCDIR)/lib/README DEB_INSTALL_DOCS_libruby$(ruby_ver) += $(DEB_SRCDIR)/NEWS @@ -109,27 +101,6 @@ DEB_SHLIBDEPS_INCLUDE = $(CURDIR)/debian/libruby$(ruby_ver)/usr/lib DEB_DH_MAKESHLIBS_ARGS_ALL = -m$(ruby_ver) -V -binary-install/libdbm-ruby$(ruby_ver) \ -binary-install/libgdbm-ruby$(ruby_ver) \ -binary-install/libreadline-ruby$(ruby_ver) \ -binary-install/libopenssl-ruby$(ruby_ver):: - dh_movefiles -p$(cdbs_curpkg) \ - $(ruby_archdir)/$(patsubst lib%-ruby$(ruby_ver),%,$(cdbs_curpkg)).so - sh $(CURDIR)/debian/extfixup_rubylibs.sh $(cdbs_curpkg) \ - $(DEB_SRCDIR)/ext/$(patsubst lib%-ruby$(ruby_ver),%,$(cdbs_curpkg)) - sh $(CURDIR)/debian/extfixup_examples.sh $(cdbs_curpkg) \ - $(DEB_SRCDIR)/ext/$(patsubst lib%-ruby$(ruby_ver),%,$(cdbs_curpkg)) -binary-install/libopenssl-ruby$(ruby_ver):: - dh_movefiles -p$(cdbs_curpkg) \ - usr/lib/ruby/$(ruby_ver)/drb/ssl.rb \ - usr/lib/ruby/$(ruby_ver)/net/https.rb \ - usr/lib/ruby/$(ruby_ver)/webrick/ssl.rb - install -d \ - $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/examples - (cd $(DEB_SRCDIR)/sample/openssl && \ - tar cf - .) | \ - (cd $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/examples && tar xf -) - binary-install/libtcltk-ruby$(ruby_ver):: dh_movefiles -p$(cdbs_curpkg) \ $(ruby_archdir)/tcltklib.so \ @@ -171,7 +142,7 @@ cd $(DEB_SRCDIR)/ext && \ for dir in \ bigdecimal curses digest dl enumerator etc \ - fcntl iconv io nkf pty racc sdbm socket \ + fcntl iconv io nkf pty racc readline openssl sdbm socket \ stringio strscan syck syslog thread zlib \ ; \ do \ @@ -203,6 +174,8 @@ usr/bin/ruby$(ruby_ver) \ usr/bin/erb$(ruby_ver) \ usr/bin/testrb$(ruby_ver) \ + usr/bin/rdoc$(ruby_ver) \ + usr/bin/irb$(ruby_ver) \ usr/share/man/man1/ruby$(ruby_ver).1 binary-post-install/ruby$(ruby_ver)-elisp:: @@ -216,21 +189,6 @@ install -m444 $(CURDIR)/debian/$(cdbs_curpkg).1 \ $(CURDIR)/debian/$(cdbs_curpkg)/$(man_dir)/$(cdbs_curpkg).1 -binary-install/rdoc$(ruby_ver):: - dh_movefiles -p$(cdbs_curpkg) \ - $(bin_dir)/$(cdbs_curpkg) \ - $(ruby_libdir)/rdoc -binary-post-install/rdoc$(ruby_ver):: - install -m444 $(CURDIR)/debian/$(cdbs_curpkg).1 \ - $(CURDIR)/debian/$(cdbs_curpkg)/$(man_dir)/$(cdbs_curpkg).1 - -binary-install/irb$(ruby_ver):: - dh_movefiles -p$(cdbs_curpkg) $(bin_dir)/$(cdbs_curpkg) \ - $(ruby_libdir)/irb.rb $(ruby_libdir)/irb -binary-post-install/irb$(ruby_ver):: - install -m444 $(CURDIR)/debian/$(cdbs_curpkg).1 \ - $(CURDIR)/debian/$(cdbs_curpkg)/$(man_dir)/$(cdbs_curpkg).1 - binary-post-install/ruby$(ruby_ver)-examples:: install -d $(examples_dir)/bigdecimal cp -a $(DEB_SRCDIR)/ext/bigdecimal/sample/* $(examples_dir)/bigdecimal @@ -261,7 +219,6 @@ (cd $(DEB_SRCDIR)/sample && tar cf - .) | \ (cd $(examples_dir) && tar xf -) - cd $(examples_dir) && rm -rf openssl $(patsubst %,binary-post-install/%,$(DEB_PACKAGES)):: bash $(CURDIR)/debian/fixshebang.sh ruby$(ruby_ver) \ diff -Nru ruby1.8-1.8.7.249/eval.c ruby1.8-1.8.7.302/eval.c --- ruby1.8-1.8.7.249/eval.c 2009-12-21 08:11:42.000000000 +0000 +++ ruby1.8-1.8.7.302/eval.c 2010-06-10 04:38:43.000000000 +0000 @@ -3,7 +3,7 @@ eval.c - $Author: shyouhei $ - $Date: 2009-12-21 17:11:42 +0900 (Mon, 21 Dec 2009) $ + $Date: 2010-06-10 13:38:43 +0900 (Thu, 10 Jun 2010) $ created at: Thu Jun 10 14:22:17 JST 1993 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -7035,6 +7035,7 @@ PUSH_ITER(ITER_NOT); PUSH_FRAME(); ruby_frame->last_func = 0; + ruby_frame->orig_func = 0; ruby_frame->last_class = 0; ruby_frame->self = self; PUSH_SCOPE(); @@ -7328,9 +7329,13 @@ const char *ext, *ftptr; int type; + if (*(ftptr = RSTRING_PTR(fname)) == '~') { + fname = rb_file_expand_path(fname, Qnil); + ftptr = RSTRING_PTR(fname); + } *featurep = fname; *path = 0; - ext = strrchr(ftptr = RSTRING_PTR(fname), '.'); + ext = strrchr(ftptr, '.'); if (ext && !strchr(ext, '/')) { if (strcmp(".rb", ext) == 0) { if (rb_feature_p(ftptr, ext, Qtrue)) { @@ -8868,8 +8873,7 @@ _block = *data; _block.block_obj = bvar; if (self != Qundef) _block.frame.self = self; - _block.frame.last_class = klass; - if (!klass) _block.frame.last_func = 0; + if (klass) _block.frame.last_class = klass; _block.frame.argc = RARRAY(tmp)->len; _block.frame.flags = ruby_frame->flags; if (_block.frame.argc && DMETHOD_P()) { @@ -9967,7 +9971,7 @@ VALUE mod; { ID id; - VALUE body; + VALUE body, orig; NODE *node; int noex; @@ -9986,6 +9990,7 @@ else { rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc); } + orig = body; if (RDATA(body)->dmark == (RUBY_DATA_FUNC)bm_mark) { node = NEW_DMETHOD(method_unbind(body)); } @@ -10014,7 +10019,7 @@ } } rb_add_method(mod, id, node, noex); - return body; + return orig; } /* @@ -12292,6 +12297,8 @@ pthread_t thread; } time_thread = {PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER}; +static int timer_stopping; + #define safe_mutex_lock(lock) \ pthread_mutex_lock(lock); \ pthread_cleanup_push((void (*)_((void *)))pthread_mutex_unlock, lock) @@ -12316,6 +12323,9 @@ #define WAIT_FOR_10MS() \ pthread_cond_timedwait(&running->cond, &running->lock, get_ts(&to, PER_NANO/100)) while ((err = WAIT_FOR_10MS()) == EINTR || err == ETIMEDOUT) { + if (timer_stopping) + break; + if (!rb_thread_critical) { rb_thread_pending = 1; if (rb_trap_immediate) { @@ -12343,7 +12353,6 @@ safe_mutex_lock(&time_thread.lock); if (pthread_create(&time_thread.thread, 0, thread_timer, args) == 0) { thread_init = 1; - pthread_atfork(0, 0, rb_thread_stop_timer); pthread_cond_wait(&start, &time_thread.lock); } pthread_cleanup_pop(1); @@ -12354,10 +12363,12 @@ { if (!thread_init) return; safe_mutex_lock(&time_thread.lock); + timer_stopping = 1; pthread_cond_signal(&time_thread.cond); thread_init = 0; pthread_cleanup_pop(1); pthread_join(time_thread.thread, NULL); + timer_stopping = 0; } #elif defined(HAVE_SETITIMER) static void @@ -13566,6 +13577,7 @@ sym = ID2SYM(rb_frame_last_func()); if (NIL_P(hash) || TYPE(hash) != T_HASH) { hash = rb_hash_new(); + OBJ_TAINT(hash); rb_thread_local_aset(rb_thread_current(), recursive_key, hash); list = Qnil; } @@ -13574,6 +13586,7 @@ } if (NIL_P(list) || TYPE(list) != T_HASH) { list = rb_hash_new(); + OBJ_TAINT(list); rb_hash_aset(hash, sym, list); } rb_hash_aset(list, obj, Qtrue); diff -Nru ruby1.8-1.8.7.249/ext/bigdecimal/bigdecimal.c ruby1.8-1.8.7.302/ext/bigdecimal/bigdecimal.c --- ruby1.8-1.8.7.249/ext/bigdecimal/bigdecimal.c 2009-12-14 04:01:05.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/bigdecimal/bigdecimal.c 2010-06-08 07:49:18.000000000 +0000 @@ -2506,7 +2506,7 @@ int sign=1; Real *vp = NULL; U_LONG mf = VpGetPrecLimit(); - volatile VALUE buf; + VALUE buf; mx = (mx + BASE_FIG - 1) / BASE_FIG + 1; /* Determine allocation unit. */ if(szVal) { @@ -2534,7 +2534,7 @@ /* Skip all '_' after digit: 2006-6-30 */ ni = 0; - buf = rb_str_new(0,strlen(szVal)+1); + buf = rb_str_tmp_new(strlen(szVal)+1); psz = RSTRING_PTR(buf); i = 0; ipn = 0; @@ -2633,6 +2633,7 @@ vp->MaxPrec = mx; /* set max precision */ VpSetZero(vp,sign); VpCtoV(vp, &(szVal[ipn]), ni, &(szVal[ipf]), nf, &(szVal[ipe]), ne); + rb_str_resize(buf, 0); return vp; } diff -Nru ruby1.8-1.8.7.249/ext/iconv/iconv.c ruby1.8-1.8.7.302/ext/iconv/iconv.c --- ruby1.8-1.8.7.249/ext/iconv/iconv.c 2009-11-24 07:18:40.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/iconv/iconv.c 2010-06-08 08:45:59.000000000 +0000 @@ -4,7 +4,7 @@ iconv.c - $Author: shyouhei $ - $Date: 2009-11-24 16:18:40 +0900 (Tue, 24 Nov 2009) $ + $Date: 2010-06-08 17:45:59 +0900 (Tue, 08 Jun 2010) $ created at: Wed Dec 1 20:28:09 JST 1999 All the files in this distribution are covered under the Ruby's @@ -146,6 +146,18 @@ return StringValuePtr(*code); } +NORETURN(static void rb_iconv_sys_fail(const char *s)); +static void +rb_iconv_sys_fail(const char *s) +{ + if (errno == 0) { + rb_exc_raise(iconv_fail(rb_eIconvBrokenLibrary, Qnil, Qnil, NULL, s)); + } + rb_sys_fail(s); +} + +#define rb_sys_fail(s) rb_iconv_sys_fail(s) + static iconv_t iconv_create #ifdef HAVE_PROTOTYPES diff -Nru ruby1.8-1.8.7.249/ext/nkf/nkf-utf8/nkf.c ruby1.8-1.8.7.302/ext/nkf/nkf-utf8/nkf.c --- ruby1.8-1.8.7.249/ext/nkf/nkf-utf8/nkf.c 2009-02-05 00:39:09.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/nkf/nkf-utf8/nkf.c 2010-06-07 10:45:46.000000000 +0000 @@ -39,7 +39,7 @@ ** E-Mail: furukawa@tcp-ip.or.jp ** $B$^$G8fO"Mm$r$*4j$$$7$^$9!#(B ***********************************************************************/ -/* $Id: nkf.c 22067 2009-02-05 00:39:09Z shyouhei $ */ +/* $Id: nkf.c 28195 2010-06-07 10:45:46Z shyouhei $ */ #define NKF_VERSION "2.0.8" #define NKF_RELEASE_DATE "2008-11-08" #include "config.h" @@ -5004,7 +5004,7 @@ nkf_char (*g)(FILE *) = i_ngetc; nkf_char (*u)(nkf_char c ,FILE *f) = i_nungetc; int i = 0, j; - nkf_char buf[8]; + nkf_char buf[10]; long c = -1; buf[i] = (*g)(f); diff -Nru ruby1.8-1.8.7.249/ext/openssl/extconf.rb ruby1.8-1.8.7.302/ext/openssl/extconf.rb --- ruby1.8-1.8.7.249/ext/openssl/extconf.rb 2007-06-18 09:03:15.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/extconf.rb 2010-06-21 09:18:59.000000000 +0000 @@ -11,7 +11,7 @@ (See the file 'LICENCE'.) = Version - $Id: extconf.rb 12572 2007-06-18 09:03:15Z technorama $ + $Id: extconf.rb 28367 2010-06-21 09:18:59Z shyouhei $ =end require "mkmf" @@ -91,12 +91,13 @@ have_func("X509_CRL_set_issuer_name") have_func("X509_CRL_set_version") have_func("X509_CRL_sort") +have_func("X509_NAME_hash_old") have_func("X509_STORE_get_ex_data") have_func("X509_STORE_set_ex_data") have_func("OBJ_NAME_do_all_sorted") have_func("SSL_SESSION_get_id") have_func("OPENSSL_cleanse") -if try_compile("#define FOO(a, ...) foo(a, ##__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n") +if try_compile("#define FOO(...) foo(__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n") $defs.push("-DHAVE_VA_ARGS_MACRO") end if have_header("openssl/engine.h") @@ -106,6 +107,14 @@ have_func("ENGINE_get_digest") have_func("ENGINE_get_cipher") have_func("ENGINE_cleanup") + have_func("ENGINE_load_4758cca") + have_func("ENGINE_load_aep") + have_func("ENGINE_load_atalla") + have_func("ENGINE_load_chil") + have_func("ENGINE_load_cswift") + have_func("ENGINE_load_nuron") + have_func("ENGINE_load_sureware") + have_func("ENGINE_load_ubsec") end if try_compile(< diff -Nru ruby1.8-1.8.7.249/ext/openssl/lib/openssl/buffering.rb ruby1.8-1.8.7.302/ext/openssl/lib/openssl/buffering.rb --- ruby1.8-1.8.7.249/ext/openssl/lib/openssl/buffering.rb 2007-10-15 08:29:08.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/lib/openssl/buffering.rb 2010-05-24 23:58:49.000000000 +0000 @@ -11,9 +11,10 @@ (See the file 'LICENCE'.) = Version - $Id: buffering.rb 13706 2007-10-15 08:29:08Z usa $ + $Id: buffering.rb 28004 2010-05-24 23:58:49Z shyouhei $ =end +module OpenSSL module Buffering include Enumerable attr_accessor :sync @@ -237,3 +238,4 @@ sysclose end end +end diff -Nru ruby1.8-1.8.7.249/ext/openssl/lib/openssl/digest.rb ruby1.8-1.8.7.302/ext/openssl/lib/openssl/digest.rb --- ruby1.8-1.8.7.249/ext/openssl/lib/openssl/digest.rb 2008-02-25 08:48:57.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/lib/openssl/digest.rb 2010-05-24 23:58:49.000000000 +0000 @@ -11,7 +11,7 @@ (See the file 'LICENCE'.) = Version - $Id: digest.rb 15600 2008-02-25 08:48:57Z technorama $ + $Id: digest.rb 28004 2010-05-24 23:58:49Z shyouhei $ =end ## @@ -40,7 +40,7 @@ super(name, data.first) } } - singleton = (class < + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id$ +=end + +require "openssl/buffering" +require "fcntl" + +module OpenSSL + module SSL + class SSLContext + DEFAULT_PARAMS = { + :ssl_version => "SSLv23", + :verify_mode => OpenSSL::SSL::VERIFY_PEER, + :ciphers => "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW", + :options => OpenSSL::SSL::OP_ALL, + } + + DEFAULT_CERT_STORE = OpenSSL::X509::Store.new + DEFAULT_CERT_STORE.set_default_paths + if defined?(OpenSSL::X509::V_FLAG_CRL_CHECK_ALL) + DEFAULT_CERT_STORE.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL + end + + def set_params(params={}) + params = DEFAULT_PARAMS.merge(params) + # ssl_version need to be set at first. + self.ssl_version = params.delete(:ssl_version) + params.each{|name, value| self.__send__("#{name}=", value) } + if self.verify_mode != OpenSSL::SSL::VERIFY_NONE + unless self.ca_file or self.ca_path or self.cert_store + self.cert_store = DEFAULT_CERT_STORE + end + end + return params + end + end + + module SocketForwarder + def addr + to_io.addr + end + + def peeraddr + to_io.peeraddr + end + + def setsockopt(level, optname, optval) + to_io.setsockopt(level, optname, optval) + end + + def getsockopt(level, optname) + to_io.getsockopt(level, optname) + end + + def fcntl(*args) + to_io.fcntl(*args) + end + + def closed? + to_io.closed? + end + + def do_not_reverse_lookup=(flag) + to_io.do_not_reverse_lookup = flag + end + end + + module Nonblock + def initialize(*args) + flag = File::NONBLOCK + flag |= @io.fcntl(Fcntl::F_GETFL) if defined?(Fcntl::F_GETFL) + @io.fcntl(Fcntl::F_SETFL, flag) + super + end + end + + def verify_certificate_identity(cert, hostname) + should_verify_common_name = true + cert.extensions.each{|ext| + next if ext.oid != "subjectAltName" + ext.value.split(/,\s+/).each{|general_name| + if /\ADNS:(.*)/ =~ general_name + should_verify_common_name = false + reg = Regexp.escape($1).gsub(/\\\*/, "[^.]+") + return true if /\A#{reg}\z/i =~ hostname + elsif /\AIP Address:(.*)/ =~ general_name + should_verify_common_name = false + return true if $1 == hostname + end + } + } + if should_verify_common_name + cert.subject.to_a.each{|oid, value| + if oid == "CN" + reg = Regexp.escape(value).gsub(/\\\*/, "[^.]+") + return true if /\A#{reg}\z/i =~ hostname + end + } + end + return false + end + module_function :verify_certificate_identity + + class SSLSocket + include Buffering + include SocketForwarder + include Nonblock + + def post_connection_check(hostname) + unless OpenSSL::SSL.verify_certificate_identity(peer_cert, hostname) + raise SSLError, "hostname was not match with the server certificate" + end + return true + end + + def session + SSL::Session.new(self) + rescue SSL::Session::SessionError + nil + end + end + + class SSLServer + include SocketForwarder + attr_accessor :start_immediately + + def initialize(svr, ctx) + @svr = svr + @ctx = ctx + unless ctx.session_id_context + session_id = OpenSSL::Digest::MD5.hexdigest($0) + @ctx.session_id_context = session_id + end + @start_immediately = true + end + + def to_io + @svr + end + + def listen(backlog=5) + @svr.listen(backlog) + end + + def shutdown(how=Socket::SHUT_RDWR) + @svr.shutdown(how) + end + + def accept + sock = @svr.accept + begin + ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx) + ssl.sync_close = true + ssl.accept if @start_immediately + ssl + rescue SSLError => ex + sock.close + raise ex + end + end + + def close + @svr.close + end + end + end +end diff -Nru ruby1.8-1.8.7.249/ext/openssl/lib/openssl/ssl.rb ruby1.8-1.8.7.302/ext/openssl/lib/openssl/ssl.rb --- ruby1.8-1.8.7.249/ext/openssl/lib/openssl/ssl.rb 2008-04-25 06:51:21.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/lib/openssl/ssl.rb 2010-05-24 23:58:49.000000000 +0000 @@ -1,179 +1 @@ -=begin -= $RCSfile$ -- Ruby-space definitions that completes C-space funcs for SSL - -= Info - 'OpenSSL for Ruby 2' project - Copyright (C) 2001 GOTOU YUUZOU - All rights reserved. - -= Licence - This program is licenced under the same licence as Ruby. - (See the file 'LICENCE'.) - -= Version - $Id: ssl.rb 16193 2008-04-25 06:51:21Z knu $ -=end - -require "openssl" -require "openssl/buffering" -require "fcntl" - -module OpenSSL - module SSL - class SSLContext - DEFAULT_PARAMS = { - :ssl_version => "SSLv23", - :verify_mode => OpenSSL::SSL::VERIFY_PEER, - :ciphers => "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW", - :options => OpenSSL::SSL::OP_ALL, - } - - DEFAULT_CERT_STORE = OpenSSL::X509::Store.new - DEFAULT_CERT_STORE.set_default_paths - if defined?(OpenSSL::X509::V_FLAG_CRL_CHECK_ALL) - DEFAULT_CERT_STORE.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL - end - - def set_params(params={}) - params = DEFAULT_PARAMS.merge(params) - self.ssl_version = params.delete(:ssl_version) - params.each{|name, value| self.__send__("#{name}=", value) } - if self.verify_mode != OpenSSL::SSL::VERIFY_NONE - unless self.ca_file or self.ca_path or self.cert_store - self.cert_store = DEFAULT_CERT_STORE - end - end - return params - end - end - - module SocketForwarder - def addr - to_io.addr - end - - def peeraddr - to_io.peeraddr - end - - def setsockopt(level, optname, optval) - to_io.setsockopt(level, optname, optval) - end - - def getsockopt(level, optname) - to_io.getsockopt(level, optname) - end - - def fcntl(*args) - to_io.fcntl(*args) - end - - def closed? - to_io.closed? - end - - def do_not_reverse_lookup=(flag) - to_io.do_not_reverse_lookup = flag - end - end - - module Nonblock - def initialize(*args) - flag = File::NONBLOCK - flag |= @io.fcntl(Fcntl::F_GETFL) if defined?(Fcntl::F_GETFL) - @io.fcntl(Fcntl::F_SETFL, flag) - super - end - end - - def verify_certificate_identity(cert, hostname) - should_verify_common_name = true - cert.extensions.each{|ext| - next if ext.oid != "subjectAltName" - ext.value.split(/,\s+/).each{|general_name| - if /\ADNS:(.*)/ =~ general_name - should_verify_common_name = false - reg = Regexp.escape($1).gsub(/\\\*/, "[^.]+") - return true if /\A#{reg}\z/i =~ hostname - elsif /\AIP Address:(.*)/ =~ general_name - should_verify_common_name = false - return true if $1 == hostname - end - } - } - if should_verify_common_name - cert.subject.to_a.each{|oid, value| - if oid == "CN" - reg = Regexp.escape(value).gsub(/\\\*/, "[^.]+") - return true if /\A#{reg}\z/i =~ hostname - end - } - end - return false - end - module_function :verify_certificate_identity - - class SSLSocket - include Buffering - include SocketForwarder - include Nonblock - - def post_connection_check(hostname) - unless OpenSSL::SSL.verify_certificate_identity(peer_cert, hostname) - raise SSLError, "hostname was not match with the server certificate" - end - return true - end - - def session - SSL::Session.new(self) - rescue SSL::Session::SessionError - nil - end - end - - class SSLServer - include SocketForwarder - attr_accessor :start_immediately - - def initialize(svr, ctx) - @svr = svr - @ctx = ctx - unless ctx.session_id_context - session_id = OpenSSL::Digest::MD5.hexdigest($0) - @ctx.session_id_context = session_id - end - @start_immediately = true - end - - def to_io - @svr - end - - def listen(backlog=5) - @svr.listen(backlog) - end - - def shutdown(how=Socket::SHUT_RDWR) - @svr.shutdown(how) - end - - def accept - sock = @svr.accept - begin - ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx) - ssl.sync_close = true - ssl.accept if @start_immediately - ssl - rescue SSLError => ex - sock.close - raise ex - end - end - - def close - @svr.close - end - end - end -end +require 'openssl' diff -Nru ruby1.8-1.8.7.249/ext/openssl/lib/openssl/x509-internal.rb ruby1.8-1.8.7.302/ext/openssl/lib/openssl/x509-internal.rb --- ruby1.8-1.8.7.249/ext/openssl/lib/openssl/x509-internal.rb 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/lib/openssl/x509-internal.rb 2010-05-24 23:58:49.000000000 +0000 @@ -0,0 +1,153 @@ +=begin += $RCSfile$ -- Ruby-space definitions that completes C-space funcs for X509 and subclasses + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2002 Michal Rokos + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id$ +=end + +module OpenSSL + module X509 + class ExtensionFactory + def create_extension(*arg) + if arg.size > 1 + create_ext(*arg) + else + send("create_ext_from_"+arg[0].class.name.downcase, arg[0]) + end + end + + def create_ext_from_array(ary) + raise ExtensionError, "unexpected array form" if ary.size > 3 + create_ext(ary[0], ary[1], ary[2]) + end + + def create_ext_from_string(str) # "oid = critical, value" + oid, value = str.split(/=/, 2) + oid.strip! + value.strip! + create_ext(oid, value) + end + + def create_ext_from_hash(hash) + create_ext(hash["oid"], hash["value"], hash["critical"]) + end + end + + class Extension + def to_s # "oid = critical, value" + str = self.oid + str << " = " + str << "critical, " if self.critical? + str << self.value.gsub(/\n/, ", ") + end + + def to_h # {"oid"=>sn|ln, "value"=>value, "critical"=>true|false} + {"oid"=>self.oid,"value"=>self.value,"critical"=>self.critical?} + end + + def to_a + [ self.oid, self.value, self.critical? ] + end + end + + class Name + module RFC2253DN + Special = ',=+<>#;' + HexChar = /[0-9a-fA-F]/ + HexPair = /#{HexChar}#{HexChar}/ + HexString = /#{HexPair}+/ + Pair = /\\(?:[#{Special}]|\\|"|#{HexPair})/ + StringChar = /[^#{Special}\\"]/ + QuoteChar = /[^\\"]/ + AttributeType = /[a-zA-Z][0-9a-zA-Z]*|[0-9]+(?:\.[0-9]+)*/ + AttributeValue = / + (?!["#])((?:#{StringChar}|#{Pair})*)| + \#(#{HexString})| + "((?:#{QuoteChar}|#{Pair})*)" + /x + TypeAndValue = /\A(#{AttributeType})=#{AttributeValue}/ + + module_function + + def expand_pair(str) + return nil unless str + return str.gsub(Pair){ + pair = $& + case pair.size + when 2 then pair[1,1] + when 3 then Integer("0x#{pair[1,2]}").chr + else raise OpenSSL::X509::NameError, "invalid pair: #{str}" + end + } + end + + def expand_hexstring(str) + return nil unless str + der = str.gsub(HexPair){$&.to_i(16).chr } + a1 = OpenSSL::ASN1.decode(der) + return a1.value, a1.tag + end + + def expand_value(str1, str2, str3) + value = expand_pair(str1) + value, tag = expand_hexstring(str2) unless value + value = expand_pair(str3) unless value + return value, tag + end + + def scan(dn) + str = dn + ary = [] + while true + if md = TypeAndValue.match(str) + matched = md.to_s + remain = md.post_match + type = md[1] + value, tag = expand_value(md[2], md[3], md[4]) rescue nil + if value + type_and_value = [type, value] + type_and_value.push(tag) if tag + ary.unshift(type_and_value) + if remain.length > 2 && remain[0] == ?, + str = remain[1..-1] + next + elsif remain.length > 2 && remain[0] == ?+ + raise OpenSSL::X509::NameError, + "multi-valued RDN is not supported: #{dn}" + elsif remain.empty? + break + end + end + end + msg_dn = dn[0, dn.length - str.length] + " =>" + str + raise OpenSSL::X509::NameError, "malformed RDN: #{msg_dn}" + end + return ary + end + end + + class < 1 - create_ext(*arg) - else - send("create_ext_from_"+arg[0].class.name.downcase, arg[0]) - end - end - - def create_ext_from_array(ary) - raise ExtensionError, "unexpected array form" if ary.size > 3 - create_ext(ary[0], ary[1], ary[2]) - end - - def create_ext_from_string(str) # "oid = critical, value" - oid, value = str.split(/=/, 2) - oid.strip! - value.strip! - create_ext(oid, value) - end - - def create_ext_from_hash(hash) - create_ext(hash["oid"], hash["value"], hash["critical"]) - end - end - - class Extension - def to_s # "oid = critical, value" - str = self.oid - str << " = " - str << "critical, " if self.critical? - str << self.value.gsub(/\n/, ", ") - end - - def to_h # {"oid"=>sn|ln, "value"=>value, "critical"=>true|false} - {"oid"=>self.oid,"value"=>self.value,"critical"=>self.critical?} - end - - def to_a - [ self.oid, self.value, self.critical? ] - end - end - - class Name - module RFC2253DN - Special = ',=+<>#;' - HexChar = /[0-9a-fA-F]/ - HexPair = /#{HexChar}#{HexChar}/ - HexString = /#{HexPair}+/ - Pair = /\\(?:[#{Special}]|\\|"|#{HexPair})/ - StringChar = /[^#{Special}\\"]/ - QuoteChar = /[^\\"]/ - AttributeType = /[a-zA-Z][0-9a-zA-Z]*|[0-9]+(?:\.[0-9]+)*/ - AttributeValue = / - (?!["#])((?:#{StringChar}|#{Pair})*)| - \#(#{HexString})| - "((?:#{QuoteChar}|#{Pair})*)" - /x - TypeAndValue = /\A(#{AttributeType})=#{AttributeValue}/ - - module_function - - def expand_pair(str) - return nil unless str - return str.gsub(Pair){|pair| - case pair.size - when 2 then pair[1,1] - when 3 then Integer("0x#{pair[1,2]}").chr - else raise OpenSSL::X509::NameError, "invalid pair: #{str}" - end - } - end - - def expand_hexstring(str) - return nil unless str - der = str.gsub(HexPair){|hex| Integer("0x#{hex}").chr } - a1 = OpenSSL::ASN1.decode(der) - return a1.value, a1.tag - end - - def expand_value(str1, str2, str3) - value = expand_pair(str1) - value, tag = expand_hexstring(str2) unless value - value = expand_pair(str3) unless value - return value, tag - end - - def scan(dn) - str = dn - ary = [] - while true - if md = TypeAndValue.match(str) - matched = md.to_s - remain = md.post_match - type = md[1] - value, tag = expand_value(md[2], md[3], md[4]) rescue nil - if value - type_and_value = [type, value] - type_and_value.push(tag) if tag - ary.unshift(type_and_value) - if remain.length > 2 && remain[0] == ?, - str = remain[1..-1] - next - elsif remain.length > 2 && remain[0] == ?+ - raise OpenSSL::X509::NameError, - "multi-valued RDN is not supported: #{dn}" - elsif remain.empty? - break - end - end - end - msg_dn = dn[0, dn.length - str.length] + " =>" + str - raise OpenSSL::X509::NameError, "malformed RDN: #{msg_dn}" - end - return ary - end - end - - class < * All rights reserved. @@ -151,7 +151,7 @@ } break; default: - ossl_raise(rb_eArgError, "illegal radix %d", base); + ossl_raise(rb_eArgError, "invalid radix %d", base); } return self; } @@ -203,7 +203,7 @@ str = ossl_buf2str(buf, strlen(buf)); break; default: - ossl_raise(rb_eArgError, "illegal radix %d", base); + ossl_raise(rb_eArgError, "invalid radix %d", base); } return str; @@ -272,9 +272,9 @@ } \ return Qfalse; \ } -BIGNUM_BOOL1(is_zero); -BIGNUM_BOOL1(is_one); -BIGNUM_BOOL1(is_odd); +BIGNUM_BOOL1(is_zero) +BIGNUM_BOOL1(is_one) +BIGNUM_BOOL1(is_odd) #define BIGNUM_1c(func) \ /* \ @@ -298,7 +298,7 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_1c(sqr); +BIGNUM_1c(sqr) #define BIGNUM_2(func) \ /* \ @@ -322,8 +322,8 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_2(add); -BIGNUM_2(sub); +BIGNUM_2(add) +BIGNUM_2(sub) #define BIGNUM_2c(func) \ /* \ @@ -347,12 +347,12 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_2c(mul); -BIGNUM_2c(mod); -BIGNUM_2c(exp); -BIGNUM_2c(gcd); -BIGNUM_2c(mod_sqr); -BIGNUM_2c(mod_inverse); +BIGNUM_2c(mul) +BIGNUM_2c(mod) +BIGNUM_2c(exp) +BIGNUM_2c(gcd) +BIGNUM_2c(mod_sqr) +BIGNUM_2c(mod_inverse) /* * call-seq: @@ -407,10 +407,10 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_3c(mod_add); -BIGNUM_3c(mod_sub); -BIGNUM_3c(mod_mul); -BIGNUM_3c(mod_exp); +BIGNUM_3c(mod_add) +BIGNUM_3c(mod_sub) +BIGNUM_3c(mod_mul) +BIGNUM_3c(mod_exp) #define BIGNUM_BIT(func) \ /* \ @@ -428,9 +428,9 @@ } \ return self; \ } -BIGNUM_BIT(set_bit); -BIGNUM_BIT(clear_bit); -BIGNUM_BIT(mask_bits); +BIGNUM_BIT(set_bit) +BIGNUM_BIT(clear_bit) +BIGNUM_BIT(mask_bits) /* * call-seq: @@ -474,8 +474,8 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_SHIFT(lshift); -BIGNUM_SHIFT(rshift); +BIGNUM_SHIFT(lshift) +BIGNUM_SHIFT(rshift) #define BIGNUM_SELF_SHIFT(func) \ /* \ @@ -494,8 +494,8 @@ ossl_raise(eBNError, NULL); \ return self; \ } -BIGNUM_SELF_SHIFT(lshift); -BIGNUM_SELF_SHIFT(rshift); +BIGNUM_SELF_SHIFT(lshift) +BIGNUM_SELF_SHIFT(rshift) #define BIGNUM_RAND(func) \ /* \ @@ -528,8 +528,8 @@ WrapBN(klass, obj, result); \ return obj; \ } -BIGNUM_RAND(rand); -BIGNUM_RAND(pseudo_rand); +BIGNUM_RAND(rand) +BIGNUM_RAND(pseudo_rand) #define BIGNUM_RAND_RANGE(func) \ /* \ @@ -552,8 +552,8 @@ WrapBN(klass, obj, result); \ return obj; \ } -BIGNUM_RAND_RANGE(rand); -BIGNUM_RAND_RANGE(pseudo_rand); +BIGNUM_RAND_RANGE(rand) +BIGNUM_RAND_RANGE(pseudo_rand) /* * call-seq: @@ -608,8 +608,8 @@ GetBN(self, bn); \ return INT2FIX(BN_##func(bn)); \ } -BIGNUM_NUM(num_bytes); -BIGNUM_NUM(num_bits); +BIGNUM_NUM(num_bytes) +BIGNUM_NUM(num_bits) static VALUE ossl_bn_copy(VALUE self, VALUE other) @@ -642,8 +642,8 @@ GetBN(self, bn1); \ return INT2FIX(BN_##func(bn1, bn2)); \ } -BIGNUM_CMP(cmp); -BIGNUM_CMP(ucmp); +BIGNUM_CMP(cmp) +BIGNUM_CMP(ucmp) static VALUE ossl_bn_eql(VALUE self, VALUE other) diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl.c ruby1.8-1.8.7.302/ext/openssl/ossl.c --- ruby1.8-1.8.7.249/ext/openssl/ossl.c 2007-06-08 15:02:04.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl.c 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl.c 12496 2007-06-08 15:02:04Z technorama $ + * $Id: ossl.c 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -92,7 +92,7 @@ #define OSSL_IMPL_SK2ARY(name, type) \ VALUE \ -ossl_##name##_sk2ary(STACK *sk) \ +ossl_##name##_sk2ary(STACK_OF(type) *sk) \ { \ type *t; \ int i, num; \ @@ -102,7 +102,7 @@ OSSL_Debug("empty sk!"); \ return Qnil; \ } \ - num = sk_num(sk); \ + num = sk_##type##_num(sk); \ if (num < 0) { \ OSSL_Debug("items in sk < -1???"); \ return rb_ary_new(); \ @@ -110,7 +110,7 @@ ary = rb_ary_new2(num); \ \ for (i=0; i BUFSIZ) len = strlen(buf); - rb_exc_raise(rb_exc_new(exc, buf, len)); + return rb_exc_new(exc, buf, len); +} + +void +ossl_raise(VALUE exc, const char *fmt, ...) +{ + va_list args; + VALUE err; + va_start(args, fmt); + err = ossl_make_error(exc, fmt, args); + va_end(args); + rb_exc_raise(err); +} + +VALUE +ossl_exc_new(VALUE exc, const char *fmt, ...) +{ + va_list args; + VALUE err; + va_start(args, fmt); + err = ossl_make_error(exc, fmt, args); + va_end(args); + return err; } /* diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_cipher.c ruby1.8-1.8.7.302/ext/openssl/ossl_cipher.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_cipher.c 2007-06-08 15:02:04.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_cipher.c 2010-05-24 23:58:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_cipher.c 12496 2007-06-08 15:02:04Z technorama $ + * $Id: ossl_cipher.c 28004 2010-05-24 23:58:49Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -67,7 +67,7 @@ { if (ctx) { EVP_CIPHER_CTX_cleanup(ctx); - free(ctx); + ruby_xfree(ctx); } } @@ -124,12 +124,14 @@ return self; } +#ifdef HAVE_OBJ_NAME_DO_ALL_SORTED static void* add_cipher_name_to_ary(const OBJ_NAME *name, VALUE ary) { rb_ary_push(ary, rb_str_new2(name->name)); return NULL; } +#endif /* * call-seq: diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_config.c ruby1.8-1.8.7.302/ext/openssl/ossl_config.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_config.c 2009-11-18 05:20:22.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_config.c 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_config.c 25839 2009-11-18 05:20:22Z shyouhei $ + * $Id: ossl_config.c 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -158,14 +158,6 @@ return self; } -static void -rb_ossl_config_modify_check(VALUE config) -{ - if (OBJ_FROZEN(config)) rb_error_frozen("OpenSSL::Config"); - if (!OBJ_TAINTED(config) && rb_safe_level() >= 4) - rb_raise(rb_eSecurityError, "Insecure: can't modify OpenSSL config"); -} - static VALUE ossl_config_add_value(VALUE self, VALUE section, VALUE name, VALUE value) { @@ -175,7 +167,6 @@ CONF *conf; CONF_VALUE *sv, *cv; - rb_ossl_config_modify_check(self); StringValue(section); StringValue(name); StringValue(value); @@ -201,6 +192,25 @@ #endif } +static void +rb_ossl_config_modify_check(VALUE config) +{ + if (OBJ_FROZEN(config)) rb_error_frozen("OpenSSL::Config"); + if (!OBJ_TAINTED(config) && rb_safe_level() >= 4) + rb_raise(rb_eSecurityError, "Insecure: can't modify OpenSSL config"); +} + +static VALUE +ossl_config_add_value_m(VALUE self, VALUE section, VALUE name, VALUE value) +{ +#if defined(OSSL_NO_CONF_API) + rb_notimplement(); +#else + rb_ossl_config_modify_check(self); + return ossl_config_add_value(self, section, name, value); +#endif +} + static VALUE ossl_config_get_value(VALUE self, VALUE section, VALUE name) { @@ -303,6 +313,12 @@ } #ifdef IMPLEMENT_LHASH_DOALL_ARG_FN +#define IMPLEMENT_LHASH_DOALL_ARG_FN_098(f_name,o_type,a_type) \ + void f_name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \ + o_type a = (o_type)arg1; \ + a_type b = (a_type)arg2; \ + f_name(a,b); } + static void get_conf_section(CONF_VALUE *cv, VALUE ary) { @@ -310,7 +326,7 @@ rb_ary_push(ary, rb_str_new2(cv->section)); } -static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE*, VALUE); +static IMPLEMENT_LHASH_DOALL_ARG_FN_098(get_conf_section, CONF_VALUE*, VALUE) static VALUE ossl_config_get_sections(VALUE self) @@ -348,7 +364,7 @@ rb_str_cat2(str, "\n"); } -static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE*, VALUE); +static IMPLEMENT_LHASH_DOALL_ARG_FN_098(dump_conf_value, CONF_VALUE*, VALUE) static VALUE dump_conf(CONF *conf) @@ -392,13 +408,15 @@ } } -static IMPLEMENT_LHASH_DOALL_ARG_FN(each_conf_value, CONF_VALUE*, void*); +static IMPLEMENT_LHASH_DOALL_ARG_FN_098(each_conf_value, CONF_VALUE*, void*) static VALUE ossl_config_each(VALUE self) { CONF *conf; + RETURN_ENUMERATOR(self, 0, 0); + GetConfig(self, conf); lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(each_conf_value), (void*)NULL); @@ -448,11 +466,14 @@ void Init_ossl_config() { + char *default_config_file; eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError); cConfig = rb_define_class_under(mOSSL, "Config", rb_cObject); + default_config_file = CONF_get1_default_config_file(); rb_define_const(cConfig, "DEFAULT_CONFIG_FILE", - rb_str_new2(CONF_get1_default_config_file())); + rb_str_new2(default_config_file)); + OPENSSL_free(default_config_file); rb_include_module(cConfig, rb_mEnumerable); rb_define_singleton_method(cConfig, "parse", ossl_config_s_parse, 1); rb_define_alias(CLASS_OF(cConfig), "load", "new"); @@ -461,7 +482,7 @@ rb_define_method(cConfig, "initialize", ossl_config_initialize, -1); rb_define_method(cConfig, "get_value", ossl_config_get_value, 2); rb_define_method(cConfig, "value", ossl_config_get_value_old, -1); - rb_define_method(cConfig, "add_value", ossl_config_add_value, 3); + rb_define_method(cConfig, "add_value", ossl_config_add_value_m, 3); rb_define_method(cConfig, "[]", ossl_config_get_section, 1); rb_define_method(cConfig, "section", ossl_config_get_section_old, 1); rb_define_method(cConfig, "[]=", ossl_config_set_section, 2); diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_engine.c ruby1.8-1.8.7.302/ext/openssl/ossl_engine.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_engine.c 2007-06-08 15:02:04.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_engine.c 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_engine.c 12496 2007-06-08 15:02:04Z technorama $ + * $Id: ossl_engine.c 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2003 GOTOU Yuuzou * All rights reserved. @@ -61,16 +61,34 @@ } StringValue(name); #ifndef OPENSSL_NO_STATIC_ENGINE +#if HAVE_ENGINE_LOAD_DYNAMIC OSSL_ENGINE_LOAD_IF_MATCH(dynamic); +#endif +#if HAVE_ENGINE_LOAD_CSWIFT OSSL_ENGINE_LOAD_IF_MATCH(cswift); +#endif +#if HAVE_ENGINE_LOAD_CHIL OSSL_ENGINE_LOAD_IF_MATCH(chil); +#endif +#if HAVE_ENGINE_LOAD_ATALLA OSSL_ENGINE_LOAD_IF_MATCH(atalla); +#endif +#if HAVE_ENGINE_LOAD_NURON OSSL_ENGINE_LOAD_IF_MATCH(nuron); +#endif +#if HAVE_ENGINE_LOAD_UBSEC OSSL_ENGINE_LOAD_IF_MATCH(ubsec); +#endif +#if HAVE_ENGINE_LOAD_AEP OSSL_ENGINE_LOAD_IF_MATCH(aep); +#endif +#if HAVE_ENGINE_LOAD_SUREWARE OSSL_ENGINE_LOAD_IF_MATCH(sureware); +#endif +#if HAVE_ENGINE_LOAD_4758CCA OSSL_ENGINE_LOAD_IF_MATCH(4758cca); #endif +#endif #ifdef HAVE_ENGINE_LOAD_OPENBSD_DEV_CRYPTO OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto); #endif @@ -119,7 +137,7 @@ if(!ENGINE_init(e)) ossl_raise(eEngineError, NULL); ENGINE_ctrl(e, ENGINE_CTRL_SET_PASSWORD_CALLBACK, - 0, NULL, (void(*)())ossl_pem_passwd_cb); + 0, NULL, (void(*)(void))ossl_pem_passwd_cb); ERR_clear_error(); return obj; diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl.h ruby1.8-1.8.7.302/ext/openssl/ossl.h --- ruby1.8-1.8.7.249/ext/openssl/ossl.h 2008-06-29 08:16:02.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl.h 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl.h 17656 2008-06-29 08:16:02Z shyouhei $ + * $Id: ossl.h 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -108,6 +108,13 @@ } while (0) /* + * Compatibility + */ +#if OPENSSL_VERSION_NUMBER >= 0x10000000L +#define STACK _STACK +#endif + +/* * String to HEXString conversion */ int string2hex(char *, int, char **, int *); @@ -139,6 +146,7 @@ */ #define OSSL_ErrMsg() ERR_reason_error_string(ERR_get_error()) NORETURN(void ossl_raise(VALUE, const char *, ...)); +VALUE ossl_exc_new(VALUE, const char *, ...); /* * Verify callback @@ -167,10 +175,10 @@ extern VALUE dOSSL; #if defined(HAVE_VA_ARGS_MACRO) -#define OSSL_Debug(fmt, ...) do { \ +#define OSSL_Debug(...) do { \ if (dOSSL == Qtrue) { \ fprintf(stderr, "OSSL_DEBUG: "); \ - fprintf(stderr, fmt, ##__VA_ARGS__); \ + fprintf(stderr, __VA_ARGS__); \ fprintf(stderr, " [%s:%d]\n", __FILE__, __LINE__); \ } \ } while (0) diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_hmac.c ruby1.8-1.8.7.302/ext/openssl/ossl_hmac.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_hmac.c 2008-05-19 03:00:52.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_hmac.c 2010-05-24 23:58:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_hmac.c 16467 2008-05-19 03:00:52Z knu $ + * $Id: ossl_hmac.c 28004 2010-05-24 23:58:49Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -42,7 +42,7 @@ ossl_hmac_free(HMAC_CTX *ctx) { HMAC_CTX_cleanup(ctx); - free(ctx); + ruby_xfree(ctx); } static VALUE diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_ocsp.c ruby1.8-1.8.7.302/ext/openssl/ossl_ocsp.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_ocsp.c 2009-03-09 11:59:27.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_ocsp.c 2010-05-24 23:58:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_ocsp.c 22857 2009-03-09 11:59:27Z shyouhei $ + * $Id: ossl_ocsp.c 28004 2010-05-24 23:58:49Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2003 Michal Rokos * Copyright (C) 2003 GOTOU Yuuzou @@ -378,7 +378,7 @@ ossl_raise(eOCSPError, NULL); str = rb_str_new(0, len); p = RSTRING_PTR(str); - if(i2d_OCSP_RESPONSE(res, NULL) <= 0) + if(i2d_OCSP_RESPONSE(res, &p) <= 0) ossl_raise(eOCSPError, NULL); ossl_str_adjust(str, p); diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_pkcs5.c ruby1.8-1.8.7.302/ext/openssl/ossl_pkcs5.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_pkcs5.c 2008-05-19 09:30:25.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_pkcs5.c 2010-06-21 09:18:59.000000000 +0000 @@ -29,14 +29,17 @@ VALUE str; const EVP_MD *md; int len = NUM2INT(keylen); + unsigned char* salt_p; + unsigned char* str_p; StringValue(pass); StringValue(salt); md = GetDigestPtr(digest); - str = rb_str_new(0, len); + salt_p = (unsigned char*)RSTRING_PTR(salt); + str_p = (unsigned char*)RSTRING_PTR(str); - if (PKCS5_PBKDF2_HMAC(RSTRING_PTR(pass), RSTRING_LEN(pass), RSTRING_PTR(salt), RSTRING_LEN(salt), NUM2INT(iter), md, len, RSTRING_PTR(str)) != 1) + if (PKCS5_PBKDF2_HMAC(RSTRING_PTR(pass), RSTRING_LEN(pass), salt_p, RSTRING_LEN(salt), NUM2INT(iter), md, len, str_p) != 1) ossl_raise(ePKCS5, "PKCS5_PBKDF2_HMAC"); return str; diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_pkcs7.c ruby1.8-1.8.7.302/ext/openssl/ossl_pkcs7.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_pkcs7.c 2007-06-08 15:02:04.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_pkcs7.c 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_pkcs7.c 12496 2007-06-08 15:02:04Z technorama $ + * $Id: ossl_pkcs7.c 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -570,12 +570,11 @@ return self; } -static STACK * -pkcs7_get_certs_or_crls(VALUE self, int want_certs) +static STACK_OF(X509) * +pkcs7_get_certs(VALUE self) { PKCS7 *pkcs7; STACK_OF(X509) *certs; - STACK_OF(X509_CRL) *crls; int i; GetPKCS7(self, pkcs7); @@ -583,17 +582,38 @@ switch(i){ case NID_pkcs7_signed: certs = pkcs7->d.sign->cert; - crls = pkcs7->d.sign->crl; break; case NID_pkcs7_signedAndEnveloped: certs = pkcs7->d.signed_and_enveloped->cert; + break; + default: + certs = NULL; + } + + return certs; +} + +static STACK_OF(X509_CRL) * +pkcs7_get_crls(VALUE self) +{ + PKCS7 *pkcs7; + STACK_OF(X509_CRL) *crls; + int i; + + GetPKCS7(self, pkcs7); + i = OBJ_obj2nid(pkcs7->type); + switch(i){ + case NID_pkcs7_signed: + crls = pkcs7->d.sign->crl; + break; + case NID_pkcs7_signedAndEnveloped: crls = pkcs7->d.signed_and_enveloped->crl; break; default: - certs = crls = NULL; + crls = NULL; } - return want_certs ? certs : crls; + return crls; } static VALUE @@ -608,7 +628,7 @@ STACK_OF(X509) *certs; X509 *cert; - certs = pkcs7_get_certs_or_crls(self, 1); + certs = pkcs7_get_certs(self); while((cert = sk_X509_pop(certs))) X509_free(cert); rb_block_call(ary, rb_intern("each"), 0, 0, ossl_pkcs7_set_certs_i, self); @@ -618,7 +638,7 @@ static VALUE ossl_pkcs7_get_certificates(VALUE self) { - return ossl_x509_sk2ary(pkcs7_get_certs_or_crls(self, 1)); + return ossl_x509_sk2ary(pkcs7_get_certs(self)); } static VALUE @@ -648,7 +668,7 @@ STACK_OF(X509_CRL) *crls; X509_CRL *crl; - crls = pkcs7_get_certs_or_crls(self, 0); + crls = pkcs7_get_crls(self); while((crl = sk_X509_CRL_pop(crls))) X509_CRL_free(crl); rb_block_call(ary, rb_intern("each"), 0, 0, ossl_pkcs7_set_crls_i, self); @@ -658,7 +678,7 @@ static VALUE ossl_pkcs7_get_crls(VALUE self) { - return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0)); + return ossl_x509crl_sk2ary(pkcs7_get_crls(self)); } static VALUE diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_pkey.c ruby1.8-1.8.7.302/ext/openssl/ossl_pkey.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_pkey.c 2007-06-08 15:02:04.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_pkey.c 2010-05-24 23:58:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_pkey.c 12496 2007-06-08 15:02:04Z technorama $ + * $Id: ossl_pkey.c 28004 2010-05-24 23:58:49Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -177,7 +177,7 @@ str = rb_str_new(0, EVP_PKEY_size(pkey)+16); if (!EVP_SignFinal(&ctx, RSTRING_PTR(str), &buf_len, pkey)) ossl_raise(ePKeyError, NULL); - assert(buf_len <= RSTRING_LEN(str)); + assert((long)buf_len <= RSTRING_LEN(str)); rb_str_set_len(str, buf_len); return str; diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_pkey_dh.c ruby1.8-1.8.7.302/ext/openssl/ossl_pkey_dh.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_pkey_dh.c 2008-05-29 17:45:47.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_pkey_dh.c 2010-05-24 23:58:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_pkey_dh.c 16691 2008-05-29 17:45:47Z knu $ + * $Id: ossl_pkey_dh.c 28004 2010-05-24 23:58:49Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -415,10 +415,10 @@ return str; } -OSSL_PKEY_BN(dh, p); -OSSL_PKEY_BN(dh, g); -OSSL_PKEY_BN(dh, pub_key); -OSSL_PKEY_BN(dh, priv_key); +OSSL_PKEY_BN(dh, p) +OSSL_PKEY_BN(dh, g) +OSSL_PKEY_BN(dh, pub_key) +OSSL_PKEY_BN(dh, priv_key) /* * -----BEGIN DH PARAMETERS----- diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_pkey_dsa.c ruby1.8-1.8.7.302/ext/openssl/ossl_pkey_dsa.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_pkey_dsa.c 2008-05-29 17:45:47.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_pkey_dsa.c 2010-05-24 23:58:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_pkey_dsa.c 16691 2008-05-29 17:45:47Z knu $ + * $Id: ossl_pkey_dsa.c 28004 2010-05-24 23:58:49Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -432,11 +432,11 @@ return Qfalse; } -OSSL_PKEY_BN(dsa, p); -OSSL_PKEY_BN(dsa, q); -OSSL_PKEY_BN(dsa, g); -OSSL_PKEY_BN(dsa, pub_key); -OSSL_PKEY_BN(dsa, priv_key); +OSSL_PKEY_BN(dsa, p) +OSSL_PKEY_BN(dsa, q) +OSSL_PKEY_BN(dsa, g) +OSSL_PKEY_BN(dsa, pub_key) +OSSL_PKEY_BN(dsa, priv_key) /* * INIT diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_pkey_ec.c ruby1.8-1.8.7.302/ext/openssl/ossl_pkey_ec.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_pkey_ec.c 2008-02-26 07:11:23.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_pkey_ec.c 2010-06-21 09:18:59.000000000 +0000 @@ -463,8 +463,10 @@ BIO *out; int i = -1; int private = 0; +#if 0 /* unused now */ EVP_CIPHER *cipher = NULL; char *password = NULL; +#endif VALUE str; Require_EC_KEY(self, ec); @@ -484,13 +486,18 @@ switch(format) { case EXPORT_PEM: if (private) { +#if 0 /* unused now */ if (cipher || password) /* BUG: finish cipher/password key export */ rb_notimplement(); i = PEM_write_bio_ECPrivateKey(out, ec, cipher, NULL, 0, NULL, password); +#endif + i = PEM_write_bio_ECPrivateKey(out, ec, NULL, NULL, 0, NULL, NULL); } else { +#if 0 /* unused now */ if (cipher || password) rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif i = PEM_write_bio_EC_PUBKEY(out, ec); } @@ -498,13 +505,17 @@ break; case EXPORT_DER: if (private) { +#if 0 /* unused now */ if (cipher || password) rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif i = i2d_ECPrivateKey_bio(out, ec); } else { +#if 0 /* unused now */ if (cipher || password) rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif i = i2d_EC_PUBKEY_bio(out, ec); } @@ -670,7 +681,7 @@ /* * call-seq: - * key.dsa_verify(data, sig) => true or false + * key.dsa_verify_asn1(data, sig) => true or false * * See the OpenSSL documentation for ECDSA_verify() */ @@ -695,7 +706,7 @@ { if (!ec_group->dont_free && ec_group->group) EC_GROUP_clear_free(ec_group->group); - free(ec_group); + ruby_xfree(ec_group); } static VALUE ossl_ec_group_alloc(VALUE klass) @@ -1201,7 +1212,7 @@ { if (!ec_point->dont_free && ec_point->point) EC_POINT_clear_free(ec_point->point); - free(ec_point); + ruby_xfree(ec_point); } static VALUE ossl_ec_point_alloc(VALUE klass) diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_pkey_rsa.c ruby1.8-1.8.7.302/ext/openssl/ossl_pkey_rsa.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_pkey_rsa.c 2008-02-26 07:11:23.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_pkey_rsa.c 2010-05-24 23:58:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_pkey_rsa.c 15611 2008-02-26 07:11:23Z technorama $ + * $Id: ossl_pkey_rsa.c 28004 2010-05-24 23:58:49Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -519,14 +519,14 @@ } */ -OSSL_PKEY_BN(rsa, n); -OSSL_PKEY_BN(rsa, e); -OSSL_PKEY_BN(rsa, d); -OSSL_PKEY_BN(rsa, p); -OSSL_PKEY_BN(rsa, q); -OSSL_PKEY_BN(rsa, dmp1); -OSSL_PKEY_BN(rsa, dmq1); -OSSL_PKEY_BN(rsa, iqmp); +OSSL_PKEY_BN(rsa, n) +OSSL_PKEY_BN(rsa, e) +OSSL_PKEY_BN(rsa, d) +OSSL_PKEY_BN(rsa, p) +OSSL_PKEY_BN(rsa, q) +OSSL_PKEY_BN(rsa, dmp1) +OSSL_PKEY_BN(rsa, dmq1) +OSSL_PKEY_BN(rsa, iqmp) /* * INIT diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_ssl.c ruby1.8-1.8.7.302/ext/openssl/ossl_ssl.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_ssl.c 2008-06-06 08:05:24.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_ssl.c 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_ssl.c 16857 2008-06-06 08:05:24Z knu $ + * $Id: ossl_ssl.c 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2000-2002 GOTOU Yuuzou * Copyright (C) 2001-2002 Michal Rokos @@ -829,7 +829,7 @@ rb_raise(rb_eArgError, "arg must be Time or nil"); } - SSL_CTX_flush_sessions(ctx, tm); + SSL_CTX_flush_sessions(ctx, (long)tm); return self; } @@ -1196,10 +1196,10 @@ } chain = SSL_get_peer_cert_chain(ssl); if(!chain) return Qnil; - num = sk_num(chain); + num = sk_X509_num(chain); ary = rb_ary_new2(num); for (i = 0; i < num; i++){ - cert = (X509*)sk_value(chain, i); + cert = sk_X509_value(chain, i); rb_ary_push(ary, ossl_x509_new(cert)); } diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_ssl_session.c ruby1.8-1.8.7.302/ext/openssl/ossl_ssl_session.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_ssl_session.c 2008-06-06 08:05:24.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_ssl_session.c 2010-06-21 09:18:59.000000000 +0000 @@ -86,9 +86,18 @@ GetSSLSession(val1, ctx1); SafeGetSSLSession(val2, ctx2); - switch (SSL_SESSION_cmp(ctx1, ctx2)) { - case 0: return Qtrue; - default: return Qfalse; + /* + * OpenSSL 1.0.0betas do not have non-static SSL_SESSION_cmp. + * ssl_session_cmp (was SSL_SESSION_cmp in 0.9.8) is for lhash + * comparing so we should not depend on it. Just compare sessions + * by version and id. + */ + if ((ctx1->ssl_version == ctx2->ssl_version) && + (ctx1->session_id_length == ctx2->session_id_length) && + (memcmp(ctx1->session_id, ctx2->session_id, ctx1->session_id_length) == 0)) { + return Qtrue; + } else { + return Qfalse; } } @@ -100,7 +109,7 @@ static VALUE ossl_ssl_session_get_time(VALUE self) { SSL_SESSION *ctx; - time_t t; + long t; GetSSLSession(self, ctx); @@ -122,20 +131,20 @@ static VALUE ossl_ssl_session_get_timeout(VALUE self) { SSL_SESSION *ctx; - time_t t; + long t; GetSSLSession(self, ctx); t = SSL_SESSION_get_timeout(ctx); - return ULONG2NUM(t); + return LONG2NUM(t); } #define SSLSESSION_SET_TIME(func) \ static VALUE ossl_ssl_session_set_##func(VALUE self, VALUE time_v) \ { \ SSL_SESSION *ctx; \ - time_t t; \ + long t; \ \ GetSSLSession(self, ctx); \ \ @@ -147,7 +156,7 @@ rb_raise(rb_eArgError, "unknown type"); \ } \ \ - t = NUM2ULONG(time_v); \ + t = NUM2LONG(time_v); \ \ SSL_SESSION_set_##func(ctx, t); \ \ diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_x509attr.c ruby1.8-1.8.7.302/ext/openssl/ossl_x509attr.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_x509attr.c 2007-06-08 15:02:04.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_x509attr.c 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_x509attr.c 12496 2007-06-08 15:02:04Z technorama $ + * $Id: ossl_x509attr.c 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001 Michal Rokos * All rights reserved. @@ -217,8 +217,9 @@ ossl_str_adjust(str, p); } else{ - length = i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, NULL, - i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0); + length = i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, + (unsigned char **) NULL, i2d_ASN1_TYPE, + V_ASN1_SET, V_ASN1_UNIVERSAL, 0); str = rb_str_new(0, length); p = RSTRING_PTR(str); i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, &p, diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_x509crl.c ruby1.8-1.8.7.302/ext/openssl/ossl_x509crl.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_x509crl.c 2007-06-08 15:02:04.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_x509crl.c 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_x509crl.c 12496 2007-06-08 15:02:04Z technorama $ + * $Id: ossl_x509crl.c 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001-2002 Michal Rokos * All rights reserved. @@ -262,7 +262,7 @@ VALUE ary, revoked; GetX509CRL(self, crl); - num = sk_X509_CRL_num(X509_CRL_get_REVOKED(crl)); + num = sk_X509_REVOKED_num(X509_CRL_get_REVOKED(crl)); if (num < 0) { OSSL_Debug("num < 0???"); return rb_ary_new(); @@ -270,7 +270,7 @@ ary = rb_ary_new2(num); for(i=0; i * All rights reserved. @@ -198,6 +198,7 @@ ossl_x509extfactory_set_subject_req(self, subject_req); if (!NIL_P(crl)) ossl_x509extfactory_set_crl(self, crl); + rb_iv_set(self, "@config", Qnil); return self; } @@ -323,14 +324,15 @@ ossl_raise(eX509ExtError, "malloc error"); memcpy(s, RSTRING_PTR(data), RSTRING_LEN(data)); if(!(asn1s = ASN1_OCTET_STRING_new())){ - free(s); + OPENSSL_free(s); ossl_raise(eX509ExtError, NULL); } if(!M_ASN1_OCTET_STRING_set(asn1s, s, RSTRING_LEN(data))){ - free(s); + OPENSSL_free(s); ASN1_OCTET_STRING_free(asn1s); ossl_raise(eX509ExtError, NULL); } + OPENSSL_free(s); GetX509Ext(self, ext); X509_EXTENSION_set_data(ext, asn1s); diff -Nru ruby1.8-1.8.7.249/ext/openssl/ossl_x509name.c ruby1.8-1.8.7.302/ext/openssl/ossl_x509name.c --- ruby1.8-1.8.7.249/ext/openssl/ossl_x509name.c 2007-07-15 13:24:51.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/openssl/ossl_x509name.c 2010-06-21 09:18:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: ossl_x509name.c 12800 2007-07-15 13:24:51Z nobu $ + * $Id: ossl_x509name.c 28367 2010-06-21 09:18:59Z shyouhei $ * 'OpenSSL for Ruby' project * Copyright (C) 2001 Michal Rokos * All rights reserved. @@ -137,9 +137,12 @@ else{ unsigned char *p; VALUE str = ossl_to_der_if_possible(arg); + X509_NAME *x; StringValue(str); - p = RSTRING_PTR(str); - if(!d2i_X509_NAME((X509_NAME**)&DATA_PTR(self), &p, RSTRING_LEN(str))){ + p = (unsigned char *)RSTRING_PTR(str); + x = d2i_X509_NAME(&name, &p, RSTRING_LEN(str)); + DATA_PTR(self) = name; + if(!x){ ossl_raise(eX509NameError, NULL); } } @@ -303,6 +306,27 @@ return ULONG2NUM(hash); } +#ifdef HAVE_X509_NAME_HASH_OLD +/* + * call-seq: + * name.hash_old => integer + * + * hash_old returns MD5 based hash used in OpenSSL 0.9.X. + */ +static VALUE +ossl_x509name_hash_old(VALUE self) +{ + X509_NAME *name; + unsigned long hash; + + GetX509Name(self, name); + + hash = X509_NAME_hash_old(name); + + return ULONG2NUM(hash); +} +#endif + /* * call-seq: * name.to_der => string @@ -348,6 +372,9 @@ rb_define_alias(cX509Name, "<=>", "cmp"); rb_define_method(cX509Name, "eql?", ossl_x509name_eql, 1); rb_define_method(cX509Name, "hash", ossl_x509name_hash, 0); +#ifdef HAVE_X509_NAME_HASH_OLD + rb_define_method(cX509Name, "hash_old", ossl_x509name_hash_old, 0); +#endif rb_define_method(cX509Name, "to_der", ossl_x509name_to_der, 0); utf8str = INT2NUM(V_ASN1_UTF8STRING); diff -Nru ruby1.8-1.8.7.249/ext/readline/readline.c ruby1.8-1.8.7.302/ext/readline/readline.c --- ruby1.8-1.8.7.249/ext/readline/readline.c 2008-04-15 03:35:55.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/readline/readline.c 2010-05-22 13:19:03.000000000 +0000 @@ -833,6 +833,12 @@ #ifdef HAVE_RL_EVENT_HOOK rl_event_hook = readline_event; #endif +#ifdef HAVE_RL_CATCH_SIGNALS + rl_catch_signals = 0; +#endif +#ifdef HAVE_RL_CATCH_SIGWINCH + rl_catch_sigwinch = 0; +#endif #ifdef HAVE_RL_CLEAR_SIGNALS rl_clear_signals(); #endif diff -Nru ruby1.8-1.8.7.249/ext/win32ole/win32ole.c ruby1.8-1.8.7.302/ext/win32ole/win32ole.c --- ruby1.8-1.8.7.249/ext/win32ole/win32ole.c 2008-07-07 03:29:28.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/win32ole/win32ole.c 2010-06-08 06:42:50.000000000 +0000 @@ -12,7 +12,6 @@ */ /* - $Date: 2008-07-07 12:29:28 +0900 (Mon, 07 Jul 2008) $ modified for win32ole (ruby) by Masaki.Suketa */ @@ -79,7 +78,7 @@ #define WC2VSTR(x) ole_wc2vstr((x), TRUE) -#define WIN32OLE_VERSION "0.7.6" +#define WIN32OLE_VERSION "0.7.8" typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX) (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*); @@ -822,6 +821,71 @@ return obj; } +static VALUE +is_all_index_under(pid, pub, dim) + long *pid; + long *pub; + long dim; +{ + long i = 0; + for (i = 0; i < dim; i++) { + if (pid[i] > pub[i]) { + return Qfalse; + } + } + return Qtrue; +} + +static long +dimension(val) + VALUE val; +{ + long dim = 0; + long dim1 = 0; + long len = 0; + long i = 0; + if (TYPE(val) == T_ARRAY) { + len = RARRAY(val)->len; + for (i = 0; i < len; i++) { + dim1 = dimension(rb_ary_entry(val, i)); + if (dim < dim1) { + dim = dim1; + } + } + dim += 1; + } + return dim; +} + +static long +ary_len_of_dim(ary, dim) + VALUE ary; + long dim; +{ + long ary_len = 0; + long ary_len1 = 0; + long len = 0; + long i = 0; + VALUE val; + if (dim == 0) { + if (TYPE(ary) == T_ARRAY) { + ary_len = RARRAY(ary)->len; + } + } else { + if (TYPE(ary) == T_ARRAY) { + len = RARRAY(ary)->len; + for (i = 0; i < len; i++) { + val = rb_ary_entry(ary, i); + ary_len1 = ary_len_of_dim(val, dim-1); + if (ary_len < ary_len1) { + ary_len = ary_len1; + } + } + } + } + return ary_len; +} + static void ole_set_safe_array(n, psa, pid, pub, val, dim) long n; @@ -832,22 +896,96 @@ long dim; { VALUE val1; + HRESULT hr = S_OK; VARIANT var; - VariantInit(&var); - if(n < 0) return; - if(n == dim) { + VOID *p = NULL; + long i = n; + while(i >= 0) { val1 = ole_ary_m_entry(val, pid); + VariantInit(&var); ole_val2variant(val1, &var); - SafeArrayPutElement(psa, pid, &var); + if (is_all_index_under(pid, pub, dim) == Qtrue) { + if ((V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == NULL) || + (V_VT(&var) == VT_UNKNOWN && V_UNKNOWN(&var) == NULL)) { + rb_raise(eWIN32OLE_RUNTIME_ERROR, "element of array does not have IDispatch or IUnknown Interface"); + } + hr = SafeArrayPutElement(psa, pid, &var); + } + if (FAILED(hr)) { + ole_raise(hr, rb_eRuntimeError, "failed to SafeArrayPutElement"); + } + pid[i] += 1; + if (pid[i] > pub[i]) { + pid[i] = 0; + i -= 1; + } else { + i = dim - 1; + } + } +} + +static HRESULT +ole_val_ary2variant_ary(val, var, vt) + VALUE val; + VARIANT *var; + VARTYPE vt; +{ + long dim = 0; + int i = 0; + HRESULT hr = S_OK; + + SAFEARRAYBOUND *psab = NULL; + SAFEARRAY *psa = NULL; + long *pub, *pid; + + Check_Type(val, T_ARRAY); + + dim = dimension(val); + + psab = ALLOC_N(SAFEARRAYBOUND, dim); + pub = ALLOC_N(long, dim); + pid = ALLOC_N(long, dim); + + if(!psab || !pub || !pid) { + if(pub) free(pub); + if(psab) free(psab); + if(pid) free(pid); + rb_raise(rb_eRuntimeError, "memory allocation error"); + } + + for (i = 0; i < dim; i++) { + psab[i].cElements = ary_len_of_dim(val, i); + psab[i].lLbound = 0; + pub[i] = psab[i].cElements - 1; + pid[i] = 0; + } + /* Create and fill VARIANT array */ + if ((vt & ~VT_BYREF) == VT_ARRAY) { + vt = (vt | VT_VARIANT); + } + psa = SafeArrayCreate(VT_VARIANT, dim, psab); + if (psa == NULL) + hr = E_OUTOFMEMORY; + else + hr = SafeArrayLock(psa); + if (SUCCEEDED(hr)) { + ole_set_safe_array(dim-1, psa, pid, pub, val, dim); + hr = SafeArrayUnlock(psa); } - pid[n] += 1; - if (pid[n] < pub[n]) { - ole_set_safe_array(dim, psa, pid, pub, val, dim); + + if(pub) free(pub); + if(psab) free(psab); + if(pid) free(pid); + + if (SUCCEEDED(hr)) { + V_VT(var) = vt; + V_ARRAY(var) = psa; } else { - pid[n] = 0; - ole_set_safe_array(n-1, psa, pid, pub, val, dim); + if (psa != NULL) + SafeArrayDestroy(psa); } + return hr; } static void @@ -870,63 +1008,8 @@ } switch (TYPE(val)) { case T_ARRAY: - { - VALUE val1; - long dim = 0; - int i = 0; - - HRESULT hr; - SAFEARRAYBOUND *psab; - SAFEARRAY *psa; - long *pub, *pid; - - val1 = val; - while(TYPE(val1) == T_ARRAY) { - val1 = rb_ary_entry(val1, 0); - dim += 1; - } - psab = ALLOC_N(SAFEARRAYBOUND, dim); - pub = ALLOC_N(long, dim); - pid = ALLOC_N(long, dim); - - if(!psab || !pub || !pid) { - if(pub) free(pub); - if(psab) free(psab); - if(pid) free(pid); - rb_raise(rb_eRuntimeError, "memory allocation error"); - } - val1 = val; - i = 0; - while(TYPE(val1) == T_ARRAY) { - psab[i].cElements = RARRAY(val1)->len; - psab[i].lLbound = 0; - pub[i] = psab[i].cElements; - pid[i] = 0; - i ++; - val1 = rb_ary_entry(val1, 0); - } - /* Create and fill VARIANT array */ - psa = SafeArrayCreate(VT_VARIANT, dim, psab); - if (psa == NULL) - hr = E_OUTOFMEMORY; - else - hr = SafeArrayLock(psa); - if (SUCCEEDED(hr)) { - ole_set_safe_array(dim-1, psa, pid, pub, val, dim-1); - hr = SafeArrayUnlock(psa); - } - if(pub) free(pub); - if(psab) free(psab); - if(pid) free(pid); - - if (SUCCEEDED(hr)) { - V_VT(var) = VT_VARIANT | VT_ARRAY; - V_ARRAY(var) = psa; - } - else if (psa != NULL) - SafeArrayDestroy(psa); + ole_val_ary2variant_ary(val, var, VT_VARIANT|VT_ARRAY); break; - } case T_STRING: V_VT(var) = VT_BSTR; V_BSTR(var) = ole_mb2wc(StringValuePtr(val), -1); diff -Nru ruby1.8-1.8.7.249/ext/zlib/zlib.c ruby1.8-1.8.7.302/ext/zlib/zlib.c --- ruby1.8-1.8.7.249/ext/zlib/zlib.c 2008-07-16 16:39:00.000000000 +0000 +++ ruby1.8-1.8.7.302/ext/zlib/zlib.c 2010-05-20 07:21:52.000000000 +0000 @@ -3,7 +3,7 @@ * * Copyright (C) UENO Katsuhiro 2000-2003 * - * $Id: zlib.c 18089 2008-07-16 16:39:00Z shyouhei $ + * $Id: zlib.c 27917 2010-05-20 07:21:52Z shyouhei $ */ #include @@ -302,7 +302,7 @@ /* * call-seq: Zlib.adler32(string, adler) * - * Calculates Alder-32 checksum for +string+, and returns updated value of + * Calculates Adler-32 checksum for +string+, and returns updated value of * +adler+. If +string+ is omitted, it returns the Adler-32 initial value. If * +adler+ is omitted, it assumes that the initial value is given to +adler+. * @@ -733,6 +733,9 @@ } for (;;) { + /* VC allocates err and guard to same address. accessing err and guard + in same scope prevents it. */ + RB_GC_GUARD(guard); n = z->stream.avail_out; err = z->func->run(&z->stream, flush); z->buf_filled += n - z->stream.avail_out; @@ -1374,6 +1377,7 @@ level = ARG_LEVEL(v_level); strategy = ARG_STRATEGY(v_strategy); + zstream_run(z, (Bytef*)"", 0, Z_SYNC_FLUSH); err = deflateParams(&z->stream, level, strategy); while (err == Z_BUF_ERROR) { rb_warning("deflateParams() returned Z_BUF_ERROR"); diff -Nru ruby1.8-1.8.7.249/file.c ruby1.8-1.8.7.302/file.c --- ruby1.8-1.8.7.249/file.c 2009-07-15 02:50:57.000000000 +0000 +++ ruby1.8-1.8.7.302/file.c 2010-06-08 06:41:19.000000000 +0000 @@ -3,7 +3,7 @@ file.c - $Author: shyouhei $ - $Date: 2009-07-15 11:50:57 +0900 (Wed, 15 Jul 2009) $ + $Date: 2010-06-08 15:41:19 +0900 (Tue, 08 Jun 2010) $ created at: Mon Nov 15 12:24:34 JST 1993 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -3024,7 +3024,7 @@ if (!p) p = name; else - name = ++p; + do name = ++p; while (isdirsep(*p)); e = 0; while (*p) { diff -Nru ruby1.8-1.8.7.249/intern.h ruby1.8-1.8.7.302/intern.h --- ruby1.8-1.8.7.249/intern.h 2009-01-22 06:22:00.000000000 +0000 +++ ruby1.8-1.8.7.302/intern.h 2010-06-08 08:42:55.000000000 +0000 @@ -3,7 +3,7 @@ intern.h - $Author: shyouhei $ - $Date: 2009-01-22 15:22:00 +0900 (Thu, 22 Jan 2009) $ + $Date: 2010-06-08 17:42:55 +0900 (Tue, 08 Jun 2010) $ created at: Thu Jun 10 14:22:17 JST 1993 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -83,6 +83,8 @@ #endif /* HAVE_LONG_LONG */ void rb_quad_pack _((char*,VALUE)); VALUE rb_quad_unpack _((const char*,int)); +void rb_big_pack(VALUE val, unsigned long *buf, long num_longs); +VALUE rb_big_unpack(unsigned long *buf, long num_longs); VALUE rb_dbl2big _((double)); double rb_big2dbl _((VALUE)); VALUE rb_big_plus _((VALUE, VALUE)); diff -Nru ruby1.8-1.8.7.249/io.c ruby1.8-1.8.7.302/io.c --- ruby1.8-1.8.7.249/io.c 2009-11-25 08:45:13.000000000 +0000 +++ ruby1.8-1.8.7.302/io.c 2010-06-08 09:02:21.000000000 +0000 @@ -3,7 +3,7 @@ io.c - $Author: shyouhei $ - $Date: 2009-11-25 17:45:13 +0900 (Wed, 25 Nov 2009) $ + $Date: 2010-06-08 18:02:21 +0900 (Tue, 08 Jun 2010) $ created at: Fri Oct 15 18:08:59 JST 1993 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -120,6 +120,9 @@ # endif #endif +#define preserving_errno(stmts) \ + do {int saved_errno = errno; stmts; errno = saved_errno;} while (0) + VALUE rb_cIO; VALUE rb_eEOFError; VALUE rb_eIOError; @@ -488,7 +491,7 @@ r = write(fileno(f), RSTRING(str)->ptr+offset, l); TRAP_END; #if BSD_STDIO - fseeko(f, lseek(fileno(f), (off_t)0, SEEK_CUR), SEEK_SET); + preserving_errno(fseeko(f, lseek(fileno(f), (off_t)0, SEEK_CUR), SEEK_SET)); #endif if (r == n) return len; if (0 <= r) { @@ -2890,13 +2893,16 @@ #else # define MODE_BINARY(a,b) (a) #endif + int accmode = flags & O_ACCMODE; if (flags & O_APPEND) { - if ((flags & O_RDWR) == O_RDWR) { + if (accmode == O_WRONLY) { + return MODE_BINARY("a", "ab"); + } + if (accmode == O_RDWR) { return MODE_BINARY("a+", "ab+"); } - return MODE_BINARY("a", "ab"); } - switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) { + switch (accmode) { case O_RDONLY: return MODE_BINARY("r", "rb"); case O_WRONLY: @@ -3245,6 +3251,7 @@ } retry: + rb_thread_stop_timer(); switch ((pid = fork())) { case 0: /* child */ if (modef & FMODE_READABLE) { @@ -3272,11 +3279,13 @@ ruby_sourcefile, ruby_sourceline, pname); _exit(127); } + rb_thread_start_timer(); rb_io_synchronized(RFILE(orig_stdout)->fptr); rb_io_synchronized(RFILE(orig_stderr)->fptr); return Qnil; case -1: /* fork failed */ + rb_thread_start_timer(); if (errno == EAGAIN) { rb_thread_sleep(1); goto retry; @@ -3297,6 +3306,7 @@ break; default: /* parent */ + rb_thread_start_timer(); if (pid < 0) rb_sys_fail(pname); else { VALUE port = io_alloc(rb_cIO); @@ -5462,6 +5472,18 @@ return io_read(arg->argc, &arg->sep, arg->io); } +struct seek_arg { + VALUE io; + VALUE offset; + int mode; +}; + +static VALUE +seek_before_read(struct seek_arg *arg) +{ + return rb_io_seek(arg->io, arg->offset, arg->mode); +} + /* * call-seq: * IO.read(name, [length [, offset]] ) => string @@ -5491,7 +5513,16 @@ arg.io = rb_io_open(StringValueCStr(fname), "r"); if (NIL_P(arg.io)) return Qnil; if (!NIL_P(offset)) { - rb_io_seek(arg.io, offset, SEEK_SET); + struct seek_arg sarg; + int state = 0; + sarg.io = arg.io; + sarg.offset = offset; + sarg.mode = SEEK_SET; + rb_protect((VALUE (*)(VALUE))seek_before_read, (VALUE)&sarg, &state); + if (state) { + rb_io_close(arg.io); + rb_jump_tag(state); + } } return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io); } diff -Nru ruby1.8-1.8.7.249/LEGAL ruby1.8-1.8.7.302/LEGAL --- ruby1.8-1.8.7.249/LEGAL 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/LEGAL 2010-06-08 06:12:33.000000000 +0000 @@ -45,7 +45,6 @@ config.guess: config.sub: -parse.c: As long as you distribute these files with the file configure, they are covered under the Ruby's license. @@ -72,6 +71,43 @@ configuration script generated by Autoconf, you may include it under the same distribution terms that you use for the rest of that program. +parse.c: + + This file is licensed under the GPL, but is incorporated into Ruby and + redistributed under the terms of the Ruby license, as permitted by the + exception to the GPL below. + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + + /* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + util.c (partly): win32/win32.[ch]: diff -Nru ruby1.8-1.8.7.249/lib/date.rb ruby1.8-1.8.7.302/lib/date.rb --- ruby1.8-1.8.7.249/lib/date.rb 2009-01-29 02:54:38.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/date.rb 2010-06-08 04:45:42.000000000 +0000 @@ -1,7 +1,7 @@ # # date.rb - date and time library # -# Author: Tadayoshi Funaba 1998-2008 +# Author: Tadayoshi Funaba 1998-2010 # # Documentation: William Webber # @@ -1305,7 +1305,10 @@ y, m = (year * 12 + (mon - 1) + n).divmod(12) m, = (m + 1) .divmod(1) d = mday - d -= 1 until jd2 = self.class.valid_civil?(y, m, d, fix_style) + until jd2 = self.class.valid_civil?(y, m, d, fix_style) + d -= 1 + raise ArgumentError, 'invalid date' unless d > 0 + end self + (jd2 - jd) end diff -Nru ruby1.8-1.8.7.249/lib/fileutils.rb ruby1.8-1.8.7.302/lib/fileutils.rb --- ruby1.8-1.8.7.249/lib/fileutils.rb 2009-06-29 04:21:32.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/fileutils.rb 2010-06-08 06:31:50.000000000 +0000 @@ -418,6 +418,7 @@ fu_check_options options, OPT_TABLE['cp_r'] fu_output_message "cp -r#{options[:preserve] ? 'p' : ''}#{options[:remove_destination] ? ' --remove-destination' : ''} #{[src,dest].flatten.join ' '}" if options[:verbose] return if options[:noop] + options = options.dup options[:dereference_root] = true unless options.key?(:dereference_root) fu_each_src_dest(src, dest) do |s, d| copy_entry s, d, options[:preserve], options[:dereference_root], options[:remove_destination] diff -Nru ruby1.8-1.8.7.249/lib/net/http.rb ruby1.8-1.8.7.302/lib/net/http.rb --- ruby1.8-1.8.7.249/lib/net/http.rb 2009-11-19 06:32:19.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/net/http.rb 2010-06-16 06:57:47.000000000 +0000 @@ -22,7 +22,7 @@ # http://www.ruby-lang.org/ja/man/?cmd=view;name=net%2Fhttp.rb # #-- -# $Id: http.rb 25851 2009-11-19 06:32:19Z shyouhei $ +# $Id: http.rb 28336 2010-06-16 06:57:47Z shyouhei $ #++ require 'net/protocol' @@ -278,7 +278,7 @@ class HTTP < Protocol # :stopdoc: - Revision = %q$Revision: 25851 $.split[1] + Revision = %q$Revision: 28336 $.split[1] HTTPVersion = '1.1' @newimpl = true # :startdoc: @@ -1044,7 +1044,8 @@ end req.set_body_internal body - begin_transport req + begin + begin_transport req req.exec @socket, @curr_http_version, edit_path(req.path) begin res = HTTPResponse.read_new(@socket) @@ -1052,13 +1053,14 @@ res.reading_body(@socket, req.response_body_permitted?) { yield res if block_given? } - end_transport req, res + end_transport req, res + rescue => exception + D "Conn close because of error #{exception}" + @socket.close unless @socket.closed? + raise exception + end res - rescue => exception - D "Conn close because of error #{exception}" - @socket.close unless @socket.closed? - raise exception end private @@ -1364,13 +1366,13 @@ return nil unless @header['content-range'] m = %ri.match(self['Content-Range']) or raise HTTPHeaderSyntaxError, 'wrong Content-Range format' - m[1].to_i .. m[2].to_i + 1 + m[1].to_i .. m[2].to_i end # The length of the range represented in Content-Range: header. def range_length r = content_range() or return nil - r.end - r.begin + r.end - r.begin + 1 end # Returns a content type string such as "text/html". @@ -1467,6 +1469,8 @@ include HTTPHeader + BUFSIZE = 16*1024 + def initialize(m, reqbody, resbody, path, initheader = nil) @method = m @request_has_body = reqbody @@ -1552,12 +1556,12 @@ supply_default_content_type write_header sock, ver, path if chunked? - while s = f.read(1024) + while s = f.read(BUFSIZE) sock.write(sprintf("%x\r\n", s.length) << s << "\r\n") end sock.write "0\r\n\r\n" else - while s = f.read(1024) + while s = f.read(BUFSIZE) sock.write s end end diff -Nru ruby1.8-1.8.7.249/lib/net/imap.rb ruby1.8-1.8.7.302/lib/net/imap.rb --- ruby1.8-1.8.7.249/lib/net/imap.rb 2009-11-24 07:14:33.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/net/imap.rb 2010-06-08 07:50:07.000000000 +0000 @@ -841,7 +841,7 @@ # Encode a string from UTF-8 format to modified UTF-7. def self.encode_utf7(s) - return s.gsub(/(&)|([^\x20-\x25\x27-\x7e]+)/n) { |x| + return s.gsub(/(&)|([^\x20-\x7e]+)/u) { |x| if $1 "&-" else @@ -913,6 +913,7 @@ @continuation_request = nil @logout_command_tag = nil @debug_output_bol = true + @exception = nil @greeting = get_response if @greeting.name == "BYE" @@ -928,14 +929,24 @@ def receive_responses while true + synchronize do + @exception = nil + end begin resp = get_response - rescue Exception - @sock.close - @client_thread.raise($!) + rescue Exception => e + synchronize do + @sock.close unless @sock.closed? + @exception = e + end + break + end + unless resp + synchronize do + @exception = EOFError.new("end of file reached") + end break end - break unless resp begin synchronize do case resp @@ -953,7 +964,9 @@ end if resp.name == "BYE" && @logout_command_tag.nil? @sock.close - raise ByeResponseError, resp.raw_data + @exception = ByeResponseError.new(resp.raw_data) + @response_arrival.broadcast + return end when ContinuationRequest @continuation_request = resp @@ -963,14 +976,21 @@ handler.call(resp) end end - rescue Exception - @client_thread.raise($!) + rescue Exception => e + @exception = e + synchronize do + @response_arrival.broadcast + end end end + synchronize do + @response_arrival.broadcast + end end def get_tagged_response(tag) until @tagged_responses.key?(tag) + raise @exception if @exception @response_arrival.wait end return pick_up_tagged_response(tag) @@ -1103,6 +1123,7 @@ while @continuation_request.nil? && !@tagged_responses.key?(Thread.current[:net_imap_tag]) @response_arrival.wait + raise @exception if @exception end if @continuation_request.nil? pick_up_tagged_response(Thread.current[:net_imap_tag]) @@ -1164,9 +1185,15 @@ end def fetch_internal(cmd, set, attr) - if attr.instance_of?(String) + case attr + when String then attr = RawData.new(attr) + when Array then + attr = attr.map { |arg| + arg.is_a?(String) ? RawData.new(arg) : arg + } end + synchronize do @responses.delete("FETCH") send_command(cmd, MessageSet.new(set), attr) diff -Nru ruby1.8-1.8.7.249/lib/net/smtp.rb ruby1.8-1.8.7.302/lib/net/smtp.rb --- ruby1.8-1.8.7.249/lib/net/smtp.rb 2008-08-04 05:51:11.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/net/smtp.rb 2010-06-08 06:14:59.000000000 +0000 @@ -14,7 +14,7 @@ # NOTE: You can find Japanese version of this document at: # http://www.ruby-lang.org/ja/man/html/net_smtp.html # -# $Id: smtp.rb 18353 2008-08-04 05:51:11Z shyouhei $ +# $Id: smtp.rb 28208 2010-06-08 06:14:59Z shyouhei $ # # See Net::SMTP for documentation. # @@ -172,7 +172,7 @@ # class SMTP - Revision = %q$Revision: 18353 $.split[1] + Revision = %q$Revision: 28208 $.split[1] # The default SMTP port number, 25. def SMTP.default_port @@ -651,8 +651,7 @@ def send_message(msgstr, from_addr, *to_addrs) raise IOError, 'closed session' unless @socket mailfrom from_addr - rcptto_list to_addrs - data msgstr + rcptto_list(to_addrs) {data msgstr} end alias send_mail send_message @@ -705,8 +704,7 @@ def open_message_stream(from_addr, *to_addrs, &block) # :yield: stream raise IOError, 'closed session' unless @socket mailfrom from_addr - rcptto_list to_addrs - data(&block) + rcptto_list(to_addrs) {data(&block)} end alias ready open_message_stream # obsolete @@ -830,9 +828,23 @@ def rcptto_list(to_addrs) raise ArgumentError, 'mail destination not given' if to_addrs.empty? + ok_users = [] + unknown_users = [] to_addrs.flatten.each do |addr| - rcptto addr + begin + rcptto addr + rescue SMTPAuthenticationError + unknown_users << addr.dump + else + ok_users << addr + end + end + raise ArgumentError, 'mail destination not given' if ok_users.empty? + ret = yield + unless unknown_users.empty? + raise SMTPAuthenticationError, "failed to deliver for #{unknown_users.join(', ')}" end + ret end def rcptto(to_addr) diff -Nru ruby1.8-1.8.7.249/lib/pathname.rb ruby1.8-1.8.7.302/lib/pathname.rb --- ruby1.8-1.8.7.249/lib/pathname.rb 2009-07-01 06:48:23.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/pathname.rb 2010-06-16 07:01:05.000000000 +0000 @@ -260,7 +260,7 @@ ensure Thread.current[:pathname_sub_matchdata] = old end - yield *args + yield(*args) } else path = @path.sub(pattern, *rest) diff -Nru ruby1.8-1.8.7.249/lib/rational.rb ruby1.8-1.8.7.302/lib/rational.rb --- ruby1.8-1.8.7.249/lib/rational.rb 2008-05-24 17:49:34.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/rational.rb 2010-06-08 05:02:31.000000000 +0000 @@ -387,7 +387,7 @@ # Converts the rational to a Float. # def to_f - @numerator.to_f/@denominator.to_f + @numerator.fdiv(@denominator) end # diff -Nru ruby1.8-1.8.7.249/lib/resolv.rb ruby1.8-1.8.7.302/lib/resolv.rb --- ruby1.8-1.8.7.249/lib/resolv.rb 2009-11-20 06:52:18.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/resolv.rb 2010-05-22 13:31:52.000000000 +0000 @@ -503,10 +503,11 @@ end def make_requester # :nodoc: - if nameserver = @config.single? - Requester::ConnectedUDP.new(nameserver) + nameserver_port = @config.nameserver_port + if nameserver_port.length == 1 + Requester::ConnectedUDP.new(*nameserver_port[0]) else - Requester::UnconnectedUDP.new + Requester::UnconnectedUDP.new(*nameserver_port) end end @@ -592,10 +593,10 @@ } end - def self.bind_random_port(udpsock, is_ipv6=false) # :nodoc: + def self.bind_random_port(udpsock, bind_host="0.0.0.0") # :nodoc: begin port = rangerand(1024..65535) - udpsock.bind(is_ipv6 ? "::" : "", port) + udpsock.bind(bind_host, port) rescue Errno::EADDRINUSE retry end @@ -604,18 +605,23 @@ class Requester # :nodoc: def initialize @senders = {} - @sock = nil + @socks = nil end def request(sender, tout) timelimit = Time.now + tout sender.send - while (now = Time.now) < timelimit + while true + now = Time.now timeout = timelimit - now - if !IO.select([@sock], nil, nil, timeout) + if timeout <= 0 raise ResolvTimeout end - reply, from = recv_reply + select_result = IO.select(@socks, nil, nil, timeout) + if !select_result + raise ResolvTimeout + end + reply, from = recv_reply(select_result[0]) begin msg = Message.decode(reply) rescue DecodeError @@ -631,9 +637,11 @@ end def close - sock = @sock - @sock = nil - sock.close if sock + socks = @socks + @socks = nil + if socks + socks.each {|sock| sock.close } + end end class Sender # :nodoc: @@ -645,15 +653,30 @@ end class UnconnectedUDP < Requester # :nodoc: - def initialize + def initialize(*nameserver_port) super() - @sock = UDPSocket.new - @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD - DNS.bind_random_port(@sock) + @nameserver_port = nameserver_port + @socks_hash = {} + @socks = [] + nameserver_port.each {|host, port| + if host.index(':') + bind_host = "::" + af = Socket::AF_INET6 + else + bind_host = "0.0.0.0" + af = Socket::AF_INET + end + next if @socks_hash[bind_host] + sock = UDPSocket.new(af) + sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD + DNS.bind_random_port(sock, bind_host) + @socks << sock + @socks_hash[bind_host] = sock + } end - def recv_reply - reply, from = @sock.recvfrom(UDPSize) + def recv_reply(readable_socks) + reply, from = readable_socks[0].recvfrom(UDPSize) return reply, [from[3],from[1]] end @@ -662,8 +685,9 @@ id = DNS.allocate_request_id(host, port) request = msg.encode request[0,2] = [id].pack('n') + sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"] return @senders[[service, id]] = - Sender.new(request, data, @sock, host, port) + Sender.new(request, data, sock, host, port) end def close @@ -693,14 +717,15 @@ @host = host @port = port is_ipv6 = host.index(':') - @sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET) - DNS.bind_random_port(@sock, is_ipv6) - @sock.connect(host, port) - @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD + sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET) + @socks = [sock] + sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD + DNS.bind_random_port(sock, is_ipv6 ? "::" : "0.0.0.0") + sock.connect(host, port) end - def recv_reply - reply = @sock.recv(UDPSize) + def recv_reply(readable_socks) + reply = readable_socks[0].recv(UDPSize) return reply, nil end @@ -711,7 +736,7 @@ id = DNS.allocate_request_id(@host, @port) request = msg.encode request[0,2] = [id].pack('n') - return @senders[[nil,id]] = Sender.new(request, data, @sock) + return @senders[[nil,id]] = Sender.new(request, data, @socks[0]) end def close @@ -734,14 +759,15 @@ super() @host = host @port = port - @sock = TCPSocket.new(@host, @port) - @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD + sock = TCPSocket.new(@host, @port) + @socks = [sock] + sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD @senders = {} end - def recv_reply - len = @sock.read(2).unpack('n')[0] - reply = @sock.read(len) + def recv_reply(readable_socks) + len = readable_socks[0].read(2).unpack('n')[0] + reply = @socks[0].read(len) return reply, nil end @@ -752,7 +778,7 @@ id = DNS.allocate_request_id(@host, @port) request = msg.encode request[0,2] = [request.length, id].pack('nn') - return @senders[[nil,id]] = Sender.new(request, data, @sock) + return @senders[[nil,id]] = Sender.new(request, data, @socks[0]) end class Sender < Requester::Sender # :nodoc: @@ -901,6 +927,12 @@ end end + def nameserver_port + lazy_initialize + @nameserver_port ||= @nameserver.map {|i| [i, Port] } + @nameserver_port + end + def generate_candidates(name) candidates = nil name = Name.create(name) diff -Nru ruby1.8-1.8.7.249/lib/rss/maker/base.rb ruby1.8-1.8.7.302/lib/rss/maker/base.rb --- ruby1.8-1.8.7.249/lib/rss/maker/base.rb 2008-02-11 08:26:47.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/rss/maker/base.rb 2010-05-20 07:14:37.000000000 +0000 @@ -341,7 +341,7 @@ :date => date, :dc_dates => dc_dates.to_a.dup, } - _date = date + _date = _parse_date_if_needed(date) if _date and !dc_dates.any? {|dc_date| dc_date.value == _date} dc_date = self.class::DublinCoreDates::DublinCoreDate.new(self) dc_date.value = _date.dup @@ -353,6 +353,11 @@ date = keep[:date] dc_dates.replace(keep[:dc_dates]) end + + def _parse_date_if_needed(date_value) + date_value = Time.parse(date_value) if date_value.is_a?(String) + date_value + end end class RSSBase < Base @@ -472,12 +477,24 @@ end %w(id about language - managingEditor webMaster rating docs date - lastBuildDate ttl).each do |element| + managingEditor webMaster rating docs ttl).each do |element| attr_accessor element add_need_initialize_variable(element) end + %w(date lastBuildDate).each do |date_element| + attr_reader date_element + add_need_initialize_variable(date_element) + end + + def date=(_date) + @date = _parse_date_if_needed(_date) + end + + def lastBuildDate=(_date) + @lastBuildDate = _parse_date_if_needed(_date) + end + def pubDate date end @@ -672,11 +689,20 @@ def_classed_elements(name, attribute) end - %w(date comments id published).each do |element| + %w(comments id published).each do |element| attr_accessor element add_need_initialize_variable(element) end + %w(date).each do |date_element| + attr_reader date_element + add_need_initialize_variable(date_element) + end + + def date=(_date) + @date = _parse_date_if_needed(_date) + end + def pubDate date end @@ -725,6 +751,8 @@ end class SourceBase < Base + include SetupDefaultDate + %w(authors categories contributors generator icon logo rights subtitle title).each do |name| def_classed_element(name) @@ -736,7 +764,7 @@ def_classed_elements(name, attribute) end - %w(id content date).each do |element| + %w(id content).each do |element| attr_accessor element add_need_initialize_variable(element) end @@ -744,6 +772,15 @@ alias_method(:url, :link) alias_method(:url=, :link=) + %w(date).each do |date_element| + attr_reader date_element + add_need_initialize_variable(date_element) + end + + def date=(_date) + @date = _parse_date_if_needed(_date) + end + def updated date end diff -Nru ruby1.8-1.8.7.249/lib/thwait.rb ruby1.8-1.8.7.302/lib/thwait.rb --- ruby1.8-1.8.7.249/lib/thwait.rb 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/thwait.rb 2010-06-08 07:08:15.000000000 +0000 @@ -101,7 +101,8 @@ end # - # Waits for specified threads to terminate. + # Waits for specified threads to terminate, and returns when one of + # the threads terminated. # def join(*threads) join_nowait(*threads) diff -Nru ruby1.8-1.8.7.249/lib/timeout.rb ruby1.8-1.8.7.302/lib/timeout.rb --- ruby1.8-1.8.7.249/lib/timeout.rb 2008-02-13 16:43:18.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/timeout.rb 2010-06-08 06:24:25.000000000 +0000 @@ -56,8 +56,13 @@ begin x = Thread.current y = Thread.start { - sleep sec - x.raise exception, "execution expired" if x.alive? + begin + sleep sec + rescue => e + x.raise e + else + x.raise exception, "execution expired" if x.alive? + end } yield sec # return true @@ -73,7 +78,10 @@ # would be expected outside. raise Error, e.message, e.backtrace ensure - y.kill if y and y.alive? + if y and y.alive? + y.kill + y.join # make sure y is dead. + end end end diff -Nru ruby1.8-1.8.7.249/lib/uri/generic.rb ruby1.8-1.8.7.302/lib/uri/generic.rb --- ruby1.8-1.8.7.249/lib/uri/generic.rb 2008-04-19 11:56:22.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/uri/generic.rb 2010-04-19 21:42:04.000000000 +0000 @@ -3,7 +3,7 @@ # # Author:: Akira Yamada # License:: You can redistribute it and/or modify it under the same term as Ruby. -# Revision:: $Id: generic.rb 16085 2008-04-19 11:56:22Z knu $ +# Revision:: $Id: generic.rb 27406 2010-04-19 21:42:04Z shyouhei $ # require 'uri/common' @@ -1054,6 +1054,7 @@ end def eql?(oth) + self.class == oth.class && self.component_ary.eql?(oth.component_ary) end diff -Nru ruby1.8-1.8.7.249/lib/webrick/httpresponse.rb ruby1.8-1.8.7.302/lib/webrick/httpresponse.rb --- ruby1.8-1.8.7.249/lib/webrick/httpresponse.rb 2008-06-06 08:05:24.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/webrick/httpresponse.rb 2010-08-16 07:31:35.000000000 +0000 @@ -209,7 +209,7 @@ @keep_alive = false self.status = HTTPStatus::RC_INTERNAL_SERVER_ERROR end - @header['content-type'] = "text/html" + @header['content-type'] = "text/html; charset=ISO-8859-1" if respond_to?(:create_error_page) create_error_page() diff -Nru ruby1.8-1.8.7.249/lib/webrick/httpservlet/filehandler.rb ruby1.8-1.8.7.302/lib/webrick/httpservlet/filehandler.rb --- ruby1.8-1.8.7.249/lib/webrick/httpservlet/filehandler.rb 2008-05-18 15:02:36.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/webrick/httpservlet/filehandler.rb 2010-05-20 07:58:00.000000000 +0000 @@ -87,7 +87,7 @@ content = io.read(last-first+1) body << "--" << boundary << CRLF body << "Content-Type: #{mtype}" << CRLF - body << "Content-Range: #{first}-#{last}/#{filesize}" << CRLF + body << "Content-Range: bytes #{first}-#{last}/#{filesize}" << CRLF body << CRLF body << content body << CRLF @@ -107,7 +107,7 @@ content = io.read(last-first+1) end res['content-type'] = mtype - res['content-range'] = "#{first}-#{last}/#{filesize}" + res['content-range'] = "bytes #{first}-#{last}/#{filesize}" res['content-length'] = last - first + 1 res.body = content else diff -Nru ruby1.8-1.8.7.249/lib/webrick/httpstatus.rb ruby1.8-1.8.7.302/lib/webrick/httpstatus.rb --- ruby1.8-1.8.7.249/lib/webrick/httpstatus.rb 2010-01-10 10:30:06.000000000 +0000 +++ ruby1.8-1.8.7.302/lib/webrick/httpstatus.rb 2010-06-10 05:23:49.000000000 +0000 @@ -13,8 +13,9 @@ module HTTPStatus class Status < StandardError - def initialize(message=self.class, *rest) - super(AccessLog.escape(message), *rest) + def initialize(*args) + args[0] = AccessLog.escape(args[0]) unless args.empty? + super(*args) end class << self attr_reader :code, :reason_phrase diff -Nru ruby1.8-1.8.7.249/Makefile.in ruby1.8-1.8.7.302/Makefile.in --- ruby1.8-1.8.7.249/Makefile.in 2009-05-26 12:27:14.000000000 +0000 +++ ruby1.8-1.8.7.302/Makefile.in 2010-06-08 09:26:34.000000000 +0000 @@ -134,7 +134,7 @@ if RUBY_PLATFORM =~ /mswin|bccwin|mingw/; \ class File; \ remove_const :ALT_SEPARATOR; \ - ALT_SEPARATOR = "\\"; \ + ALT_SEPARATOR = "\\\\"; \ end; \ end; \ ' > $@ diff -Nru ruby1.8-1.8.7.249/marshal.c ruby1.8-1.8.7.302/marshal.c --- ruby1.8-1.8.7.249/marshal.c 2009-12-13 15:14:02.000000000 +0000 +++ ruby1.8-1.8.7.302/marshal.c 2010-06-23 13:16:28.000000000 +0000 @@ -3,7 +3,7 @@ marshal.c - $Author: shyouhei $ - $Date: 2009-12-14 00:14:02 +0900 (Mon, 14 Dec 2009) $ + $Date: 2010-06-23 22:16:28 +0900 (Wed, 23 Jun 2010) $ created at: Thu Apr 27 16:30:01 JST 1995 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -85,10 +85,12 @@ static ID s_getc, s_read, s_write, s_binmode; struct dump_arg { + VALUE obj; VALUE str, dest; st_table *symbols; st_table *data; int taint; + VALUE wrapper; }; struct dump_call_arg { @@ -102,32 +104,22 @@ struct dump_arg *arg; ID sym; { - if (!arg->symbols) { + if (!DATA_PTR(arg->wrapper)) { rb_raise(rb_eRuntimeError, "Marshal.dump reentered at %s", rb_id2name(sym)); } } -static void clear_dump_arg _((struct dump_arg *arg)); - static void mark_dump_arg(ptr) void *ptr; { struct dump_arg *p = ptr; - if (!p->symbols) + if (!ptr) return; rb_mark_set(p->data); } -static void -free_dump_arg(ptr) - void *ptr; -{ - clear_dump_arg(ptr); - xfree(ptr); -} - static VALUE class2path(klass) VALUE klass; @@ -707,17 +699,32 @@ } } -static void -clear_dump_arg(arg) +static VALUE +dump(arg) + struct dump_call_arg *arg; +{ + w_object(arg->obj, arg->arg, arg->limit); + if (arg->arg->dest) { + rb_io_write(arg->arg->dest, arg->arg->str); + rb_str_resize(arg->arg->str, 0); + } + return 0; +} + +static VALUE +dump_ensure(arg) struct dump_arg *arg; { - if (!arg->symbols) return; + if (!DATA_PTR(arg->wrapper)) return 0; st_free_table(arg->symbols); - arg->symbols = 0; st_free_table(arg->data); + DATA_PTR(arg->wrapper) = 0; + arg->wrapper = 0; if (arg->taint) { OBJ_TAINT(arg->str); } + + return 0; } /* @@ -753,8 +760,8 @@ { VALUE obj, port, a1, a2; int limit = -1; - struct dump_arg *arg; - VALUE wrapper; + struct dump_arg arg; + struct dump_call_arg c_arg; port = Qnil; rb_scan_args(argc, argv, "12", &obj, &a1, &a2); @@ -768,40 +775,37 @@ else if (NIL_P(a1)) goto type_error; else port = a1; } - wrapper = Data_Make_Struct(rb_cData, struct dump_arg, mark_dump_arg, free_dump_arg, arg); - arg->dest = 0; - arg->symbols = st_init_numtable(); - arg->data = st_init_numtable(); - arg->taint = Qfalse; - arg->str = rb_str_buf_new(0); - RBASIC(arg->str)->klass = 0; + arg.dest = 0; + arg.symbols = st_init_numtable(); + arg.data = st_init_numtable(); + arg.taint = Qfalse; + arg.str = rb_str_buf_new(0); + RBASIC(arg.str)->klass = 0; + arg.wrapper = Data_Wrap_Struct(rb_cData, mark_dump_arg, 0, &arg); if (!NIL_P(port)) { if (!rb_respond_to(port, s_write)) { type_error: rb_raise(rb_eTypeError, "instance of IO needed"); } - arg->dest = port; + arg.dest = port; if (rb_respond_to(port, s_binmode)) { rb_funcall2(port, s_binmode, 0, 0); - check_dump_arg(arg, s_binmode); + check_dump_arg(&arg, s_binmode); } } else { - port = arg->str; + port = arg.str; } - w_byte(MARSHAL_MAJOR, arg); - w_byte(MARSHAL_MINOR, arg); + c_arg.obj = obj; + c_arg.arg = &arg; + c_arg.limit = limit; - w_object(obj, arg, limit); - if (arg->dest) { - rb_io_write(arg->dest, arg->str); - rb_str_resize(arg->str, 0); - } + w_byte(MARSHAL_MAJOR, &arg); + w_byte(MARSHAL_MINOR, &arg); - RBASIC(arg->str)->klass = rb_cString; - clear_dump_arg(arg); - RB_GC_GUARD(wrapper); + rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg); + RBASIC(arg.str)->klass = rb_cString; return port; } @@ -813,6 +817,7 @@ st_table *data; VALUE proc; int taint; + VALUE wrapper; }; static void @@ -820,31 +825,22 @@ struct load_arg *arg; ID sym; { - if (!arg->symbols) { + if (!DATA_PTR(arg->wrapper)) { rb_raise(rb_eRuntimeError, "Marshal.load reentered at %s", rb_id2name(sym)); } } -static void clear_load_arg _((struct load_arg *arg)); - static void mark_load_arg(ptr) void *ptr; { struct load_arg *p = ptr; - if (!p->symbols) + if (!ptr) return; rb_mark_tbl(p->data); } -static void -free_load_arg(void *ptr) -{ - clear_load_arg(ptr); - xfree(ptr); -} - static VALUE r_object _((struct load_arg *arg)); static int @@ -1419,14 +1415,23 @@ return r_object0(arg, arg->proc, 0, Qnil); } -static void -clear_load_arg(arg) +static VALUE +load(arg) struct load_arg *arg; { - if (!arg->symbols) return; + return r_object(arg); +} + +static VALUE +load_ensure(arg) + struct load_arg *arg; +{ + if (!DATA_PTR(arg->wrapper)) return 0; st_free_table(arg->symbols); - arg->symbols = 0; st_free_table(arg->data); + DATA_PTR(arg->wrapper) = 0; + arg->wrapper = 0; + return 0; } /* @@ -1447,8 +1452,8 @@ { VALUE port, proc; int major, minor, taint = Qfalse; - VALUE v, wrapper; - struct load_arg *arg; + VALUE v; + struct load_arg arg; rb_scan_args(argc, argv, "11", &port, &proc); v = rb_check_string_type(port); @@ -1465,18 +1470,17 @@ else { rb_raise(rb_eTypeError, "instance of IO needed"); } - wrapper = Data_Make_Struct(rb_cData, struct load_arg, mark_load_arg, free_load_arg, arg); - arg->src = port; - arg->offset = 0; - arg->symbols = st_init_numtable(); - arg->data = st_init_numtable(); - arg->proc = 0; - arg->taint = taint; + arg.src = port; + arg.offset = 0; + arg.symbols = st_init_numtable(); + arg.data = st_init_numtable(); + arg.proc = 0; + arg.wrapper = Data_Wrap_Struct(rb_cData, mark_load_arg, 0, &arg); + arg.taint = taint; - major = r_byte(arg); - minor = r_byte(arg); + major = r_byte(&arg); + minor = r_byte(&arg); if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) { - clear_load_arg(arg); rb_raise(rb_eTypeError, "incompatible marshal file format (can't be read)\n\ \tformat version %d.%d required; %d.%d given", MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); @@ -1487,10 +1491,8 @@ MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); } - if (!NIL_P(proc)) arg->proc = proc; - v = r_object(arg); - clear_load_arg(arg); - RB_GC_GUARD(wrapper); + if (!NIL_P(proc)) arg.proc = proc; + v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg); return v; } diff -Nru ruby1.8-1.8.7.249/NEWS ruby1.8-1.8.7.302/NEWS --- ruby1.8-1.8.7.249/NEWS 2009-11-08 21:29:22.000000000 +0000 +++ ruby1.8-1.8.7.302/NEWS 2010-04-16 23:25:51.000000000 +0000 @@ -78,6 +78,7 @@ * Array#reject * Array#reject! * Array#delete_if + * Array#select Return an enumerator if no block is given. diff -Nru ruby1.8-1.8.7.249/pack.c ruby1.8-1.8.7.302/pack.c --- ruby1.8-1.8.7.249/pack.c 2009-02-19 09:02:43.000000000 +0000 +++ ruby1.8-1.8.7.302/pack.c 2010-06-08 08:42:55.000000000 +0000 @@ -3,7 +3,7 @@ pack.c - $Author: shyouhei $ - $Date: 2009-02-19 18:02:43 +0900 (Thu, 19 Feb 2009) $ + $Date: 2010-06-08 17:42:55 +0900 (Tue, 08 Jun 2010) $ created at: Thu Feb 10 15:17:05 JST 1994 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -14,6 +14,12 @@ #include #include +#define GCC_VERSION_SINCE(major, minor, patchlevel) \ + (defined(__GNUC__) && !defined(__INTEL_COMPILER) && \ + ((__GNUC__ > (major)) || \ + (__GNUC__ == (major) && __GNUC_MINOR__ > (minor)) || \ + (__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel)))) + #define SIZE16 2 #define SIZE32 4 @@ -21,33 +27,40 @@ # define NATINT_PACK #endif +#ifdef DYNAMIC_ENDIAN + /* for universal binary of NEXTSTEP and MacOS X */ + /* useless since autoconf 2.63? */ + static int + is_bigendian(void) + { + static int init = 0; + static int endian_value; + char *p; + + if (init) return endian_value; + init = 1; + p = (char*)&init; + return endian_value = p[0]?0:1; + } +# define BIGENDIAN_P() (is_bigendian()) +#elif defined(WORDS_BIGENDIAN) +# define BIGENDIAN_P() 1 +#else +# define BIGENDIAN_P() 0 +#endif + #ifdef NATINT_PACK -# define OFF16B(p) ((char*)(p) + (natint?0:(sizeof(short) - SIZE16))) -# define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32))) -# define NATINT_LEN(type,len) (natint?sizeof(type):(len)) -# ifdef WORDS_BIGENDIAN -# define OFF16(p) OFF16B(p) -# define OFF32(p) OFF32B(p) -# endif -# define NATINT_HTOVS(x) (natint?htovs(x):htov16(x)) -# define NATINT_HTOVL(x) (natint?htovl(x):htov32(x)) -# define NATINT_HTONS(x) (natint?htons(x):hton16(x)) -# define NATINT_HTONL(x) (natint?htonl(x):hton32(x)) +# define NATINT_LEN(type,len) (natint?(int)sizeof(type):(int)(len)) #else -# define NATINT_LEN(type,len) sizeof(type) -# define NATINT_HTOVS(x) htovs(x) -# define NATINT_HTOVL(x) htovl(x) -# define NATINT_HTONS(x) htons(x) -# define NATINT_HTONL(x) htonl(x) +# define NATINT_LEN(type,len) ((int)sizeof(type)) #endif -#ifndef OFF16 -# define OFF16(p) (char*)(p) -# define OFF32(p) (char*)(p) -#endif -#ifndef OFF16B -# define OFF16B(p) (char*)(p) -# define OFF32B(p) (char*)(p) +#if SIZEOF_LONG == 8 +# define INT64toNUM(x) LONG2NUM(x) +# define UINT64toNUM(x) ULONG2NUM(x) +#elif defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8 +# define INT64toNUM(x) LL2NUM(x) +# define UINT64toNUM(x) ULL2NUM(x) #endif #define define_swapx(x, xtype) \ @@ -73,262 +86,185 @@ return r; \ } +#if GCC_VERSION_SINCE(4,3,0) +# define swap32(x) __builtin_bswap32(x) +# define swap64(x) __builtin_bswap64(x) +#endif + #ifndef swap16 -#define swap16(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF)) +# define swap16(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF)) #endif -#if SIZEOF_SHORT == 2 -#define swaps(x) swap16(x) -#else -#if SIZEOF_SHORT == 4 -#define swaps(x) ((((x)&0xFF)<<24) \ + +#ifndef swap32 +# define swap32(x) ((((x)&0xFF)<<24) \ |(((x)>>24)&0xFF) \ |(((x)&0x0000FF00)<<8) \ |(((x)&0x00FF0000)>>8) ) -#else -define_swapx(s,short) #endif + +#ifndef swap64 +# ifdef HAVE_INT64_T +# define byte_in_64bit(n) ((uint64_t)0xff << (n)) +# define swap64(x) ((((x)&byte_in_64bit(0))<<56) \ + |(((x)>>56)&0xFF) \ + |(((x)&byte_in_64bit(8))<<40) \ + |(((x)&byte_in_64bit(48))>>40) \ + |(((x)&byte_in_64bit(16))<<24) \ + |(((x)&byte_in_64bit(40))>>24) \ + |(((x)&byte_in_64bit(24))<<8) \ + |(((x)&byte_in_64bit(32))>>8)) +# endif #endif -#ifndef swap32 -#define swap32(x) ((((x)&0xFF)<<24) \ - |(((x)>>24)&0xFF) \ - |(((x)&0x0000FF00)<<8) \ - |(((x)&0x00FF0000)>>8) ) +#if SIZEOF_SHORT == 2 +# define swaps(x) swap16(x) +#elif SIZEOF_SHORT == 4 +# define swaps(x) swap32(x) +#else + define_swapx(s,short) #endif -#if SIZEOF_LONG == 4 -#define swapl(x) swap32(x) + +#if SIZEOF_INT == 2 +# define swapi(x) swap16(x) +#elif SIZEOF_INT == 4 +# define swapi(x) swap32(x) #else -#if SIZEOF_LONG == 8 -#define swapl(x) ((((x)&0x00000000000000FF)<<56) \ - |(((x)&0xFF00000000000000)>>56) \ - |(((x)&0x000000000000FF00)<<40) \ - |(((x)&0x00FF000000000000)>>40) \ - |(((x)&0x0000000000FF0000)<<24) \ - |(((x)&0x0000FF0000000000)>>24) \ - |(((x)&0x00000000FF000000)<<8) \ - |(((x)&0x000000FF00000000)>>8)) + define_swapx(i,int) +#endif + +#if SIZEOF_LONG == 4 +# define swapl(x) swap32(x) +#elif SIZEOF_LONG == 8 +# define swapl(x) swap64(x) #else -define_swapx(l,long) + define_swapx(l,long) #endif + +#ifdef HAVE_LONG_LONG +# if SIZEOF_LONG_LONG == 8 +# define swapll(x) swap64(x) +# else + define_swapx(ll,LONG_LONG) +# endif #endif #if SIZEOF_FLOAT == 4 -#if SIZEOF_LONG == 4 /* SIZEOF_FLOAT == 4 == SIZEOF_LONG */ -#define swapf(x) swapl(x) -#define FLOAT_SWAPPER unsigned long -#else -#if SIZEOF_SHORT == 4 /* SIZEOF_FLOAT == 4 == SIZEOF_SHORT */ -#define swapf(x) swaps(x) -#define FLOAT_SWAPPER unsigned short -#else /* SIZEOF_FLOAT == 4 but undivide by known size of int */ -define_swapx(f,float) -#endif /* #if SIZEOF_SHORT == 4 */ -#endif /* #if SIZEOF_LONG == 4 */ +# ifdef HAVE_UINT32_T +# define swapf(x) swap32(x) +# define FLOAT_SWAPPER uint32_t +# else /* SIZEOF_FLOAT == 4 but undivide by known size of int */ + define_swapx(f,float) +# endif #else /* SIZEOF_FLOAT != 4 */ -define_swapx(f,float) + define_swapx(f,float) #endif /* #if SIZEOF_FLOAT == 4 */ #if SIZEOF_DOUBLE == 8 -#if SIZEOF_LONG == 8 /* SIZEOF_DOUBLE == 8 == SIZEOF_LONG */ -#define swapd(x) swapl(x) -#define DOUBLE_SWAPPER unsigned long -#else -#if SIZEOF_LONG == 4 /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_LONG */ -static double -swapd(d) - const double d; -{ - double dtmp = d; - unsigned long utmp[2]; - unsigned long utmp0; - - utmp[0] = 0; utmp[1] = 0; - memcpy(utmp,&dtmp,sizeof(double)); - utmp0 = utmp[0]; - utmp[0] = swapl(utmp[1]); - utmp[1] = swapl(utmp0); - memcpy(&dtmp,utmp,sizeof(double)); - return dtmp; -} -#else -#if SIZEOF_SHORT == 4 /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_SHORT */ -static double -swapd(d) - const double d; -{ - double dtmp = d; - unsigned short utmp[2]; - unsigned short utmp0; - - utmp[0] = 0; utmp[1] = 0; - memcpy(utmp,&dtmp,sizeof(double)); - utmp0 = utmp[0]; - utmp[0] = swaps(utmp[1]); - utmp[1] = swaps(utmp0); - memcpy(&dtmp,utmp,sizeof(double)); - return dtmp; -} -#else /* SIZEOF_DOUBLE == 8 but undivied by known size of int */ -define_swapx(d, double) -#endif /* #if SIZEOF_SHORT == 4 */ -#endif /* #if SIZEOF_LONG == 4 */ -#endif /* #if SIZEOF_LONG == 8 */ +# ifdef HAVE_UINT64_T /* SIZEOF_DOUBLE == 8 == SIZEOF_UINT64_T */ +# define swapd(x) swap64(x) +# define DOUBLE_SWAPPER uint64_t +# else +# if SIZEOF_LONG == 4 /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_LONG */ + static double + swapd(const double d) + { + double dtmp = d; + unsigned long utmp[2]; + unsigned long utmp0; + + utmp[0] = 0; utmp[1] = 0; + memcpy(utmp,&dtmp,sizeof(double)); + utmp0 = utmp[0]; + utmp[0] = swapl(utmp[1]); + utmp[1] = swapl(utmp0); + memcpy(&dtmp,utmp,sizeof(double)); + return dtmp; + } +# elif SIZEOF_SHORT == 4 /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_SHORT */ + static double + swapd(const double d) + { + double dtmp = d; + unsigned short utmp[2]; + unsigned short utmp0; + + utmp[0] = 0; utmp[1] = 0; + memcpy(utmp,&dtmp,sizeof(double)); + utmp0 = utmp[0]; + utmp[0] = swaps(utmp[1]); + utmp[1] = swaps(utmp0); + memcpy(&dtmp,utmp,sizeof(double)); + return dtmp; + } +# else /* SIZEOF_DOUBLE == 8 but undivide by known size of int */ + define_swapx(d, double) +# endif +# endif /* #if SIZEOF_LONG == 8 */ #else /* SIZEOF_DOUBLE != 8 */ -define_swapx(d, double) + define_swapx(d, double) #endif /* #if SIZEOF_DOUBLE == 8 */ #undef define_swapx -#ifdef DYNAMIC_ENDIAN -#ifdef ntohs -#undef ntohs -#undef ntohl -#undef htons -#undef htonl -#endif -static int -endian() -{ - static int init = 0; - static int endian_value; - char *p; - - if (init) return endian_value; - init = 1; - p = (char*)&init; - return endian_value = p[0]?0:1; -} - -#define ntohs(x) (endian()?(x):swaps(x)) -#define ntohl(x) (endian()?(x):swapl(x)) -#define ntohf(x) (endian()?(x):swapf(x)) -#define ntohd(x) (endian()?(x):swapd(x)) -#define htons(x) (endian()?(x):swaps(x)) -#define htonl(x) (endian()?(x):swapl(x)) -#define htonf(x) (endian()?(x):swapf(x)) -#define htond(x) (endian()?(x):swapd(x)) -#define htovs(x) (endian()?swaps(x):(x)) -#define htovl(x) (endian()?swapl(x):(x)) -#define htovf(x) (endian()?swapf(x):(x)) -#define htovd(x) (endian()?swapd(x):(x)) -#define vtohs(x) (endian()?swaps(x):(x)) -#define vtohl(x) (endian()?swapl(x):(x)) -#define vtohf(x) (endian()?swapf(x):(x)) -#define vtohd(x) (endian()?swapd(x):(x)) -# ifdef NATINT_PACK -#define htov16(x) (endian()?swap16(x):(x)) -#define htov32(x) (endian()?swap32(x):(x)) -#define hton16(x) (endian()?(x):swap16(x)) -#define hton32(x) (endian()?(x):swap32(x)) -# endif -#else -#ifdef WORDS_BIGENDIAN -#ifndef ntohs -#define ntohs(x) (x) -#define ntohl(x) (x) -#define htons(x) (x) -#define htonl(x) (x) -#endif -#define ntohf(x) (x) -#define ntohd(x) (x) -#define htonf(x) (x) -#define htond(x) (x) -#define htovs(x) swaps(x) -#define htovl(x) swapl(x) -#define htovf(x) swapf(x) -#define htovd(x) swapd(x) -#define vtohs(x) swaps(x) -#define vtohl(x) swapl(x) -#define vtohf(x) swapf(x) -#define vtohd(x) swapd(x) -# ifdef NATINT_PACK -#define htov16(x) swap16(x) -#define htov32(x) swap32(x) -#define hton16(x) (x) -#define hton32(x) (x) -# endif -#else /* LITTLE ENDIAN */ -#ifdef ntohs -#undef ntohs -#undef ntohl -#undef htons -#undef htonl -#endif -#define ntohs(x) swaps(x) -#define ntohl(x) swapl(x) -#define htons(x) swaps(x) -#define htonl(x) swapl(x) -#define ntohf(x) swapf(x) -#define ntohd(x) swapd(x) -#define htonf(x) swapf(x) -#define htond(x) swapd(x) -#define htovs(x) (x) -#define htovl(x) (x) -#define htovf(x) (x) -#define htovd(x) (x) -#define vtohs(x) (x) -#define vtohl(x) (x) -#define vtohf(x) (x) -#define vtohd(x) (x) -# ifdef NATINT_PACK -#define htov16(x) (x) -#define htov32(x) (x) -#define hton16(x) swap16(x) -#define hton32(x) swap32(x) -# endif -#endif -#endif +#define rb_ntohf(x) (BIGENDIAN_P()?(x):swapf(x)) +#define rb_ntohd(x) (BIGENDIAN_P()?(x):swapd(x)) +#define rb_htonf(x) (BIGENDIAN_P()?(x):swapf(x)) +#define rb_htond(x) (BIGENDIAN_P()?(x):swapd(x)) +#define rb_htovf(x) (BIGENDIAN_P()?swapf(x):(x)) +#define rb_htovd(x) (BIGENDIAN_P()?swapd(x):(x)) +#define rb_vtohf(x) (BIGENDIAN_P()?swapf(x):(x)) +#define rb_vtohd(x) (BIGENDIAN_P()?swapd(x):(x)) #ifdef FLOAT_SWAPPER #define FLOAT_CONVWITH(y) FLOAT_SWAPPER y; #define HTONF(x,y) (memcpy(&y,&x,sizeof(float)), \ - y = htonf((FLOAT_SWAPPER)y), \ + y = rb_htonf((FLOAT_SWAPPER)y), \ memcpy(&x,&y,sizeof(float)), \ x) #define HTOVF(x,y) (memcpy(&y,&x,sizeof(float)), \ - y = htovf((FLOAT_SWAPPER)y), \ + y = rb_htovf((FLOAT_SWAPPER)y), \ memcpy(&x,&y,sizeof(float)), \ x) #define NTOHF(x,y) (memcpy(&y,&x,sizeof(float)), \ - y = ntohf((FLOAT_SWAPPER)y), \ + y = rb_ntohf((FLOAT_SWAPPER)y), \ memcpy(&x,&y,sizeof(float)), \ x) #define VTOHF(x,y) (memcpy(&y,&x,sizeof(float)), \ - y = vtohf((FLOAT_SWAPPER)y), \ + y = rb_vtohf((FLOAT_SWAPPER)y), \ memcpy(&x,&y,sizeof(float)), \ x) #else #define FLOAT_CONVWITH(y) -#define HTONF(x,y) htonf(x) -#define HTOVF(x,y) htovf(x) -#define NTOHF(x,y) ntohf(x) -#define VTOHF(x,y) vtohf(x) +# define HTONF(x,y) rb_htonf(x) +# define HTOVF(x,y) rb_htovf(x) +# define NTOHF(x,y) rb_ntohf(x) +# define VTOHF(x,y) rb_vtohf(x) #endif #ifdef DOUBLE_SWAPPER #define DOUBLE_CONVWITH(y) DOUBLE_SWAPPER y; #define HTOND(x,y) (memcpy(&y,&x,sizeof(double)), \ - y = htond((DOUBLE_SWAPPER)y), \ + y = rb_htond((DOUBLE_SWAPPER)y), \ memcpy(&x,&y,sizeof(double)), \ x) #define HTOVD(x,y) (memcpy(&y,&x,sizeof(double)), \ - y = htovd((DOUBLE_SWAPPER)y), \ + y = rb_htovd((DOUBLE_SWAPPER)y), \ memcpy(&x,&y,sizeof(double)), \ x) #define NTOHD(x,y) (memcpy(&y,&x,sizeof(double)), \ - y = ntohd((DOUBLE_SWAPPER)y), \ + y = rb_ntohd((DOUBLE_SWAPPER)y), \ memcpy(&x,&y,sizeof(double)), \ x) #define VTOHD(x,y) (memcpy(&y,&x,sizeof(double)), \ - y = vtohd((DOUBLE_SWAPPER)y), \ + y = rb_vtohd((DOUBLE_SWAPPER)y), \ memcpy(&x,&y,sizeof(double)), \ x) #else #define DOUBLE_CONVWITH(y) -#define HTOND(x,y) htond(x) -#define HTOVD(x,y) htovd(x) -#define NTOHD(x,y) ntohd(x) -#define VTOHD(x,y) vtohd(x) +# define HTOND(x,y) rb_htond(x) +# define HTOVD(x,y) rb_htovd(x) +# define NTOHD(x,y) rb_ntohd(x) +# define VTOHD(x,y) rb_vtohd(x) #endif unsigned long rb_big2ulong_pack _((VALUE x)); @@ -359,11 +295,10 @@ # define EXTEND16(x) do { if (!natint) {(x) = (short)(((1<<15)-1-(x))^~(~0<<15));}} while(0) #endif -#ifdef HAVE_LONG_LONG -# define QUAD_SIZE sizeof(LONG_LONG) -#else -# define QUAD_SIZE 8 -#endif +#define QUAD_SIZE 8 +#define MAX_INTEGER_PACK_SIZE 8 +/* #define FORCE_BIG_PACK */ + static const char toofew[] = "too few arguments"; static void encodes _((VALUE,const char*,long,int)); @@ -397,44 +332,67 @@ * * Directives for +pack+. * - * Directive Meaning - * --------------------------------------------------------------- - * @ | Moves to absolute position - * A | ASCII string (space padded, count is width) - * a | ASCII string (null padded, count is width) - * B | Bit string (descending bit order) - * b | Bit string (ascending bit order) - * C | Unsigned char - * c | Char - * D, d | Double-precision float, native format - * E | Double-precision float, little-endian byte order - * e | Single-precision float, little-endian byte order - * F, f | Single-precision float, native format - * G | Double-precision float, network (big-endian) byte order - * g | Single-precision float, network (big-endian) byte order - * H | Hex string (high nibble first) - * h | Hex string (low nibble first) - * I | Unsigned integer - * i | Integer - * L | Unsigned long - * l | Long - * M | Quoted printable, MIME encoding (see RFC2045) - * m | Base64 encoded string - * N | Long, network (big-endian) byte order - * n | Short, network (big-endian) byte-order - * P | Pointer to a structure (fixed-length string) - * p | Pointer to a null-terminated string - * Q, q | 64-bit number - * S | Unsigned short - * s | Short - * U | UTF-8 - * u | UU-encoded string - * V | Long, little-endian byte order - * v | Short, little-endian byte order - * w | BER-compressed integer\fnm - * X | Back up a byte - * x | Null byte - * Z | Same as ``a'', except that null is added with * + * Integer | Array | + * Directive | Element | Meaning + * ------------------------------------------------------------------------ + * C | Integer | 8-bit unsigned integer (unsigned char) + * S | Integer | 16-bit unsigned integer, native endian (uint16_t) + * L | Integer | 32-bit unsigned integer, native endian (uint32_t) + * Q | Integer | 64-bit unsigned integer, native endian (uint64_t) + * | | + * c | Integer | 8-bit signed integer (char) + * s | Integer | 16-bit signed integer, native endian (int16_t) + * l | Integer | 32-bit signed integer, native endian (int32_t) + * q | Integer | 64-bit signed integer, native endian (int64_t) + * | | + * S_ | Integer | unsigned short, native endian + * I, I_ | Integer | unsigned int, native endian + * L_ | Integer | unsigned long, native endian + * | | + * s_ | Integer | signed short, native endian + * i, i_ | Integer | signed int, native endian + * l_ | Integer | signed long, native endian + * | | + * n | Integer | 16-bit unsigned integer, network (big-endian) byte order + * N | Integer | 32-bit unsigned integer, network (big-endian) byte order + * v | Integer | 16-bit unsigned integer, VAX (little-endian) byte order + * V | Integer | 32-bit unsigned integer, VAX (little-endian) byte order + * | | + * U | Integer | UTF-8 character + * w | Integer | BER-compressed integer + * + * Float | | + * Directive | | Meaning + * ------------------------------------------------------------------------ + * D, d | Float | double-precision float, native format + * F, f | Float | single-precision float, native format + * E | Float | double-precision float, little-endian byte order + * e | Float | single-precision float, little-endian byte order + * G | Float | double-precision float, network (big-endian) byte order + * g | Float | single-precision float, network (big-endian) byte order + * + * String | | + * Directive | | Meaning + * ------------------------------------------------------------------------ + * A | String | arbitrary binary string (space padded, count is width) + * a | String | arbitrary binary string (null padded, count is width) + * Z | String | same as ``a'', except that null is added with * + * B | String | bit string (MSB first) + * b | String | bit string (LSB first) + * H | String | hex string (high nibble first) + * h | String | hex string (low nibble first) + * u | String | UU-encoded string + * M | String | quoted printable, MIME encoding (see RFC2045) + * m | String | base64 encoded string (see RFC 2045, count is width) + * P | String | pointer to a structure (fixed-length string) + * p | String | pointer to a null-terminated string + * + * Misc. | | + * Directive | | Meaning + * ------------------------------------------------------------------------ + * @ | --- | moves to absolute position + * X | --- | back up a byte + * x | --- | null byte */ static VALUE @@ -451,6 +409,7 @@ #ifdef NATINT_PACK int natint; /* native integer */ #endif + int signed_p, integer_size, bigendian_p; StringValue(fmt); p = RSTRING(fmt)->ptr; @@ -682,92 +641,163 @@ break; case 's': /* signed short */ - case 'S': /* unsigned short */ - while (len-- > 0) { - short s; + signed_p = 1; + integer_size = NATINT_LEN(short, 2); + bigendian_p = BIGENDIAN_P(); + goto pack_integer; - from = NEXTFROM; - s = num2i32(from); - rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2)); - } - break; + case 'S': /* unsigned short */ + signed_p = 0; + integer_size = NATINT_LEN(short, 2); + bigendian_p = BIGENDIAN_P(); + goto pack_integer; case 'i': /* signed int */ - case 'I': /* unsigned int */ - while (len-- > 0) { - long i; + signed_p = 1; + integer_size = (int)sizeof(int); + bigendian_p = BIGENDIAN_P(); + goto pack_integer; - from = NEXTFROM; - i = num2i32(from); - rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4)); - } - break; + case 'I': /* unsigned int */ + signed_p = 0; + integer_size = (int)sizeof(int); + bigendian_p = BIGENDIAN_P(); + goto pack_integer; case 'l': /* signed long */ - case 'L': /* unsigned long */ - while (len-- > 0) { - long l; + signed_p = 1; + integer_size = NATINT_LEN(long, 4); + bigendian_p = BIGENDIAN_P(); + goto pack_integer; - from = NEXTFROM; - l = num2i32(from); - rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4)); - } - break; + case 'L': /* unsigned long */ + signed_p = 0; + integer_size = NATINT_LEN(long, 4); + bigendian_p = BIGENDIAN_P(); + goto pack_integer; case 'q': /* signed quad (64bit) int */ - case 'Q': /* unsigned quad (64bit) int */ - while (len-- > 0) { - char tmp[QUAD_SIZE]; + signed_p = 1; + integer_size = 8; + bigendian_p = BIGENDIAN_P(); + goto pack_integer; - from = NEXTFROM; - rb_quad_pack(tmp, from); - rb_str_buf_cat(res, (char*)&tmp, QUAD_SIZE); - } - break; + case 'Q': /* unsigned quad (64bit) int */ + signed_p = 0; + integer_size = 8; + bigendian_p = BIGENDIAN_P(); + goto pack_integer; case 'n': /* unsigned short (network byte-order) */ - while (len-- > 0) { - unsigned short s; - - from = NEXTFROM; - s = num2i32(from); - s = NATINT_HTONS(s); - rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2)); - } - break; + signed_p = 0; + integer_size = 2; + bigendian_p = 1; + goto pack_integer; case 'N': /* unsigned long (network byte-order) */ - while (len-- > 0) { - unsigned long l; - - from = NEXTFROM; - l = num2i32(from); - l = NATINT_HTONL(l); - rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4)); - } - break; + signed_p = 0; + integer_size = 4; + bigendian_p = 1; + goto pack_integer; case 'v': /* unsigned short (VAX byte-order) */ - while (len-- > 0) { - unsigned short s; - - from = NEXTFROM; - s = num2i32(from); - s = NATINT_HTOVS(s); - rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2)); - } - break; + signed_p = 0; + integer_size = 2; + bigendian_p = 0; + goto pack_integer; case 'V': /* unsigned long (VAX byte-order) */ - while (len-- > 0) { - unsigned long l; - - from = NEXTFROM; - l = num2i32(from); - l = NATINT_HTOVL(l); - rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4)); - } - break; + signed_p = 0; + integer_size = 4; + bigendian_p = 0; + goto pack_integer; + + pack_integer: + switch (integer_size) { +#if defined(HAVE_INT16_T) && !defined(FORCE_BIG_PACK) + case SIZEOF_INT16_T: + while (len-- > 0) { + union { + int16_t i; + char a[sizeof(int16_t)]; + } v; + + from = NEXTFROM; + v.i = (int16_t)num2i32(from); + if (bigendian_p != BIGENDIAN_P()) v.i = swap16(v.i); + rb_str_buf_cat(res, v.a, sizeof(int16_t)); + } + break; +#endif + +#if defined(HAVE_INT32_T) && !defined(FORCE_BIG_PACK) + case SIZEOF_INT32_T: + while (len-- > 0) { + union { + int32_t i; + char a[sizeof(int32_t)]; + } v; + + from = NEXTFROM; + v.i = (int32_t)num2i32(from); + if (bigendian_p != BIGENDIAN_P()) v.i = swap32(v.i); + rb_str_buf_cat(res, v.a, sizeof(int32_t)); + } + break; +#endif + +#if defined(HAVE_INT64_T) && SIZEOF_LONG == SIZEOF_INT64_T && !defined(FORCE_BIG_PACK) + case SIZEOF_INT64_T: + while (len-- > 0) { + union { + int64_t i; + char a[sizeof(int64_t)]; + } v; + + from = NEXTFROM; + v.i = num2i32(from); /* can return 64bit value if SIZEOF_LONG == SIZEOF_INT64_T */ + if (bigendian_p != BIGENDIAN_P()) v.i = swap64(v.i); + rb_str_buf_cat(res, v.a, sizeof(int64_t)); + } + break; +#endif + + default: + if (integer_size > MAX_INTEGER_PACK_SIZE) + rb_bug("unexpected intger size for pack: %d", integer_size); + while (len-- > 0) { + union { + unsigned long i[(MAX_INTEGER_PACK_SIZE+SIZEOF_LONG-1)/SIZEOF_LONG]; + char a[(MAX_INTEGER_PACK_SIZE+SIZEOF_LONG-1)/SIZEOF_LONG*SIZEOF_LONG]; + } v; + int num_longs = (integer_size+SIZEOF_LONG-1)/SIZEOF_LONG; + int i; + + from = NEXTFROM; + from = rb_to_int(from); + if (integer_size == QUAD_SIZE) + rb_quad_pack(v.a, from); /* RangeError compatibility for Ruby 1.8. */ + rb_big_pack(from, v.i, num_longs); + if (bigendian_p) { + for (i = 0; i < num_longs/2; i++) { + unsigned long t = v.i[i]; + v.i[i] = v.i[num_longs-1-i]; + v.i[num_longs-1-i] = t; + } + } + if (bigendian_p != BIGENDIAN_P()) { + for (i = 0; i < num_longs; i++) + v.i[i] = swapl(v.i[i]); + } + rb_str_buf_cat(res, + bigendian_p ? + v.a + sizeof(long)*num_longs - integer_size : + v.a, + integer_size); + } + break; + } + break; case 'f': /* single precision float in native format */ case 'F': /* ditto */ @@ -1132,26 +1162,19 @@ } #define PACK_LENGTH_ADJUST_SIZE(sz) do { \ - tmp = 0; \ - if (len > (send-s)/sz) { \ + tmp_len = 0; \ + if (len > (long)((send-s)/sz)) { \ if (!star) { \ - tmp = len-(send-s)/sz; \ + tmp_len = len-(send-s)/sz; \ } \ len = (send-s)/sz; \ } \ } while (0) -#ifdef NATINT_PACK -#define PACK_LENGTH_ADJUST(type,sz) do { \ - int t__len = NATINT_LEN(type,(sz)); \ - PACK_LENGTH_ADJUST_SIZE(t__len); \ +#define PACK_ITEM_ADJUST() do { \ + if (tmp_len > 0) \ + rb_ary_store(ary, RARRAY_LEN(ary)+tmp_len-1, Qnil); \ } while (0) -#else -#define PACK_LENGTH_ADJUST(type,sz) \ - PACK_LENGTH_ADJUST_SIZE(sizeof(type)) -#endif - -#define PACK_ITEM_ADJUST() while (tmp--) rb_ary_push(ary, Qnil) static VALUE infected_str_new(ptr, len, str) @@ -1312,11 +1335,12 @@ char *p, *pend; VALUE ary; char type; - long len; - int tmp, star; + long len, tmp_len; + int star; #ifdef NATINT_PACK int natint; /* native integer */ #endif + int signed_p, integer_size, bigendian_p; StringValue(str); StringValue(fmt); @@ -1490,7 +1514,7 @@ break; case 'c': - PACK_LENGTH_ADJUST(char,sizeof(char)); + PACK_LENGTH_ADJUST_SIZE(sizeof(char)); while (len-- > 0) { int c = *s++; if (c > (char)127) c-=256; @@ -1500,7 +1524,7 @@ break; case 'C': - PACK_LENGTH_ADJUST(unsigned char,sizeof(unsigned char)); + PACK_LENGTH_ADJUST_SIZE(sizeof(unsigned char)); while (len-- > 0) { unsigned char c = *s++; rb_ary_push(ary, INT2FIX(c)); @@ -1509,139 +1533,221 @@ break; case 's': - PACK_LENGTH_ADJUST(short,2); - while (len-- > 0) { - short tmp = 0; - memcpy(OFF16(&tmp), s, NATINT_LEN(short,2)); - EXTEND16(tmp); - s += NATINT_LEN(short,2); - rb_ary_push(ary, INT2FIX(tmp)); - } - PACK_ITEM_ADJUST(); - break; + signed_p = 1; + integer_size = NATINT_LEN(short, 2); + bigendian_p = BIGENDIAN_P(); + goto unpack_integer; case 'S': - PACK_LENGTH_ADJUST(unsigned short,2); - while (len-- > 0) { - unsigned short tmp = 0; - memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2)); - s += NATINT_LEN(unsigned short,2); - rb_ary_push(ary, INT2FIX(tmp)); - } - PACK_ITEM_ADJUST(); - break; + signed_p = 0; + integer_size = NATINT_LEN(short, 2); + bigendian_p = BIGENDIAN_P(); + goto unpack_integer; case 'i': - PACK_LENGTH_ADJUST(int,sizeof(int)); - while (len-- > 0) { - int tmp; - memcpy(&tmp, s, sizeof(int)); - s += sizeof(int); - rb_ary_push(ary, INT2NUM(tmp)); - } - PACK_ITEM_ADJUST(); - break; + signed_p = 1; + integer_size = (int)sizeof(int); + bigendian_p = BIGENDIAN_P(); + goto unpack_integer; case 'I': - PACK_LENGTH_ADJUST(unsigned int,sizeof(unsigned int)); - while (len-- > 0) { - unsigned int tmp; - memcpy(&tmp, s, sizeof(unsigned int)); - s += sizeof(unsigned int); - rb_ary_push(ary, UINT2NUM(tmp)); - } - PACK_ITEM_ADJUST(); - break; + signed_p = 0; + integer_size = (int)sizeof(int); + bigendian_p = BIGENDIAN_P(); + goto unpack_integer; case 'l': - PACK_LENGTH_ADJUST(long,4); - while (len-- > 0) { - long tmp = 0; - memcpy(OFF32(&tmp), s, NATINT_LEN(long,4)); - EXTEND32(tmp); - s += NATINT_LEN(long,4); - rb_ary_push(ary, LONG2NUM(tmp)); - } - PACK_ITEM_ADJUST(); - break; - - case 'L': - PACK_LENGTH_ADJUST(unsigned long,4); - while (len-- > 0) { - unsigned long tmp = 0; - memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4)); - s += NATINT_LEN(unsigned long,4); - rb_ary_push(ary, ULONG2NUM(tmp)); - } - PACK_ITEM_ADJUST(); - break; - - case 'q': - PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE); - while (len-- > 0) { - char *tmp = (char*)s; - s += QUAD_SIZE; - rb_ary_push(ary, rb_quad_unpack(tmp, 1)); - } - PACK_ITEM_ADJUST(); - break; - - case 'Q': - PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE); - while (len-- > 0) { - char *tmp = (char*)s; - s += QUAD_SIZE; - rb_ary_push(ary, rb_quad_unpack(tmp, 0)); - } - break; - - case 'n': - PACK_LENGTH_ADJUST(unsigned short,2); - while (len-- > 0) { - unsigned short tmp = 0; - memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2)); - s += NATINT_LEN(unsigned short,2); - rb_ary_push(ary, UINT2NUM(ntohs(tmp))); - } - PACK_ITEM_ADJUST(); - break; - - case 'N': - PACK_LENGTH_ADJUST(unsigned long,4); - while (len-- > 0) { - unsigned long tmp = 0; - memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4)); - s += NATINT_LEN(unsigned long,4); - rb_ary_push(ary, ULONG2NUM(ntohl(tmp))); - } - PACK_ITEM_ADJUST(); - break; - - case 'v': - PACK_LENGTH_ADJUST(unsigned short,2); - while (len-- > 0) { - unsigned short tmp = 0; - memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2)); - s += NATINT_LEN(unsigned short,2); - rb_ary_push(ary, UINT2NUM(vtohs(tmp))); - } - PACK_ITEM_ADJUST(); - break; - - case 'V': - PACK_LENGTH_ADJUST(unsigned long,4); - while (len-- > 0) { - unsigned long tmp = 0; - memcpy(OFF32(&tmp), s, NATINT_LEN(long,4)); - s += NATINT_LEN(long,4); - rb_ary_push(ary, ULONG2NUM(vtohl(tmp))); - } - PACK_ITEM_ADJUST(); - break; + signed_p = 1; + integer_size = NATINT_LEN(long, 4); + bigendian_p = BIGENDIAN_P(); + goto unpack_integer; + + case 'L': + signed_p = 0; + integer_size = NATINT_LEN(long, 4); + bigendian_p = BIGENDIAN_P(); + goto unpack_integer; + + case 'q': + signed_p = 1; + integer_size = QUAD_SIZE; + bigendian_p = BIGENDIAN_P(); + goto unpack_integer; + + case 'Q': + signed_p = 0; + integer_size = QUAD_SIZE; + bigendian_p = BIGENDIAN_P(); + goto unpack_integer; + + case 'n': + signed_p = 0; + integer_size = 2; + bigendian_p = 1; + goto unpack_integer; + + case 'N': + signed_p = 0; + integer_size = 4; + bigendian_p = 1; + goto unpack_integer; + + case 'v': + signed_p = 0; + integer_size = 2; + bigendian_p = 0; + goto unpack_integer; + + case 'V': + signed_p = 0; + integer_size = 4; + bigendian_p = 0; + goto unpack_integer; + + unpack_integer: + switch (integer_size) { +#if defined(HAVE_INT16_T) && !defined(FORCE_BIG_PACK) + case SIZEOF_INT16_T: + if (signed_p) { + PACK_LENGTH_ADJUST_SIZE(sizeof(int16_t)); + while (len-- > 0) { + union { + int16_t i; + char a[sizeof(int16_t)]; + } v; + memcpy(v.a, s, sizeof(int16_t)); + if (bigendian_p != BIGENDIAN_P()) v.i = swap16(v.i); + s += sizeof(int16_t); + rb_ary_push(ary, INT2FIX(v.i)); + } + PACK_ITEM_ADJUST(); + } + else { + PACK_LENGTH_ADJUST_SIZE(sizeof(uint16_t)); + while (len-- > 0) { + union { + uint16_t i; + char a[sizeof(uint16_t)]; + } v; + memcpy(v.a, s, sizeof(uint16_t)); + if (bigendian_p != BIGENDIAN_P()) v.i = swap16(v.i); + s += sizeof(uint16_t); + rb_ary_push(ary, INT2FIX(v.i)); + } + PACK_ITEM_ADJUST(); + } + break; +#endif + +#if defined(HAVE_INT32_T) && !defined(FORCE_BIG_PACK) + case SIZEOF_INT32_T: + if (signed_p) { + PACK_LENGTH_ADJUST_SIZE(sizeof(int32_t)); + while (len-- > 0) { + union { + int32_t i; + char a[sizeof(int32_t)]; + } v; + memcpy(v.a, s, sizeof(int32_t)); + if (bigendian_p != BIGENDIAN_P()) v.i = swap32(v.i); + s += sizeof(int32_t); + rb_ary_push(ary, INT2NUM(v.i)); + } + PACK_ITEM_ADJUST(); + } + else { + PACK_LENGTH_ADJUST_SIZE(sizeof(uint32_t)); + while (len-- > 0) { + union { + uint32_t i; + char a[sizeof(uint32_t)]; + } v; + memcpy(v.a, s, sizeof(uint32_t)); + if (bigendian_p != BIGENDIAN_P()) v.i = swap32(v.i); + s += sizeof(uint32_t); + rb_ary_push(ary, UINT2NUM(v.i)); + } + PACK_ITEM_ADJUST(); + } + break; +#endif + +#if defined(HAVE_INT64_T) && !defined(FORCE_BIG_PACK) + case SIZEOF_INT64_T: + if (signed_p) { + PACK_LENGTH_ADJUST_SIZE(sizeof(int64_t)); + while (len-- > 0) { + union { + int64_t i; + char a[sizeof(int64_t)]; + } v; + memcpy(v.a, s, sizeof(int64_t)); + if (bigendian_p != BIGENDIAN_P()) v.i = swap64(v.i); + s += sizeof(int64_t); + rb_ary_push(ary, INT64toNUM(v.i)); + } + PACK_ITEM_ADJUST(); + } + else { + PACK_LENGTH_ADJUST_SIZE(sizeof(uint64_t)); + while (len-- > 0) { + union { + uint64_t i; + char a[sizeof(uint64_t)]; + } v; + memcpy(v.a, s, sizeof(uint64_t)); + if (bigendian_p != BIGENDIAN_P()) v.i = swap64(v.i); + s += sizeof(uint64_t); + rb_ary_push(ary, UINT64toNUM(v.i)); + } + PACK_ITEM_ADJUST(); + } + break; +#endif + + + default: + if (integer_size > MAX_INTEGER_PACK_SIZE) + rb_bug("unexpected intger size for pack: %d", integer_size); + PACK_LENGTH_ADJUST_SIZE(integer_size); + while (len-- > 0) { + union { + unsigned long i[(MAX_INTEGER_PACK_SIZE+SIZEOF_LONG)/SIZEOF_LONG]; + char a[(MAX_INTEGER_PACK_SIZE+SIZEOF_LONG)/SIZEOF_LONG*SIZEOF_LONG]; + } v; + int num_longs = (integer_size+SIZEOF_LONG)/SIZEOF_LONG; + int i; + + if (signed_p && (signed char)s[bigendian_p ? 0 : (integer_size-1)] < 0) + memset(v.a, 0xff, sizeof(long)*num_longs); + else + memset(v.a, 0, sizeof(long)*num_longs); + if (bigendian_p) + memcpy(v.a + sizeof(long)*num_longs - integer_size, s, integer_size); + else + memcpy(v.a, s, integer_size); + if (bigendian_p) { + for (i = 0; i < num_longs/2; i++) { + unsigned long t = v.i[i]; + v.i[i] = v.i[num_longs-1-i]; + v.i[num_longs-1-i] = t; + } + } + if (bigendian_p != BIGENDIAN_P()) { + for (i = 0; i < num_longs; i++) + v.i[i] = swapl(v.i[i]); + } + s += integer_size; + rb_ary_push(ary, rb_big_unpack(v.i, num_longs)); + } + PACK_ITEM_ADJUST(); + break; + } + break; case 'f': case 'F': - PACK_LENGTH_ADJUST(float,sizeof(float)); + PACK_LENGTH_ADJUST_SIZE(sizeof(float)); while (len-- > 0) { float tmp; memcpy(&tmp, s, sizeof(float)); @@ -1652,7 +1758,7 @@ break; case 'e': - PACK_LENGTH_ADJUST(float,sizeof(float)); + PACK_LENGTH_ADJUST_SIZE(sizeof(float)); while (len-- > 0) { float tmp; FLOAT_CONVWITH(ftmp); @@ -1666,7 +1772,7 @@ break; case 'E': - PACK_LENGTH_ADJUST(double,sizeof(double)); + PACK_LENGTH_ADJUST_SIZE(sizeof(double)); while (len-- > 0) { double tmp; DOUBLE_CONVWITH(dtmp); @@ -1681,7 +1787,7 @@ case 'D': case 'd': - PACK_LENGTH_ADJUST(double,sizeof(double)); + PACK_LENGTH_ADJUST_SIZE(sizeof(double)); while (len-- > 0) { double tmp; memcpy(&tmp, s, sizeof(double)); @@ -1692,7 +1798,7 @@ break; case 'g': - PACK_LENGTH_ADJUST(float,sizeof(float)); + PACK_LENGTH_ADJUST_SIZE(sizeof(float)); while (len-- > 0) { float tmp; FLOAT_CONVWITH(ftmp;) @@ -1706,7 +1812,7 @@ break; case 'G': - PACK_LENGTH_ADJUST(double,sizeof(double)); + PACK_LENGTH_ADJUST_SIZE(sizeof(double)); while (len-- > 0) { double tmp; DOUBLE_CONVWITH(dtmp); @@ -1886,7 +1992,7 @@ break; case 'P': - if (sizeof(char *) <= send - s) { + if (sizeof(char *) <= (size_t)(send - s)) { VALUE tmp = Qnil; char *t; @@ -1926,7 +2032,7 @@ if (len > (send - s) / sizeof(char *)) len = (send - s) / sizeof(char *); while (len-- > 0) { - if (send - s < sizeof(char *)) + if ((size_t)(send - s) < sizeof(char *)) break; else { VALUE tmp = Qnil; diff -Nru ruby1.8-1.8.7.249/parse.c ruby1.8-1.8.7.302/parse.c --- ruby1.8-1.8.7.249/parse.c 2010-01-10 10:32:24.000000000 +0000 +++ ruby1.8-1.8.7.302/parse.c 2010-08-16 07:32:19.000000000 +0000 @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,229 +54,20 @@ /* Pure parsers. */ #define YYPURE 0 -/* Using locations. */ -#define YYLSP_NEEDED 0 - - +/* Push parsers. */ +#define YYPUSH 0 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - kCLASS = 258, - kMODULE = 259, - kDEF = 260, - kUNDEF = 261, - kBEGIN = 262, - kRESCUE = 263, - kENSURE = 264, - kEND = 265, - kIF = 266, - kUNLESS = 267, - kTHEN = 268, - kELSIF = 269, - kELSE = 270, - kCASE = 271, - kWHEN = 272, - kWHILE = 273, - kUNTIL = 274, - kFOR = 275, - kBREAK = 276, - kNEXT = 277, - kREDO = 278, - kRETRY = 279, - kIN = 280, - kDO = 281, - kDO_COND = 282, - kDO_BLOCK = 283, - kRETURN = 284, - kYIELD = 285, - kSUPER = 286, - kSELF = 287, - kNIL = 288, - kTRUE = 289, - kFALSE = 290, - kAND = 291, - kOR = 292, - kNOT = 293, - kIF_MOD = 294, - kUNLESS_MOD = 295, - kWHILE_MOD = 296, - kUNTIL_MOD = 297, - kRESCUE_MOD = 298, - kALIAS = 299, - kDEFINED = 300, - klBEGIN = 301, - klEND = 302, - k__LINE__ = 303, - k__FILE__ = 304, - tIDENTIFIER = 305, - tFID = 306, - tGVAR = 307, - tIVAR = 308, - tCONSTANT = 309, - tCVAR = 310, - tINTEGER = 311, - tFLOAT = 312, - tSTRING_CONTENT = 313, - tNTH_REF = 314, - tBACK_REF = 315, - tREGEXP_END = 316, - tUPLUS = 317, - tUMINUS = 318, - tPOW = 319, - tCMP = 320, - tEQ = 321, - tEQQ = 322, - tNEQ = 323, - tGEQ = 324, - tLEQ = 325, - tANDOP = 326, - tOROP = 327, - tMATCH = 328, - tNMATCH = 329, - tDOT2 = 330, - tDOT3 = 331, - tAREF = 332, - tASET = 333, - tLSHFT = 334, - tRSHFT = 335, - tCOLON2 = 336, - tCOLON3 = 337, - tOP_ASGN = 338, - tASSOC = 339, - tLPAREN = 340, - tLPAREN_ARG = 341, - tRPAREN = 342, - tLBRACK = 343, - tLBRACE = 344, - tLBRACE_ARG = 345, - tSTAR = 346, - tAMPER = 347, - tSYMBEG = 348, - tSTRING_BEG = 349, - tXSTRING_BEG = 350, - tREGEXP_BEG = 351, - tWORDS_BEG = 352, - tQWORDS_BEG = 353, - tSTRING_DBEG = 354, - tSTRING_DVAR = 355, - tSTRING_END = 356, - tLOWEST = 357, - tUMINUS_NUM = 358, - tLAST_TOKEN = 359 - }; -#endif -/* Tokens. */ -#define kCLASS 258 -#define kMODULE 259 -#define kDEF 260 -#define kUNDEF 261 -#define kBEGIN 262 -#define kRESCUE 263 -#define kENSURE 264 -#define kEND 265 -#define kIF 266 -#define kUNLESS 267 -#define kTHEN 268 -#define kELSIF 269 -#define kELSE 270 -#define kCASE 271 -#define kWHEN 272 -#define kWHILE 273 -#define kUNTIL 274 -#define kFOR 275 -#define kBREAK 276 -#define kNEXT 277 -#define kREDO 278 -#define kRETRY 279 -#define kIN 280 -#define kDO 281 -#define kDO_COND 282 -#define kDO_BLOCK 283 -#define kRETURN 284 -#define kYIELD 285 -#define kSUPER 286 -#define kSELF 287 -#define kNIL 288 -#define kTRUE 289 -#define kFALSE 290 -#define kAND 291 -#define kOR 292 -#define kNOT 293 -#define kIF_MOD 294 -#define kUNLESS_MOD 295 -#define kWHILE_MOD 296 -#define kUNTIL_MOD 297 -#define kRESCUE_MOD 298 -#define kALIAS 299 -#define kDEFINED 300 -#define klBEGIN 301 -#define klEND 302 -#define k__LINE__ 303 -#define k__FILE__ 304 -#define tIDENTIFIER 305 -#define tFID 306 -#define tGVAR 307 -#define tIVAR 308 -#define tCONSTANT 309 -#define tCVAR 310 -#define tINTEGER 311 -#define tFLOAT 312 -#define tSTRING_CONTENT 313 -#define tNTH_REF 314 -#define tBACK_REF 315 -#define tREGEXP_END 316 -#define tUPLUS 317 -#define tUMINUS 318 -#define tPOW 319 -#define tCMP 320 -#define tEQ 321 -#define tEQQ 322 -#define tNEQ 323 -#define tGEQ 324 -#define tLEQ 325 -#define tANDOP 326 -#define tOROP 327 -#define tMATCH 328 -#define tNMATCH 329 -#define tDOT2 330 -#define tDOT3 331 -#define tAREF 332 -#define tASET 333 -#define tLSHFT 334 -#define tRSHFT 335 -#define tCOLON2 336 -#define tCOLON3 337 -#define tOP_ASGN 338 -#define tASSOC 339 -#define tLPAREN 340 -#define tLPAREN_ARG 341 -#define tRPAREN 342 -#define tLBRACK 343 -#define tLBRACE 344 -#define tLBRACE_ARG 345 -#define tSTAR 346 -#define tAMPER 347 -#define tSYMBEG 348 -#define tSTRING_BEG 349 -#define tXSTRING_BEG 350 -#define tREGEXP_BEG 351 -#define tWORDS_BEG 352 -#define tQWORDS_BEG 353 -#define tSTRING_DBEG 354 -#define tSTRING_DVAR 355 -#define tSTRING_END 356 -#define tLOWEST 357 -#define tUMINUS_NUM 358 -#define tLAST_TOKEN 359 +/* Pull parsers. */ +#define YYPULL 1 +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 13 "parse.y" @@ -481,48 +271,273 @@ -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +/* Line 189 of yacc.c */ +#line 276 "parse.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + kCLASS = 258, + kMODULE = 259, + kDEF = 260, + kUNDEF = 261, + kBEGIN = 262, + kRESCUE = 263, + kENSURE = 264, + kEND = 265, + kIF = 266, + kUNLESS = 267, + kTHEN = 268, + kELSIF = 269, + kELSE = 270, + kCASE = 271, + kWHEN = 272, + kWHILE = 273, + kUNTIL = 274, + kFOR = 275, + kBREAK = 276, + kNEXT = 277, + kREDO = 278, + kRETRY = 279, + kIN = 280, + kDO = 281, + kDO_COND = 282, + kDO_BLOCK = 283, + kRETURN = 284, + kYIELD = 285, + kSUPER = 286, + kSELF = 287, + kNIL = 288, + kTRUE = 289, + kFALSE = 290, + kAND = 291, + kOR = 292, + kNOT = 293, + kIF_MOD = 294, + kUNLESS_MOD = 295, + kWHILE_MOD = 296, + kUNTIL_MOD = 297, + kRESCUE_MOD = 298, + kALIAS = 299, + kDEFINED = 300, + klBEGIN = 301, + klEND = 302, + k__LINE__ = 303, + k__FILE__ = 304, + tIDENTIFIER = 305, + tFID = 306, + tGVAR = 307, + tIVAR = 308, + tCONSTANT = 309, + tCVAR = 310, + tINTEGER = 311, + tFLOAT = 312, + tSTRING_CONTENT = 313, + tNTH_REF = 314, + tBACK_REF = 315, + tREGEXP_END = 316, + tUPLUS = 317, + tUMINUS = 318, + tPOW = 319, + tCMP = 320, + tEQ = 321, + tEQQ = 322, + tNEQ = 323, + tGEQ = 324, + tLEQ = 325, + tANDOP = 326, + tOROP = 327, + tMATCH = 328, + tNMATCH = 329, + tDOT2 = 330, + tDOT3 = 331, + tAREF = 332, + tASET = 333, + tLSHFT = 334, + tRSHFT = 335, + tCOLON2 = 336, + tCOLON3 = 337, + tOP_ASGN = 338, + tASSOC = 339, + tLPAREN = 340, + tLPAREN_ARG = 341, + tRPAREN = 342, + tLBRACK = 343, + tLBRACE = 344, + tLBRACE_ARG = 345, + tSTAR = 346, + tAMPER = 347, + tSYMBEG = 348, + tSTRING_BEG = 349, + tXSTRING_BEG = 350, + tREGEXP_BEG = 351, + tWORDS_BEG = 352, + tQWORDS_BEG = 353, + tSTRING_DBEG = 354, + tSTRING_DVAR = 355, + tSTRING_END = 356, + tLOWEST = 357, + tUMINUS_NUM = 358, + tLAST_TOKEN = 359 + }; +#endif +/* Tokens. */ +#define kCLASS 258 +#define kMODULE 259 +#define kDEF 260 +#define kUNDEF 261 +#define kBEGIN 262 +#define kRESCUE 263 +#define kENSURE 264 +#define kEND 265 +#define kIF 266 +#define kUNLESS 267 +#define kTHEN 268 +#define kELSIF 269 +#define kELSE 270 +#define kCASE 271 +#define kWHEN 272 +#define kWHILE 273 +#define kUNTIL 274 +#define kFOR 275 +#define kBREAK 276 +#define kNEXT 277 +#define kREDO 278 +#define kRETRY 279 +#define kIN 280 +#define kDO 281 +#define kDO_COND 282 +#define kDO_BLOCK 283 +#define kRETURN 284 +#define kYIELD 285 +#define kSUPER 286 +#define kSELF 287 +#define kNIL 288 +#define kTRUE 289 +#define kFALSE 290 +#define kAND 291 +#define kOR 292 +#define kNOT 293 +#define kIF_MOD 294 +#define kUNLESS_MOD 295 +#define kWHILE_MOD 296 +#define kUNTIL_MOD 297 +#define kRESCUE_MOD 298 +#define kALIAS 299 +#define kDEFINED 300 +#define klBEGIN 301 +#define klEND 302 +#define k__LINE__ 303 +#define k__FILE__ 304 +#define tIDENTIFIER 305 +#define tFID 306 +#define tGVAR 307 +#define tIVAR 308 +#define tCONSTANT 309 +#define tCVAR 310 +#define tINTEGER 311 +#define tFLOAT 312 +#define tSTRING_CONTENT 313 +#define tNTH_REF 314 +#define tBACK_REF 315 +#define tREGEXP_END 316 +#define tUPLUS 317 +#define tUMINUS 318 +#define tPOW 319 +#define tCMP 320 +#define tEQ 321 +#define tEQQ 322 +#define tNEQ 323 +#define tGEQ 324 +#define tLEQ 325 +#define tANDOP 326 +#define tOROP 327 +#define tMATCH 328 +#define tNMATCH 329 +#define tDOT2 330 +#define tDOT3 331 +#define tAREF 332 +#define tASET 333 +#define tLSHFT 334 +#define tRSHFT 335 +#define tCOLON2 336 +#define tCOLON3 337 +#define tOP_ASGN 338 +#define tASSOC 339 +#define tLPAREN 340 +#define tLPAREN_ARG 341 +#define tRPAREN 342 +#define tLBRACK 343 +#define tLBRACE 344 +#define tLBRACE_ARG 345 +#define tSTAR 346 +#define tAMPER 347 +#define tSYMBEG 348 +#define tSTRING_BEG 349 +#define tXSTRING_BEG 350 +#define tREGEXP_BEG 351 +#define tWORDS_BEG 352 +#define tQWORDS_BEG 353 +#define tSTRING_DBEG 354 +#define tSTRING_DVAR 355 +#define tSTRING_END 356 +#define tLOWEST 357 +#define tUMINUS_NUM 358 +#define tLAST_TOKEN 359 + -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 215 "parse.y" { + +/* Line 214 of yacc.c */ +#line 215 "parse.y" + NODE *node; ID id; int num; struct RVarmap *vars; -} -/* Line 187 of yacc.c. */ -#line 513 "parse.c" - YYSTYPE; + + + +/* Line 214 of yacc.c */ +#line 529 "parse.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 526 "parse.c" +/* Line 264 of yacc.c */ +#line 541 "parse.c" #ifdef short # undef short @@ -597,14 +612,14 @@ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -685,9 +700,9 @@ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -721,12 +736,12 @@ elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -1103,30 +1118,31 @@ "tSTRING_END", "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "']'", "'.'", "')'", "','", - "'`'", "'('", "' '", "'\\n'", "';'", "$accept", "program", "@1", - "bodystmt", "compstmt", "stmts", "stmt", "@2", "@3", "expr", + "'`'", "'('", "' '", "'\\n'", "';'", "$accept", "program", "$@1", + "bodystmt", "compstmt", "stmts", "stmt", "$@2", "$@3", "expr", "expr_value", "command_call", "block_command", "cmd_brace_block", "@4", "@5", "command", "mlhs", "mlhs_entry", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", - "fitem", "undef_list", "@6", "op", "reswords", "arg", "@7", "arg_value", - "aref_args", "paren_args", "opt_paren_args", "call_args", "call_args2", - "command_args", "@8", "open_args", "@9", "@10", "block_arg", - "opt_block_arg", "args", "mrhs", "primary", "@11", "@12", "@13", "@14", - "@15", "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24", - "@25", "@26", "primary_value", "then", "do", "if_tail", "opt_else", - "for_var", "block_par", "block_var", "opt_block_var", "do_block", "@27", - "@28", "block_call", "method_call", "brace_block", "@29", "@30", "@31", - "@32", "case_body", "when_args", "cases", "opt_rescue", "exc_list", - "exc_var", "opt_ensure", "literal", "strings", "string", "string1", - "xstring", "regexp", "words", "word_list", "word", "qwords", - "qword_list", "string_contents", "xstring_contents", "string_content", - "@33", "@34", "string_dvar", "symbol", "sym", "dsym", "numeric", - "variable", "var_ref", "var_lhs", "backref", "superclass", "@35", - "f_arglist", "f_args", "f_norm_arg", "f_arg", "f_opt", "f_optarg", - "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", - "opt_f_block_arg", "singleton", "@36", "assoc_list", "assocs", "assoc", - "operation", "operation2", "operation3", "dot_or_colon", "opt_terms", - "opt_nl", "trailer", "term", "terms", "none", 0 + "fitem", "undef_list", "$@6", "op", "reswords", "arg", "$@7", + "arg_value", "aref_args", "paren_args", "opt_paren_args", "call_args", + "call_args2", "command_args", "@8", "open_args", "$@9", "$@10", + "block_arg", "opt_block_arg", "args", "mrhs", "primary", "$@11", "$@12", + "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "@20", "@21", + "@22", "@23", "@24", "$@25", "$@26", "primary_value", "then", "do", + "if_tail", "opt_else", "for_var", "block_par", "block_var", + "opt_block_var", "do_block", "@27", "@28", "block_call", "method_call", + "brace_block", "@29", "@30", "@31", "@32", "case_body", "when_args", + "cases", "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", + "strings", "string", "string1", "xstring", "regexp", "words", + "word_list", "word", "qwords", "qword_list", "string_contents", + "xstring_contents", "string_content", "@33", "@34", "string_dvar", + "symbol", "sym", "dsym", "numeric", "variable", "var_ref", "var_lhs", + "backref", "superclass", "$@35", "f_arglist", "f_args", "f_norm_arg", + "f_arg", "f_opt", "f_optarg", "restarg_mark", "f_rest_arg", + "blkarg_mark", "f_block_arg", "opt_f_block_arg", "singleton", "$@36", + "assoc_list", "assocs", "assoc", "operation", "operation2", "operation3", + "dot_or_colon", "opt_terms", "opt_nl", "trailer", "term", "terms", + "none", 0 }; #endif @@ -3807,17 +3823,20 @@ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -3851,11 +3870,11 @@ /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -4135,10 +4154,8 @@ break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -4154,11 +4171,10 @@ #endif /* ! YYPARSE_PARAM */ - -/* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ @@ -4166,9 +4182,9 @@ -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -4192,14 +4208,39 @@ #endif #endif { - - int yystate; + + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + int yyn; int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; @@ -4207,51 +4248,28 @@ YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -4281,7 +4299,6 @@ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -4289,7 +4306,6 @@ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -4312,9 +4328,8 @@ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -4325,7 +4340,6 @@ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -4335,6 +4349,9 @@ YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -4343,16 +4360,16 @@ yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -4384,20 +4401,16 @@ goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -4437,6 +4450,8 @@ switch (yyn) { case 2: + +/* Line 1455 of yacc.c */ #line 353 "parse.y" { lex_state = EXPR_BEG; @@ -4447,6 +4462,8 @@ break; case 3: + +/* Line 1455 of yacc.c */ #line 360 "parse.y" { if ((yyvsp[(2) - (2)].node) && !compile_for_eval) { @@ -4467,6 +4484,8 @@ break; case 4: + +/* Line 1455 of yacc.c */ #line 382 "parse.y" { (yyval.node) = (yyvsp[(1) - (4)].node); @@ -4485,6 +4504,8 @@ break; case 5: + +/* Line 1455 of yacc.c */ #line 399 "parse.y" { void_stmts((yyvsp[(1) - (2)].node)); @@ -4494,6 +4515,8 @@ break; case 7: + +/* Line 1455 of yacc.c */ #line 408 "parse.y" { (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); @@ -4501,6 +4524,8 @@ break; case 8: + +/* Line 1455 of yacc.c */ #line 412 "parse.y" { (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); @@ -4508,6 +4533,8 @@ break; case 9: + +/* Line 1455 of yacc.c */ #line 416 "parse.y" { (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); @@ -4515,11 +4542,15 @@ break; case 10: + +/* Line 1455 of yacc.c */ #line 421 "parse.y" {lex_state = EXPR_FNAME;} break; case 11: + +/* Line 1455 of yacc.c */ #line 422 "parse.y" { (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); @@ -4527,6 +4558,8 @@ break; case 12: + +/* Line 1455 of yacc.c */ #line 426 "parse.y" { (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id)); @@ -4534,6 +4567,8 @@ break; case 13: + +/* Line 1455 of yacc.c */ #line 430 "parse.y" { char buf[3]; @@ -4544,6 +4579,8 @@ break; case 14: + +/* Line 1455 of yacc.c */ #line 437 "parse.y" { yyerror("can't make alias for the number variables"); @@ -4552,6 +4589,8 @@ break; case 15: + +/* Line 1455 of yacc.c */ #line 442 "parse.y" { (yyval.node) = (yyvsp[(2) - (2)].node); @@ -4559,6 +4598,8 @@ break; case 16: + +/* Line 1455 of yacc.c */ #line 446 "parse.y" { (yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); @@ -4571,6 +4612,8 @@ break; case 17: + +/* Line 1455 of yacc.c */ #line 455 "parse.y" { (yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); @@ -4583,6 +4626,8 @@ break; case 18: + +/* Line 1455 of yacc.c */ #line 464 "parse.y" { if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { @@ -4598,6 +4643,8 @@ break; case 19: + +/* Line 1455 of yacc.c */ #line 476 "parse.y" { if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { @@ -4613,6 +4660,8 @@ break; case 20: + +/* Line 1455 of yacc.c */ #line 488 "parse.y" { NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node)), 0); @@ -4621,6 +4670,8 @@ break; case 21: + +/* Line 1455 of yacc.c */ #line 493 "parse.y" { if (in_def || in_single) { @@ -4631,6 +4682,8 @@ break; case 22: + +/* Line 1455 of yacc.c */ #line 500 "parse.y" { ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, @@ -4641,6 +4694,8 @@ break; case 23: + +/* Line 1455 of yacc.c */ #line 507 "parse.y" { if (in_def || in_single) { @@ -4652,6 +4707,8 @@ break; case 24: + +/* Line 1455 of yacc.c */ #line 515 "parse.y" { (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -4659,6 +4716,8 @@ break; case 25: + +/* Line 1455 of yacc.c */ #line 519 "parse.y" { value_expr((yyvsp[(3) - (3)].node)); @@ -4668,6 +4727,8 @@ break; case 26: + +/* Line 1455 of yacc.c */ #line 525 "parse.y" { value_expr((yyvsp[(3) - (3)].node)); @@ -4696,6 +4757,8 @@ break; case 27: + +/* Line 1455 of yacc.c */ #line 550 "parse.y" { NODE *args; @@ -4715,6 +4778,8 @@ break; case 28: + +/* Line 1455 of yacc.c */ #line 566 "parse.y" { value_expr((yyvsp[(5) - (5)].node)); @@ -4730,6 +4795,8 @@ break; case 29: + +/* Line 1455 of yacc.c */ #line 578 "parse.y" { value_expr((yyvsp[(5) - (5)].node)); @@ -4745,6 +4812,8 @@ break; case 30: + +/* Line 1455 of yacc.c */ #line 590 "parse.y" { value_expr((yyvsp[(5) - (5)].node)); @@ -4760,6 +4829,8 @@ break; case 31: + +/* Line 1455 of yacc.c */ #line 602 "parse.y" { rb_backref_error((yyvsp[(1) - (3)].node)); @@ -4768,6 +4839,8 @@ break; case 32: + +/* Line 1455 of yacc.c */ #line 607 "parse.y" { (yyval.node) = node_assign((yyvsp[(1) - (3)].node), NEW_SVALUE((yyvsp[(3) - (3)].node))); @@ -4775,6 +4848,8 @@ break; case 33: + +/* Line 1455 of yacc.c */ #line 611 "parse.y" { (yyvsp[(1) - (3)].node)->nd_value = ((yyvsp[(1) - (3)].node)->nd_head) ? NEW_TO_ARY((yyvsp[(3) - (3)].node)) : NEW_ARRAY((yyvsp[(3) - (3)].node)); @@ -4783,6 +4858,8 @@ break; case 34: + +/* Line 1455 of yacc.c */ #line 616 "parse.y" { (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); @@ -4791,6 +4868,8 @@ break; case 37: + +/* Line 1455 of yacc.c */ #line 625 "parse.y" { (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -4798,6 +4877,8 @@ break; case 38: + +/* Line 1455 of yacc.c */ #line 629 "parse.y" { (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -4805,6 +4886,8 @@ break; case 39: + +/* Line 1455 of yacc.c */ #line 633 "parse.y" { (yyval.node) = NEW_NOT(cond((yyvsp[(2) - (2)].node))); @@ -4812,6 +4895,8 @@ break; case 40: + +/* Line 1455 of yacc.c */ #line 637 "parse.y" { (yyval.node) = NEW_NOT(cond((yyvsp[(2) - (2)].node))); @@ -4819,6 +4904,8 @@ break; case 42: + +/* Line 1455 of yacc.c */ #line 644 "parse.y" { value_expr((yyval.node)); @@ -4827,6 +4914,8 @@ break; case 45: + +/* Line 1455 of yacc.c */ #line 653 "parse.y" { (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node))); @@ -4834,6 +4923,8 @@ break; case 46: + +/* Line 1455 of yacc.c */ #line 657 "parse.y" { (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node))); @@ -4841,6 +4932,8 @@ break; case 47: + +/* Line 1455 of yacc.c */ #line 661 "parse.y" { (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node))); @@ -4848,6 +4941,8 @@ break; case 49: + +/* Line 1455 of yacc.c */ #line 668 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); @@ -4855,6 +4950,8 @@ break; case 50: + +/* Line 1455 of yacc.c */ #line 672 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); @@ -4862,6 +4959,8 @@ break; case 51: + +/* Line 1455 of yacc.c */ #line 678 "parse.y" { (yyval.vars) = dyna_push(); @@ -4870,11 +4969,15 @@ break; case 52: + +/* Line 1455 of yacc.c */ #line 682 "parse.y" {(yyval.vars) = ruby_dyna_vars;} break; case 53: + +/* Line 1455 of yacc.c */ #line 685 "parse.y" { (yyval.node) = NEW_ITER((yyvsp[(3) - (6)].node), 0, dyna_init((yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].vars))); @@ -4884,6 +4987,8 @@ break; case 54: + +/* Line 1455 of yacc.c */ #line 693 "parse.y" { (yyval.node) = new_fcall((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); @@ -4892,6 +4997,8 @@ break; case 55: + +/* Line 1455 of yacc.c */ #line 698 "parse.y" { (yyval.node) = new_fcall((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].node)); @@ -4907,6 +5014,8 @@ break; case 56: + +/* Line 1455 of yacc.c */ #line 710 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); @@ -4915,6 +5024,8 @@ break; case 57: + +/* Line 1455 of yacc.c */ #line 715 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); @@ -4930,6 +5041,8 @@ break; case 58: + +/* Line 1455 of yacc.c */ #line 727 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); @@ -4938,6 +5051,8 @@ break; case 59: + +/* Line 1455 of yacc.c */ #line 732 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); @@ -4953,6 +5068,8 @@ break; case 60: + +/* Line 1455 of yacc.c */ #line 744 "parse.y" { (yyval.node) = new_super((yyvsp[(2) - (2)].node)); @@ -4961,6 +5078,8 @@ break; case 61: + +/* Line 1455 of yacc.c */ #line 749 "parse.y" { (yyval.node) = new_yield((yyvsp[(2) - (2)].node)); @@ -4969,6 +5088,8 @@ break; case 63: + +/* Line 1455 of yacc.c */ #line 757 "parse.y" { (yyval.node) = (yyvsp[(2) - (3)].node); @@ -4976,6 +5097,8 @@ break; case 65: + +/* Line 1455 of yacc.c */ #line 764 "parse.y" { (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0); @@ -4983,6 +5106,8 @@ break; case 66: + +/* Line 1455 of yacc.c */ #line 770 "parse.y" { (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); @@ -4990,6 +5115,8 @@ break; case 67: + +/* Line 1455 of yacc.c */ #line 774 "parse.y" { (yyval.node) = NEW_MASGN(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0); @@ -4997,6 +5124,8 @@ break; case 68: + +/* Line 1455 of yacc.c */ #line 778 "parse.y" { (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -5004,6 +5133,8 @@ break; case 69: + +/* Line 1455 of yacc.c */ #line 782 "parse.y" { (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1); @@ -5011,6 +5142,8 @@ break; case 70: + +/* Line 1455 of yacc.c */ #line 786 "parse.y" { (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node)); @@ -5018,6 +5151,8 @@ break; case 71: + +/* Line 1455 of yacc.c */ #line 790 "parse.y" { (yyval.node) = NEW_MASGN(0, -1); @@ -5025,6 +5160,8 @@ break; case 73: + +/* Line 1455 of yacc.c */ #line 797 "parse.y" { (yyval.node) = (yyvsp[(2) - (3)].node); @@ -5032,6 +5169,8 @@ break; case 74: + +/* Line 1455 of yacc.c */ #line 803 "parse.y" { (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node)); @@ -5039,6 +5178,8 @@ break; case 75: + +/* Line 1455 of yacc.c */ #line 807 "parse.y" { (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); @@ -5046,6 +5187,8 @@ break; case 76: + +/* Line 1455 of yacc.c */ #line 813 "parse.y" { (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); @@ -5053,6 +5196,8 @@ break; case 77: + +/* Line 1455 of yacc.c */ #line 817 "parse.y" { (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); @@ -5060,6 +5205,8 @@ break; case 78: + +/* Line 1455 of yacc.c */ #line 821 "parse.y" { (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); @@ -5067,6 +5214,8 @@ break; case 79: + +/* Line 1455 of yacc.c */ #line 825 "parse.y" { (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); @@ -5074,6 +5223,8 @@ break; case 80: + +/* Line 1455 of yacc.c */ #line 829 "parse.y" { (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); @@ -5081,6 +5232,8 @@ break; case 81: + +/* Line 1455 of yacc.c */ #line 833 "parse.y" { if (in_def || in_single) @@ -5090,6 +5243,8 @@ break; case 82: + +/* Line 1455 of yacc.c */ #line 839 "parse.y" { if (in_def || in_single) @@ -5099,6 +5254,8 @@ break; case 83: + +/* Line 1455 of yacc.c */ #line 845 "parse.y" { rb_backref_error((yyvsp[(1) - (1)].node)); @@ -5107,6 +5264,8 @@ break; case 84: + +/* Line 1455 of yacc.c */ #line 852 "parse.y" { (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); @@ -5114,6 +5273,8 @@ break; case 85: + +/* Line 1455 of yacc.c */ #line 856 "parse.y" { (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); @@ -5121,6 +5282,8 @@ break; case 86: + +/* Line 1455 of yacc.c */ #line 860 "parse.y" { (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); @@ -5128,6 +5291,8 @@ break; case 87: + +/* Line 1455 of yacc.c */ #line 864 "parse.y" { (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); @@ -5135,6 +5300,8 @@ break; case 88: + +/* Line 1455 of yacc.c */ #line 868 "parse.y" { (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); @@ -5142,6 +5309,8 @@ break; case 89: + +/* Line 1455 of yacc.c */ #line 872 "parse.y" { if (in_def || in_single) @@ -5151,6 +5320,8 @@ break; case 90: + +/* Line 1455 of yacc.c */ #line 878 "parse.y" { if (in_def || in_single) @@ -5160,6 +5331,8 @@ break; case 91: + +/* Line 1455 of yacc.c */ #line 884 "parse.y" { rb_backref_error((yyvsp[(1) - (1)].node)); @@ -5168,6 +5341,8 @@ break; case 92: + +/* Line 1455 of yacc.c */ #line 891 "parse.y" { yyerror("class/module name must be CONSTANT"); @@ -5175,6 +5350,8 @@ break; case 94: + +/* Line 1455 of yacc.c */ #line 898 "parse.y" { (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); @@ -5182,6 +5359,8 @@ break; case 95: + +/* Line 1455 of yacc.c */ #line 902 "parse.y" { (yyval.node) = NEW_COLON2(0, (yyval.node)); @@ -5189,6 +5368,8 @@ break; case 96: + +/* Line 1455 of yacc.c */ #line 906 "parse.y" { (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); @@ -5196,6 +5377,8 @@ break; case 100: + +/* Line 1455 of yacc.c */ #line 915 "parse.y" { lex_state = EXPR_END; @@ -5204,6 +5387,8 @@ break; case 101: + +/* Line 1455 of yacc.c */ #line 920 "parse.y" { lex_state = EXPR_END; @@ -5212,6 +5397,8 @@ break; case 104: + +/* Line 1455 of yacc.c */ #line 931 "parse.y" { (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); @@ -5219,6 +5406,8 @@ break; case 106: + +/* Line 1455 of yacc.c */ #line 938 "parse.y" { (yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node)); @@ -5226,11 +5415,15 @@ break; case 107: + +/* Line 1455 of yacc.c */ #line 941 "parse.y" {lex_state = EXPR_FNAME;} break; case 108: + +/* Line 1455 of yacc.c */ #line 942 "parse.y" { (yyval.node) = block_append((yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node))); @@ -5238,136 +5431,190 @@ break; case 109: + +/* Line 1455 of yacc.c */ #line 947 "parse.y" { (yyval.id) = '|'; } break; case 110: + +/* Line 1455 of yacc.c */ #line 948 "parse.y" { (yyval.id) = '^'; } break; case 111: + +/* Line 1455 of yacc.c */ #line 949 "parse.y" { (yyval.id) = '&'; } break; case 112: + +/* Line 1455 of yacc.c */ #line 950 "parse.y" { (yyval.id) = tCMP; } break; case 113: + +/* Line 1455 of yacc.c */ #line 951 "parse.y" { (yyval.id) = tEQ; } break; case 114: + +/* Line 1455 of yacc.c */ #line 952 "parse.y" { (yyval.id) = tEQQ; } break; case 115: + +/* Line 1455 of yacc.c */ #line 953 "parse.y" { (yyval.id) = tMATCH; } break; case 116: + +/* Line 1455 of yacc.c */ #line 954 "parse.y" { (yyval.id) = '>'; } break; case 117: + +/* Line 1455 of yacc.c */ #line 955 "parse.y" { (yyval.id) = tGEQ; } break; case 118: + +/* Line 1455 of yacc.c */ #line 956 "parse.y" { (yyval.id) = '<'; } break; case 119: + +/* Line 1455 of yacc.c */ #line 957 "parse.y" { (yyval.id) = tLEQ; } break; case 120: + +/* Line 1455 of yacc.c */ #line 958 "parse.y" { (yyval.id) = tLSHFT; } break; case 121: + +/* Line 1455 of yacc.c */ #line 959 "parse.y" { (yyval.id) = tRSHFT; } break; case 122: + +/* Line 1455 of yacc.c */ #line 960 "parse.y" { (yyval.id) = '+'; } break; case 123: + +/* Line 1455 of yacc.c */ #line 961 "parse.y" { (yyval.id) = '-'; } break; case 124: + +/* Line 1455 of yacc.c */ #line 962 "parse.y" { (yyval.id) = '*'; } break; case 125: + +/* Line 1455 of yacc.c */ #line 963 "parse.y" { (yyval.id) = '*'; } break; case 126: + +/* Line 1455 of yacc.c */ #line 964 "parse.y" { (yyval.id) = '/'; } break; case 127: + +/* Line 1455 of yacc.c */ #line 965 "parse.y" { (yyval.id) = '%'; } break; case 128: + +/* Line 1455 of yacc.c */ #line 966 "parse.y" { (yyval.id) = tPOW; } break; case 129: + +/* Line 1455 of yacc.c */ #line 967 "parse.y" { (yyval.id) = '~'; } break; case 130: + +/* Line 1455 of yacc.c */ #line 968 "parse.y" { (yyval.id) = tUPLUS; } break; case 131: + +/* Line 1455 of yacc.c */ #line 969 "parse.y" { (yyval.id) = tUMINUS; } break; case 132: + +/* Line 1455 of yacc.c */ #line 970 "parse.y" { (yyval.id) = tAREF; } break; case 133: + +/* Line 1455 of yacc.c */ #line 971 "parse.y" { (yyval.id) = tASET; } break; case 134: + +/* Line 1455 of yacc.c */ #line 972 "parse.y" { (yyval.id) = '`'; } break; case 175: + +/* Line 1455 of yacc.c */ #line 985 "parse.y" { (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -5375,6 +5622,8 @@ break; case 176: + +/* Line 1455 of yacc.c */ #line 989 "parse.y" { (yyval.node) = node_assign((yyvsp[(1) - (5)].node), NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0)); @@ -5382,6 +5631,8 @@ break; case 177: + +/* Line 1455 of yacc.c */ #line 993 "parse.y" { value_expr((yyvsp[(3) - (3)].node)); @@ -5410,6 +5661,8 @@ break; case 178: + +/* Line 1455 of yacc.c */ #line 1018 "parse.y" { NODE *args; @@ -5429,6 +5682,8 @@ break; case 179: + +/* Line 1455 of yacc.c */ #line 1034 "parse.y" { value_expr((yyvsp[(5) - (5)].node)); @@ -5444,6 +5699,8 @@ break; case 180: + +/* Line 1455 of yacc.c */ #line 1046 "parse.y" { value_expr((yyvsp[(5) - (5)].node)); @@ -5459,6 +5716,8 @@ break; case 181: + +/* Line 1455 of yacc.c */ #line 1058 "parse.y" { value_expr((yyvsp[(5) - (5)].node)); @@ -5474,6 +5733,8 @@ break; case 182: + +/* Line 1455 of yacc.c */ #line 1070 "parse.y" { yyerror("constant re-assignment"); @@ -5482,6 +5743,8 @@ break; case 183: + +/* Line 1455 of yacc.c */ #line 1075 "parse.y" { yyerror("constant re-assignment"); @@ -5490,6 +5753,8 @@ break; case 184: + +/* Line 1455 of yacc.c */ #line 1080 "parse.y" { rb_backref_error((yyvsp[(1) - (3)].node)); @@ -5498,6 +5763,8 @@ break; case 185: + +/* Line 1455 of yacc.c */ #line 1085 "parse.y" { value_expr((yyvsp[(1) - (3)].node)); @@ -5511,6 +5778,8 @@ break; case 186: + +/* Line 1455 of yacc.c */ #line 1095 "parse.y" { value_expr((yyvsp[(1) - (3)].node)); @@ -5524,6 +5793,8 @@ break; case 187: + +/* Line 1455 of yacc.c */ #line 1105 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '+', 1, (yyvsp[(3) - (3)].node)); @@ -5531,6 +5802,8 @@ break; case 188: + +/* Line 1455 of yacc.c */ #line 1109 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '-', 1, (yyvsp[(3) - (3)].node)); @@ -5538,6 +5811,8 @@ break; case 189: + +/* Line 1455 of yacc.c */ #line 1113 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '*', 1, (yyvsp[(3) - (3)].node)); @@ -5545,6 +5820,8 @@ break; case 190: + +/* Line 1455 of yacc.c */ #line 1117 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '/', 1, (yyvsp[(3) - (3)].node)); @@ -5552,6 +5829,8 @@ break; case 191: + +/* Line 1455 of yacc.c */ #line 1121 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '%', 1, (yyvsp[(3) - (3)].node)); @@ -5559,6 +5838,8 @@ break; case 192: + +/* Line 1455 of yacc.c */ #line 1125 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), tPOW, 1, (yyvsp[(3) - (3)].node)); @@ -5566,6 +5847,8 @@ break; case 193: + +/* Line 1455 of yacc.c */ #line 1129 "parse.y" { (yyval.node) = call_op(call_op((yyvsp[(2) - (4)].node), tPOW, 1, (yyvsp[(4) - (4)].node)), tUMINUS, 0, 0); @@ -5573,6 +5856,8 @@ break; case 194: + +/* Line 1455 of yacc.c */ #line 1133 "parse.y" { (yyval.node) = call_op(call_op((yyvsp[(2) - (4)].node), tPOW, 1, (yyvsp[(4) - (4)].node)), tUMINUS, 0, 0); @@ -5580,6 +5865,8 @@ break; case 195: + +/* Line 1455 of yacc.c */ #line 1137 "parse.y" { if ((yyvsp[(2) - (2)].node) && nd_type((yyvsp[(2) - (2)].node)) == NODE_LIT) { @@ -5592,6 +5879,8 @@ break; case 196: + +/* Line 1455 of yacc.c */ #line 1146 "parse.y" { (yyval.node) = call_op((yyvsp[(2) - (2)].node), tUMINUS, 0, 0); @@ -5599,6 +5888,8 @@ break; case 197: + +/* Line 1455 of yacc.c */ #line 1150 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '|', 1, (yyvsp[(3) - (3)].node)); @@ -5606,6 +5897,8 @@ break; case 198: + +/* Line 1455 of yacc.c */ #line 1154 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '^', 1, (yyvsp[(3) - (3)].node)); @@ -5613,6 +5906,8 @@ break; case 199: + +/* Line 1455 of yacc.c */ #line 1158 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '&', 1, (yyvsp[(3) - (3)].node)); @@ -5620,6 +5915,8 @@ break; case 200: + +/* Line 1455 of yacc.c */ #line 1162 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), tCMP, 1, (yyvsp[(3) - (3)].node)); @@ -5627,6 +5924,8 @@ break; case 201: + +/* Line 1455 of yacc.c */ #line 1166 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '>', 1, (yyvsp[(3) - (3)].node)); @@ -5634,6 +5933,8 @@ break; case 202: + +/* Line 1455 of yacc.c */ #line 1170 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), tGEQ, 1, (yyvsp[(3) - (3)].node)); @@ -5641,6 +5942,8 @@ break; case 203: + +/* Line 1455 of yacc.c */ #line 1174 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), '<', 1, (yyvsp[(3) - (3)].node)); @@ -5648,6 +5951,8 @@ break; case 204: + +/* Line 1455 of yacc.c */ #line 1178 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), tLEQ, 1, (yyvsp[(3) - (3)].node)); @@ -5655,6 +5960,8 @@ break; case 205: + +/* Line 1455 of yacc.c */ #line 1182 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), tEQ, 1, (yyvsp[(3) - (3)].node)); @@ -5662,6 +5969,8 @@ break; case 206: + +/* Line 1455 of yacc.c */ #line 1186 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), tEQQ, 1, (yyvsp[(3) - (3)].node)); @@ -5669,6 +5978,8 @@ break; case 207: + +/* Line 1455 of yacc.c */ #line 1190 "parse.y" { (yyval.node) = NEW_NOT(call_op((yyvsp[(1) - (3)].node), tEQ, 1, (yyvsp[(3) - (3)].node))); @@ -5676,6 +5987,8 @@ break; case 208: + +/* Line 1455 of yacc.c */ #line 1194 "parse.y" { (yyval.node) = match_gen((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -5683,6 +5996,8 @@ break; case 209: + +/* Line 1455 of yacc.c */ #line 1198 "parse.y" { (yyval.node) = NEW_NOT(match_gen((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node))); @@ -5690,6 +6005,8 @@ break; case 210: + +/* Line 1455 of yacc.c */ #line 1202 "parse.y" { (yyval.node) = NEW_NOT(cond((yyvsp[(2) - (2)].node))); @@ -5697,6 +6014,8 @@ break; case 211: + +/* Line 1455 of yacc.c */ #line 1206 "parse.y" { (yyval.node) = call_op((yyvsp[(2) - (2)].node), '~', 0, 0); @@ -5704,6 +6023,8 @@ break; case 212: + +/* Line 1455 of yacc.c */ #line 1210 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), tLSHFT, 1, (yyvsp[(3) - (3)].node)); @@ -5711,6 +6032,8 @@ break; case 213: + +/* Line 1455 of yacc.c */ #line 1214 "parse.y" { (yyval.node) = call_op((yyvsp[(1) - (3)].node), tRSHFT, 1, (yyvsp[(3) - (3)].node)); @@ -5718,6 +6041,8 @@ break; case 214: + +/* Line 1455 of yacc.c */ #line 1218 "parse.y" { (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -5725,6 +6050,8 @@ break; case 215: + +/* Line 1455 of yacc.c */ #line 1222 "parse.y" { (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -5732,11 +6059,15 @@ break; case 216: + +/* Line 1455 of yacc.c */ #line 1225 "parse.y" {in_defined = 1;} break; case 217: + +/* Line 1455 of yacc.c */ #line 1226 "parse.y" { in_defined = 0; @@ -5745,6 +6076,8 @@ break; case 218: + +/* Line 1455 of yacc.c */ #line 1231 "parse.y" { (yyval.node) = NEW_IF(cond((yyvsp[(1) - (5)].node)), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); @@ -5753,6 +6086,8 @@ break; case 219: + +/* Line 1455 of yacc.c */ #line 1236 "parse.y" { (yyval.node) = (yyvsp[(1) - (1)].node); @@ -5760,6 +6095,8 @@ break; case 220: + +/* Line 1455 of yacc.c */ #line 1242 "parse.y" { value_expr((yyvsp[(1) - (1)].node)); @@ -5768,6 +6105,8 @@ break; case 222: + +/* Line 1455 of yacc.c */ #line 1250 "parse.y" { (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node)); @@ -5775,6 +6114,8 @@ break; case 223: + +/* Line 1455 of yacc.c */ #line 1254 "parse.y" { (yyval.node) = (yyvsp[(1) - (2)].node); @@ -5782,6 +6123,8 @@ break; case 224: + +/* Line 1455 of yacc.c */ #line 1258 "parse.y" { value_expr((yyvsp[(4) - (5)].node)); @@ -5790,6 +6133,8 @@ break; case 225: + +/* Line 1455 of yacc.c */ #line 1263 "parse.y" { (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); @@ -5797,6 +6142,8 @@ break; case 226: + +/* Line 1455 of yacc.c */ #line 1267 "parse.y" { value_expr((yyvsp[(2) - (3)].node)); @@ -5805,6 +6152,8 @@ break; case 227: + +/* Line 1455 of yacc.c */ #line 1274 "parse.y" { (yyval.node) = (yyvsp[(2) - (3)].node); @@ -5812,6 +6161,8 @@ break; case 228: + +/* Line 1455 of yacc.c */ #line 1278 "parse.y" { (yyval.node) = (yyvsp[(2) - (4)].node); @@ -5819,6 +6170,8 @@ break; case 229: + +/* Line 1455 of yacc.c */ #line 1282 "parse.y" { (yyval.node) = NEW_LIST((yyvsp[(2) - (4)].node)); @@ -5826,6 +6179,8 @@ break; case 230: + +/* Line 1455 of yacc.c */ #line 1286 "parse.y" { (yyval.node) = list_append((yyvsp[(2) - (6)].node), (yyvsp[(4) - (6)].node)); @@ -5833,6 +6188,8 @@ break; case 233: + +/* Line 1455 of yacc.c */ #line 1296 "parse.y" { (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); @@ -5840,6 +6197,8 @@ break; case 234: + +/* Line 1455 of yacc.c */ #line 1300 "parse.y" { (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); @@ -5847,6 +6206,8 @@ break; case 235: + +/* Line 1455 of yacc.c */ #line 1304 "parse.y" { (yyval.node) = arg_concat((yyvsp[(1) - (5)].node), (yyvsp[(4) - (5)].node)); @@ -5855,6 +6216,8 @@ break; case 236: + +/* Line 1455 of yacc.c */ #line 1309 "parse.y" { (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); @@ -5863,6 +6226,8 @@ break; case 237: + +/* Line 1455 of yacc.c */ #line 1314 "parse.y" { (yyval.node) = arg_concat(NEW_LIST(NEW_HASH((yyvsp[(1) - (5)].node))), (yyvsp[(4) - (5)].node)); @@ -5871,6 +6236,8 @@ break; case 238: + +/* Line 1455 of yacc.c */ #line 1319 "parse.y" { (yyval.node) = list_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); @@ -5879,6 +6246,8 @@ break; case 239: + +/* Line 1455 of yacc.c */ #line 1324 "parse.y" { value_expr((yyvsp[(6) - (7)].node)); @@ -5888,6 +6257,8 @@ break; case 240: + +/* Line 1455 of yacc.c */ #line 1330 "parse.y" { (yyval.node) = arg_blk_pass(NEW_SPLAT((yyvsp[(2) - (3)].node)), (yyvsp[(3) - (3)].node)); @@ -5895,6 +6266,8 @@ break; case 242: + +/* Line 1455 of yacc.c */ #line 1337 "parse.y" { (yyval.node) = arg_blk_pass(list_concat(NEW_LIST((yyvsp[(1) - (4)].node)),(yyvsp[(3) - (4)].node)), (yyvsp[(4) - (4)].node)); @@ -5902,6 +6275,8 @@ break; case 243: + +/* Line 1455 of yacc.c */ #line 1341 "parse.y" { (yyval.node) = arg_blk_pass((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -5909,6 +6284,8 @@ break; case 244: + +/* Line 1455 of yacc.c */ #line 1345 "parse.y" { (yyval.node) = arg_concat(NEW_LIST((yyvsp[(1) - (5)].node)), (yyvsp[(4) - (5)].node)); @@ -5917,6 +6294,8 @@ break; case 245: + +/* Line 1455 of yacc.c */ #line 1350 "parse.y" { (yyval.node) = arg_concat(list_concat(NEW_LIST((yyvsp[(1) - (7)].node)),(yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node)); @@ -5925,6 +6304,8 @@ break; case 246: + +/* Line 1455 of yacc.c */ #line 1355 "parse.y" { (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); @@ -5933,6 +6314,8 @@ break; case 247: + +/* Line 1455 of yacc.c */ #line 1360 "parse.y" { (yyval.node) = arg_concat(NEW_LIST(NEW_HASH((yyvsp[(1) - (5)].node))), (yyvsp[(4) - (5)].node)); @@ -5941,6 +6324,8 @@ break; case 248: + +/* Line 1455 of yacc.c */ #line 1365 "parse.y" { (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (4)].node)), NEW_HASH((yyvsp[(3) - (4)].node))); @@ -5949,6 +6334,8 @@ break; case 249: + +/* Line 1455 of yacc.c */ #line 1370 "parse.y" { (yyval.node) = list_append(list_concat(NEW_LIST((yyvsp[(1) - (6)].node)),(yyvsp[(3) - (6)].node)), NEW_HASH((yyvsp[(5) - (6)].node))); @@ -5957,6 +6344,8 @@ break; case 250: + +/* Line 1455 of yacc.c */ #line 1375 "parse.y" { (yyval.node) = arg_concat(list_append(NEW_LIST((yyvsp[(1) - (7)].node)), NEW_HASH((yyvsp[(3) - (7)].node))), (yyvsp[(6) - (7)].node)); @@ -5965,6 +6354,8 @@ break; case 251: + +/* Line 1455 of yacc.c */ #line 1380 "parse.y" { (yyval.node) = arg_concat(list_append(list_concat(NEW_LIST((yyvsp[(1) - (9)].node)), (yyvsp[(3) - (9)].node)), NEW_HASH((yyvsp[(5) - (9)].node))), (yyvsp[(8) - (9)].node)); @@ -5973,6 +6364,8 @@ break; case 252: + +/* Line 1455 of yacc.c */ #line 1385 "parse.y" { (yyval.node) = arg_blk_pass(NEW_SPLAT((yyvsp[(2) - (3)].node)), (yyvsp[(3) - (3)].node)); @@ -5980,6 +6373,8 @@ break; case 254: + +/* Line 1455 of yacc.c */ #line 1391 "parse.y" { (yyval.num) = cmdarg_stack; @@ -5988,6 +6383,8 @@ break; case 255: + +/* Line 1455 of yacc.c */ #line 1396 "parse.y" { /* CMDARG_POP() */ @@ -5997,11 +6394,15 @@ break; case 257: + +/* Line 1455 of yacc.c */ #line 1404 "parse.y" {lex_state = EXPR_ENDARG;} break; case 258: + +/* Line 1455 of yacc.c */ #line 1405 "parse.y" { rb_warn("don't put space before argument parentheses"); @@ -6010,11 +6411,15 @@ break; case 259: + +/* Line 1455 of yacc.c */ #line 1409 "parse.y" {lex_state = EXPR_ENDARG;} break; case 260: + +/* Line 1455 of yacc.c */ #line 1410 "parse.y" { rb_warn("don't put space before argument parentheses"); @@ -6023,6 +6428,8 @@ break; case 261: + +/* Line 1455 of yacc.c */ #line 1417 "parse.y" { (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node)); @@ -6030,6 +6437,8 @@ break; case 262: + +/* Line 1455 of yacc.c */ #line 1423 "parse.y" { (yyval.node) = (yyvsp[(2) - (2)].node); @@ -6037,6 +6446,8 @@ break; case 264: + +/* Line 1455 of yacc.c */ #line 1430 "parse.y" { (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); @@ -6044,6 +6455,8 @@ break; case 265: + +/* Line 1455 of yacc.c */ #line 1434 "parse.y" { (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -6051,6 +6464,8 @@ break; case 266: + +/* Line 1455 of yacc.c */ #line 1440 "parse.y" { (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -6058,6 +6473,8 @@ break; case 267: + +/* Line 1455 of yacc.c */ #line 1444 "parse.y" { (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); @@ -6065,6 +6482,8 @@ break; case 268: + +/* Line 1455 of yacc.c */ #line 1448 "parse.y" { (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); @@ -6072,6 +6491,8 @@ break; case 277: + +/* Line 1455 of yacc.c */ #line 1462 "parse.y" { (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0); @@ -6079,6 +6500,8 @@ break; case 278: + +/* Line 1455 of yacc.c */ #line 1466 "parse.y" { (yyvsp[(1) - (1)].num) = ruby_sourceline; @@ -6086,6 +6509,8 @@ break; case 279: + +/* Line 1455 of yacc.c */ #line 1471 "parse.y" { if ((yyvsp[(3) - (4)].node) == NULL) @@ -6097,11 +6522,15 @@ break; case 280: + +/* Line 1455 of yacc.c */ #line 1478 "parse.y" {lex_state = EXPR_ENDARG;} break; case 281: + +/* Line 1455 of yacc.c */ #line 1479 "parse.y" { rb_warning("(...) interpreted as grouped expression"); @@ -6110,6 +6539,8 @@ break; case 282: + +/* Line 1455 of yacc.c */ #line 1484 "parse.y" { if (!(yyvsp[(2) - (3)].node)) (yyval.node) = NEW_NIL(); @@ -6118,6 +6549,8 @@ break; case 283: + +/* Line 1455 of yacc.c */ #line 1489 "parse.y" { (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); @@ -6125,6 +6558,8 @@ break; case 284: + +/* Line 1455 of yacc.c */ #line 1493 "parse.y" { (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); @@ -6132,6 +6567,8 @@ break; case 285: + +/* Line 1455 of yacc.c */ #line 1497 "parse.y" { if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF) @@ -6143,6 +6580,8 @@ break; case 286: + +/* Line 1455 of yacc.c */ #line 1505 "parse.y" { if ((yyvsp[(2) - (3)].node) == 0) { @@ -6155,6 +6594,8 @@ break; case 287: + +/* Line 1455 of yacc.c */ #line 1514 "parse.y" { (yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node)); @@ -6162,6 +6603,8 @@ break; case 288: + +/* Line 1455 of yacc.c */ #line 1518 "parse.y" { (yyval.node) = NEW_RETURN(0); @@ -6169,6 +6612,8 @@ break; case 289: + +/* Line 1455 of yacc.c */ #line 1522 "parse.y" { (yyval.node) = new_yield((yyvsp[(3) - (4)].node)); @@ -6176,6 +6621,8 @@ break; case 290: + +/* Line 1455 of yacc.c */ #line 1526 "parse.y" { (yyval.node) = NEW_YIELD(0, Qfalse); @@ -6183,6 +6630,8 @@ break; case 291: + +/* Line 1455 of yacc.c */ #line 1530 "parse.y" { (yyval.node) = NEW_YIELD(0, Qfalse); @@ -6190,11 +6639,15 @@ break; case 292: + +/* Line 1455 of yacc.c */ #line 1533 "parse.y" {in_defined = 1;} break; case 293: + +/* Line 1455 of yacc.c */ #line 1534 "parse.y" { in_defined = 0; @@ -6203,6 +6656,8 @@ break; case 294: + +/* Line 1455 of yacc.c */ #line 1539 "parse.y" { (yyvsp[(2) - (2)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].id), 0); @@ -6212,6 +6667,8 @@ break; case 296: + +/* Line 1455 of yacc.c */ #line 1546 "parse.y" { if ((yyvsp[(1) - (2)].node) && nd_type((yyvsp[(1) - (2)].node)) == NODE_BLOCK_PASS) { @@ -6224,6 +6681,8 @@ break; case 297: + +/* Line 1455 of yacc.c */ #line 1558 "parse.y" { (yyval.node) = NEW_IF(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); @@ -6237,6 +6696,8 @@ break; case 298: + +/* Line 1455 of yacc.c */ #line 1571 "parse.y" { (yyval.node) = NEW_UNLESS(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); @@ -6250,16 +6711,22 @@ break; case 299: + +/* Line 1455 of yacc.c */ #line 1580 "parse.y" {COND_PUSH(1);} break; case 300: + +/* Line 1455 of yacc.c */ #line 1580 "parse.y" {COND_POP();} break; case 301: + +/* Line 1455 of yacc.c */ #line 1583 "parse.y" { (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); @@ -6271,16 +6738,22 @@ break; case 302: + +/* Line 1455 of yacc.c */ #line 1590 "parse.y" {COND_PUSH(1);} break; case 303: + +/* Line 1455 of yacc.c */ #line 1590 "parse.y" {COND_POP();} break; case 304: + +/* Line 1455 of yacc.c */ #line 1593 "parse.y" { (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); @@ -6292,6 +6765,8 @@ break; case 305: + +/* Line 1455 of yacc.c */ #line 1603 "parse.y" { (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); @@ -6300,6 +6775,8 @@ break; case 306: + +/* Line 1455 of yacc.c */ #line 1608 "parse.y" { (yyval.node) = (yyvsp[(3) - (4)].node); @@ -6307,6 +6784,8 @@ break; case 307: + +/* Line 1455 of yacc.c */ #line 1612 "parse.y" { (yyval.node) = (yyvsp[(4) - (5)].node); @@ -6314,16 +6793,22 @@ break; case 308: + +/* Line 1455 of yacc.c */ #line 1615 "parse.y" {COND_PUSH(1);} break; case 309: + +/* Line 1455 of yacc.c */ #line 1615 "parse.y" {COND_POP();} break; case 310: + +/* Line 1455 of yacc.c */ #line 1618 "parse.y" { (yyval.node) = NEW_FOR((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].node), (yyvsp[(8) - (9)].node)); @@ -6332,6 +6817,8 @@ break; case 311: + +/* Line 1455 of yacc.c */ #line 1623 "parse.y" { if (in_def || in_single) @@ -6343,6 +6830,8 @@ break; case 312: + +/* Line 1455 of yacc.c */ #line 1632 "parse.y" { (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node)); @@ -6353,6 +6842,8 @@ break; case 313: + +/* Line 1455 of yacc.c */ #line 1639 "parse.y" { (yyval.num) = in_def; @@ -6361,6 +6852,8 @@ break; case 314: + +/* Line 1455 of yacc.c */ #line 1644 "parse.y" { (yyval.num) = in_single; @@ -6371,6 +6864,8 @@ break; case 315: + +/* Line 1455 of yacc.c */ #line 1652 "parse.y" { (yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node)); @@ -6383,6 +6878,8 @@ break; case 316: + +/* Line 1455 of yacc.c */ #line 1661 "parse.y" { if (in_def || in_single) @@ -6394,6 +6891,8 @@ break; case 317: + +/* Line 1455 of yacc.c */ #line 1670 "parse.y" { (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); @@ -6404,6 +6903,8 @@ break; case 318: + +/* Line 1455 of yacc.c */ #line 1677 "parse.y" { (yyval.id) = cur_mid; @@ -6414,6 +6915,8 @@ break; case 319: + +/* Line 1455 of yacc.c */ #line 1686 "parse.y" { if (!(yyvsp[(5) - (6)].node)) (yyvsp[(5) - (6)].node) = NEW_NIL(); @@ -6426,11 +6929,15 @@ break; case 320: + +/* Line 1455 of yacc.c */ #line 1694 "parse.y" {lex_state = EXPR_FNAME;} break; case 321: + +/* Line 1455 of yacc.c */ #line 1695 "parse.y" { in_single++; @@ -6440,6 +6947,8 @@ break; case 322: + +/* Line 1455 of yacc.c */ #line 1703 "parse.y" { (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), (yyvsp[(8) - (9)].node)); @@ -6450,6 +6959,8 @@ break; case 323: + +/* Line 1455 of yacc.c */ #line 1710 "parse.y" { (yyval.node) = NEW_BREAK(0); @@ -6457,6 +6968,8 @@ break; case 324: + +/* Line 1455 of yacc.c */ #line 1714 "parse.y" { (yyval.node) = NEW_NEXT(0); @@ -6464,6 +6977,8 @@ break; case 325: + +/* Line 1455 of yacc.c */ #line 1718 "parse.y" { (yyval.node) = NEW_REDO(); @@ -6471,6 +6986,8 @@ break; case 326: + +/* Line 1455 of yacc.c */ #line 1722 "parse.y" { (yyval.node) = NEW_RETRY(); @@ -6478,6 +6995,8 @@ break; case 327: + +/* Line 1455 of yacc.c */ #line 1728 "parse.y" { value_expr((yyvsp[(1) - (1)].node)); @@ -6486,6 +7005,8 @@ break; case 336: + +/* Line 1455 of yacc.c */ #line 1749 "parse.y" { (yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node)), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); @@ -6494,6 +7015,8 @@ break; case 338: + +/* Line 1455 of yacc.c */ #line 1757 "parse.y" { (yyval.node) = (yyvsp[(2) - (2)].node); @@ -6501,6 +7024,8 @@ break; case 341: + +/* Line 1455 of yacc.c */ #line 1767 "parse.y" { (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); @@ -6508,6 +7033,8 @@ break; case 342: + +/* Line 1455 of yacc.c */ #line 1771 "parse.y" { (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -6515,6 +7042,8 @@ break; case 343: + +/* Line 1455 of yacc.c */ #line 1777 "parse.y" { if ((yyvsp[(1) - (1)].node)->nd_alen == 1) { @@ -6528,6 +7057,8 @@ break; case 344: + +/* Line 1455 of yacc.c */ #line 1787 "parse.y" { (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), 0); @@ -6535,6 +7066,8 @@ break; case 345: + +/* Line 1455 of yacc.c */ #line 1791 "parse.y" { (yyval.node) = NEW_BLOCK_VAR((yyvsp[(4) - (4)].node), NEW_MASGN((yyvsp[(1) - (4)].node), 0)); @@ -6542,6 +7075,8 @@ break; case 346: + +/* Line 1455 of yacc.c */ #line 1795 "parse.y" { (yyval.node) = NEW_BLOCK_VAR((yyvsp[(7) - (7)].node), NEW_MASGN((yyvsp[(1) - (7)].node), (yyvsp[(4) - (7)].node))); @@ -6549,6 +7084,8 @@ break; case 347: + +/* Line 1455 of yacc.c */ #line 1799 "parse.y" { (yyval.node) = NEW_BLOCK_VAR((yyvsp[(6) - (6)].node), NEW_MASGN((yyvsp[(1) - (6)].node), -1)); @@ -6556,6 +7093,8 @@ break; case 348: + +/* Line 1455 of yacc.c */ #line 1803 "parse.y" { (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); @@ -6563,6 +7102,8 @@ break; case 349: + +/* Line 1455 of yacc.c */ #line 1807 "parse.y" { (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1); @@ -6570,6 +7111,8 @@ break; case 350: + +/* Line 1455 of yacc.c */ #line 1811 "parse.y" { (yyval.node) = NEW_BLOCK_VAR((yyvsp[(5) - (5)].node), NEW_MASGN(0, (yyvsp[(2) - (5)].node))); @@ -6577,6 +7120,8 @@ break; case 351: + +/* Line 1455 of yacc.c */ #line 1815 "parse.y" { (yyval.node) = NEW_BLOCK_VAR((yyvsp[(4) - (4)].node), NEW_MASGN(0, -1)); @@ -6584,6 +7129,8 @@ break; case 352: + +/* Line 1455 of yacc.c */ #line 1819 "parse.y" { (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node)); @@ -6591,6 +7138,8 @@ break; case 353: + +/* Line 1455 of yacc.c */ #line 1823 "parse.y" { (yyval.node) = NEW_MASGN(0, -1); @@ -6598,6 +7147,8 @@ break; case 354: + +/* Line 1455 of yacc.c */ #line 1827 "parse.y" { (yyval.node) = NEW_BLOCK_VAR((yyvsp[(2) - (2)].node), (NODE*)1); @@ -6605,6 +7156,8 @@ break; case 356: + +/* Line 1455 of yacc.c */ #line 1834 "parse.y" { (yyval.node) = (NODE*)1; @@ -6613,6 +7166,8 @@ break; case 357: + +/* Line 1455 of yacc.c */ #line 1839 "parse.y" { (yyval.node) = (NODE*)1; @@ -6621,6 +7176,8 @@ break; case 358: + +/* Line 1455 of yacc.c */ #line 1844 "parse.y" { (yyval.node) = (yyvsp[(2) - (3)].node); @@ -6629,6 +7186,8 @@ break; case 359: + +/* Line 1455 of yacc.c */ #line 1851 "parse.y" { (yyval.vars) = dyna_push(); @@ -6637,11 +7196,15 @@ break; case 360: + +/* Line 1455 of yacc.c */ #line 1855 "parse.y" {(yyval.vars) = ruby_dyna_vars;} break; case 361: + +/* Line 1455 of yacc.c */ #line 1858 "parse.y" { (yyval.node) = NEW_ITER((yyvsp[(3) - (6)].node), 0, dyna_init((yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].vars))); @@ -6651,6 +7214,8 @@ break; case 362: + +/* Line 1455 of yacc.c */ #line 1866 "parse.y" { if ((yyvsp[(1) - (2)].node) && nd_type((yyvsp[(1) - (2)].node)) == NODE_BLOCK_PASS) { @@ -6663,6 +7228,8 @@ break; case 363: + +/* Line 1455 of yacc.c */ #line 1875 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); @@ -6670,6 +7237,8 @@ break; case 364: + +/* Line 1455 of yacc.c */ #line 1879 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); @@ -6677,6 +7246,8 @@ break; case 365: + +/* Line 1455 of yacc.c */ #line 1885 "parse.y" { (yyval.node) = new_fcall((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); @@ -6685,6 +7256,8 @@ break; case 366: + +/* Line 1455 of yacc.c */ #line 1890 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); @@ -6693,6 +7266,8 @@ break; case 367: + +/* Line 1455 of yacc.c */ #line 1895 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); @@ -6701,6 +7276,8 @@ break; case 368: + +/* Line 1455 of yacc.c */ #line 1900 "parse.y" { (yyval.node) = new_call((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0); @@ -6708,6 +7285,8 @@ break; case 369: + +/* Line 1455 of yacc.c */ #line 1904 "parse.y" { (yyval.node) = new_super((yyvsp[(2) - (2)].node)); @@ -6715,6 +7294,8 @@ break; case 370: + +/* Line 1455 of yacc.c */ #line 1908 "parse.y" { (yyval.node) = NEW_ZSUPER(); @@ -6722,6 +7303,8 @@ break; case 371: + +/* Line 1455 of yacc.c */ #line 1914 "parse.y" { (yyval.vars) = dyna_push(); @@ -6730,11 +7313,15 @@ break; case 372: + +/* Line 1455 of yacc.c */ #line 1918 "parse.y" {(yyval.vars) = ruby_dyna_vars;} break; case 373: + +/* Line 1455 of yacc.c */ #line 1920 "parse.y" { (yyval.node) = NEW_ITER((yyvsp[(3) - (6)].node), 0, dyna_init((yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].vars))); @@ -6744,6 +7331,8 @@ break; case 374: + +/* Line 1455 of yacc.c */ #line 1926 "parse.y" { (yyval.vars) = dyna_push(); @@ -6752,11 +7341,15 @@ break; case 375: + +/* Line 1455 of yacc.c */ #line 1930 "parse.y" {(yyval.vars) = ruby_dyna_vars;} break; case 376: + +/* Line 1455 of yacc.c */ #line 1932 "parse.y" { (yyval.node) = NEW_ITER((yyvsp[(3) - (6)].node), 0, dyna_init((yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].vars))); @@ -6766,6 +7359,8 @@ break; case 377: + +/* Line 1455 of yacc.c */ #line 1942 "parse.y" { (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); @@ -6773,6 +7368,8 @@ break; case 379: + +/* Line 1455 of yacc.c */ #line 1948 "parse.y" { (yyval.node) = list_append((yyvsp[(1) - (4)].node), NEW_WHEN((yyvsp[(4) - (4)].node), 0, 0)); @@ -6780,6 +7377,8 @@ break; case 380: + +/* Line 1455 of yacc.c */ #line 1952 "parse.y" { (yyval.node) = NEW_LIST(NEW_WHEN((yyvsp[(2) - (2)].node), 0, 0)); @@ -6787,6 +7386,8 @@ break; case 383: + +/* Line 1455 of yacc.c */ #line 1964 "parse.y" { if ((yyvsp[(3) - (6)].node)) { @@ -6799,6 +7400,8 @@ break; case 385: + +/* Line 1455 of yacc.c */ #line 1976 "parse.y" { (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); @@ -6806,6 +7409,8 @@ break; case 388: + +/* Line 1455 of yacc.c */ #line 1984 "parse.y" { (yyval.node) = (yyvsp[(2) - (2)].node); @@ -6813,6 +7418,8 @@ break; case 390: + +/* Line 1455 of yacc.c */ #line 1991 "parse.y" { if ((yyvsp[(2) - (2)].node)) @@ -6824,6 +7431,8 @@ break; case 393: + +/* Line 1455 of yacc.c */ #line 2003 "parse.y" { (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); @@ -6831,6 +7440,8 @@ break; case 395: + +/* Line 1455 of yacc.c */ #line 2010 "parse.y" { NODE *node = (yyvsp[(1) - (1)].node); @@ -6845,6 +7456,8 @@ break; case 397: + +/* Line 1455 of yacc.c */ #line 2024 "parse.y" { (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); @@ -6852,6 +7465,8 @@ break; case 398: + +/* Line 1455 of yacc.c */ #line 2030 "parse.y" { (yyval.node) = (yyvsp[(2) - (3)].node); @@ -6859,6 +7474,8 @@ break; case 399: + +/* Line 1455 of yacc.c */ #line 2036 "parse.y" { NODE *node = (yyvsp[(2) - (3)].node); @@ -6883,6 +7500,8 @@ break; case 400: + +/* Line 1455 of yacc.c */ #line 2059 "parse.y" { int options = (yyvsp[(3) - (3)].num); @@ -6917,6 +7536,8 @@ break; case 401: + +/* Line 1455 of yacc.c */ #line 2092 "parse.y" { (yyval.node) = NEW_ZARRAY(); @@ -6924,6 +7545,8 @@ break; case 402: + +/* Line 1455 of yacc.c */ #line 2096 "parse.y" { (yyval.node) = (yyvsp[(2) - (3)].node); @@ -6931,6 +7554,8 @@ break; case 403: + +/* Line 1455 of yacc.c */ #line 2102 "parse.y" { (yyval.node) = 0; @@ -6938,6 +7563,8 @@ break; case 404: + +/* Line 1455 of yacc.c */ #line 2106 "parse.y" { (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node))); @@ -6945,6 +7572,8 @@ break; case 406: + +/* Line 1455 of yacc.c */ #line 2113 "parse.y" { (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); @@ -6952,6 +7581,8 @@ break; case 407: + +/* Line 1455 of yacc.c */ #line 2119 "parse.y" { (yyval.node) = NEW_ZARRAY(); @@ -6959,6 +7590,8 @@ break; case 408: + +/* Line 1455 of yacc.c */ #line 2123 "parse.y" { (yyval.node) = (yyvsp[(2) - (3)].node); @@ -6966,6 +7599,8 @@ break; case 409: + +/* Line 1455 of yacc.c */ #line 2129 "parse.y" { (yyval.node) = 0; @@ -6973,6 +7608,8 @@ break; case 410: + +/* Line 1455 of yacc.c */ #line 2133 "parse.y" { (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); @@ -6980,6 +7617,8 @@ break; case 411: + +/* Line 1455 of yacc.c */ #line 2139 "parse.y" { (yyval.node) = 0; @@ -6987,6 +7626,8 @@ break; case 412: + +/* Line 1455 of yacc.c */ #line 2143 "parse.y" { (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); @@ -6994,6 +7635,8 @@ break; case 413: + +/* Line 1455 of yacc.c */ #line 2149 "parse.y" { (yyval.node) = 0; @@ -7001,6 +7644,8 @@ break; case 414: + +/* Line 1455 of yacc.c */ #line 2153 "parse.y" { (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); @@ -7008,6 +7653,8 @@ break; case 416: + +/* Line 1455 of yacc.c */ #line 2160 "parse.y" { (yyval.node) = lex_strterm; @@ -7017,6 +7664,8 @@ break; case 417: + +/* Line 1455 of yacc.c */ #line 2166 "parse.y" { lex_strterm = (yyvsp[(2) - (3)].node); @@ -7025,6 +7674,8 @@ break; case 418: + +/* Line 1455 of yacc.c */ #line 2171 "parse.y" { (yyval.node) = lex_strterm; @@ -7036,6 +7687,8 @@ break; case 419: + +/* Line 1455 of yacc.c */ #line 2179 "parse.y" { lex_strterm = (yyvsp[(2) - (4)].node); @@ -7050,21 +7703,29 @@ break; case 420: + +/* Line 1455 of yacc.c */ #line 2191 "parse.y" {(yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id));} break; case 421: + +/* Line 1455 of yacc.c */ #line 2192 "parse.y" {(yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id));} break; case 422: + +/* Line 1455 of yacc.c */ #line 2193 "parse.y" {(yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id));} break; case 424: + +/* Line 1455 of yacc.c */ #line 2198 "parse.y" { lex_state = EXPR_END; @@ -7073,6 +7734,8 @@ break; case 429: + +/* Line 1455 of yacc.c */ #line 2211 "parse.y" { lex_state = EXPR_END; @@ -7108,6 +7771,8 @@ break; case 432: + +/* Line 1455 of yacc.c */ #line 2247 "parse.y" { (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); @@ -7115,6 +7780,8 @@ break; case 433: + +/* Line 1455 of yacc.c */ #line 2251 "parse.y" { (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); @@ -7122,36 +7789,50 @@ break; case 439: + +/* Line 1455 of yacc.c */ #line 2261 "parse.y" {(yyval.id) = kNIL;} break; case 440: + +/* Line 1455 of yacc.c */ #line 2262 "parse.y" {(yyval.id) = kSELF;} break; case 441: + +/* Line 1455 of yacc.c */ #line 2263 "parse.y" {(yyval.id) = kTRUE;} break; case 442: + +/* Line 1455 of yacc.c */ #line 2264 "parse.y" {(yyval.id) = kFALSE;} break; case 443: + +/* Line 1455 of yacc.c */ #line 2265 "parse.y" {(yyval.id) = k__FILE__;} break; case 444: + +/* Line 1455 of yacc.c */ #line 2266 "parse.y" {(yyval.id) = k__LINE__;} break; case 445: + +/* Line 1455 of yacc.c */ #line 2270 "parse.y" { (yyval.node) = gettable((yyvsp[(1) - (1)].id)); @@ -7159,6 +7840,8 @@ break; case 446: + +/* Line 1455 of yacc.c */ #line 2276 "parse.y" { (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); @@ -7166,6 +7849,8 @@ break; case 449: + +/* Line 1455 of yacc.c */ #line 2286 "parse.y" { (yyval.node) = 0; @@ -7173,6 +7858,8 @@ break; case 450: + +/* Line 1455 of yacc.c */ #line 2290 "parse.y" { lex_state = EXPR_BEG; @@ -7180,6 +7867,8 @@ break; case 451: + +/* Line 1455 of yacc.c */ #line 2294 "parse.y" { (yyval.node) = (yyvsp[(3) - (4)].node); @@ -7187,11 +7876,15 @@ break; case 452: + +/* Line 1455 of yacc.c */ #line 2297 "parse.y" {yyerrok; (yyval.node) = 0;} break; case 453: + +/* Line 1455 of yacc.c */ #line 2301 "parse.y" { (yyval.node) = (yyvsp[(2) - (4)].node); @@ -7201,6 +7894,8 @@ break; case 454: + +/* Line 1455 of yacc.c */ #line 2307 "parse.y" { (yyval.node) = (yyvsp[(1) - (2)].node); @@ -7208,6 +7903,8 @@ break; case 455: + +/* Line 1455 of yacc.c */ #line 2313 "parse.y" { (yyval.node) = block_append(NEW_ARGS((yyvsp[(1) - (6)].num), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node)), (yyvsp[(6) - (6)].node)); @@ -7215,6 +7912,8 @@ break; case 456: + +/* Line 1455 of yacc.c */ #line 2317 "parse.y" { (yyval.node) = block_append(NEW_ARGS((yyvsp[(1) - (4)].num), (yyvsp[(3) - (4)].node), 0), (yyvsp[(4) - (4)].node)); @@ -7222,6 +7921,8 @@ break; case 457: + +/* Line 1455 of yacc.c */ #line 2321 "parse.y" { (yyval.node) = block_append(NEW_ARGS((yyvsp[(1) - (4)].num), 0, (yyvsp[(3) - (4)].node)), (yyvsp[(4) - (4)].node)); @@ -7229,6 +7930,8 @@ break; case 458: + +/* Line 1455 of yacc.c */ #line 2325 "parse.y" { (yyval.node) = block_append(NEW_ARGS((yyvsp[(1) - (2)].num), 0, 0), (yyvsp[(2) - (2)].node)); @@ -7236,6 +7939,8 @@ break; case 459: + +/* Line 1455 of yacc.c */ #line 2329 "parse.y" { (yyval.node) = block_append(NEW_ARGS(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)), (yyvsp[(4) - (4)].node)); @@ -7243,6 +7948,8 @@ break; case 460: + +/* Line 1455 of yacc.c */ #line 2333 "parse.y" { (yyval.node) = block_append(NEW_ARGS(0, (yyvsp[(1) - (2)].node), 0), (yyvsp[(2) - (2)].node)); @@ -7250,6 +7957,8 @@ break; case 461: + +/* Line 1455 of yacc.c */ #line 2337 "parse.y" { (yyval.node) = block_append(NEW_ARGS(0, 0, (yyvsp[(1) - (2)].node)), (yyvsp[(2) - (2)].node)); @@ -7257,6 +7966,8 @@ break; case 462: + +/* Line 1455 of yacc.c */ #line 2341 "parse.y" { (yyval.node) = block_append(NEW_ARGS(0, 0, 0), (yyvsp[(1) - (1)].node)); @@ -7264,6 +7975,8 @@ break; case 463: + +/* Line 1455 of yacc.c */ #line 2345 "parse.y" { (yyval.node) = NEW_ARGS(0, 0, 0); @@ -7271,6 +7984,8 @@ break; case 464: + +/* Line 1455 of yacc.c */ #line 2351 "parse.y" { yyerror("formal argument cannot be a constant"); @@ -7278,6 +7993,8 @@ break; case 465: + +/* Line 1455 of yacc.c */ #line 2355 "parse.y" { yyerror("formal argument cannot be an instance variable"); @@ -7285,6 +8002,8 @@ break; case 466: + +/* Line 1455 of yacc.c */ #line 2359 "parse.y" { yyerror("formal argument cannot be a global variable"); @@ -7292,6 +8011,8 @@ break; case 467: + +/* Line 1455 of yacc.c */ #line 2363 "parse.y" { yyerror("formal argument cannot be a class variable"); @@ -7299,6 +8020,8 @@ break; case 468: + +/* Line 1455 of yacc.c */ #line 2367 "parse.y" { if (!is_local_id((yyvsp[(1) - (1)].id))) @@ -7311,6 +8034,8 @@ break; case 470: + +/* Line 1455 of yacc.c */ #line 2379 "parse.y" { (yyval.num) += 1; @@ -7318,6 +8043,8 @@ break; case 471: + +/* Line 1455 of yacc.c */ #line 2385 "parse.y" { if (!is_local_id((yyvsp[(1) - (3)].id))) @@ -7329,6 +8056,8 @@ break; case 472: + +/* Line 1455 of yacc.c */ #line 2395 "parse.y" { (yyval.node) = NEW_BLOCK((yyvsp[(1) - (1)].node)); @@ -7337,6 +8066,8 @@ break; case 473: + +/* Line 1455 of yacc.c */ #line 2400 "parse.y" { (yyval.node) = block_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -7344,6 +8075,8 @@ break; case 476: + +/* Line 1455 of yacc.c */ #line 2410 "parse.y" { if (!is_local_id((yyvsp[(2) - (2)].id))) @@ -7358,6 +8091,8 @@ break; case 477: + +/* Line 1455 of yacc.c */ #line 2421 "parse.y" { if (dyna_in_block()) { @@ -7370,6 +8105,8 @@ break; case 480: + +/* Line 1455 of yacc.c */ #line 2436 "parse.y" { if (!is_local_id((yyvsp[(2) - (2)].id))) @@ -7381,6 +8118,8 @@ break; case 481: + +/* Line 1455 of yacc.c */ #line 2446 "parse.y" { (yyval.node) = (yyvsp[(2) - (2)].node); @@ -7388,6 +8127,8 @@ break; case 483: + +/* Line 1455 of yacc.c */ #line 2453 "parse.y" { (yyval.node) = (yyvsp[(1) - (1)].node); @@ -7396,11 +8137,15 @@ break; case 484: + +/* Line 1455 of yacc.c */ #line 2457 "parse.y" {lex_state = EXPR_BEG;} break; case 485: + +/* Line 1455 of yacc.c */ #line 2458 "parse.y" { if ((yyvsp[(3) - (5)].node) == 0) { @@ -7427,6 +8172,8 @@ break; case 487: + +/* Line 1455 of yacc.c */ #line 2484 "parse.y" { (yyval.node) = (yyvsp[(1) - (2)].node); @@ -7434,6 +8181,8 @@ break; case 488: + +/* Line 1455 of yacc.c */ #line 2488 "parse.y" { if ((yyvsp[(1) - (2)].node)->nd_alen%2 != 0) { @@ -7444,6 +8193,8 @@ break; case 490: + +/* Line 1455 of yacc.c */ #line 2498 "parse.y" { (yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -7451,6 +8202,8 @@ break; case 491: + +/* Line 1455 of yacc.c */ #line 2504 "parse.y" { (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node)); @@ -7458,23 +8211,30 @@ break; case 511: + +/* Line 1455 of yacc.c */ #line 2542 "parse.y" {yyerrok;} break; case 514: + +/* Line 1455 of yacc.c */ #line 2547 "parse.y" {yyerrok;} break; case 515: + +/* Line 1455 of yacc.c */ #line 2550 "parse.y" {(yyval.node) = 0;} break; -/* Line 1267 of yacc.c. */ -#line 7478 "parse.c" + +/* Line 1455 of yacc.c */ +#line 8238 "parse.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -7485,7 +8245,6 @@ *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -7550,7 +8309,7 @@ if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -7567,7 +8326,7 @@ } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -7624,9 +8383,6 @@ YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -7651,7 +8407,7 @@ yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -7662,7 +8418,7 @@ #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -7688,6 +8444,8 @@ } + +/* Line 1675 of yacc.c */ #line 2552 "parse.y" #ifdef yystacksize diff -Nru ruby1.8-1.8.7.249/process.c ruby1.8-1.8.7.302/process.c --- ruby1.8-1.8.7.249/process.c 2008-06-29 09:34:43.000000000 +0000 +++ ruby1.8-1.8.7.302/process.c 2010-06-08 09:02:21.000000000 +0000 @@ -3,7 +3,7 @@ process.c - $Author: shyouhei $ - $Date: 2008-06-29 18:34:43 +0900 (Sun, 29 Jun 2008) $ + $Date: 2010-06-08 18:02:21 +0900 (Tue, 08 Jun 2010) $ created at: Tue Aug 10 14:30:50 JST 1993 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -1330,7 +1330,11 @@ fflush(stderr); #endif - switch (pid = fork()) { + before_exec(); + pid = fork(); + after_exec(); + + switch (pid) { case 0: #ifdef linux after_exec(); @@ -1570,6 +1574,7 @@ chfunc = signal(SIGCHLD, SIG_DFL); retry: + before_exec(); pid = fork(); if (pid == 0) { /* child process */ @@ -1577,6 +1582,7 @@ rb_protect(proc_exec_args, (VALUE)&earg, NULL); _exit(127); } + after_exec(); if (pid < 0) { if (errno == EAGAIN) { rb_thread_sleep(1); diff -Nru ruby1.8-1.8.7.249/regex.c ruby1.8-1.8.7.302/regex.c --- ruby1.8-1.8.7.249/regex.c 2008-08-04 05:15:15.000000000 +0000 +++ ruby1.8-1.8.7.302/regex.c 2010-06-08 09:33:00.000000000 +0000 @@ -1203,7 +1203,8 @@ else if (c == -1) return ~0; return c & 0x9f; default: - *pp = p + 1; + PATFETCH_RAW(c); + *pp = p; return read_backslash(c); } @@ -2151,6 +2152,12 @@ more at the end of the loop. */ unsigned nbytes = upper_bound == 1 ? 10 : 20; + if (lower_bound == 0 && greedy == 0) { + GET_BUFFER_SPACE(3); + insert_jump(try_next, laststart, b + 3, b); + b += 3; + } + GET_BUFFER_SPACE(nbytes); /* Initialize lower bound of the `succeed_n', even though it will be set during matching by its diff -Nru ruby1.8-1.8.7.249/ruby.h ruby1.8-1.8.7.302/ruby.h --- ruby1.8-1.8.7.249/ruby.h 2009-08-04 02:04:58.000000000 +0000 +++ ruby1.8-1.8.7.302/ruby.h 2010-06-08 08:42:55.000000000 +0000 @@ -50,6 +50,10 @@ # include #endif +#ifdef HAVE_STDINT_H +# include +#endif + #include #include @@ -224,7 +228,13 @@ #define TYPE(x) rb_type((VALUE)(x)) -#define RB_GC_GUARD(v) (*(volatile VALUE *)&(v)) +#ifdef __GNUC__ +#define RB_GC_GUARD_PTR(ptr) \ + __extension__ ({volatile VALUE *rb_gc_guarded_ptr = (ptr); rb_gc_guarded_ptr;}) +#else +#define RB_GC_GUARD_PTR(ptr) (volatile VALUE *)(ptr) +#endif +#define RB_GC_GUARD(v) (*RB_GC_GUARD_PTR(&(v))) void rb_check_type _((VALUE,int)); #define Check_Type(v,t) rb_check_type((VALUE)(v),t) diff -Nru ruby1.8-1.8.7.249/string.c ruby1.8-1.8.7.302/string.c --- ruby1.8-1.8.7.249/string.c 2009-12-13 15:59:51.000000000 +0000 +++ ruby1.8-1.8.7.302/string.c 2010-04-01 07:11:40.000000000 +0000 @@ -3,7 +3,7 @@ string.c - $Author: shyouhei $ - $Date: 2009-12-14 00:59:51 +0900 (Mon, 14 Dec 2009) $ + $Date: 2010-04-01 16:11:40 +0900 (Thu, 01 Apr 2010) $ created at: Mon Aug 9 17:12:58 JST 1993 Copyright (C) 1993-2003 Yukihiro Matsumoto @@ -2642,7 +2642,7 @@ while (p < pend) { char c = *p++; int len; - if (ismbchar(c) && p + (len = mbclen(c)) <= pend) { + if (ismbchar(c) && p - 1 + (len = mbclen(c)) <= pend) { rb_str_buf_cat(result, p - 1, len); p += len - 1; } diff -Nru ruby1.8-1.8.7.249/test/iconv/test_option.rb ruby1.8-1.8.7.302/test/iconv/test_option.rb --- ruby1.8-1.8.7.249/test/iconv/test_option.rb 2009-11-24 07:18:40.000000000 +0000 +++ ruby1.8-1.8.7.302/test/iconv/test_option.rb 2010-06-10 05:51:03.000000000 +0000 @@ -28,4 +28,4 @@ assert_equal(SJIS_STR, str) iconv.close end -end if defined?(TestIconv) +end if false and defined?(TestIconv) diff -Nru ruby1.8-1.8.7.249/test/net/http/test_connection.rb ruby1.8-1.8.7.302/test/net/http/test_connection.rb --- ruby1.8-1.8.7.249/test/net/http/test_connection.rb 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/test/net/http/test_connection.rb 2010-05-22 13:11:41.000000000 +0000 @@ -0,0 +1,33 @@ +require 'net/http' +require 'test/unit' + +module TestHTTP + class HTTPConnectionTest < Test::Unit::TestCase + def test_connection_refused_in_request + bug2708 = '[ruby-core:28028]' + port = nil + localhost = "127.0.0.1" + t = Thread.new { + TCPServer.open(localhost, 0) do |serv| + _, port, _, _ = serv.addr + if clt = serv.accept + clt.close + end + end + } + begin + sleep 0.1 until port + assert_raise(EOFError, bug2708) { + n = Net::HTTP.new(localhost, port) + n.request_get('/') + } + ensure + t.join if t + end + assert_raise(Errno::ECONNREFUSED, bug2708) { + n = Net::HTTP.new(localhost, port) + n.request_get('/') + } + end + end +end diff -Nru ruby1.8-1.8.7.249/test/net/http/test_post_io.rb ruby1.8-1.8.7.302/test/net/http/test_post_io.rb --- ruby1.8-1.8.7.249/test/net/http/test_post_io.rb 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/test/net/http/test_post_io.rb 2010-04-02 03:27:45.000000000 +0000 @@ -0,0 +1,32 @@ +require 'test/unit' +require 'net/http' +require 'stringio' + +class HTTPPostIOTest < Test::Unit::TestCase + def test_post_io_chunk_size + t = nil + TCPServer.open("127.0.0.1", 0) {|serv| + _, port, _, _ = serv.addr + t = Thread.new { + begin + req = Net::HTTP::Post.new("/test.cgi") + req['Transfer-Encoding'] = 'chunked' + req.body_stream = StringIO.new("\0" * (16 * 1024 + 1)) + http = Net::HTTP.new("127.0.0.1", port) + res = http.start { |http| http.request(req) } + rescue EOFError, Errno::EPIPE + end + } + sock = serv.accept + begin + assert_match(/chunked/, sock.gets("\r\n\r\n")) + chunk_header = sock.gets.chomp + assert_equal(16 * 1024, chunk_header.to_i(16)) + ensure + sock.close + end + } + ensure + t.join if t + end +end diff -Nru ruby1.8-1.8.7.249/test/net/imap/test_imap.rb ruby1.8-1.8.7.302/test/net/imap/test_imap.rb --- ruby1.8-1.8.7.249/test/net/imap/test_imap.rb 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/test/net/imap/test_imap.rb 2010-06-08 07:05:36.000000000 +0000 @@ -8,4 +8,20 @@ assert_equal("OK", r.name) assert_equal("NOMODSEQ", r.data.code.name) end + + def test_encode_utf7 + utf8 = "\357\274\241\357\274\242\357\274\243" + s = Net::IMAP.encode_utf7(utf8) + assert_equal("&,yH,Iv8j-", s) + + utf8 = "\343\201\202&" + s = Net::IMAP.encode_utf7(utf8) + assert_equal("&MEI-&-", s) + end + + def test_decode_utf7 + s = Net::IMAP.decode_utf7("&,yH,Iv8j-") + utf8 = "\357\274\241\357\274\242\357\274\243" + assert_equal(utf8, s) + end end diff -Nru ruby1.8-1.8.7.249/test/nkf/test_nkf.rb ruby1.8-1.8.7.302/test/nkf/test_nkf.rb --- ruby1.8-1.8.7.249/test/nkf/test_nkf.rb 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/test/nkf/test_nkf.rb 2010-06-07 10:45:46.000000000 +0000 @@ -13,4 +13,9 @@ assert_equal(::NKF::EUC, NKF.guess(str_euc)) end + def test_numchar_input + bug2953 = '[ruby-dev:40606]' + assert_equal("A", NKF.nkf("-w --numchar-input", "A"), bug2953) + assert_equal("B", NKF.nkf("-w --numchar-input", "B"), bug2953) + end end diff -Nru ruby1.8-1.8.7.249/test/openssl/test_ec.rb ruby1.8-1.8.7.302/test/openssl/test_ec.rb --- ruby1.8-1.8.7.249/test/openssl/test_ec.rb 2007-06-19 15:26:26.000000000 +0000 +++ ruby1.8-1.8.7.302/test/openssl/test_ec.rb 2010-06-21 09:18:59.000000000 +0000 @@ -87,9 +87,7 @@ def test_dsa_sign_verify for key in @keys sig = key.dsa_sign_asn1(@data1) - assert_equal(key.dsa_verify_asn1(@data1, sig), true) - - assert_raises(OpenSSL::PKey::ECError) { key.dsa_sign_asn1(@data2) } + assert(key.dsa_verify_asn1(@data1, sig)) end end diff -Nru ruby1.8-1.8.7.249/test/openssl/test_x509cert.rb ruby1.8-1.8.7.302/test/openssl/test_x509cert.rb --- ruby1.8-1.8.7.249/test/openssl/test_x509cert.rb 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/test/openssl/test_x509cert.rb 2010-06-21 09:18:59.000000000 +0000 @@ -129,13 +129,31 @@ end + def test_sign_and_verify_wrong_key_type + cert_rsa = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [], + nil, nil, OpenSSL::Digest::SHA1.new) + cert_dsa = issue_cert(@ca, @dsa512, 1, Time.now, Time.now+3600, [], + nil, nil, OpenSSL::Digest::DSS1.new) + begin + assert_equal(false, cert_rsa.verify(@dsa256)) + rescue OpenSSL::X509::CertificateError => e + # OpenSSL 1.0.0 added checks for pkey OID + assert_equal('wrong public key type', e.message) + end + + begin + assert_equal(false, cert_dsa.verify(@rsa1024)) + rescue OpenSSL::X509::CertificateError => e + # OpenSSL 1.0.0 added checks for pkey OID + assert_equal('wrong public key type', e.message) + end + end + def test_sign_and_verify cert = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [], nil, nil, OpenSSL::Digest::SHA1.new) assert_equal(false, cert.verify(@rsa1024)) assert_equal(true, cert.verify(@rsa2048)) - assert_equal(false, cert.verify(@dsa256)) - assert_equal(false, cert.verify(@dsa512)) cert.serial = 2 assert_equal(false, cert.verify(@rsa2048)) @@ -143,33 +161,22 @@ nil, nil, OpenSSL::Digest::MD5.new) assert_equal(false, cert.verify(@rsa1024)) assert_equal(true, cert.verify(@rsa2048)) - assert_equal(false, cert.verify(@dsa256)) - assert_equal(false, cert.verify(@dsa512)) cert.subject = @ee1 assert_equal(false, cert.verify(@rsa2048)) cert = issue_cert(@ca, @dsa512, 1, Time.now, Time.now+3600, [], nil, nil, OpenSSL::Digest::DSS1.new) - assert_equal(false, cert.verify(@rsa1024)) - assert_equal(false, cert.verify(@rsa2048)) assert_equal(false, cert.verify(@dsa256)) assert_equal(true, cert.verify(@dsa512)) cert.not_after = Time.now assert_equal(false, cert.verify(@dsa512)) + end + def test_dsig_algorithm_mismatch assert_raises(OpenSSL::X509::CertificateError){ cert = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [], nil, nil, OpenSSL::Digest::DSS1.new) } - assert_raises(OpenSSL::X509::CertificateError){ - cert = issue_cert(@ca, @dsa512, 1, Time.now, Time.now+3600, [], - nil, nil, OpenSSL::Digest::MD5.new) - } - assert_raises(OpenSSL::X509::CertificateError){ - cert = issue_cert(@ca, @dsa512, 1, Time.now, Time.now+3600, [], - nil, nil, OpenSSL::Digest::SHA1.new) - } + end end end - -end diff -Nru ruby1.8-1.8.7.249/test/openssl/test_x509crl.rb ruby1.8-1.8.7.302/test/openssl/test_x509crl.rb --- ruby1.8-1.8.7.249/test/openssl/test_x509crl.rb 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/test/openssl/test_x509crl.rb 2010-06-21 09:18:59.000000000 +0000 @@ -190,6 +190,30 @@ assert_match((2**100).to_s, crl.extensions[0].value) end + def test_sign_and_verify_wrong_key_type + cert_rsa = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [], + nil, nil, OpenSSL::Digest::SHA1.new) + crl_rsa = issue_crl([], 1, Time.now, Time.now+1600, [], + cert_rsa, @rsa2048, OpenSSL::Digest::SHA1.new) + cert_dsa = issue_cert(@ca, @dsa512, 1, Time.now, Time.now+3600, [], + nil, nil, OpenSSL::Digest::DSS1.new) + crl_dsa = issue_crl([], 1, Time.now, Time.now+1600, [], + cert_dsa, @dsa512, OpenSSL::Digest::DSS1.new) + begin + assert_equal(false, crl_rsa.verify(@dsa256)) + rescue OpenSSL::X509::CRLError => e + # OpenSSL 1.0.0 added checks for pkey OID + assert_equal('wrong public key type', e.message) + end + + begin + assert_equal(false, crl_dsa.verify(@rsa1024)) + rescue OpenSSL::X509::CRLError => e + # OpenSSL 1.0.0 added checks for pkey OID + assert_equal('wrong public key type', e.message) + end + end + def test_sign_and_verify cert = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [], nil, nil, OpenSSL::Digest::SHA1.new) @@ -197,8 +221,6 @@ cert, @rsa2048, OpenSSL::Digest::SHA1.new) assert_equal(false, crl.verify(@rsa1024)) assert_equal(true, crl.verify(@rsa2048)) - assert_equal(false, crl.verify(@dsa256)) - assert_equal(false, crl.verify(@dsa512)) crl.version = 0 assert_equal(false, crl.verify(@rsa2048)) @@ -206,8 +228,6 @@ nil, nil, OpenSSL::Digest::DSS1.new) crl = issue_crl([], 1, Time.now, Time.now+1600, [], cert, @dsa512, OpenSSL::Digest::DSS1.new) - assert_equal(false, crl.verify(@rsa1024)) - assert_equal(false, crl.verify(@rsa2048)) assert_equal(false, crl.verify(@dsa256)) assert_equal(true, crl.verify(@dsa512)) crl.version = 0 diff -Nru ruby1.8-1.8.7.249/test/openssl/test_x509req.rb ruby1.8-1.8.7.302/test/openssl/test_x509req.rb --- ruby1.8-1.8.7.249/test/openssl/test_x509req.rb 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/test/openssl/test_x509req.rb 2010-06-21 09:18:59.000000000 +0000 @@ -103,37 +103,51 @@ assert_equal(exts, get_ext_req(attrs[1].value)) end + def test_sign_and_verify_wrong_key_type + req_rsa = issue_csr(0, @dn, @rsa1024, OpenSSL::Digest::SHA1.new) + req_dsa = issue_csr(0, @dn, @dsa512, OpenSSL::Digest::DSS1.new) + begin + assert_equal(false, req_rsa.verify(@dsa256)) + rescue OpenSSL::X509::RequestError => e + # OpenSSL 1.0.0 added checks for pkey OID + assert_equal('wrong public key type', e.message) + end + + begin + assert_equal(false, req_dsa.verify(@rsa1024)) + rescue OpenSSL::X509::RequestError => e + # OpenSSL 1.0.0 added checks for pkey OID + assert_equal('wrong public key type', e.message) + end + end + def test_sign_and_verify req = issue_csr(0, @dn, @rsa1024, OpenSSL::Digest::SHA1.new) assert_equal(true, req.verify(@rsa1024)) assert_equal(false, req.verify(@rsa2048)) - assert_equal(false, req.verify(@dsa256)) - assert_equal(false, req.verify(@dsa512)) req.version = 1 assert_equal(false, req.verify(@rsa1024)) req = issue_csr(0, @dn, @rsa2048, OpenSSL::Digest::MD5.new) assert_equal(false, req.verify(@rsa1024)) assert_equal(true, req.verify(@rsa2048)) - assert_equal(false, req.verify(@dsa256)) - assert_equal(false, req.verify(@dsa512)) req.subject = OpenSSL::X509::Name.parse("/C=JP/CN=FooBar") assert_equal(false, req.verify(@rsa2048)) req = issue_csr(0, @dn, @dsa512, OpenSSL::Digest::DSS1.new) - assert_equal(false, req.verify(@rsa1024)) - assert_equal(false, req.verify(@rsa2048)) assert_equal(false, req.verify(@dsa256)) assert_equal(true, req.verify(@dsa512)) req.public_key = @rsa1024.public_key assert_equal(false, req.verify(@dsa512)) + end - assert_raise(OpenSSL::X509::RequestError){ - issue_csr(0, @dn, @rsa1024, OpenSSL::Digest::DSS1.new) } - assert_raise(OpenSSL::X509::RequestError){ - issue_csr(0, @dn, @dsa512, OpenSSL::Digest::SHA1.new) } - assert_raise(OpenSSL::X509::RequestError){ - issue_csr(0, @dn, @dsa512, OpenSSL::Digest::MD5.new) } + def test_dsig_algorithm_mismatch + assert_raise(OpenSSL::X509::RequestError) do + issue_csr(0, @dn, @rsa1024, OpenSSL::Digest::DSS1.new) + end + assert_raise(OpenSSL::X509::RequestError) do + issue_csr(0, @dn, @dsa512, OpenSSL::Digest::MD5.new) + end end end diff -Nru ruby1.8-1.8.7.249/test/optparse/test_summary.rb ruby1.8-1.8.7.302/test/optparse/test_summary.rb --- ruby1.8-1.8.7.249/test/optparse/test_summary.rb 2009-02-20 11:43:35.000000000 +0000 +++ ruby1.8-1.8.7.302/test/optparse/test_summary.rb 2010-06-23 13:30:04.000000000 +0000 @@ -1,8 +1,6 @@ -require 'test/unit' -require 'optparse' +require 'test_optparse' -class TestOptionParser < Test::Unit::TestCase; end -class TestOptionParser::SummaryTest < Test::Unit::TestCase +class TestOptionParser::SummaryTest < TestOptionParser def test_short_clash r = nil o = OptionParser.new do |opts| diff -Nru ruby1.8-1.8.7.249/test/rss/test_maker_0.9.rb ruby1.8-1.8.7.302/test/rss/test_maker_0.9.rb --- ruby1.8-1.8.7.249/test/rss/test_maker_0.9.rb 2008-02-11 08:26:47.000000000 +0000 +++ ruby1.8-1.8.7.302/test/rss/test_maker_0.9.rb 2010-05-20 07:14:37.000000000 +0000 @@ -434,5 +434,22 @@ end assert_nil(rss.channel.textInput) end + + def test_date_in_string + date = Time.now + + rss = RSS::Maker.make("0.91") do |maker| + setup_dummy_channel(maker) + setup_dummy_image(maker) + + maker.items.new_item do |item| + item.title = "The first item" + item.link = "http://example.com/blog/1.html" + item.date = date.rfc822 + end + end + + assert_equal(date.iso8601, rss.items[0].date.iso8601) + end end end diff -Nru ruby1.8-1.8.7.249/test/ruby/bug2519.rb ruby1.8-1.8.7.302/test/ruby/bug2519.rb --- ruby1.8-1.8.7.249/test/ruby/bug2519.rb 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/bug2519.rb 2010-06-10 04:38:43.000000000 +0000 @@ -0,0 +1 @@ +__method__.to_s diff -Nru ruby1.8-1.8.7.249/test/ruby/test_file_exhaustive.rb ruby1.8-1.8.7.302/test/ruby/test_file_exhaustive.rb --- ruby1.8-1.8.7.249/test/ruby/test_file_exhaustive.rb 2009-05-26 12:20:27.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_file_exhaustive.rb 2010-06-08 06:41:19.000000000 +0000 @@ -403,6 +403,8 @@ end end end + bug3175 = '[ruby-core:29627]' + assert_equal(".rb", File.extname("/tmp//bla.rb"), bug3175) end def test_split diff -Nru ruby1.8-1.8.7.249/test/ruby/test_marshal.rb ruby1.8-1.8.7.302/test/ruby/test_marshal.rb --- ruby1.8-1.8.7.249/test/ruby/test_marshal.rb 2009-12-13 15:14:02.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_marshal.rb 2010-06-23 13:16:28.000000000 +0000 @@ -72,34 +72,6 @@ assert_equal("marshal data too short", e.message) end - class DumpTest - def marshal_dump - loop { Thread.pass } - end - end - - class LoadTest - def marshal_dump - nil - end - def marshal_load(obj) - loop { Thread.pass } - end - end - - def test_context_switch - o = DumpTest.new - Thread.new { Marshal.dump(o) } - GC.start - assert(true, '[ruby-dev:39425]') - - o = LoadTest.new - m = Marshal.dump(o) - Thread.new { Marshal.load(m) } - GC.start - assert(true, '[ruby-dev:39425]') - end - def test_taint x = Object.new x.taint diff -Nru ruby1.8-1.8.7.249/test/ruby/test_method.rb ruby1.8-1.8.7.302/test/ruby/test_method.rb --- ruby1.8-1.8.7.249/test/ruby/test_method.rb 2008-05-18 15:02:36.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_method.rb 2010-06-10 04:38:43.000000000 +0000 @@ -1,6 +1,16 @@ require 'test/unit' +require File.expand_path('../envutil', __FILE__) class TestMethod < Test::Unit::TestCase + def setup + @verbose = $VERBOSE + $VERBOSE = nil + end + + def teardown + $VERBOSE = @verbose + end + def m0() end def m1(a) end def m2(a, b) end @@ -15,6 +25,15 @@ class Derived < Base def foo() :derived end end + class T + def initialize; end + def normal_method; end + end + module M + def func; end + module_function :func + def meth; end + end def test_arity assert_equal(0, method(:m0).arity) @@ -26,6 +45,10 @@ assert_equal(-2, method(:mo4).arity) end + def test_arity_special + assert_equal(-1, method(:__send__).arity) + end + def test_unbind assert_equal(:derived, Derived.new.foo) um = Derived.new.method(:foo).unbind @@ -40,6 +63,47 @@ end end + def test_callee + assert_equal(:test_callee, __method__) + assert_equal(:m, Class.new {def m; __method__; end}.new.m) + assert_equal(:m, Class.new {def m; tap{return __method__}; end}.new.m) + assert_equal(:m, Class.new {define_method(:m) {__method__}}.new.m) + assert_nothing_raised('[ruby-core:27296]') {load File.expand_path('../bug2519.rb', __FILE__)} + end + + def test_new + c1 = Class.new + c1.class_eval { def foo; :foo; end } + c2 = Class.new(c1) + c2.class_eval { private :foo } + o = c2.new + o.extend(Module.new) + assert_raise(NameError) { o.method(:bar) } + assert_equal(:foo, o.method(:foo).call) + end + + def test_eq + o = Object.new + class << o + def foo; end + alias bar foo + def baz; end + end + assert_not_equal(o.method(:foo), nil) + m = o.method(:foo) + def m.foo; end + assert_not_equal(o.method(:foo), m) + assert_equal(o.method(:foo), o.method(:foo)) + assert_equal(o.method(:foo), o.method(:bar)) + assert_not_equal(o.method(:foo), o.method(:baz)) + end + + def test_hash + o = Object.new + def o.foo; end + assert_kind_of(Integer, o.method(:foo).hash) + end + def test_receiver_name_owner o = Object.new def o.foo; end @@ -50,4 +114,104 @@ assert_equal("foo", m.unbind.name) assert_equal(class << o; self; end, m.unbind.owner) end + + def test_instance_method + c = Class.new + c.class_eval do + def foo; :foo; end + private :foo + end + o = c.new + o.method(:foo).unbind + assert_raise(NoMethodError) { o.foo } + c.instance_method(:foo).bind(o) + assert_equal(:foo, o.instance_eval { foo }) + def o.bar; end + m = o.method(:bar).unbind + assert_raise(TypeError) { m.bind(Object.new) } + end + + def test_define_method + c = Class.new + c.class_eval { def foo; :foo; end } + o = c.new + def o.bar; :bar; end + assert_raise(TypeError) do + c.class_eval { define_method(:foo, :foo) } + end + assert_raise(ArgumentError) do + c.class_eval { define_method } + end + c2 = Class.new(c) + c2.class_eval { define_method(:baz, o.method(:foo)) } + assert_equal(:foo, c2.new.baz) + + o = Object.new + def o.foo(c) + c.class_eval { define_method(:foo) } + end + c = Class.new + o.foo(c) { :foo } + assert_equal(:foo, c.new.foo) + end + + def test_clone + o = Object.new + def o.foo; :foo; end + m = o.method(:foo) + def m.bar; :bar; end + assert_equal(:foo, m.clone.call) + assert_equal(:bar, m.clone.bar) + end + + def test_call + o = Object.new + def o.foo; p 1; end + def o.bar(x); x; end + m = o.method(:foo) + m.taint + assert_raise(SecurityError) { m.call } + end + + def test_inspect + o = Object.new + def o.foo; end + m = o.method(:foo) + assert_equal("#", m.inspect) + m = o.method(:foo) + assert_equal("#", m.unbind.inspect) + + c = Class.new + c.class_eval { def foo; end; } + m = c.new.method(:foo) + assert_equal("#", m.inspect) + m = c.instance_method(:foo) + assert_equal("#", m.inspect) + + c2 = Class.new(c) + c2.class_eval { private :foo } + m2 = c2.new.method(:foo) + assert_equal("#", m2.inspect) + end + + def test_caller_negative_level + assert_raise(ArgumentError) { caller(-1) } + end + + def test_attrset_ivar + c = Class.new + c.class_eval { attr_accessor :foo } + o = c.new + o.method(:foo=).call(42) + assert_equal(42, o.foo) + assert_raise(ArgumentError) { o.method(:foo=).call(1, 2, 3) } + assert_raise(ArgumentError) { o.method(:foo).call(1) } + end + + def test_default_accessibility + assert T.public_instance_methods.include?("normal_method"), 'normal methods are public by default' + assert !T.public_instance_methods.include?("initialize"), '#initialize is private' + assert !M.public_instance_methods.include?("func"), 'module methods are private by default' + assert M.public_instance_methods.include?("meth"), 'normal methods are public by default' + end end diff -Nru ruby1.8-1.8.7.249/test/ruby/test_pack.rb ruby1.8-1.8.7.302/test/ruby/test_pack.rb --- ruby1.8-1.8.7.249/test/ruby/test_pack.rb 2009-02-19 08:26:33.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_pack.rb 2010-06-08 08:42:55.000000000 +0000 @@ -20,6 +20,31 @@ assert_equal($x, $x.pack("l").unpack("l")) end + def test_pack_n + assert_equal "\000\000", [0].pack('n') + assert_equal "\000\001", [1].pack('n') + assert_equal "\000\002", [2].pack('n') + assert_equal "\000\003", [3].pack('n') + assert_equal "\377\376", [65534].pack('n') + assert_equal "\377\377", [65535].pack('n') + + assert_equal "\200\000", [2**15].pack('n') + assert_equal "\177\377", [-2**15-1].pack('n') + assert_equal "\377\377", [-1].pack('n') + + assert_equal "\000\001\000\001", [1,1].pack('n*') + assert_equal "\000\001\000\001\000\001", [1,1,1].pack('n*') + end + + def test_unpack_n + assert_equal 1, "\000\001".unpack('n')[0] + assert_equal 2, "\000\002".unpack('n')[0] + assert_equal 3, "\000\003".unpack('n')[0] + assert_equal 65535, "\377\377".unpack('n')[0] + assert_equal [1,1], "\000\001\000\001".unpack('n*') + assert_equal [1,1,1], "\000\001\000\001\000\001".unpack('n*') + end + def test_pack_N assert_equal "\000\000\000\000", [0].pack('N') assert_equal "\000\000\000\001", [1].pack('N') @@ -40,22 +65,206 @@ assert_equal 1, "\000\000\000\001".unpack('N')[0] assert_equal 2, "\000\000\000\002".unpack('N')[0] assert_equal 3, "\000\000\000\003".unpack('N')[0] - assert_equal 3, "\000\000\000\003".unpack('N')[0] assert_equal 4294967295, "\377\377\377\377".unpack('N')[0] assert_equal [1,1], "\000\000\000\001\000\000\000\001".unpack('N*') assert_equal [1,1,1], "\000\000\000\001\000\000\000\001\000\000\000\001".unpack('N*') end + def test_integer_endian + s = [1].pack("s") + assert_operator(["\0\1", "\1\0"], :include?, s) + if s == "\0\1" + # big endian + assert_equal("\x01\x02", [0x0102].pack("s")) + assert_equal("\x01\x02", [0x0102].pack("S")) + assert_equal("\x01\x02\x03\x04", [0x01020304].pack("l")) + assert_equal("\x01\x02\x03\x04", [0x01020304].pack("L")) + assert_equal("\x01\x02\x03\x04\x05\x06\x07\x08", [0x0102030405060708].pack("q")) + assert_equal("\x01\x02\x03\x04\x05\x06\x07\x08", [0x0102030405060708].pack("Q")) + assert_match(/\A\x00*\x01\x02\z/, [0x0102].pack("s!")) + assert_match(/\A\x00*\x01\x02\z/, [0x0102].pack("S!")) + assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("i")) + assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("I")) + assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("i!")) + assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("I!")) + assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("l!")) + assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("L!")) + %w[s S l L q Q s! S! i I i! I! l! L!].each {|fmt| + nuls = [0].pack(fmt) + v = 0 + s = "" + nuls.bytesize.times {|i| + j = i + 40 + v = v * 256 + j + s << [j].pack("C") + } + assert_equal(s, [v].pack(fmt), "[#{v}].pack(#{fmt.dump})") + assert_equal([v], s.unpack(fmt), "#{s.dump}.unpack(#{fmt.dump})") + s2 = s+s + fmt2 = fmt+"*" + assert_equal([v,v], s2.unpack(fmt2), "#{s2.dump}.unpack(#{fmt2.dump})") + } + else + # little endian + assert_equal("\x02\x01", [0x0102].pack("s")) + assert_equal("\x02\x01", [0x0102].pack("S")) + assert_equal("\x04\x03\x02\x01", [0x01020304].pack("l")) + assert_equal("\x04\x03\x02\x01", [0x01020304].pack("L")) + assert_equal("\x08\x07\x06\x05\x04\x03\x02\x01", [0x0102030405060708].pack("q")) + assert_equal("\x08\x07\x06\x05\x04\x03\x02\x01", [0x0102030405060708].pack("Q")) + assert_match(/\A\x02\x01\x00*\z/, [0x0102].pack("s!")) + assert_match(/\A\x02\x01\x00*\z/, [0x0102].pack("S!")) + assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("i")) + assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("I")) + assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("i!")) + assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("I!")) + assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("l!")) + assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("L!")) + %w[s S l L q Q s! S! i I i! I! l! L!].each {|fmt| + nuls = [0].pack(fmt) + v = 0 + s = "" + nuls.bytesize.times {|i| + j = i+40 + v = v * 256 + j + s << [j].pack("C") + } + s.reverse! + assert_equal(s, [v].pack(fmt), "[#{v}].pack(#{fmt.dump})") + assert_equal([v], s.unpack(fmt), "#{s.dump}.unpack(#{fmt.dump})") + s2 = s+s + fmt2 = fmt+"*" + assert_equal([v,v], s2.unpack(fmt2), "#{s2.dump}.unpack(#{fmt2.dump})") + } + end + end + def test_pack_U - assert_raises(RangeError) { [-0x40000001].pack("U") } - assert_raises(RangeError) { [-0x40000000].pack("U") } - assert_raises(RangeError) { [-1].pack("U") } + assert_raise(RangeError) { [-0x40000001].pack("U") } + assert_raise(RangeError) { [-0x40000000].pack("U") } + assert_raise(RangeError) { [-1].pack("U") } assert_equal "\000", [0].pack("U") assert_equal "\374\277\277\277\277\277", [0x3fffffff].pack("U") assert_equal "\375\200\200\200\200\200", [0x40000000].pack("U") assert_equal "\375\277\277\277\277\277", [0x7fffffff].pack("U") - assert_raises(RangeError) { [0x80000000].pack("U") } - assert_raises(RangeError) { [0x100000000].pack("U") } + assert_raise(RangeError) { [0x80000000].pack("U") } + assert_raise(RangeError) { [0x100000000].pack("U") } + end + + def test_pack_P + a = ["abc"] + assert_equal a, a.pack("P").unpack("P*") + assert_equal "a", a.pack("P").unpack("P")[0] + assert_equal a, a.pack("P").freeze.unpack("P*") + assert_raise(ArgumentError) { (a.pack("P") + "").unpack("P*") } + end + + def test_pack_p + a = ["abc"] + assert_equal a, a.pack("p").unpack("p*") + assert_equal a[0], a.pack("p").unpack("p")[0] + assert_equal a, a.pack("p").freeze.unpack("p*") + assert_raise(ArgumentError) { (a.pack("p") + "").unpack("p*") } + end + + def test_format_string_modified + fmt = "CC" + o = Object.new + class << o; self; end.class_eval do + define_method(:to_int) { fmt.replace ""; 0 } + end + assert_raise(RuntimeError) do + [o, o].pack(fmt) + end + end + + def test_comment + assert_equal("\0\1", [0,1].pack(" C #foo \n C ")) + assert_equal([0,1], "\0\1".unpack(" C #foo \n C ")) + end + + def test_illegal_bang + assert_raise(ArgumentError) { [].pack("a!") } + assert_raise(ArgumentError) { "".unpack("a!") } + end + + def test_pack_unpack_aA + assert_equal("f", ["foo"].pack("A")) + assert_equal("f", ["foo"].pack("a")) + assert_equal("foo", ["foo"].pack("A*")) + assert_equal("foo", ["foo"].pack("a*")) + assert_equal("fo", ["foo"].pack("A2")) + assert_equal("fo", ["foo"].pack("a2")) + assert_equal("foo ", ["foo"].pack("A4")) + assert_equal("foo\0", ["foo"].pack("a4")) + assert_equal(" ", [nil].pack("A")) + assert_equal("\0", [nil].pack("a")) + assert_equal("", [nil].pack("A*")) + assert_equal("", [nil].pack("a*")) + assert_equal(" ", [nil].pack("A2")) + assert_equal("\0\0", [nil].pack("a2")) + + assert_equal("foo" + "\0" * 27, ["foo"].pack("a30")) + + assert_equal(["f"], "foo\0".unpack("A")) + assert_equal(["f"], "foo\0".unpack("a")) + assert_equal(["foo"], "foo\0".unpack("A4")) + assert_equal(["foo\0"], "foo\0".unpack("a4")) + assert_equal(["foo"], "foo ".unpack("A4")) + assert_equal(["foo "], "foo ".unpack("a4")) + assert_equal(["foo"], "foo".unpack("A4")) + assert_equal(["foo"], "foo".unpack("a4")) + end + + def test_pack_unpack_Z + assert_equal("f", ["foo"].pack("Z")) + assert_equal("foo\0", ["foo"].pack("Z*")) + assert_equal("fo", ["foo"].pack("Z2")) + assert_equal("foo\0\0", ["foo"].pack("Z5")) + assert_equal("\0", [nil].pack("Z")) + assert_equal("\0", [nil].pack("Z*")) + assert_equal("\0\0", [nil].pack("Z2")) + + assert_equal(["f"], "foo\0".unpack("Z")) + assert_equal(["foo"], "foo".unpack("Z*")) + assert_equal(["foo"], "foo\0".unpack("Z*")) + assert_equal(["foo"], "foo".unpack("Z5")) + end + + def test_pack_unpack_bB + assert_equal("\xff\x00", ["1111111100000000"].pack("b*")) + assert_equal("\x01\x02", ["1000000001000000"].pack("b*")) + assert_equal("", ["1"].pack("b0")) + assert_equal("\x01", ["1"].pack("b1")) + assert_equal("\x01\x00", ["1"].pack("b2")) + assert_equal("\x01\x00", ["1"].pack("b3")) + assert_equal("\x01\x00\x00", ["1"].pack("b4")) + assert_equal("\x01\x00\x00", ["1"].pack("b5")) + assert_equal("\x01\x00\x00\x00", ["1"].pack("b6")) + + assert_equal("\xff\x00", ["1111111100000000"].pack("B*")) + assert_equal("\x01\x02", ["0000000100000010"].pack("B*")) + assert_equal("", ["1"].pack("B0")) + assert_equal("\x80", ["1"].pack("B1")) + assert_equal("\x80\x00", ["1"].pack("B2")) + assert_equal("\x80\x00", ["1"].pack("B3")) + assert_equal("\x80\x00\x00", ["1"].pack("B4")) + assert_equal("\x80\x00\x00", ["1"].pack("B5")) + assert_equal("\x80\x00\x00\x00", ["1"].pack("B6")) + + assert_equal(["1111111100000000"], "\xff\x00".unpack("b*")) + assert_equal(["1000000001000000"], "\x01\x02".unpack("b*")) + assert_equal([""], "".unpack("b0")) + assert_equal(["1"], "\x01".unpack("b1")) + assert_equal(["10"], "\x01".unpack("b2")) + assert_equal(["100"], "\x01".unpack("b3")) + + assert_equal(["1111111100000000"], "\xff\x00".unpack("B*")) + assert_equal(["0000000100000010"], "\x01\x02".unpack("B*")) + assert_equal([""], "".unpack("B0")) + assert_equal(["1"], "\x80".unpack("B1")) + assert_equal(["10"], "\x80".unpack("B2")) + assert_equal(["100"], "\x80".unpack("B3")) end def test_pack_unpack_hH diff -Nru ruby1.8-1.8.7.249/test/ruby/test_pipe.rb ruby1.8-1.8.7.302/test/ruby/test_pipe.rb --- ruby1.8-1.8.7.249/test/ruby/test_pipe.rb 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_pipe.rb 2010-05-20 06:45:22.000000000 +0000 @@ -15,4 +15,18 @@ r.close end end + + def test_write + bug2559 = '[ruby-core:27425]' + a, b = IO.pipe + begin + a.close + assert_raises(Errno::EPIPE, bug2559) do + b.write("hi") + end + ensure + a.close if !a.closed? + b.close if !b.closed? + end + end end diff -Nru ruby1.8-1.8.7.249/test/ruby/test_regexp.rb ruby1.8-1.8.7.302/test/ruby/test_regexp.rb --- ruby1.8-1.8.7.249/test/ruby/test_regexp.rb 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_regexp.rb 2010-06-08 09:33:00.000000000 +0000 @@ -0,0 +1,465 @@ +require 'test/unit' + +class TestRegexp < Test::Unit::TestCase + def setup + @verbose = $VERBOSE + $VERBOSE = nil + end + + def teardown + $VERBOSE = @verbose + end + + def test_ruby_core_27247 + assert_match(/(a){2}z/, "aaz") + end + + def test_ruby_dev_24643 + assert_nothing_raised("[ruby-dev:24643]") { + /(?:(?:[a]*[a])?b)*a*$/ =~ "aabaaca" + } + end + + def test_ruby_talk_116455 + assert_match(/^(\w{2,}).* ([A-Za-z\xa2\xc0-\xff]{2,}?)$/n, "Hallo Welt") + end + + def test_ruby_dev_24887 + assert_equal("a".gsub(/a\Z/, ""), "") + end + + def test_yoshidam_net_20041111_1 + s = "[\xC2\xA0-\xC3\xBE]" + assert_match(Regexp.new(s, nil, "u"), "\xC3\xBE") + end + + def test_ruby_dev_31309 + assert_equal('Ruby', 'Ruby'.sub(/[^a-z]/i, '-')) + end + + def test_assert_normal_exit + # moved from knownbug. It caused core. + Regexp.union("a", "a") + end + + def test_to_s + assert_equal '(?-mix:\000)', Regexp.new("\0").to_s + end + + def test_source + assert_equal('', //.source) + end + + def test_inspect + assert_equal('//', //.inspect) + assert_equal('//i', //i.inspect) + assert_equal('/\//i', /\//i.inspect) + assert_equal('/\//i', %r"#{'/'}"i.inspect) + assert_equal('/\/x/i', /\/x/i.inspect) + assert_equal('/\000/i', /#{"\0"}/i.inspect) + assert_equal("/\n/i", /#{"\n"}/i.inspect) + s = [0xff].pack("C") + assert_equal('/\/'+s.dump.delete('"')+'/i', /\/#{s}/i.inspect) + end + + def test_char_to_option + assert_equal("BAR", "FOOBARBAZ"[/b../i]) + assert_equal("bar", "foobarbaz"[/ b . . /x]) + assert_equal("bar\n", "foo\nbar\nbaz"[/b.../m]) + assert_raise(SyntaxError) { eval('//z') } + end + + def test_char_to_option_kcode + assert_equal("bar", "foobarbaz"[/b../s]) + assert_equal("bar", "foobarbaz"[/b../e]) + assert_equal("bar", "foobarbaz"[/b../u]) + end + + def test_to_s2 + assert_equal('(?-mix:foo)', /(?:foo)/.to_s) + assert_equal('(?m-ix:foo)', /(?:foo)/m.to_s) + assert_equal('(?mi-x:foo)', /(?:foo)/mi.to_s) + assert_equal('(?mix:foo)', /(?:foo)/mix.to_s) + assert_equal('(?m-ix:foo)', /(?m-ix:foo)/.to_s) + assert_equal('(?mi-x:foo)', /(?mi-x:foo)/.to_s) + assert_equal('(?mix:foo)', /(?mix:foo)/.to_s) + assert_equal('(?mix:)', /(?mix)/.to_s) + assert_equal('(?-mix:(?mix:foo) )', /(?mix:foo) /.to_s) + end + + def test_casefold_p + assert_equal(false, /a/.casefold?) + assert_equal(true, /a/i.casefold?) + assert_equal(false, /(?i:a)/.casefold?) + end + + def test_options + assert_equal(Regexp::IGNORECASE, /a/i.options) + assert_equal(Regexp::EXTENDED, /a/x.options) + assert_equal(Regexp::MULTILINE, /a/m.options) + end + + def test_match_init_copy + m = /foo/.match("foo") + assert_raise(TypeError) do + m.instance_eval { initialize_copy(nil) } + end + assert_equal([0, 3], m.offset(0)) + end + + def test_match_size + m = /(.)(.)(\d+)(\d)/.match("THX1138.") + assert_equal(5, m.size) + end + + def test_match_array + m = /(...)(...)(...)(...)?/.match("foobarbaz") + assert_equal(["foobarbaz", "foo", "bar", "baz", nil], m.to_a) + end + + def test_match_captures + m = /(...)(...)(...)(...)?/.match("foobarbaz") + assert_equal(["foo", "bar", "baz", nil], m.captures) + end + + def test_match_aref + m = /(...)(...)(...)(...)?/.match("foobarbaz") + assert_equal("foo", m[1]) + assert_equal(["foo", "bar", "baz"], m[1..3]) + assert_nil(m[5]) + end + + def test_match_values_at + m = /(...)(...)(...)(...)?/.match("foobarbaz") + assert_equal(["foo", "bar", "baz"], m.values_at(1, 2, 3)) + end + + def test_match_inspect + m = /(...)(...)(...)(...)?/.match("foobarbaz") + assert_equal('#', m.inspect) + end + + def test_initialize + assert_raise(ArgumentError) { Regexp.new } + assert_equal(/foo/, Regexp.new(/foo/, Regexp::IGNORECASE)) + re = /foo/ + assert_raise(SecurityError) do + Thread.new { $SAFE = 4; re.instance_eval { initialize(re) } }.join + end + re.taint + assert_raise(SecurityError) do + Thread.new { $SAFE = 4; re.instance_eval { initialize(re) } }.join + end + + assert_equal("bar", "foobarbaz"[Regexp.new("b..", nil, "n")]) + assert_equal(//n, Regexp.new("", nil, "n")) + + assert_raise(RegexpError) { Regexp.new(")(") } + end + + def test_unescape + assert_raise(RegexpError) { s = '\\'; /#{ s }/ } + assert_equal(/\xFF/n, /#{ s="\\xFF" }/n) + assert_equal(/\177/, (s = '\177'; /#{ s }/)) + + assert_raise(RegexpError) { s = '\x'; /#{ s }/ } + + assert_equal("\xe1", [0x00, 0xe1, 0xff].pack("C*")[/\M-a/]) + assert_equal("\xdc", [0x00, 0xdc, 0xff].pack("C*")[/\M-\\/]) + assert_equal("\x8a", [0x00, 0x8a, 0xff].pack("C*")[/\M-\n/]) + assert_equal("\x89", [0x00, 0x89, 0xff].pack("C*")[/\M-\t/]) + assert_equal("\x8d", [0x00, 0x8d, 0xff].pack("C*")[/\M-\r/]) + assert_equal("\x8c", [0x00, 0x8c, 0xff].pack("C*")[/\M-\f/]) + assert_equal("\x8b", [0x00, 0x8b, 0xff].pack("C*")[/\M-\v/]) + assert_equal("\x87", [0x00, 0x87, 0xff].pack("C*")[/\M-\a/]) + assert_equal("\x9b", [0x00, 0x9b, 0xff].pack("C*")[/\M-\e/]) + assert_equal("\x01", [0x00, 0x01, 0xff].pack("C*")[/\C-a/]) + + assert_raise(RegexpError) { s = '\M'; /#{ s }/ } + #assert_raise(RegexpError) { s = '\M-\M-a'; /#{ s }/ } + assert_raise(RegexpError) { s = '\M-\\'; /#{ s }/ } + + assert_raise(RegexpError) { s = '\C'; /#{ s }/ } + assert_raise(RegexpError) { s = '\c'; /#{ s }/ } + #assert_raise(RegexpError) { s = '\C-\C-a'; /#{ s }/ } + + #assert_raise(RegexpError) { s = '\M-\z'; /#{ s }/ } + #assert_raise(RegexpError) { s = '\M-\777'; /#{ s }/ } + + s = ".........." + 5.times { s.sub!(".", "") } + assert_equal(".....", s) + end + + def test_equal + assert_equal(true, /abc/ == /abc/) + assert_equal(false, /abc/ == /abc/m) + assert_equal(false, /abc/ == /abd/) + end + + def test_match + assert_nil(//.match(nil)) + assert_raise(TypeError) { /.../.match(Object.new)[0] } + + $_ = "abc"; assert_equal(1, ~/bc/) + $_ = "abc"; assert_nil(~/d/) + $_ = nil; assert_nil(~/./) + end + + def test_eqq + assert_equal(false, /../ === nil) + end + + def test_quote + assert_equal("\xff", Regexp.quote([0xff].pack("C"))) + assert_equal("\\ ", Regexp.quote("\ ")) + assert_equal("\\t", Regexp.quote("\t")) + assert_equal("\\n", Regexp.quote("\n")) + assert_equal("\\r", Regexp.quote("\r")) + assert_equal("\\f", Regexp.quote("\f")) + assert_equal("\\t\xff", Regexp.quote("\t" + [0xff].pack("C"))) + end + + def test_union2 + assert_equal(/(?!)/, Regexp.union) + assert_equal(/foo/, Regexp.union(/foo/)) + assert_equal(/foo/, Regexp.union([/foo/])) + assert_equal(/\t/, Regexp.union("\t")) + end + + def test_dup + assert_equal(//, //.dup) + assert_raise(TypeError) { //.instance_eval { initialize_copy(nil) } } + end + + def test_regsub + assert_equal("fooXXXbaz", "foobarbaz".sub!(/bar/, "XXX")) + s = [0xff].pack("C") + assert_equal(s, "X".sub!(/./, s)) + assert_equal('\\' + s, "X".sub!(/./, '\\' + s)) + assert_equal('\k', "foo".sub!(/.../, '\k')) + assert_equal('foo[bar]baz', "foobarbaz".sub!(/(b..)/, '[\0]')) + assert_equal('foo[foo]baz', "foobarbaz".sub!(/(b..)/, '[\`]')) + assert_equal('foo[baz]baz', "foobarbaz".sub!(/(b..)/, '[\\\']')) + assert_equal('foo[r]baz', "foobarbaz".sub!(/(b)(.)(.)/, '[\+]')) + assert_equal('foo[\\]baz', "foobarbaz".sub!(/(b..)/, '[\\\\]')) + assert_equal('foo[\z]baz', "foobarbaz".sub!(/(b..)/, '[\z]')) + end + + def test_KCODE + assert_nothing_raised { $KCODE = 'n' } + assert_equal('NONE', $KCODE) + assert_equal(false, $=) + assert_nothing_raised { $= = nil } + end + + def test_match_setter + /foo/ =~ "foo" + m = $~ + /bar/ =~ "bar" + $~ = m + assert_equal("foo", $&) + end + + def test_last_match + /(...)(...)(...)(...)?/.match("foobarbaz") + assert_equal("foobarbaz", Regexp.last_match(0)) + assert_equal("foo", Regexp.last_match(1)) + assert_nil(Regexp.last_match(5)) + assert_nil(Regexp.last_match(-1)) + end + + def test_getter + alias $__REGEXP_TEST_LASTMATCH__ $& + alias $__REGEXP_TEST_PREMATCH__ $` + alias $__REGEXP_TEST_POSTMATCH__ $' + alias $__REGEXP_TEST_LASTPARENMATCH__ $+ + /(b)(.)(.)/.match("foobarbaz") + assert_equal("bar", $__REGEXP_TEST_LASTMATCH__) + assert_equal("foo", $__REGEXP_TEST_PREMATCH__) + assert_equal("baz", $__REGEXP_TEST_POSTMATCH__) + assert_equal("r", $__REGEXP_TEST_LASTPARENMATCH__) + + /(...)(...)(...)/.match("foobarbaz") + assert_equal("baz", $+) + end + + def test_taint + m = Thread.new do + "foo"[/foo/] + $SAFE = 4 + /foo/.match("foo") + end.value + assert(m.tainted?) + assert_nothing_raised('[ruby-core:26137]') { + m = proc {$SAFE = 4; %r"#{ }"o}.call + } + assert(m.tainted?) + end + + def check(re, ss, fs = []) + re = Regexp.new(re) unless re.is_a?(Regexp) + ss = [ss] unless ss.is_a?(Array) + ss.each do |e, s| + s ||= e + assert_match(re, s) + m = re.match(s) + assert_equal(e, m[0]) + end + fs = [fs] unless fs.is_a?(Array) + fs.each {|s| assert_no_match(re, s) } + end + + def failcheck(re) + assert_raise(RegexpError) { %r"#{ re }" } + end + + def test_parse + check(/\*\+\?\{\}\|\(\)\<\>\`\'/, "*+?{}|()<>`'") + check(/\A\w\W\z/, %w(a. b!), %w(.. ab)) + check(/\A.\b.\b.\B.\B.\z/, %w(a.aaa .a...), %w(aaaaa .....)) + check(/\A\s\S\z/, [' a', "\n."], [' ', "\n\n", 'a ']) + check(/\A\d\D\z/, '0a', %w(00 aa)) + check(/\Afoo\Z\s\z/, "foo\n", ["foo", "foo\nbar"]) + assert_equal(%w(a b c), "abc def".scan(/\G\w/)) + check(/\A(..)\1\z/, %w(abab ....), %w(abba aba)) + check(/\A\77\z/, "?") + check(/\A\78\z/, "\7" + '8', ["\100", ""]) + check(/\A\Qfoo\E\z/, "QfooE") + failcheck('\Aa++\z') + check('\Ax]\z', "x]") + check(/x#foo/x, "x", "#foo") + check(/\Ax#foo#{ "\n" }x\z/x, "xx", ["x", "x#foo\nx"]) + check(/\A\n\z/, "\n") + check(/\A\t\z/, "\t") + check(/\A\r\z/, "\r") + check(/\A\f\z/, "\f") + check(/\A\a\z/, "\007") + check(/\A\e\z/, "\033") + check(/\A\v\z/, "\v") + failcheck('(') + failcheck('(?foo)') + failcheck('/[1-\w]/') + end + + def test_exec + check(/A*B/, %w(B AB AAB AAAB), %w(A)) + check(/\w*!/, %w(! a! ab! abc!), %w(abc)) + check(/\w*\W/, %w(! a" ab# abc$), %w(abc)) + check(/\w*\w/, %w(z az abz abcz), %w(!)) + check(/[a-z]*\w/, %w(z az abz abcz), %w(!)) + check(/[a-z]*\W/, %w(! a" ab# abc$), %w(A)) + check(/((a|bb|ccc|dddd)(1|22|333|4444))/i, %w(a1 bb1 a22), %w(a2 b1)) + check(/abc\B.\Bxyz/, %w(abcXxyz abc0xyz), %w(abc|xyz abc-xyz)) + check(/\Bxyz/, [%w(xyz abcXxyz), %w(xyz abc0xyz)], %w(abc xyz abc-xyz)) + check(/abc\B/, [%w(abc abcXxyz), %w(abc abc0xyz)], %w(abc xyz abc-xyz)) + failcheck('(?abc)\1') + check(eval('/^(?:a?)?$/'), ["", "a"], ["aa"]) + check(eval('/^(?:a+)?$/'), ["", "a", "aa"], ["ab"]) + check(/^a??[ab]/, [["a", "a"], ["a", "aa"], ["b", "b"], ["a", "ab"]], ["c"]) + check(/^(?:a*){3,5}$/, ["", "a", "aa", "aaa", "aaaa", "aaaaa", "aaaaaa"], ["b"]) + check(/^(?:a+){3,5}$/, ["aaa", "aaaa", "aaaaa", "aaaaaa"], ["", "a", "aa", "b"]) + end + + def test_parse_curly_brace + check(/\Aa{0}+\z/, "", %w(a aa aab)) + check(/\Aa{1}+\z/, %w(a aa), ["", "aab"]) + check(/\Aa{1,2}b{1,2}\z/, %w(ab aab abb aabb), ["", "aaabb", "abbb"]) + check(/(?!x){0,1}/, [ ['', 'ab'], ['', ''] ]) + failcheck('.{100001}') + failcheck('.{0,100001}') + failcheck('.{1,0}') + failcheck('{0}') + end + + def test_char_class + failcheck('[]') + failcheck('[x') + check('\A[]]\z', "]", "") + check('\A[]\.]+\z', %w(] . ]..]), ["", "["]) + check(/\A[abc]+\z/, "abcba", ["", "ada"]) + check(/\A[\w][\W]\z/, %w(a. b!), %w(.. ab)) + check(/\A[\s][\S]\z/, [' a', "\n."], [' ', "\n\n", 'a ']) + check(/\A[\d][\D]\z/, '0a', %w(00 aa)) + check(/\A[\xff]\z/, "\xff", ["", "\xfe"]) + check(/\A[\80]+\z/, "8008", ["\\80", "\100", "\1000"]) + check(/\A[\77]+\z/, "???") + check(/\A[\78]+\z/, "\788\7") + check(/\A[\0]\z/, "\0") + check(/\A[0-]\z/, ["0", "-"], "0-") + check('\A[--0]\z', ["-", "/", "0"], ["", "1"]) + check('\A[\'--0]\z', %w(* + \( \) 0 ,), ["", ".", "1"]) + check(/\A[a-b-]\z/, %w(a b -), ["", "c"]) + check(/\A[\n\r\t]\z/, ["\n", "\r", "\t"]) + failcheck('[9-1]') + + assert_match(/\A\d+\z/, "0123456789") + assert_match(/\A\w+\z/, "09azAZ_") + #assert_match(/\A\s+\z/, "\r\n\v\f\r\s") # pending for 187, [Bug #1196] + end + + def test_posix_bracket + check(/\A[[:alpha:]0]\z/, %w(0 a), %w(1 .)) + check('\A[[:abcdefghijklmnopqrstu:]]+\z', "[]") + failcheck('[[:alpha') + failcheck('[[:alpha:') + failcheck('[[:alp:]]') + end + + def test_backward + assert_equal(3, "foobar".rindex(/b.r/i)) + assert_equal(nil, "foovar".rindex(/b.r/i)) + assert_equal(3, ("foo" + "bar" * 1000).rindex(/#{"bar"*1000}/)) + assert_equal(4, ("foo\nbar\nbaz\n").rindex(/bar/i)) + end + + def test_uninitialized + assert_raise(TypeError) { Regexp.allocate.hash } + assert_raise(TypeError) { Regexp.allocate.eql? Regexp.allocate } + assert_raise(TypeError) { Regexp.allocate == Regexp.allocate } + assert_raise(TypeError) { Regexp.allocate =~ "" } + assert_equal(false, Regexp.allocate === Regexp.allocate) + assert_nil(~Regexp.allocate) + assert_raise(TypeError) { Regexp.allocate.match("") } + assert_raise(TypeError) { Regexp.allocate.to_s } + assert_raise(TypeError) { Regexp.allocate.inspect } + assert_raise(TypeError) { Regexp.allocate.source } + assert_raise(TypeError) { Regexp.allocate.casefold? } + assert_raise(TypeError) { Regexp.allocate.options } + + assert_raise(TypeError) { MatchData.allocate.size } + assert_raise(TypeError) { MatchData.allocate.length } + assert_raise(TypeError) { MatchData.allocate.offset(0) } + assert_raise(TypeError) { MatchData.allocate.begin(0) } + assert_raise(TypeError) { MatchData.allocate.end(0) } + assert_raise(TypeError) { MatchData.allocate.to_a } + assert_raise(TypeError) { MatchData.allocate[:foo] } + assert_raise(TypeError) { MatchData.allocate.values_at } + assert_raise(TypeError) { MatchData.allocate.pre_match } + assert_raise(TypeError) { MatchData.allocate.post_match } + assert_raise(TypeError) { MatchData.allocate.to_s } + assert_raise(TypeError) { MatchData.allocate.string } + $~ = MatchData.allocate + assert_raise(TypeError) { $& } + assert_raise(TypeError) { $` } + assert_raise(TypeError) { $' } + assert_raise(TypeError) { $+ } + end + + def test_regexp_poped + assert_nothing_raised { eval("a = 1; /\#{ a }/; a") } + assert_nothing_raised { eval("a = 1; /\#{ a }/o; a") } + end + + def test_optimize_last_anycharstar + s = "1" + " " * 5000000 + assert_nothing_raised { s.match(/(\d) (.*)/) } + assert_equal("1", $1) + assert_equal(" " * 4999999, $2) + end + + def test_range_greedy + /wo{0,3}?/ =~ "woo" + assert_equal("w", $&) + end +end diff -Nru ruby1.8-1.8.7.249/test/ruby/test_require.rb ruby1.8-1.8.7.302/test/ruby/test_require.rb --- ruby1.8-1.8.7.249/test/ruby/test_require.rb 1970-01-01 00:00:00.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_require.rb 2010-06-08 06:30:35.000000000 +0000 @@ -0,0 +1,27 @@ +require 'test/unit' + +require 'tempfile' +require File.expand_path('../envutil', __FILE__) +require 'tmpdir' + +class TestRequire < Test::Unit::TestCase + def test_home_path + home = ENV["HOME"] + bug3171 = '[ruby-core:29610]' + Dir.mktmpdir do |tmp| + ENV["HOME"] = tmp + name = "loadtest#{$$}-1" + path = File.join(tmp, name) << ".rb" + open(path, "w") {} + require "~/#{name}" + assert_equal(path, $"[-1], bug3171) + name.succ! + path = File.join(tmp, name << ".rb") + open(path, "w") {} + require "~/#{name}" + assert_equal(path, $"[-1], bug3171) + end + ensure + ENV["HOME"] = home + end +end diff -Nru ruby1.8-1.8.7.249/test/ruby/test_string.rb ruby1.8-1.8.7.302/test/ruby/test_string.rb --- ruby1.8-1.8.7.249/test/ruby/test_string.rb 2009-12-13 15:59:51.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_string.rb 2010-04-01 07:11:40.000000000 +0000 @@ -24,7 +24,7 @@ assert_equal('"\343\201\202"', "\xe3\x81\x82".inspect) $KCODE = 'u' - assert_equal('"\\343\\201\\202"', "\xe3\x81\x82".inspect) + assert_equal("\"\343\201\202\"", "\xe3\x81\x82".inspect) assert_no_match(/\0/, "\xe3\x81".inspect, '[ruby-dev:39550]') ensure $KCODE = original_kcode diff -Nru ruby1.8-1.8.7.249/test/ruby/test_super.rb ruby1.8-1.8.7.302/test/ruby/test_super.rb --- ruby1.8-1.8.7.249/test/ruby/test_super.rb 2009-12-14 03:39:41.000000000 +0000 +++ ruby1.8-1.8.7.302/test/ruby/test_super.rb 2010-05-22 10:41:43.000000000 +0000 @@ -149,4 +149,25 @@ c = C.new assert_equal([c, "#{C.to_s}::m"], c.m, bug2419) end + + module Bug2537 + class Parent + def run(a) + a + end + end + + class Child < Parent + def run(*a) + proc {super(*a)}.call + end + end + end + + def test_super_in_block_call + bug2537 = '[ruby-dev:39931]' + assert_nothing_raised(bug2537) do + assert_equal(bug2537, Bug2537::Child.new.run(bug2537), bug2537) + end + end end diff -Nru ruby1.8-1.8.7.249/test/webrick/test_filehandler.rb ruby1.8-1.8.7.302/test/webrick/test_filehandler.rb --- ruby1.8-1.8.7.249/test/webrick/test_filehandler.rb 2008-05-18 15:02:36.000000000 +0000 +++ ruby1.8-1.8.7.302/test/webrick/test_filehandler.rb 2010-06-16 06:57:47.000000000 +0000 @@ -71,7 +71,12 @@ def test_filehandler config = { :DocumentRoot => File.dirname(__FILE__), } this_file = File.basename(__FILE__) - TestWEBrick.start_httpserver(config) do |server, addr, port| + filesize = File.size(__FILE__) + this_data = File.open(__FILE__, "rb") {|f| f.read} + range = nil + bug2593 = '[ruby-dev:40030]' + + TestWEBrick.start_httpserver(config) do |server, addr, port, log| http = Net::HTTP.new(addr, port) req = Net::HTTP::Get.new("/") http.request(req){|res| @@ -85,6 +90,67 @@ assert_equal("text/plain", res.content_type) assert_equal(File.read(__FILE__), res.body) } + + req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=#{filesize-100}-") + http.request(req){|res| + assert_equal("206", res.code, log.call) + assert_equal("text/plain", res.content_type, log.call) + assert_nothing_raised(bug2593) {range = res.content_range} + assert_equal((filesize-100)..(filesize-1), range, log.call) + assert_equal(this_data[-100..-1], res.body, log.call) + } + + req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=-100") + http.request(req){|res| + assert_equal("206", res.code, log.call) + assert_equal("text/plain", res.content_type, log.call) + assert_nothing_raised(bug2593) {range = res.content_range} + assert_equal((filesize-100)..(filesize-1), range, log.call) + assert_equal(this_data[-100..-1], res.body, log.call) + } + + req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=0-99") + http.request(req){|res| + assert_equal("206", res.code, log.call) + assert_equal("text/plain", res.content_type, log.call) + assert_nothing_raised(bug2593) {range = res.content_range} + assert_equal(0..99, range, log.call) + assert_equal(this_data[0..99], res.body, log.call) + } + + req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=100-199") + http.request(req){|res| + assert_equal("206", res.code, log.call) + assert_equal("text/plain", res.content_type, log.call) + assert_nothing_raised(bug2593) {range = res.content_range} + assert_equal(100..199, range, log.call) + assert_equal(this_data[100..199], res.body, log.call) + } + + req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=0-0") + http.request(req){|res| + assert_equal("206", res.code, log.call) + assert_equal("text/plain", res.content_type, log.call) + assert_nothing_raised(bug2593) {range = res.content_range} + assert_equal(0..0, range, log.call) + assert_equal(this_data[0..0], res.body, log.call) + } + + req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=-1") + http.request(req){|res| + assert_equal("206", res.code, log.call) + assert_equal("text/plain", res.content_type, log.call) + assert_nothing_raised(bug2593) {range = res.content_range} + assert_equal((filesize-1)..(filesize-1), range, log.call) + assert_equal(this_data[-1, 1], res.body, log.call) + } + + req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=0-0, -2") + http.request(req){|res| + assert_equal("206", res.code, log.call) + assert_equal("multipart/byteranges", res.content_type, log.call) + } + end end diff -Nru ruby1.8-1.8.7.249/test/webrick/utils.rb ruby1.8-1.8.7.302/test/webrick/utils.rb --- ruby1.8-1.8.7.249/test/webrick/utils.rb 2008-05-18 15:02:36.000000000 +0000 +++ ruby1.8-1.8.7.302/test/webrick/utils.rb 2010-06-16 06:57:47.000000000 +0000 @@ -27,15 +27,21 @@ module_function def start_server(klass, config={}, &block) + log_string = "" + logger = Object.new + class << logger; self; end.class_eval do + define_method(:<<) {|msg| log_string << msg } + end + log = proc { "webrick log start:\n" + log_string.gsub(/^/, " ").chomp + "\nwebrick log end" } server = klass.new({ :BindAddress => "127.0.0.1", :Port => 0, - :Logger => WEBrick::Log.new(NullWriter), + :Logger => WEBrick::Log.new(logger), :AccessLog => [[NullWriter, ""]] }.update(config)) begin thread = Thread.start{ server.start } addr = server.listeners[0].addr - block.call([server, addr[3], addr[1]]) + block.call([server, addr[3], addr[1], log]) ensure server.stop thread.join diff -Nru ruby1.8-1.8.7.249/test/zlib/test_zlib.rb ruby1.8-1.8.7.302/test/zlib/test_zlib.rb --- ruby1.8-1.8.7.249/test/zlib/test_zlib.rb 2007-02-12 23:01:19.000000000 +0000 +++ ruby1.8-1.8.7.302/test/zlib/test_zlib.rb 2010-05-20 07:21:52.000000000 +0000 @@ -1,6 +1,7 @@ require 'test/unit/testsuite' require 'test/unit/testcase' require 'stringio' +require 'tempfile' begin require 'zlib' @@ -8,13 +9,451 @@ end if defined? Zlib + class TestZlibDeflate < Test::Unit::TestCase + def test_initialize + z = Zlib::Deflate.new + s = z.deflate("foo", Zlib::FINISH) + assert_equal("foo", Zlib::Inflate.inflate(s)) + + z = Zlib::Deflate.new + s = z.deflate("foo") + s << z.deflate(nil, Zlib::FINISH) + assert_equal("foo", Zlib::Inflate.inflate(s)) + + assert_raise(Zlib::StreamError) { Zlib::Deflate.new(10000) } + end + + def test_dup + z1 = Zlib::Deflate.new + s = z1.deflate("foo") + z2 = z1.dup + s1 = s + z1.deflate("bar", Zlib::FINISH) + s2 = s + z2.deflate("baz", Zlib::FINISH) + assert_equal("foobar", Zlib::Inflate.inflate(s1)) + assert_equal("foobaz", Zlib::Inflate.inflate(s2)) + end + + def test_deflate + s = Zlib::Deflate.deflate("foo") + assert_equal("foo", Zlib::Inflate.inflate(s)) + + assert_raise(Zlib::StreamError) { Zlib::Deflate.deflate("foo", 10000) } + end + + def test_addstr + z = Zlib::Deflate.new + z << "foo" + s = z.deflate(nil, Zlib::FINISH) + assert_equal("foo", Zlib::Inflate.inflate(s)) + end + + def test_flush + z = Zlib::Deflate.new + z << "foo" + s = z.flush + z << "bar" + s << z.flush_next_in + z << "baz" + s << z.flush_next_out + s << z.deflate("qux", Zlib::FINISH) + assert_equal("foobarbazqux", Zlib::Inflate.inflate(s)) + end + + def test_avail + z = Zlib::Deflate.new + assert_equal(0, z.avail_in) + assert_equal(0, z.avail_out) + z << "foo" + z.avail_out += 100 + z << "bar" + s = z.finish + assert_equal("foobar", Zlib::Inflate.inflate(s)) + end + + def test_total + z = Zlib::Deflate.new + 1000.times { z << "foo" } + s = z.finish + assert_equal(3000, z.total_in) + assert_operator(3000, :>, z.total_out) + assert_equal("foo" * 1000, Zlib::Inflate.inflate(s)) + end + + def test_data_type + z = Zlib::Deflate.new + assert([Zlib::ASCII, Zlib::BINARY, Zlib::UNKNOWN].include?(z.data_type)) + end + + def test_adler + z = Zlib::Deflate.new + z << "foo" + s = z.finish + assert_equal(0x02820145, z.adler) + end + + def test_finished_p + z = Zlib::Deflate.new + assert_equal(false, z.finished?) + z << "foo" + assert_equal(false, z.finished?) + s = z.finish + assert_equal(true, z.finished?) + z.close + assert_raise(Zlib::Error) { z.finished? } + end + + def test_closed_p + z = Zlib::Deflate.new + assert_equal(false, z.closed?) + z << "foo" + assert_equal(false, z.closed?) + s = z.finish + assert_equal(false, z.closed?) + z.close + assert_equal(true, z.closed?) + end + + def test_params + z = Zlib::Deflate.new + z << "foo" + z.params(Zlib::DEFAULT_COMPRESSION, Zlib::DEFAULT_STRATEGY) + z << "bar" + s = z.finish + assert_equal("foobar", Zlib::Inflate.inflate(s)) + + data = ('a'..'z').to_a.join + z = Zlib::Deflate.new(Zlib::NO_COMPRESSION, Zlib::MAX_WBITS, + Zlib::DEF_MEM_LEVEL, Zlib::DEFAULT_STRATEGY) + z << data[0, 10] + z.params(Zlib::BEST_COMPRESSION, Zlib::DEFAULT_STRATEGY) + z << data[10 .. -1] + assert_equal(data, Zlib::Inflate.inflate(z.finish)) + + z = Zlib::Deflate.new + s = z.deflate("foo", Zlib::FULL_FLUSH) + z.avail_out = 0 + z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED) + s << z.deflate("bar", Zlib::FULL_FLUSH) + z.avail_out = 0 + z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY) + s << z.deflate("baz", Zlib::FINISH) + assert_equal("foobarbaz", Zlib::Inflate.inflate(s)) + + z = Zlib::Deflate.new + assert_raise(Zlib::StreamError) { z.params(10000, 10000) } + z.close # without this, outputs `zlib(finalizer): the stream was freed prematurely.' + end + + def test_set_dictionary + z = Zlib::Deflate.new + z.set_dictionary("foo") + s = z.deflate("foo" * 100, Zlib::FINISH) + z = Zlib::Inflate.new + assert_raise(Zlib::NeedDict) { z.inflate(s) } + z.set_dictionary("foo") + assert_equal("foo" * 100, z.inflate(s)) # ??? + + z = Zlib::Deflate.new + z << "foo" + assert_raise(Zlib::StreamError) { z.set_dictionary("foo") } + z.close # without this, outputs `zlib(finalizer): the stream was freed prematurely.' + end + + def test_reset + z = Zlib::Deflate.new + z << "foo" + z.reset + z << "bar" + s = z.finish + assert_equal("bar", Zlib::Inflate.inflate(s)) + end + + def test_close + z = Zlib::Deflate.new + z.close + assert_raise(Zlib::Error) { z << "foo" } + assert_raise(Zlib::Error) { z.reset } + end + + COMPRESS_MSG = '0000000100100011010001010110011110001001101010111100110111101111' + def test_deflate_no_flush + d = Zlib::Deflate.new + d.deflate(COMPRESS_MSG, Zlib::SYNC_FLUSH) # for header output + assert(d.deflate(COMPRESS_MSG, Zlib::NO_FLUSH).empty?) + assert(!d.finish.empty?) + d.close + end + + def test_deflate_sync_flush + d = Zlib::Deflate.new + assert_nothing_raised do + d.deflate(COMPRESS_MSG, Zlib::SYNC_FLUSH) + end + assert(!d.finish.empty?) + d.close + end + + def test_deflate_full_flush + d = Zlib::Deflate.new + assert_nothing_raised do + d.deflate(COMPRESS_MSG, Zlib::FULL_FLUSH) + end + assert(!d.finish.empty?) + d.close + end + + def test_deflate_flush_finish + d = Zlib::Deflate.new + d.deflate("init", Zlib::SYNC_FLUSH) # for flushing header + assert(!d.deflate(COMPRESS_MSG, Zlib::FINISH).empty?) + d.close + end + + def test_deflate_raise_after_finish + d = Zlib::Deflate.new + d.deflate("init") + d.finish + assert_raise(Zlib::StreamError) do + d.deflate('foo') + end + # + d = Zlib::Deflate.new + d.deflate("init", Zlib::FINISH) + assert_raise(Zlib::StreamError) do + d.deflate('foo') + end + end + end + + class TestZlibInflate < Test::Unit::TestCase + def test_initialize + assert_raise(Zlib::StreamError) { Zlib::Inflate.new(-1) } + + s = Zlib::Deflate.deflate("foo") + z = Zlib::Inflate.new + z << s << nil + assert_equal("foo", z.finish) + end + + def test_inflate + s = Zlib::Deflate.deflate("foo") + z = Zlib::Inflate.new + s = z.inflate(s) + s << z.inflate(nil) + assert_equal("foo", s) + z.inflate("foo") # ??? + z << "foo" # ??? + end + + def test_sync + z = Zlib::Deflate.new + s = z.deflate("foo" * 1000, Zlib::FULL_FLUSH) + z.avail_out = 0 + z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED) + s << z.deflate("bar" * 1000, Zlib::FULL_FLUSH) + z.avail_out = 0 + z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY) + s << z.deflate("baz" * 1000, Zlib::FINISH) + + z = Zlib::Inflate.new + assert_raise(Zlib::DataError) { z << "\0" * 100 } + assert_equal(false, z.sync("")) + assert_equal(false, z.sync_point?) + + z = Zlib::Inflate.new + assert_raise(Zlib::DataError) { z << "\0" * 100 + s } + assert_equal(true, z.sync("")) + #assert_equal(true, z.sync_point?) + + z = Zlib::Inflate.new + assert_equal(false, z.sync("\0" * 100)) + assert_equal(false, z.sync_point?) + + z = Zlib::Inflate.new + assert_equal(true, z.sync("\0" * 100 + s)) + #assert_equal(true, z.sync_point?) + end + + def test_set_dictionary + z = Zlib::Inflate.new + assert_raise(Zlib::StreamError) { z.set_dictionary("foo") } + z.close + end + end + + class TestZlibGzipFile < Test::Unit::TestCase + def test_to_io + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo") } + + f = Zlib::GzipReader.open(t.path) + assert_kind_of(IO, f.to_io) + end + + def test_crc + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo") } + + f = Zlib::GzipReader.open(t.path) + f.read + assert_equal(0x8c736521, f.crc) + end + + def test_mtime + tim = Time.now + + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) do |gz| + gz.mtime = -1 + gz.mtime = tim + gz.print("foo") + gz.flush + assert_raise(Zlib::GzipFile::Error) { gz.mtime = Time.now } + end + + f = Zlib::GzipReader.open(t.path) + assert_equal(tim.to_i, f.mtime.to_i) + end + + def test_level + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo") } + + f = Zlib::GzipReader.open(t.path) + assert_equal(Zlib::DEFAULT_COMPRESSION, f.level) + end + + def test_os_code + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo") } + + f = Zlib::GzipReader.open(t.path) + assert_equal(Zlib::OS_CODE, f.os_code) + end + + def test_orig_name + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) do |gz| + gz.orig_name = "foobarbazqux\0quux" + gz.print("foo") + gz.flush + assert_raise(Zlib::GzipFile::Error) { gz.orig_name = "quux" } + end + + f = Zlib::GzipReader.open(t.path) + assert_equal("foobarbazqux", f.orig_name) + end + + def test_comment + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) do |gz| + gz.comment = "foobarbazqux\0quux" + gz.print("foo") + gz.flush + assert_raise(Zlib::GzipFile::Error) { gz.comment = "quux" } + end + + f = Zlib::GzipReader.open(t.path) + assert_equal("foobarbazqux", f.comment) + end + + def test_lineno + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo\nbar\nbaz\nqux\n") } + + f = Zlib::GzipReader.open(t.path) + assert_equal([0, "foo\n"], [f.lineno, f.gets]) + assert_equal([1, "bar\n"], [f.lineno, f.gets]) + f.lineno = 1000 + assert_equal([1000, "baz\n"], [f.lineno, f.gets]) + assert_equal([1001, "qux\n"], [f.lineno, f.gets]) + end + + def test_closed_p + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo") } + + f = Zlib::GzipReader.open(t.path) + assert_equal(false, f.closed?) + f.read + assert_equal(false, f.closed?) + f.close + assert_equal(true, f.closed?) + end + + def test_sync + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo") } + + f = Zlib::GzipReader.open(t.path) + f.sync = true + assert_equal(true, f.sync) + f.read + f.sync = false + assert_equal(false, f.sync) + f.close + end + + def test_pos + t = Tempfile.new("test_zlib_gzip_file") + t.close + Zlib::GzipWriter.open(t.path) do |gz| + gz.print("foo") + gz.flush + assert_equal(3, gz.tell) + end + end + + def test_path + t = Tempfile.new("test_zlib_gzip_file") + t.close + + gz = Zlib::GzipWriter.open(t.path) + unless gz.respond_to?(:path) + gz.close + return + end + gz.print("foo") + assert_equal(t.path, gz.path) + gz.close + assert_equal(t.path, gz.path) + + f = Zlib::GzipReader.open(t.path) + assert_equal(t.path, f.path) + f.close + assert_equal(t.path, f.path) + + s = "" + sio = StringIO.new(s) + gz = Zlib::GzipWriter.new(sio) + gz.print("foo") + assert_raise(NoMethodError) { gz.path } + gz.close + + sio = StringIO.new(s) + f = Zlib::GzipReader.new(sio) + assert_raise(NoMethodError) { f.path } + f.close + end + end + class TestZlibGzipReader < Test::Unit::TestCase D0 = "\037\213\010\000S`\017A\000\003\003\000\000\000\000\000\000\000\000\000" def test_read0 assert_equal("", Zlib::GzipReader.new(StringIO.new(D0)).read(0)) end - def test_ungetc # [ruby-dev:24060] + def test_ungetc s = "" w = Zlib::GzipWriter.new(StringIO.new(s)) w << (1...1000).to_a.inspect @@ -22,14 +461,14 @@ r = Zlib::GzipReader.new(StringIO.new(s)) r.read(100) r.ungetc ?a - assert_nothing_raised { + assert_nothing_raised("[ruby-dev:24060]") { r.read(100) r.read r.close } end - def test_ungetc_paragraph # [ruby-dev:24065] + def test_ungetc_paragraph s = "" w = Zlib::GzipWriter.new(StringIO.new(s)) w << "abc" @@ -37,11 +476,67 @@ r = Zlib::GzipReader.new(StringIO.new(s)) r.ungetc ?\n assert_equal("abc", r.gets("")) - assert_nothing_raised { + assert_nothing_raised("[ruby-dev:24065]") { r.read r.close } end + + def test_native_exception_from_zlib_on_broken_header + corrupt = StringIO.new + corrupt.write('borkborkbork') + begin + Zlib::GzipReader.new(corrupt) + flunk() + rescue Zlib::GzipReader::Error + end + end + + def test_wrap + content = StringIO.new "", "r+" + + Zlib::GzipWriter.wrap(content) do |io| + io.write "hello\nworld\n" + end + + content = StringIO.new content.string, "rb" + + gin = Zlib::GzipReader.new(content) + assert_equal("hello\n", gin.gets) + assert_equal("world\n", gin.gets) + assert_nil gin.gets + assert gin.eof? + gin.close + end + + def test_each_line_no_block + t = Tempfile.new("test_zlib_gzip_reader") + t.close + Zlib::GzipWriter.open(t.path) { |io| io.write "hello\nworld\n" } + lines = [] + z = Zlib::GzipReader.open(t.path) + z.each_line do |line| + lines << line + end + z.close + + assert_equal(2, lines.size, lines.inspect) + assert_equal("hello\n", lines.first) + assert_equal("world\n", lines.last) + end + + def test_each_line_block + t = Tempfile.new("test_zlib_gzip_reader") + t.close + Zlib::GzipWriter.open(t.path) { |io| io.write "hello\nworld\n" } + lines = [] + Zlib::GzipReader.open(t.path) do |z| + z.each_line do |line| + lines << line + end + end + assert_equal(2, lines.size, lines.inspect) + end end class TestZlibGzipWriter < Test::Unit::TestCase @@ -53,5 +548,16 @@ assert_raise(NoMethodError) { Zlib::GzipWriter.new(0).close } assert_raise(NoMethodError) { Zlib::GzipWriter.new(:hoge).close } end + + def test_empty_line + t = Tempfile.new("test_zlib_gzip_writer") + t.close + Zlib::GzipWriter.open(t.path) { |io| io.write "hello\nworld\n\ngoodbye\n" } + lines = nil + Zlib::GzipReader.open(t.path) do |z| + lines = z.readlines + end + assert_equal(4, lines.size, lines.inspect) + end end end diff -Nru ruby1.8-1.8.7.249/version.h ruby1.8-1.8.7.302/version.h --- ruby1.8-1.8.7.249/version.h 2010-01-10 10:30:06.000000000 +0000 +++ ruby1.8-1.8.7.302/version.h 2010-08-16 07:31:35.000000000 +0000 @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.7" -#define RUBY_RELEASE_DATE "2010-01-10" +#define RUBY_RELEASE_DATE "2010-08-16" #define RUBY_VERSION_CODE 187 -#define RUBY_RELEASE_CODE 20100110 -#define RUBY_PATCHLEVEL 249 +#define RUBY_RELEASE_CODE 20100816 +#define RUBY_PATCHLEVEL 302 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_YEAR 2010 -#define RUBY_RELEASE_MONTH 1 -#define RUBY_RELEASE_DAY 10 +#define RUBY_RELEASE_MONTH 8 +#define RUBY_RELEASE_DAY 16 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; @@ -26,4 +26,4 @@ #define RUBY_BIRTH_DAY 24 #define RUBY_RELEASE_STR "patchlevel" -#define RUBY_RELEASE_NUM RUBY_PATCHLEVEL \ No newline at end of file +#define RUBY_RELEASE_NUM RUBY_PATCHLEVEL diff -Nru ruby1.8-1.8.7.249/win32/Makefile.sub ruby1.8-1.8.7.302/win32/Makefile.sub --- ruby1.8-1.8.7.249/win32/Makefile.sub 2009-12-21 07:17:03.000000000 +0000 +++ ruby1.8-1.8.7.302/win32/Makefile.sub 2010-06-08 09:59:39.000000000 +0000 @@ -537,8 +537,8 @@ s,@LIBARG@,%s.lib,;t t s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t !if $(MSC_VER) >= 1400 -s,@LINK_SO@,$(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t -s,@LINK_SO@,@$$(RM) $$(@:/=\).manifest,;t t +s,@LINK_SO@,@if exist $$(@).manifest $(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t +s,@LINK_SO@,@if exist $$(@).manifest $$(RM) $$(@:/=\).manifest,;t t !endif s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t diff -Nru ruby1.8-1.8.7.249/win32/win32.c ruby1.8-1.8.7.302/win32/win32.c --- ruby1.8-1.8.7.249/win32/win32.c 2009-12-16 11:27:51.000000000 +0000 +++ ruby1.8-1.8.7.302/win32/win32.c 2010-06-08 09:39:56.000000000 +0000 @@ -178,15 +178,60 @@ { ERROR_INFLOOP_IN_RELOC_CHAIN, ENOEXEC }, { ERROR_FILENAME_EXCED_RANGE, ENOENT }, { ERROR_NESTING_NOT_ALLOWED, EAGAIN }, +#ifndef ERROR_PIPE_LOCAL +#define ERROR_PIPE_LOCAL 229L +#endif + { ERROR_PIPE_LOCAL, EPIPE }, + { ERROR_BAD_PIPE, EPIPE }, + { ERROR_PIPE_BUSY, EAGAIN }, + { ERROR_NO_DATA, EPIPE }, + { ERROR_PIPE_NOT_CONNECTED, EPIPE }, + { ERROR_OPERATION_ABORTED, EINTR }, { ERROR_NOT_ENOUGH_QUOTA, ENOMEM }, - { WSAENAMETOOLONG, ENAMETOOLONG }, - { WSAENOTEMPTY, ENOTEMPTY }, + { ERROR_MOD_NOT_FOUND, ENOENT }, { WSAEINTR, EINTR }, { WSAEBADF, EBADF }, { WSAEACCES, EACCES }, { WSAEFAULT, EFAULT }, { WSAEINVAL, EINVAL }, { WSAEMFILE, EMFILE }, + { WSAEWOULDBLOCK, EWOULDBLOCK }, + { WSAEINPROGRESS, EINPROGRESS }, + { WSAEALREADY, EALREADY }, + { WSAENOTSOCK, ENOTSOCK }, + { WSAEDESTADDRREQ, EDESTADDRREQ }, + { WSAEMSGSIZE, EMSGSIZE }, + { WSAEPROTOTYPE, EPROTOTYPE }, + { WSAENOPROTOOPT, ENOPROTOOPT }, + { WSAEPROTONOSUPPORT, EPROTONOSUPPORT }, + { WSAESOCKTNOSUPPORT, ESOCKTNOSUPPORT }, + { WSAEOPNOTSUPP, EOPNOTSUPP }, + { WSAEPFNOSUPPORT, EPFNOSUPPORT }, + { WSAEAFNOSUPPORT, EAFNOSUPPORT }, + { WSAEADDRINUSE, EADDRINUSE }, + { WSAEADDRNOTAVAIL, EADDRNOTAVAIL }, + { WSAENETDOWN, ENETDOWN }, + { WSAENETUNREACH, ENETUNREACH }, + { WSAENETRESET, ENETRESET }, + { WSAECONNABORTED, ECONNABORTED }, + { WSAECONNRESET, ECONNRESET }, + { WSAENOBUFS, ENOBUFS }, + { WSAEISCONN, EISCONN }, + { WSAENOTCONN, ENOTCONN }, + { WSAESHUTDOWN, ESHUTDOWN }, + { WSAETOOMANYREFS, ETOOMANYREFS }, + { WSAETIMEDOUT, ETIMEDOUT }, + { WSAECONNREFUSED, ECONNREFUSED }, + { WSAELOOP, ELOOP }, + { WSAENAMETOOLONG, ENAMETOOLONG }, + { WSAEHOSTDOWN, EHOSTDOWN }, + { WSAEHOSTUNREACH, EHOSTUNREACH }, + { WSAEPROCLIM, EPROCLIM }, + { WSAENOTEMPTY, ENOTEMPTY }, + { WSAEUSERS, EUSERS }, + { WSAEDQUOT, EDQUOT }, + { WSAESTALE, ESTALE }, + { WSAEREMOTE, EREMOTE }, }; int diff -Nru ruby1.8-1.8.7.249/win32/win32.h ruby1.8-1.8.7.302/win32/win32.h --- ruby1.8-1.8.7.249/win32/win32.h 2008-06-06 10:39:57.000000000 +0000 +++ ruby1.8-1.8.7.302/win32/win32.h 2010-06-08 09:39:56.000000000 +0000 @@ -331,43 +331,115 @@ /* #undef va_end */ /* winsock error map */ -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEINPROGRESS -#define EALREADY WSAEALREADY -#define ENOTSOCK WSAENOTSOCK -#define EDESTADDRREQ WSAEDESTADDRREQ -#define EMSGSIZE WSAEMSGSIZE -#define EPROTOTYPE WSAEPROTOTYPE -#define ENOPROTOOPT WSAENOPROTOOPT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#define EADDRINUSE WSAEADDRINUSE -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#define ENETDOWN WSAENETDOWN -#define ENETUNREACH WSAENETUNREACH -#define ENETRESET WSAENETRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNRESET WSAECONNRESET -#define ENOBUFS WSAENOBUFS -#define EISCONN WSAEISCONN -#define ENOTCONN WSAENOTCONN -#define ESHUTDOWN WSAESHUTDOWN -#define ETOOMANYREFS WSAETOOMANYREFS -#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define ELOOP WSAELOOP +#include + +#ifndef EWOULDBLOCK +# define EWOULDBLOCK WSAEWOULDBLOCK +#endif +#ifndef EINPROGRESS +# define EINPROGRESS WSAEINPROGRESS +#endif +#ifndef EALREADY +# define EALREADY WSAEALREADY +#endif +#ifndef ENOTSOCK +# define ENOTSOCK WSAENOTSOCK +#endif +#ifndef EDESTADDRREQ +# define EDESTADDRREQ WSAEDESTADDRREQ +#endif +#ifndef EMSGSIZE +# define EMSGSIZE WSAEMSGSIZE +#endif +#ifndef EPROTOTYPE +# define EPROTOTYPE WSAEPROTOTYPE +#endif +#ifndef ENOPROTOOPT +# define ENOPROTOOPT WSAENOPROTOOPT +#endif +#ifndef EPROTONOSUPPORT +# define EPROTONOSUPPORT WSAEPROTONOSUPPORT +#endif +#ifndef ESOCKTNOSUPPORT +# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT +#endif +#ifndef EOPNOTSUPP +# define EOPNOTSUPP WSAEOPNOTSUPP +#endif +#ifndef EPFNOSUPPORT +# define EPFNOSUPPORT WSAEPFNOSUPPORT +#endif +#ifndef EAFNOSUPPORT +# define EAFNOSUPPORT WSAEAFNOSUPPORT +#endif +#ifndef EADDRINUSE +# define EADDRINUSE WSAEADDRINUSE +#endif +#ifndef EADDRNOTAVAIL +# define EADDRNOTAVAIL WSAEADDRNOTAVAIL +#endif +#ifndef ENETDOWN +# define ENETDOWN WSAENETDOWN +#endif +#ifndef ENETUNREACH +# define ENETUNREACH WSAENETUNREACH +#endif +#ifndef ENETRESET +# define ENETRESET WSAENETRESET +#endif +#ifndef ECONNABORTED +# define ECONNABORTED WSAECONNABORTED +#endif +#ifndef ECONNRESET +# define ECONNRESET WSAECONNRESET +#endif +#ifndef ENOBUFS +# define ENOBUFS WSAENOBUFS +#endif +#ifndef EISCONN +# define EISCONN WSAEISCONN +#endif +#ifndef ENOTCONN +# define ENOTCONN WSAENOTCONN +#endif +#ifndef ESHUTDOWN +# define ESHUTDOWN WSAESHUTDOWN +#endif +#ifndef ETOOMANYREFS +# define ETOOMANYREFS WSAETOOMANYREFS +#endif +#ifndef ETIMEDOUT +# define ETIMEDOUT WSAETIMEDOUT +#endif +#ifndef ECONNREFUSED +# define ECONNREFUSED WSAECONNREFUSED +#endif +#ifndef ELOOP +# define ELOOP WSAELOOP +#endif /*#define ENAMETOOLONG WSAENAMETOOLONG*/ -#define EHOSTDOWN WSAEHOSTDOWN -#define EHOSTUNREACH WSAEHOSTUNREACH +#ifndef EHOSTDOWN +# define EHOSTDOWN WSAEHOSTDOWN +#endif +#ifndef EHOSTUNREACH +# define EHOSTUNREACH WSAEHOSTUNREACH +#endif /*#define ENOTEMPTY WSAENOTEMPTY*/ -#define EPROCLIM WSAEPROCLIM -#define EUSERS WSAEUSERS -#define EDQUOT WSAEDQUOT -#define ESTALE WSAESTALE -#define EREMOTE WSAEREMOTE +#ifndef EPROCLIM +# define EPROCLIM WSAEPROCLIM +#endif +#ifndef EUSERS +# define EUSERS WSAEUSERS +#endif +#ifndef EDQUOT +# define EDQUOT WSAEDQUOT +#endif +#ifndef ESTALE +# define ESTALE WSAESTALE +#endif +#ifndef EREMOTE +# define EREMOTE WSAEREMOTE +#endif #define F_SETFL 1 #define O_NONBLOCK 1