Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 41d42a59373a53754b7e3de3b3509f459832145e 1 parent ad09805
@nobu nobu authored
Showing with 24 additions and 10 deletions.
  1. +5 −0 ChangeLog
  2. +19 −10 configure.in
View
5 ChangeLog
@@ -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>
* configure.in: use SSE2 instructions for drop unexpected
View
29 configure.in
@@ -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/^ //"`
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' ' '`
+ val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -L\1/lib|g;s/^ //"`
+ LDFLAGS="$LDFLAGS $val"
LDFLAGS_OPTDIR="$val"
- test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS "
- LDFLAGS="$LDFLAGS$val"
- test x"${DLDFLAGS}" = x || DLDFLAGS="$DLDFLAGS "
- DLDFLAGS="$DLDFLAGS$val"
- ])
+ OPT_DIR="$withval"
+ ], [OPT_DIR=])
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\""
@@ -2762,6 +2756,21 @@ AC_SUBST(RPATHFLAG)
AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}")
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"],
[*-darwin*], [
AC_CHECK_HEADERS([execinfo.h])
Please sign in to comment.
Something went wrong with that request. Please try again.