Граф коммитов

1262 Коммитов

Автор SHA1 Сообщение Дата
nobu e6a317bf6c configure.in: size_t must be unsigned
* configure.in (RUBY_CHECK_SIGNEDNESS): macro to check signedness of a
  type.
* configure.in (size_t): must be unsigned.
  [ruby-core:57149] [Feature #8890]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-12 13:40:06 +00:00
nobu 5397a25634 configure.in: fix cross-compiling installation failure
* configure.in (RUNRUBY): append -- only after runruby.rb, not
  cross-compiling baseruby, so that $(RUN_OPT) can be command line
  options.  [ruby-dev:47703] [Bug #8893]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-11 08:30:48 +00:00
akr f43d9e22f6 * configure.in: Define ac_cv_func_clock_getres to yes for mingw*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 13:49:55 +00:00
mrkn 301cb9ca99 * configure.in (with_gmp): set with_gmp no if it is empty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 03:50:07 +00:00
nobu fdf04ce67e configure.in: libruby needs gmp
* configure.in (SOLIBS): LIBRUBY_SO also needs linking with gmp, to
  run worker processes in test-all on non-ELF platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 02:11:38 +00:00
akr 23da5a785e * process.c (rb_clock_getres): New method.
(timetick2dblnum_reciprocal): New function.

* configure.in: Check clock_getres.

[ruby-core:56780] [Feature #8809] accepted at
DevelopersMeeting20130831Japan
https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130831Japan



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-31 13:21:48 +00:00
akr 83a0709174 * bignum.c: Use GMP to accelerate big Bignum multiplication.
(bary_mul_gmp): New function.
  (bary_mul): Use bary_mul_gmp.
  (bigsq): Use different threshold with GMP.

* configure.in: Detect GMP.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-31 12:17:18 +00:00
nobu e6ece12201 configure.in: check for sys/pstat.h
* configure.in (sys/pstat.h): fix missing header check for
  missing/setproctitle.c on HP-UX.  [ruby-core:56644] [Bug #8792]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-28 02:25:04 +00:00
nobu 5784aaf15d configure.in: clock_t
* configure.in (clock_t): needs time.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 13:07:59 +00:00
akr 3873e09cad * process.c (unsigned_clock_t): Defined.
(rb_clock_gettime): Consider clock_t overflow for
  ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID.

* configure.in: Check the size of clock_t.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-22 11:19:49 +00:00
akr 2df40d4d18 * configure.in: Define ac_cv_func_clock_gettime to yes for mingw*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19 16:20:40 +00:00
nobu a3b4296369 configure.in: clock_gettime
* configure.in (clock_gettime): should not overwrite cache variable
  with different condtion.  otherwise -lrt is not linked and the link
  fails, after reconfig.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19 04:03:22 +00:00
akr 5da36600a1 * configure.in: Revert r42604. It causes linking librt on systems
with newer glibc uselessly.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18 05:26:47 +00:00
nobu e7ad242663 configure.in: clock_gettime
* configure.in (clock_gettime): need to check with -lrt prior to check
  for the function only.  otherwise -lrt is not linked and the link
  fails, when ac_cv_func_clock_gettime is cached as yes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18 03:41:56 +00:00
akr 93bb48995c * process.c (rb_clock_gettime): New method.
This is accepted in the meeting:
  https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130809
  This method is accepted as a CRuby feature.
  I.e. Other Ruby implementations don't need to implement it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 02:59:30 +00:00
akr 55b6fff737 * configure.in: Revert r42458.
It removes the HAVE_CLOCK_GETTIME from config.h.
  http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20130809T044800Z.diff.html.gz



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 16:59:58 +00:00
nobu 6e563a4ecc configure.in: CoreFoundation framework option
* configure.in (XLDFLAGS, LIBRUBYARG_STATIC): CoreFoundation framework
  option is now needed always, regardless enable-shared.
  [ruby-core:56467] [Bug #8759]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 13:51:13 +00:00
nobu f67c1b0a12 configure.in: clock_gettime
* configure.in: use the result of AC_CHECK_LIB(rt, clock_gettime) as
  clock_gettime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 04:42:44 +00:00
nobu c04f402f0f file.c: normalize Form C
* file.c (rb_str_normalize_ospath): normalize to Normalization Form C
  using CFString.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 03:06:53 +00:00
glass 867876ab9b * string.c (rb_str_rindex): performance improvement by using
memrchr(3).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 08:47:13 +00:00
akr 028d67b924 Fix a typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-19 03:06:12 +00:00
glass 13a1fd6d82 * configure.in: revert r42008. strcasecmp() uses the current locale.
* include/ruby/ruby.h: ditto.

* st.c (st_strcasecmp): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16 12:49:01 +00:00
glass a0d9bd4445 * configure.in: check strcasecmp().
* include/ruby/ruby.h: use strcasecmp() as st_strcasecmp() if it
  exists.

* st.c (st_strcasecmp): define the function only if strcasecmp()
  doesn't exist.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16 12:13:19 +00:00
akr 150b265502 * bignum.c (nlz16): Use __builtin_clz if possible.
(nlz32): Use __builtin_clz or __builtin_clzl if possible.
  (nlz64): Use __builtin_clzl or __builtin_clzll if possible.
  (nlz128): Use __builtin_clzll if possible.

* configure.in: Check __builtin_clz, __builtin_clzl and
  __builtin_clzll.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-15 01:49:32 +00:00
akr 508669b6da * bignum.c (power_cache_get_power): Use bitsize insteadof ceil_log2.
(ones): Removed.
  (next_pow2): Removed.
  (floor_log2): Removed.
  (ceil_log2): Removed.

* configure.in (__builtin_popcountl): Don't check.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-15 00:46:00 +00:00
akr 240f3056aa * configure.in: Check __builtin_popcountl, __builtin_bswap32 and
__builtin_bswap64.

* internal.h (swap32): Use the configure result for the condition to
  use __builtin_bswap32.
  (swap64): Use the configure result for the condition to use
  __builtin_bswap64.

* bignum.c (ones): Use the configure result for the condition to use
  __builtin_popcountl.
  (bary_unpack_internal): Use appropriate types for swap argument.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-14 14:28:33 +00:00
nobu 2114ad42da configure.in: check exit statuses
* configure.in (RUBY_DTRACE_POSTPROCESS): check exit statuses of
  commands.  [Bug #8606]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-07 02:01:27 +00:00
nobu 2b5f033cb5 configure.in: correctly tests dtrace -G in version 1.11
* configure.in (RUBY_DTRACE_POSTPROCESS): dtrace version SUN D 1.11
  introduces a check in the dtrace compiler to ensure that probes
  actually exist. If there are no probes, then the -G step will
  fail. As this test is only being used to determine whether -G is
  necessary (for instance, on OSX it is not), adding a real probe to
  the conftest allows it to succeed on newer versions of dtrace.
  Patch by Eric Saxby <sax AT livinginthepast.org> at
  [ruby-core:55826].  [Fix GH-351], [Bug #8606].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-07 02:01:07 +00:00
akr 1a6a65f16b * configure.in: Check __int128.
* include/ruby/defines.h (BDIGIT_DBL): Use uint128_t if it is available.
  (BDIGIT): Use uint64_t if uint128_t is available.
  (SIZEOF_BDIGITS): Defined for above case.
  (BDIGIT_DBL_SIGNED): Ditto.
  (PRI_BDIGIT_PREFIX): Ditto.

* include/ruby/ruby.h (PRI_64_PREFIX): Defined.

* bignum.c (rb_big_pow): Don't use BITSPERDIG for the condition which
  rb_big_pow returns Float or Bignum.

[ruby-dev:47413] [Feature #8509]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 09:46:01 +00:00
nobu 632ed84cf1 * configure.in: download missing config files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-14 05:10:17 +00:00
nobu f28ec8da8c no alternate value expansion
* configure.in (opt-dir), tool/ifchange: get rid of "alternate value"
  expansion for legacy sh.  [ruby-dev:47420] [Bug #8524]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 12:30:24 +00:00
nobu 5713c59531 win32.c: NET_LUID
* configure.in: check for NET_LUID.  header macro varies across
  complier versions.
* win32/win32.c: use configured macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-08 05:17:04 +00:00
nobu 147775ac2b use NUM2SIZET and SIZET2NUM
* configure.in: revert r41106.  size_t may not be unsigned

* bignum.c (rb_absint_size_in_word, rb_int_export, rb_int_import): use
  NUM2SIZET() and SIZET2NUM() already defined in ruby/ruby.h.

* ext/-test-/bignum/export.c (rb_int_export_m): ditto.

* ext/-test-/bignum/import.c (rb_int_import_m): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07 02:41:45 +00:00
akr 9fea8758e9 * configure.in: Invoke RUBY_REPLACE_TYPE for size_t.
Don't invoke RUBY_CHECK_PRINTF_PREFIX for size_t to avoid conflict
  with RUBY_REPLACE_TYPE.

* internal.h (rb_absint_size): Declared.
  (rb_absint_size_in_word): Ditto.
  (rb_int_export): Ditto.

* bignum.c (rb_absint_size): New function.
  (rb_absint_size_in_word): Ditto.
  (int_export_fill_dd): Ditto.
  (int_export_take_lowbits): Ditto.
  (rb_int_export): Ditto.

* pack.c (pack_pack): Use rb_int_export for BER compressed integer.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-06 11:57:35 +00:00
kosaki 523bd6737e * configure.in: removes AC_CHECK_FUNCS(readdir_r). readdir_r()
is only used from dir.c and it doesn't need readdir_r().
* configure.in (SIZEOF_STRUCT_DIRENT_TOO_SMALL): remvoed. It is
  only used for readdir_r.
* dir.c: removes NAME_MAX_FOR_STRUCT_DIRENT. It is not right way
  to detect maximum length of path len. POSIX require to use
  fpathconf(). IOW, it might have lead to make a vulnerability
  using stack smashing. Moreover, readdir() works enough for our
  usage.
* dir.c (READDIR): removes an implementation which uses
  readdir_r() and parenthesize in a macro body correctly.
* dir.c (dir_read): removes IF_HAVE_READDIR_R(DEFINE_STRUCT_DIRENT
  entry), it is used only for readdir_r().
* dir.c (dir_each): ditto.
* dir.c (glob_helper): ditto.

* dir.c (READDIR): removes entry and dp argument.
* dir.c (dir_read): adjust for the above change.
* dir.c (dir_each): ditto.
* dir.c (glob_helper): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02 22:38:11 +00:00
nobu 58bec3e2cb configure.in: HAVE_ATTRIBUTE_FUNCTION_ALIAS
* configure.in (HAVE_ATTRIBUTE_FUNCTION_ALIAS): define to tell if
  alias attribute is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-31 07:36:19 +00:00
nobu d3298468d0 configure.in: no runtime path to -L
* configure.in (LIBRUBY_RPATHFLAGS): do not append -L option with
  runtime library directory if cross compiling, but only -R option.
  runtime path makes no sense on the host system.  [ruby-dev:47363]
  [Bug #8443]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-24 02:04:27 +00:00
nobu 9c0ff0c1c8 configure.in: setjmpex
* configure.in (setjmp-type): check if setjmpex() is really available.
  workaround for i686-w64-mingw32 which declares it but lacks its
  definition.
* include/ruby/defines.h: include setjmpex.h only if also setjmpex()
  is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18 16:40:10 +00:00
nobu 344db69c45 configure.in: setjmpex
* configure.in (setjmp-type): use setjmpex() on w64-mingw32 to get rid
  of -Wclobbered warnings.
* include/ruby/defines.h: include setjmpex.h here becase setjmp.h is
  included from win32.h via intrin.h, winnt.h, and so on.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18 14:57:59 +00:00
akr fbe45fdfa2 * configure.in: Consider error messages to find out version option of
C compiler.
  The C compiler of Sun Studio C emits "Warning: Option -qversion
  passed to ld, if ld is invoked, ignored otherwise" and exit
  successfully.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-17 09:10:16 +00:00
nobu 49d37e6edc verconf.h: fix for default prefix
* configure.in, template/verconf.h.in (RUBY_EXEC_PREFIX): fix for
  default prefix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-16 07:15:48 +00:00
nobu 434f0abd02 verconf.h.in: template for verconf.h
* template/verconf.h.in: generate verconf.h from the template and
  rbconfig.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-16 04:13:40 +00:00
nobu 1ad7cbbf64 configure.in: move RUBY_PLATFORM to config.h
* configure.in (RUBY_PLATFORM): move to config.h as needed by
  version.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-15 08:56:28 +00:00
nobu b38e3f953c configure.in: shvar_to_cpp in ruby
* configure.in: save configured load path values into verconf.in.
* common.mk (verconf.h): create from verconf.in with shvar_to_cpp.rb.
* tool/shvar_to_cpp.rb: turn shell variables into C macros.
  [Bug #7959]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-15 07:58:28 +00:00
nobu 4425e21343 configure.in: escape
* configure.in (unexpand_shvar): escape $.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-15 07:52:53 +00:00
usa cb3fcdcdc3 * win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]
emulate getipaddrs(3) on Unix.

* win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above
  function.

* include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't
  substitute for any function, so use non-prefixed name.

* ext/socket/extconf.rb (socketpair); follow above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13 11:29:32 +00:00
kosaki 6591e26eb2 * configure.in: removes 'ac_cv_func_fseeko=yes' form MinGW
specific definitions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:53:40 +00:00
kosaki 96ffcf557b * file.c (rb_file_s_truncate): use correct type. chsize takes
a long.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:42:30 +00:00
kosaki 82330e919b * configure.in: removes AC_CHECK_FUNCS(setitimer) because it's
unsed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:42:09 +00:00
kosaki 3f6b5aa2f8 * configure.in: removes AC_CHECK_FUNCS(pause) because it's unused.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:41:57 +00:00
kosaki 59a3943a67 * configure.in: abort if gettimeofday doesn't exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:41:36 +00:00
kosaki 05628d3b6d * configure.in: removes AC_CHECK_FUNC(ftruncate64).
* configure.in: adds RUBY_REPLACE_TYPE(off_t) for creating
  NUM2OFFT.
* file.c (rb_file_truncate): use correct type. chsize() take
  a long.
* include/ruby/ruby.h (NUM2OFFT): use a definition created by
  a configure script by default.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:41:24 +00:00
kosaki e79f790798 * configure.in: removes AC_CHECK_FUNC(fseeko, fseeko64, ftello,
ftello64). They are not used from anywhere.

* win32/win32.c (fseeko): removes.
* win32/win32.c (rb_w32_ftello): removes.
* include/ruby/win32.h: removes declarations of rb_w32_ftello and
  rb_w32_fseeko.
* win32/Makefile.sub: removes '#define HAVE_FTELLO 1'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:41:12 +00:00
kosaki 2d0c7e37bf * configure.in: remove AC_CHECK_FUNC(close). It is not used from
anywhere.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:40:59 +00:00
kosaki f15d3ff927 * configure.in: adds comments for setjmp check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:40:47 +00:00
kosaki a79cccb5c6 * configure.in: move clock_gettime() check into regular place.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:40:35 +00:00
kosaki 7776ca930b * configure.in: add getenv() declaration check.
* dln_find.c: add HAVE_DECL_GETENV test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:40:24 +00:00
kosaki fa5db01644 * configure.in: sorts AC_CHECK_FUNCS()s as alphabetical order.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 08:40:12 +00:00
akr 980bf275fa * configure.in: Move library checks into "Checks for libraries." part.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-10 11:24:06 +00:00
akr 695ad02d1b * configure.in: Reformat arguments of AC_CHECK_HEADERS and
AC_CHECK_FUNCS to track modifications easily.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-10 10:33:18 +00:00
akr 093beeda90 * configure.in: Don't link librt if clock_gettime is available in
the main C library.
  glibc 2.17 moves clock_* from librt to the main C library.
  http://sourceware.org/ml/libc-announce/2012/msg00001.html



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-10 03:01:51 +00:00
akr 18646d74dd * configure.in: Check socket library again. shutdown() is used in
io.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-08 19:57:37 +00:00
akr 86d5a05c47 Update a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-08 16:55:59 +00:00
akr 6d313a387a * configure.in: Don't check socketpair. socketpair is not used in
ruby command itself.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-08 16:52:16 +00:00
akr 6359460610 Add a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-08 12:39:38 +00:00
nobu 13bd7afc6e configure.in: default LINK_SO
* configure.in: should not strip newline at the beginning for the
  default link command.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-05 06:54:32 +00:00
nobu 38ea534c34 configure.in: keep POSTLINK
* configure.in: keep POSTLINK in LINK_SO macro till rbconfig.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-05 04:37:48 +00:00
akr d7b32fb4c1 * configure.in: Fix a typo. Should check endgrent() instead of
endgrnam().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27 17:48:28 +00:00
akr 1a67580eb5 * process.c (obj2gid): Don't call endgrnam() if not exist.
Bionic (Android's libc) don't have endgrnam().

* configure.in: Check endgrnam function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27 15:38:36 +00:00
akr 6d2662d45a add comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 08:45:02 +00:00
akr 66938f38a3 dd comment about AC_FUNC_SETPGRP.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 03:51:01 +00:00
nobu 2667cb2d98 configure.in: RUBY_RM_RECURSIVE
* configure.in (RUBY_RM_RECURSIVE): this hack is needed by only
  autoconf 2.69 or earlier on darwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 17:23:36 +00:00
akr 4ddce7a68b * configure.in: Check mblen().
* eval_intern.h (CharNext): Don't use mblen() is not available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 12:52:26 +00:00
charliesome e9679c9ad4 * configure.in: Revert using sigsetjmp by default due to performance
problems on some systems (eg. older Linux)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-21 14:23:48 +00:00
charliesome c032cf6efe * configure.in: Use sigsetjmp by default so jumping out of signal
handlers properly restores the signal mask and SS_ONSTACK flag.
  [ruby-core:54175] [Bug #8254]

* configure.in: Manually check for presence of sigsetjmp. It is not a
  function on some systems, so AC_CHECK_FUNCS cannot be used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-21 12:35:23 +00:00
nobu 526ffc53e9 configure.in: -g and -fstack-protector flags can't work
together on SmartOS
* configure.in (stack_protector): control use of -fstack-protector.
* configure.in (debugflags): let -fstack-protector precede and disable
  debugflags, because they can't work together on SmartOS.  [Bug #8268]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-19 02:37:06 +00:00
akr 1f32d09523 * include/ruby/defines.h: Simplify the logic to include sys/select.h.
This fixes a compilation error on Haiku (gcc2 and gcc4).

* configure.in: Use shared linker as $(CC) for Haiku.
  This fixes a build error on Haiku (gcc2).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-07 02:00:46 +00:00
ngoto f70a7cd20f * configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops.
* ruby_atomic.h: Skip using Solaris10 atomic_ops on Solaris 9 or earlier if atomic.h is not available. [ruby-dev:47229] [Bug #8228]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 15:00:44 +00:00
nobu 23335c78d3 configure.in: gcc_major
* configure.in: use gcc_major value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 14:08:27 +00:00
nobu b493f30a42 configure.in: no -Wextra-token on gcc 3
* configure.in (warnflags): -Wextra-tokens is same as -Wextra and
  let -Wno- options ignored on gcc 3.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 14:08:21 +00:00
nobu 647dc4fd49 configure.in: -Werror=extra-tokens
* configure.in (warnflags): bail out at extra tokens, instead
  continuing with lots of warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 12:34:43 +00:00
nobu 7862695406 configure.in: no -include options
* configure.in (XCFLAGS): stop including missing.h by command line
  option, as the header seems included necessary places already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 10:29:42 +00:00
nobu bff997e02b defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
* include/ruby/defines.h (RUBY_SYMBOL_EXPORT_{BEGIN,END}): visibility
  control macros.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 10:29:38 +00:00
nobu ecb9b98774 configure.in: prereq 2.67
* configure.in: skip autoconf 2.64 and 2.66, 2.67 seems short-lived
  but stick on it for Debian Squeeze.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 09:41:42 +00:00
nobu 3962655994 configure.in: clang check
* configure.in: should not use AC_COMPILE_IFELSE before
  AC_USE_SYSTEM_EXTENSIONS.  [Bug #8192]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 05:41:27 +00:00
nobu 90e8a9b4bd configure.in: clang check
* configure.in: check clang version by predefined macro values.
  [Bug #8192]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 05:22:57 +00:00
ayumin 6a23960f3f * configure.in: use 'test' instead quadrigraph.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31 23:16:19 +00:00
ayumin ec61b0794a * configure.in: use quadrigraph to put '[' or ']'. [Bug #8192]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31 22:19:55 +00:00
naruse 45334da911 Fix build failure introduced by previous commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31 19:24:08 +00:00
naruse a6b625c538 * configure.in: kick old clang. [ruby-dev:47204] [Bug #8192]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31 19:18:41 +00:00
nobu b5583577d4 thread.c: TYPEOF_TIMEVAL_TV_SEC
* configure.in (TYPEOF_TIMEVAL_TV_SEC): check for x64-mingw, where
  timeval.tv_sec is not time_t.

* thread.c (double2timeval): use TYPEOF_TIMEVAL_TV_SEC to get rid of
  overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-30 21:08:42 +00:00
nobu 7b2c7b620c internal.h: use SIGNEDNESS_OF_TIME_T
* configure.in (RUBY_REPLACE_TYPE): define SIGNEDNESS_OF_type same as
  check_signedness of mkmf.rb.
* internal.h (TIMET_MAX, TIMET_MIN, TIMET_MAX_PLUS_ONE): use
  SIGNEDNESS_OF_TIME_T.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-26 20:15:44 +00:00
nobu 81cb1f6394 compiler version
* common.mk (showflags): show the compiler version.

* configure.in (CC_VERSION): compiler with version option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-22 07:57:09 +00:00
mrkn 357b8c06c3 * configure.in: set ac_cv_prog_cxx if CXX is supplied.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-18 17:15:43 +00:00
mrkn 5ef1525b5e * configure.in: Fix c++ compiler auto-selection not only for
Darwin 11.x, but also the other versions of Darwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-18 16:22:15 +00:00
naruse aa24857f12 * vm_dump.c (backtrace): on darwin use custom backtrace() to trace
beyond _sigtramp. darwin's backtrace can't trace beyond signal
  trampoline with sigaltstack.

* configure.in: check execinfo.h on darwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-18 04:31:59 +00:00
nobu cab124776e mingw build fix
* configure.in: struct timeval is defined in winsock2.h on mingw.

* include/ruby/missing.h: include time.h for time_t, and sys/time.h
  for timeval and timespec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16 07:28:32 +00:00
kosaki 798ff850e4 * configure.in: check struct timeval exist or not.
* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
  properly. and don't include sys/time.h if struct timeval exist.

* file.c: include sys/time.h explicitly.
* random.c: ditto.
* thread_pthread.c: ditto.
* time.c: ditto.
* ext/date/date_strftime.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16 05:06:47 +00:00
kosaki 2e544471ae * configure.in (_FORTIFY_SOURCE): added a few comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16 05:06:32 +00:00
nobu 844c04f462 configure.in, file.c: RUBY_FUNCTION_NAME_STRING
* configure.in (rb_cv_function_name_string): macro for function name
  string predefined identifier, __func__ in C99, or __FUNCTION__ in
  gcc.
* file.c (rb_sys_fail_path): use RUBY_FUNCTION_NAME_STRING.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-14 07:59:16 +00:00
nobu 120e2219f3 configure.in: fix for old shells
* configure.in (rm, shvar_to_cpp, unexpand_shvar): local is not
  available on old shells.
* configure.in (shvar_to_cpp): escape quotes for old shells.
  [Bug #7959] [Bug #8071]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-13 04:06:47 +00:00
nobu 0230ff7020 configure.in: note to remove a hack
* configure.in (rm): note to remove this hack when AC_PREREQ(2.70) or
  later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-09 00:17:51 +00:00
nobu d415f2abac configure.in: suppress error messages
* configure.in: suppress error messages, rm: cannot remove
  'conftest.dSYM', from AC_EGREP_CPP with CFLAGS=-g on Darwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-08 05:24:26 +00:00
nobu 0af37bf0c5 configure.in: fix unexpand_shvar
* configure.in (unexpand_shvar): remove guarding quotes at last.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-06 10:22:29 +00:00
nobu 6332415800 GNUmakefile.in: new template
* template/GNUmakefile.in: split from configure.in.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-06 06:30:08 +00:00
eban 9a1d5b04cd * configure.in(AC_DISABLE_OPTION_CHECKING): avoid warning "WARNING: Unrecognized options: --with-PACKAGE".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-28 12:35:56 +00:00
nobu 2e3fc1f064 configure.in: escape double-quotes
* configure.in (unexpand_shvar): escape double-quotes in backquotes in
  double-quotes for some shells.  [Bug #7959]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27 05:24:01 +00:00
nobu 54c9163f25 configure.in: remove no longer used variable
* configure.in (unexpand_shvar): remove variable which is no longer
  used since r39506.  [Bug #7959]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27 01:16:08 +00:00
nobu a4ccd46d31 configure.in: non-portable shell behavior
* configure.in (unexpand_shvar): get rid of non-portable shell
  behavior on OpenBSD, so no extra quotes.  [Bug #7959]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-26 06:04:22 +00:00
nobu 5919370363 configure.in: find Setup file automatically
* configure.in (setup): find Setup file from target_os 1. by
  suffix (e.g. Setup.nacl, Setup.atheos), 2. by "platform"
  option (e.g. Setup.nt, Setup.emx), and 3. default Setup.  And
  Setup.dj had been removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 04:12:45 +00:00
knu 6487abea6c Fix ksh/bash-ism.
* configure.in (unexpand_shvar): Use the numeric comparison
  operator instead of '==' which is a ksh extention. [Bug #7941]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 02:09:07 +00:00
nobu cc367fb326 configure.in: quite conftest
* configure.in (rb_cv_broken_backtrace): suppress extra output from
  conftest.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 00:05:51 +00:00
nobu 74016f1842 ruby.c: fix for multiarch library
* ruby.c (ruby_init_loadpath_safe): try two levels upper for stripping
  libdir name.  [Bug #7874]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21 03:45:07 +00:00
nobu 739c8ffcee configure.in: expand libdir_basename
* configure.in (libdir_basename): expand with multiarch in configure,
  not to defer the expansion till ruby.pc.in and mkmf.rb.  [Bug #7874]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21 03:42:25 +00:00
nobu 22b51faf7e configure.in: libdir_basename for -rpath and -install_name
* configure.in (libdir_basename): also -rpath and -install_name flags
  are affected when libruby directory changes.  [Bug #7874]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21 00:51:11 +00:00
nobu 52911974f8 configure.in: target_os suffix
* configure.in (target_os): do not strip -gnu suffix on Linux if
  --target is given explicitly.  [Bug #7874]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-20 09:02:28 +00:00
nobu 67ab6e3d9b configure.in: adjust libdirname
* configure.in (libdirname): adjust library path name which libruby
  files will be installed.  [Bug #7874]
* tool/rbinstall.rb (libdir): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-20 09:01:17 +00:00
naruse 0b261c379b * vm_dump: FreeBSD ports' libexecinfo's backtrace(3) can't trace
beyond signal trampoline, and as described in r38342 it can't
  trace on -O because it see stack frame pointers.
  libunwind unw_backtrace see dwarf information in the binary
  and it works with -O (without frame pointers).

* configure.in: remove r38342's hack and check libunwind.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-18 21:21:02 +00:00
naruse e233ca15e0 * configure.in: check whether backtrace(3) works well or not.
* vm_dump.c: set HAVE_BACKTRACE 0 if BROKEN_BACKTRACE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-18 21:20:59 +00:00
nobu e8c57cd850 configure.in: unexpand exec_prefix
* configure.in (exec_prefix): unexpand after RUBY_EXEC_PREFIX is set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-18 01:49:14 +00:00
nobu 46cdc66f84 version.c: move ruby_exec_prefix
* version.c (ruby_exec_prefix): move all path configuration stuffs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-18 01:11:58 +00:00
nobu f8530342f4 configure.in: unexpand_shvar
* configure.in (unexpand_shvar): regularize a shell variable by
  unexpanding shell variables in it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-18 01:09:56 +00:00
naruse c4d4107486 Revert r39289
* "configure.in: unexpand_shvar"
it breaks $LOAD_PATH.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-17 12:46:45 +00:00
nobu c9283b5c5d * configure.in: remove debug print.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-17 09:41:31 +00:00
nobu 17b898e182 configure.in: unexpand_shvar
* configure.in (unexpand_shvar): regularize a shell variable by
  unexpanding shell variables in it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-17 07:57:43 +00:00
knu b38334e2ec Properly reflect --with-opt-dir to LIBRUBY_DLDFLAGS on all platforms.
* configure.in (LIBRUBY_DLDFLAGS): Fix a bug where --with-opt-dir
  options given were not reflected to LIBRUBY_DLDFLAGS on many
  platforms including Linux and other GNU-based systems, NetBSD,
  AIX and BeOS.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 11:52:12 +00:00
nobu bb7e19c8e9 configure.in: don't substitute exec_prefix itself
* configure.in (shvar_to_cpp): do not substitute exec_prefix itself
  with RUBY_EXEC_PREFIX, which cause recursive definition.
  [ruby-core:52296] [Bug #7860]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 04:40:17 +00:00
nobu 62711da253 configure.in: unexpand exec_prefix etc
* configure.in: unexpand arch sitearch and exec_prefix values, so
  directly specified bindir, libdir, rubyprefix, etc can be properly
  substituted.  [ruby-core:52296] [Bug #7860]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 03:45:53 +00:00
akr d6d0e85320 * configure.in, ext/socket/extconf.rb: test netinet/in_systm.h in
ext/socket/extconf.rb instead of configure.in.

  Originally, netinet/in_systm.h is included for NextStep, OpenStep,
  and Rhapsody.  [ruby-core:1596]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 23:46:44 +00:00
akr 899ba99b90 * configure.in: don't test xti.h here.
* ext/socket/extconf.rb: test xti.h here.

  Originally, xti.h is included for IRIX [ruby-core:14447].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 22:59:40 +00:00
knu aeac90e6c5 Fix CFLAGS and CXXFLAGS in RbConfig::CONFIG on FreeBSD and NetBSD/amd64.
* configure.in: Fix a bug introduced in r38342 that the cflagspat
  substitution is messed up by the way CFLAGS and optflags are
  modified, which affected FreeBSD and NetBSD/amd64 when
  configured to use libexecinfo.  This bug resulted in CFLAGS and
  CXXFLAGS in RbConfig::CONFIG having warnflags expanded in them,
  forcing third-party C/C++ extensions to follow what warnflags
  demands, like ANSI/ISO-C90 conformance.  ref [Bug #7101]




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 13:25:28 +00:00
nobu 4e5d0cee76 configure.in: no Werror
* configure.in (warnflags): disable -Werror by default unless
  development.  [ruby-core:52131] [Bug #7830]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 08:56:42 +00:00
nobu 9f2e85a33c configure.in: Werror-implicit-function-declaration
* configure.in (warnflags): -Werror-implicit-function-declaration
  haven't been used as-is, but always replaced with -Werror= or -W.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 01:34:35 +00:00
akr 17df736379 add ML ref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 16:40:47 +00:00
akr cbacc5d501 * configure.in: enable rb_cv_page_size_log test for MirOS BSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 14:26:01 +00:00
akr c586d820c8 * configure.in: use -pthread on mirbsd*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 11:07:32 +00:00
akr a378fa0d10 * configure.in: add SOLIBS and LIBRUBY_SO definition for mirbsd*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 07:08:41 +00:00
nobu 0d46721033 configure.in: sitearch
* configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 04:17:22 +00:00
akr f882c4c5e0 * configure.in: move OS specific header/function knowledge before
automatic header tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 03:33:11 +00:00
akr 0a8fc937ca * configure.in: move the test for -march=i486 just after
RUBY_UNIVERSAL_ARCH/RUBY_DEFAULT_ARCH.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 02:06:47 +00:00
nobu 817dff033f configure.in: escape
* configure.in (configure_args): escape $ for Makefile.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-09 14:50:03 +00:00
akr c38f3cd906 * configure.in: move header files check to the beginning of
"header and library section".
  test rlim_t with sys/types.h and sys/time.h for MirOS BSD.
  sys/types.h and sys/time.h is gurded by #ifdef and the above move
  is required for this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-09 13:13:01 +00:00
nobu c4544321cb configure.in: empty version
* configure.in, version.c: prevent duplicated load paths by empty
  version string, it does not work right now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-09 08:46:02 +00:00
nobu 8a91512692 configure.in: fix help message
* configure.in: fix arch parameters in help message.  [Bug #7804]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-09 08:38:46 +00:00
akr 01e7ec0137 fix the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 14:30:10 +00:00
akr 513bfb29ea * configure.in: change CFLAGS temporally to test
ARCH_FLAG="-march=i486".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 14:26:13 +00:00
akr 89ae338e97 * configure.in: don't define ARCH_FLAG="-march=i486" if it causes
compilation problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 12:20:27 +00:00
akr 8f5f89452d * configure.in: define linker for shared library on MirOS BSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 13:02:31 +00:00
nobu 834fd50ae2 configure.in: multiarch option
* configure.in (multiarch): add option to move architecture dependent
  directories.  [Feature #6111]
* template/ruby.pc.in: add arch dependent paths.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 08:33:03 +00:00
nobu 67db06ba97 configure.in: arch dependent header directory options
* configure.in (rubyarchhdrdir, sitearchhdrdir, vendorarchhdrdir): add
  options to customize architecture dependent header directories.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 08:32:58 +00:00
nobu 29c214e4a0 configure.in: arch dependent library directory options
* configure.in (rubyarchprefix, sitearchdir, vendorarchdir): add
  options to customize architecture dependent library directories.
* template/ruby.pc.in, tool/mkconfig.rb, tool/rbinstall.rb: use
  configured values.
* tool/mkconfig.rb: expand rubyarchdir to extract prefix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 08:32:53 +00:00
nobu d32b122996 configure.in: RUBY_VERSION_NAME
* configure.in (RUBY_VERSION_NAME), template/ruby.pc.in: add
  substitution and define.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 08:32:48 +00:00
nobu 85aae4c658 configure.in: architecture name
* configure.in, version.c: parametric architecture name for paths.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 08:32:43 +00:00
nobu a8795e3527 configure.in: shvar_to_cpp
* configure.in (shvar_to_cpp): convert sh variable references
  by replacing with string literal forms in cpp.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 08:32:38 +00:00
nobu 6f9bbca2df configure.in: clang temporary files
* configure.in: clang leaves temporary files when interrupted by
  SIGPIPE if input is not stdin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-18 09:14:11 +00:00
yugui c9f5a8f3f2 * bootstraptest/test_io.c: add a test for [ruby-dev:46834].
* io.c (rb_cloexec_fcntl_dupfd) Use an emulation with dup(2) when
  fcntl(2) and/or F_DUPFD is unavailable.
  Suggested by akr.

* configure.in (HAVE_FCNTL): NativeClient does not provide fcntl(2).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-06 09:48:00 +00:00
yugui ea9301bd2b * common.mk (yes-btest): btest depends on also $(arch)-fake.rb and
rbconfig.rb on building for NativeClient.

* Makefile.in (fake): Avoid generating $(arch)-fake.rb unless cross
  compiling.

* configure.in (CROSS_COMPILING): New substitution.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 09:04:58 +00:00
yugui 6efba755da Fix failures on btest for NativeClient.
* bootstraptest/runner.rb (nacl?): New method to distinguish NaCl
  corss build.

* bootstraptest/test_io.rb: Skip unsupported operations.

* bootstraptest/test_literal.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 15:39:15 +00:00
yugui 6837b808cd * configure.in (OBJCOPY): Fixes build error for NativeClient.
Avoid disabling OBJCOPY for NativeClient.

* thread_pthread.c (rb_reserved_fd_p): USE_SLEEPY_TIMER_THREAD is
  always defined.  Fixes compilation error for NativeClient.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 05:46:29 +00:00
charliesome c56eee05c6 * configure.in: use 4 argument form of AC_CHECK_HEADERS to force
autoconf to use compiler's result

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30 03:11:17 +00:00
nobu 2eb92b143a configure.in: AC_CHECK_HEADERS
* configure.in (crt_externs.h): use standard macro AC_CHECK_HEADERS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 01:10:41 +00:00
charliesome af35f2a61d * configure.in: check for the whether crt_externs.h is present when compiling
for darwin (this header is missing in the iOS SDK)
* eval_intern.h: check HAVE_CRT_EXTERNS_H before including crt_externs.h, if
  not defined, include missing/crt_externs.h instead
* hash.c: ditto
* missing/setproctitle.c: ditto
* missing/crt_externs.h: declare _NSGetEnviron() function and define environ
  for iOS

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 14:23:25 +00:00
kosaki 495f72ed38 * configure.in: enable -fPIE when checking -pie for fixing
OpenBSD build error. Patch by George Koehler. Thank you!
  [Bug #7606] [ruby-core:51082]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-26 03:00:13 +00:00
nobu 2ed40d3b57 * configure.in (NULLCMD): check in loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-15 01:39:49 +00:00
nobu 67c599a5d2 * configure.in (GNUmakefile): remove -jN option from submake.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-15 01:39:47 +00:00
drbrain 40f89c17e6 * configure.in (HAVE_GCC_ATOMIC_BUILTINS): Set -march=i486 to enable
__sync_val_compare_and_swap.  Patch by KOSAKI Motohiro.
  [ruby-trunk - Bug #7485]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-14 21:18:00 +00:00
naruse 486795d951 * configure.in: add -fno-omit-frame-pointer if libexecinfo is used.
At least on FreeBSD ruby will crash on getting C backtrace
  when it is compiled with other than -O0.

* vm_dump.c: enable backtrace on FreeBSD even if with optimizations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-12 07:36:32 +00:00
nobu 2b8485bc89 configure.in, mkmf.rb: sign extensions
* configure.in (codesign): check identifier at link time, not
  configure time.

* lib/mkmf.rb (LINK_SO): sign extensions too.  replace empty line with
  default command.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10 04:18:13 +00:00
naruse 013521e557 * configure.in: fix r37294: run only on i[3-6]86-linux.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 06:45:25 +00:00
ngoto 58b8573081 * configure.in: revert r37911, r37906 and r37904 which break build
with non-gcc and/or non-IA32 compilers, e.g. Solaris Studio,
  Fujitsu C Compiler. [ruby-dev:46646] [Bug #7451]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 06:29:05 +00:00
naruse 13dc0e14fe Refix of r37904
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 23:30:33 +00:00
naruse c8d3536852 fix r37904: it forced i486 though -marh was usually i686
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 18:12:53 +00:00
naruse bb2e9e9e98 * configure.in (opt-dir): don't use non portable flag -E of sed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 18:04:55 +00:00
naruse c41e749c4d * configure.in (ARCH_FLAG): __sync_val_compare_and_swap_4 needs
-march=i486 on at least linux gcc 4.1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 18:02:31 +00:00
kosaki 5611df706e * process.c (proc_getsid): adds new method for getting session id.
Contributed from fumiyas (Fumiyasu SATOH). Thank you!
  [Feature #6757] [ruby-dev:45977]
* configure.in: adds getsid check.
* test/ruby/test_process.rb (TestProcess#test_setsid): new test
  for the above.
* NEWS: news for the above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-24 02:51:24 +00:00
nobu f6761088a4 configure.in: --disable-dln
* configure.in (--disable-dln): option to disable dynamic linking
  feature.  [ruby-core:37676] [Feature #4946]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-23 15:00:12 +00:00
naruse f495c968c9 * configure.in (RUBY_DTRACE_AVAILABLE): only check dtrace availability.
* configure.in (RUBY_DTRACE_POSTPROCESS): restore.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20 12:49:36 +00:00
naruse b1fa559039 Add extra line to prevent syntax error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20 08:47:43 +00:00
naruse da56cb6bf2 * configure.in: fix dtrace didn't work on darwin.
* configure.in (RUBY_DTRACE_AVAILABLE): unify RUBY_DTRACE_POSTPROCESS
  and RUBY_DTRACE_BSD_BROKEN.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20 08:35:57 +00:00
naruse bd0931f7b9 * configure.in (--enable-dtrace): always call RUBY_DTRACE_BSD_BROKEN
for portability.
  As the note, FreeBSD 8 has DTrace as the optional
  feature (it is enabled by the build option), but doesn't have USDT.
  FreeBSD 9 has USDT but they are still optional. FreeBSD 10 will
  enable them by default.
  The variable $rb_cv_prog_dtrace_g is "yes" only on FreeBSD 9 with
  optional DTrace or FreeBSD 10. If it is "no", you cannnot know
  whether it doesn't need -G or DTrace is disabled. (by cheking
  error code, you can know)

* configure.in (--enable-dtrace): change help message

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20 02:21:17 +00:00
naruse 49c0c51056 Revert "* configure.in (--enable-dtrace): change help message"
This reverts commit 029b59ba53.
When $rb_cv_prog_dtrace_g is yes on FreeBSD even if /usr/bin/dtrace
exists, it means dtrace is disabled on the system.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20 01:18:18 +00:00
ngoto 029b59ba53 * configure.in (--enable-dtrace): change help message
* configure.in (--enable-dtrace): remove ineffective "else AS_CASE ..."
  because the variable $rb_cv_prog_dtrace_g is normally "yes" on
  FreeBSD and the AS_CASE is not evaluated on FreeBSD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 14:12:48 +00:00
nobu 2370556d3d configure.in: no -lelf
* configure.in (LIBS): libelf is need on only FreeBSD.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 07:17:56 +00:00
naruse 24512ba1b4 * configure.in: fix didn't enable_dtrace=yes on auto.
* configure.in: see enable_dtrace for adding libelf on FreeBSD.

* common.mk: VPATH is not needed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 06:11:36 +00:00
naruse f567a1a4d9 * Makefile.in (.SUFFIX): bsdmake needs .SUFFIX is defined before use.
* common.mk: fix path of probes.dmyh.

* configure.in: FreeBSD's USDT requires libelf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 01:04:53 +00:00
ngoto 1f225be2e5 * configure.in, Makefile.in, common.mk: support DTrace on Solaris 10,
based on r26235 by Yugui. On Solaris 10, low optimization level
  may also be needed, e.g. optflags="-xO1" or "-xO0" with Oracle
  SolarisStudio 12.3 cc.

* configure.in (--enable-dtrace): new option to enable/disable
  DTrace support. By default, trying to enable if dtrace command
  is found on the system. It is disabled when cross compiling.

* configure.in (RUBY_DTRACE_POSTPROCESS): new macro. checks whether
  the dtrace on the system needs postprocessing with "dtrace -G".
  The postprocessing is needed on Solaris 10 and other platforms.

* configure.in (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether
  the dtrace supports USDT.

* configure.in (DTRACE): move after RUBY_DTRACE_POSTPROCESS.

* configure.in (LD): On Solaris, /usr/ccs/bin/ld is preferred.

* configure.in, Makefile.in, common.mk (DTRACE_OBJ): new macro for
  DTrace probe object generated by postprocessing with "dtrace -G".

* Makefile.in, common.mk (probes.$(OBJEXT)): DTrace probe object
  generated by the postprocessing. New file probes.stamp is for
  rebuilding related objects that may be modified by "dtrace -G".

* configure.in, Makefile.in, common.mk (DTRACE_GLOMMED_OBJ): new
  macro for DTrace static library hacks.

* configure.in, Makefile.in (LIBRUBY_A_OBJS): ditto.

* Makefile.in, common.mk (ruby-glommed.$(OBJEXT)): new target with
  rule for DTrace static library hacks.

* common.mk (DTRACE_DEPENDENT_OBJS): objects depended on probes.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-18 08:24:24 +00:00
nobu eb40d20e30 probes.h: select by suffix rules
* Makefile.in, common.mk, configure.in, win32/Makefile.sub (probes.h):
  select generating with dtrace or copying dummy file by suffix rules.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 15:22:37 +00:00
nobu df4e0dd52d Makefile.in: split probes.h commands
* Makefile.in (probes.h): split build commands for dtrace-available
  and unavailable platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 08:57:17 +00:00
nobu 1c7f72dac2 configure.in: move after AC_PROG_CC
* configure.in (DTRACE): move after AC_PROG_CC since cross_compiling
  is set in it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 08:30:56 +00:00
nobu 288da355e3 configure.in: cross-compiling fix
* configure.in (DTRACE): ignore non-prefixed version if
  cross-compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 07:24:45 +00:00
naruse f82d652f35 Fix dtrace commit r37631, it is [Feature #2565]
* configure.in: disable dtrace because it doesn't work on FreeBSD.

* common.mk (clean-local): rm probes.h.

* common.mk (parse.o): depend $(PROBES_H_INCLUDES).

* common.mk (.d.h): moved from Makefile.in and use BASERUBY.

* tool/gen_dummy_probes.rb: reimplemented with ruby because sed is not
  available on Windows Microsoft VC++ environment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-13 06:13:39 +00:00
glass c5b19cf01c * re.c (rb_memsearch_ss): performance improvement by using memmem(3) if
possible. [ruby-dev:45530] [Feature #6311]

* configure.in: check existence of memmem(3) and that it is not broken.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-13 02:12:40 +00:00
tenderlove 4c740bae97 * probes.d: add DTrace probe declarations. [ruby-core:27448]
* array.c (empty_ary_alloc, ary_new): added array create DTrace probe.

* compile.c (rb_insns_name): allowing DTrace probes to access
  instruction sequence name.

* Makefile.in: translate probes.d file to appropriate header file.

* common.mk: declare dependencies on the DTrace header.

* configure.in: add a test for existence of DTrace.

* eval.c (setup_exception): add a probe for when an exception is
  raised.

* gc.c: Add DTrace probes for mark begin and end, and sweep begin and
  end.

* hash.c (empty_hash_alloc): Add a probe for hash allocation.

* insns.def: Add probes for function entry and return.

* internal.h: function declaration for compile.c change.

* load.c (rb_f_load): add probes for `load` entry and exit, require
  entry and exit, and wrapping search_required for load path search.

* object.c (rb_obj_alloc): added a probe for general object creation.

* parse.y (yycompile0): added a probe around parse and compile phase.

* string.c (empty_str_alloc, str_new): DTrace probes for string
  allocation.

* test/dtrace/*: tests for DTrace probes.

* vm.c (vm_invoke_proc): add probes for function return on exception
  raise, hash create, and instruction sequence execution.

* vm_core.h: add probe declarations for function entry and exit.

* vm_dump.c: add probes header file.

* vm_eval.c (vm_call0_cfunc, vm_call0_cfunc_with_frame): add probe on
  function entry and return.

* vm_exec.c: expose instruction number to instruction name function.

* vm_insnshelper.c: add function entry and exit probes for cfunc
  methods.

* vm_insnhelper.h: vm usage information is always collected, so
  uncomment the functions.

12 19:14:50 2012  Akinori MUSHA  <knu@iDaemons.org>

* configure.in (isinf, isnan): isinf() and isnan() are macros on
  DragonFly which cannot be found by AC_REPLACE_FUNCS().  This
  workaround enforces the fact that they exist on DragonFly.

12 15:59:38 2012  Shugo Maeda  <shugo@ruby-lang.org>

* vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo),
  vm_insnhelper.c (vm_search_method): revert r37616 because it's too
  slow.  [ruby-dev:46477]

* test/ruby/test_refinement.rb (test_inline_method_cache): skip
  the test until the bug is fixed efficiently.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-12 21:52:12 +00:00
knu e34f508775 Fix build on DragonFly where configure fails to detect isinf()/isnan().
* configure.in (isinf, isnan): isinf() and isnan() are macros on
  DragonFly which cannot be found by AC_REPLACE_FUNCS().  This
  workaround enforces the fact that they exist on DragonFly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-12 10:26:28 +00:00
knu 0a741075a3 * configure.in (--with-opt-dir): Avoid nesting of double quotes
inside backquotes, since some traditional shells like PD KSH
  (which OpenBSD's /bin/sh bases on) fails to parse them.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-08 03:09:18 +00:00
nobu 0249395582 configure.in: no visibility option for older GCC
* configure.in (visibility_option): visibility attribute is not
  available before GCC 4, so do not use -fvisibility option in that
  case.  [ruby-core:48147] [Bug #7205]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-23 05:06:50 +00:00
nobu 7254573c55 configure.in: multiple opt-dir
* configure.in (opt-dir): allow multiple directories separated by
  $PATH_SEPARATOR as well as dir_config in mkmf.rb. [ruby-core:47868]
  [Bug #7120]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-17 06:33:14 +00:00
nari 8d53a08ed8 * gc.c: Use the non-recursive marking instead of recursion. The
recursion marking of CRuby needs checking stack overflow and the
  fail-safe system, but these systems not good at partial points,
  for example, marking deep tree structures. [ruby-dev:46184]
  [Feature #7095]

* configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
  checking stack overflow of marking.

* win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 12:30:21 +00:00
knu 1d695c36b9 * configure.in (--with-opt-dir): Make this also work on DLDFLAGS
so LIBRUBY_SO links fine with libexecinfo installed in a
  non-system directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 17:36:09 +00:00
nobu c278c84692 configure.in: warnflags
* configure.in (warnflags): needs to check configuration with strict
  options.  [ruby-dev:46105]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-16 08:41:37 +00:00