From ef9ea0482d9c13c68e30d1a0f40e4cd20fdf61ad Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 17 Dec 2013 05:29:17 +0000 Subject: configure.in: move opt-dir option * configure.in (opt-dir): move so that it can affect in configure not only after rbconfig.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.in | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/configure.in b/configure.in index 513e3cc704..ecadb0b215 100644 --- a/configure.in +++ b/configure.in @@ -856,6 +856,25 @@ if test "$GCC" = yes; then done fi +AC_ARG_WITH(opt-dir, + AS_HELP_STRING([--with-opt-dir=DIR-LIST], + [add optional headers and libraries directories separated by $PATH_SEPARATOR]), + [ + withval="$1" + val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"` + CPPFLAGS="$CPPFLAGS $val" + val=`IFS="$PATH_SEPARATOR" + for dir in $withval; do + echo x ${LIBPATHFLAG} ${RPATHFLAG} | + sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${dir}/lib${IFS}g;s${IFS}%s${IFS}${dir}/lib${IFS}g" + done | tr '\012' ' '` + LDFLAGS_OPTDIR="$val" + test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS " + LDFLAGS="$LDFLAGS$val" + test x"${DLDFLAGS}" = x || DLDFLAGS="$DLDFLAGS " + DLDFLAGS="$DLDFLAGS$val" + ]) + test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ARCH_FLAG\"" test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cxxflags $ARCH_FLAG\"" @@ -2736,24 +2755,6 @@ 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-LIST], - [add optional headers and libraries directories separated by $PATH_SEPARATOR]), - [ - val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"` - CPPFLAGS="$CPPFLAGS $val" - val=`IFS="$PATH_SEPARATOR" - for dir in $withval; do - echo x ${LIBPATHFLAG} ${RPATHFLAG} | - sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${dir}/lib${IFS}g;s${IFS}%s${IFS}${dir}/lib${IFS}g" - done | tr '\012' ' '` - LDFLAGS_OPTDIR="$val" - test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS " - LDFLAGS="$LDFLAGS$val" - test x"${DLDFLAGS}" = x || DLDFLAGS="$DLDFLAGS " - DLDFLAGS="$DLDFLAGS$val" - ]) - AS_CASE(["$target_cpu-$target_os"], [*-darwin*], [ AC_CHECK_HEADERS([execinfo.h]) -- cgit v1.2.3