The present handling of these predefined values is sort of broken. If explicitly specified by the user, the output should say so. If not, they should not be propagated from CC to CXX to F77. The present output > checking dynamic linker characteristics... GNU/Linux ld.so > (cached) (cached) checking how to hardcode library paths into programs... immediate is confusing. ============================================ Should the mechanism be tested during "make check" ? ============================================ Changelog: 2008-02-14 Peter Breitenlohner * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): better handling of predefined values for lt_cv_sys_lib_search_path_spec and lt_cv_sys_lib_dlsearch_path_spec. Don't propagate them between tags unless they are explicitly specified by the user. ============================================ diff -ur -x acinclude.m4 -x aclocal.m4 -x autom4te.cache -x configure -x libtool.info -x stamp-vti -x version.texi libtool-1.5.26.orig/libtool.m4 libtool-1.5.26/libtool.m4 --- libtool-1.5.26.orig/libtool.m4 2008-02-01 17:26:47.000000000 +0100 +++ libtool-1.5.26/libtool.m4 2008-02-14 13:38:12.000000000 +0100 @@ -1889,12 +1889,16 @@ AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no -AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], -[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], -[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" + AC_MSG_NOTICE([overriding sys_lib_search_path_spec with]) + AC_MSG_NOTICE([ predefined value: $sys_lib_search_path_spec]) +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + AC_MSG_NOTICE([overriding sys_lib_dlsearch_path_spec with]) + AC_MSG_NOTICE([ predefined value: $sys_lib_dlsearch_path_spec]) +fi variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then