configure.in: LDFLAGS and DLDFLAGS for opt-dir

* configure.in: reset LDFLAGS and DLDFLAGS for opt-dir again after
  LIBPATHFLAG and RPATHFLAG are set.  [ruby-dev:47868] [Bug #9317]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-01-01 09:19:37 +00:00
Родитель ad0980504b
Коммит 41d42a5937
2 изменённых файлов: 24 добавлений и 10 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Wed Jan 1 18:19:35 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in: reset LDFLAGS and DLDFLAGS for opt-dir again after
LIBPATHFLAG and RPATHFLAG are set. [ruby-dev:47868] [Bug #9317]
Wed Jan 1 11:12:29 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> Wed Jan 1 11:12:29 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in: use SSE2 instructions for drop unexpected * configure.in: use SSE2 instructions for drop unexpected

Просмотреть файл

@ -865,17 +865,11 @@ AC_ARG_WITH(opt-dir,
[ [
val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"` val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"`
CPPFLAGS="$CPPFLAGS $val" CPPFLAGS="$CPPFLAGS $val"
val=`IFS="$PATH_SEPARATOR" val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -L\1/lib|g;s/^ //"`
for dir in $withval; do LDFLAGS="$LDFLAGS $val"
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" LDFLAGS_OPTDIR="$val"
test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS " OPT_DIR="$withval"
LDFLAGS="$LDFLAGS$val" ], [OPT_DIR=])
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_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\"" test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cxxflags $ARCH_FLAG\""
@ -2762,6 +2756,21 @@ AC_SUBST(RPATHFLAG)
AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}") AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}")
AC_SUBST(TRY_LINK) AC_SUBST(TRY_LINK)
if test "x$OPT_DIR" != x; then
pat=`echo "${LDFLAGS_OPTDIR}" | sed ['s/[][\\.*|]/\\\\&/']`
LDFLAGS=`echo "${LDFLAGS}" | sed "s| ${pat}||"`
val=`IFS="$PATH_SEPARATOR"
for dir in $OPT_DIR; 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' ' '`
test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS "
LDFLAGS="$LDFLAGS$val"
test x"${DLDFLAGS}" = x || DLDFLAGS="$DLDFLAGS "
DLDFLAGS="$DLDFLAGS$val"
LDFLAGS_OPTDIR="$val"
fi
AS_CASE(["$target_cpu-$target_os"], AS_CASE(["$target_cpu-$target_os"],
[*-darwin*], [ [*-darwin*], [
AC_CHECK_HEADERS([execinfo.h]) AC_CHECK_HEADERS([execinfo.h])