[前][次][番号順一覧][スレッド一覧]

ruby-changes:32397

From: nobu <ko1@a...>
Date: Wed, 1 Jan 2014 18:19:43 +0900 (JST)
Subject: [ruby-changes:32397] nobu:r44476 (trunk): configure.in: LDFLAGS and DLDFLAGS for opt-dir

nobu	2014-01-01 18:19:37 +0900 (Wed, 01 Jan 2014)

  New Revision: 44476

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44476

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 44475)
+++ configure.in	(revision 44476)
@@ -865,17 +865,11 @@ AC_ARG_WITH(opt-dir, https://github.com/ruby/ruby/blob/trunk/configure.in#L865
 	[
 		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) https://github.com/ruby/ruby/blob/trunk/configure.in#L2756
 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])
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44475)
+++ ChangeLog	(revision 44476)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jan  1 18:19:35 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* configure.in: use SSE2 instructions for drop unexpected

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]