Révision | 76ce1f5dc5f6bccf226a51cfed60877b4901e0fa (tree) |
---|---|
l'heure | 2013-01-02 04:03:28 |
Auteur | Katsuhiko Nishimra <ktns.87@gmai...> |
Commiter | Katsuhiko Nishimra |
Fix a bug in testing -rpath flag for ld. #28588
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/automake@1231 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -167,11 +167,14 @@ AX_BOOST_BASE([1.48],,[AC_MSG_FAILURE([boost library is too old!])]) | ||
167 | 167 | dnl Check whether ld accepts -rpath option |
168 | 168 | AC_CACHE_CHECK([whether ld accepts -rpath option],[molds_cv_ld_accepts_rpath], |
169 | 169 | [LDFLAGS_save=$LDFLAGS] |
170 | + [LIBS_save=$LIBS] | |
170 | 171 | [LDFLAGS="-Wl,-rpath=$BOOST_LIBDIR"] |
171 | - [AC_LINK_IFELSE([AC_LANG_SOURCE([return 0;])], | |
172 | + [LIBS=""] | |
173 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM(,[return 0;])], | |
172 | 174 | [molds_cv_ld_accepts_rpath=yes], |
173 | 175 | [molds_cv_ld_accepts_rpath=no])] |
174 | - [LDFLAGS=$LDFLAGS_save]) | |
176 | + [LDFLAGS=$LDFLAGS_save] | |
177 | + [LIBS=$LIBS_save]) | |
175 | 178 | |
176 | 179 | AS_IF([test x$molds_cv_ld_accepts_rpath == xyes], |
177 | 180 | [BOOST_LDFLAGS="$BOOST_LDFLAGS -Wl,-rpath=$BOOST_LIBDIR"]) |