aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in38
2 files changed, 27 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 8448c470ed..8d1eac3257 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 23 10:49:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: use the value of --with-opt-dir on building ruby
+ itself. [ruby-dev:46064] [Bug #6900]
+
Thu Aug 23 10:36:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* common.mk (ID_H_TARGET): revert a part of r36724 and r36751. they
diff --git a/configure.in b/configure.in
index e8b1cc739a..2dd21ef593 100644
--- a/configure.in
+++ b/configure.in
@@ -2104,19 +2104,6 @@ main(int argc, char *argv[])
test x$rb_cv_fork_with_pthread = xyes || AC_DEFINE(CANNOT_FORK_WITH_PTHREAD)
fi
-AS_CASE(["$target_cpu-$target_os"],
-[*-freebsd*|x86_64-netbsd*], [
- AC_CHECK_HEADERS([execinfo.h])
- if test "x$ac_cv_header_execinfo_h" = xyes; then
- AC_CHECK_LIB([execinfo], [backtrace])
- fi])
-AC_CHECK_FUNCS(backtrace)
-
-AC_ARG_WITH(valgrind,
- AS_HELP_STRING([--without-valgrind],[disable valgrind memcheck support]),
- [], with_valgrind=yes)
-AS_IF([test x$with_valgrind != xno],
- [AC_CHECK_HEADERS(valgrind/memcheck.h)])
}
{ # runtime section
@@ -2360,6 +2347,28 @@ AC_SUBST(RPATHFLAG)
AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}")
AC_SUBST(TRY_LINK)
+AC_ARG_WITH(opt-dir,
+ AS_HELP_STRING([--with-opt-dir=DIR], [add optional headers and libraries DIR]),
+ [
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ val=`echo $withval|sed 's/\\//\\\\\\//g'`
+ LDFLAGS="$LDFLAGS "`echo ${LIBPATHFLAG} ${RPATHFLAG}|sed -E 's/%1\\$-s|%s/'${val}'\/lib/g'`
+ ])
+
+AS_CASE(["$target_cpu-$target_os"],
+[*-freebsd*|x86_64-netbsd*], [
+ AC_CHECK_HEADERS([execinfo.h])
+ if test "x$ac_cv_header_execinfo_h" = xyes; then
+ AC_CHECK_LIB([execinfo], [backtrace])
+ fi])
+AC_CHECK_FUNCS(backtrace)
+
+AC_ARG_WITH(valgrind,
+ AS_HELP_STRING([--without-valgrind],[disable valgrind memcheck support]),
+ [], with_valgrind=yes)
+AS_IF([test x$with_valgrind != xno],
+ [AC_CHECK_HEADERS(valgrind/memcheck.h)])
+
dln_a_out_works=no
if test "$ac_cv_header_a_out_h" = yes; then
if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then
@@ -3165,9 +3174,6 @@ AC_SUBST(rubyhdrdir)dnl
AC_SUBST(sitehdrdir)dnl
AC_SUBST(vendorhdrdir)dnl
-AC_ARG_WITH(opt-dir,
- AS_HELP_STRING([--with-opt-dir=DIR], [add optional headers and libraries DIR]))
-
AC_ARG_WITH(mantype,
AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]),
[