From ea16237c614f9261cedad243b311c0c76466aaef Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 23 Aug 2012 01:50:12 +0000 Subject: * configure.in: use the value of --with-opt-dir on building ruby itself. [ruby-dev:46064] [Bug #6900] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.in | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'configure.in') 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]), [ -- cgit v1.2.3