diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/configure.in b/configure.in index cd4ee03..f0121a6 100644 --- a/configure.in +++ b/configure.in @@ -1647,10 +1647,25 @@ case "${host}" in ;; esac +# If no --enable-shared nor --disable-shared is specified, we set up +# LD_LIBRARY_PATH when we build for gcc. +case $enable_shared in +"") + if test -d ${srcdir}/gcc; then + set_lib_path=yes + else + set_lib_path=no + fi + ;; +*) + set_lib_path=$enable_shared + ;; +esac + # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the # binutils tools will find libbfd.so. -case "${enable_shared}" in - no | "") SET_LIB_PATH= ;; +case "${set_lib_path}" in + no) SET_LIB_PATH= ;; *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;; esac @@ -2328,8 +2343,8 @@ AC_SUBST(stage2_werror_flag) # used. SET_GCC_LIB_PATH= if test -d ${srcdir}/gcc && test x${is_cross_compiler} = xno; then - case "${enable_shared}" in - no | "") ;; + case "${set_lib_path}" in + no) ;; *) eval "d=\$$RPATH_ENVVAR" if test x"$d" != x; then |