Fix a libtool issue with some mingw-w64 cross compilers (thanks, Ozkan!).
authorRyan C. Gordon <icculus@icculus.org>
Tue, 26 May 2015 19:54:06 -0400
changeset 9638a30b6998c1d8
parent 9637 adf81fe554b9
child 9639 044cafe15108
Fix a libtool issue with some mingw-w64 cross compilers (thanks, Ozkan!).

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15321
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commit;h=0ebb734910bf56186dd0c0e84b1c8be507bad336

Fixes Bugzilla #2722.
acinclude/libtool.m4
configure
     1.1 --- a/acinclude/libtool.m4	Tue May 26 19:34:56 2015 -0300
     1.2 +++ b/acinclude/libtool.m4	Tue May 26 19:54:06 2015 -0400
     1.3 @@ -2186,13 +2186,20 @@
     1.4      ;;
     1.5    esac
     1.6    # Ok, now we have the path, separated by spaces, we can step through it
     1.7 -  # and add multilib dir if necessary.
     1.8 +  # and add multilib dir if necessary...
     1.9    lt_tmp_lt_search_path_spec=
    1.10 -  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
    1.11 +  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
    1.12 +  # ...but if some path already ends with the multilib dir we assume
    1.13 +  # that all is fine and trust -print-search-dirs as is (GCC 4.2 or newer).
    1.14 +  case "$lt_multi_os_dir; $lt_search_path_spec " in
    1.15 +  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
    1.16 +    lt_multi_os_dir=
    1.17 +    ;;
    1.18 +  esac
    1.19    for lt_sys_path in $lt_search_path_spec; do
    1.20 -    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
    1.21 -      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
    1.22 -    else
    1.23 +    if test -d "$lt_sys_path$lt_multi_os_dir"; then
    1.24 +      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
    1.25 +    elif test -n "$lt_multi_os_dir"; then
    1.26        test -d "$lt_sys_path" && \
    1.27  	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
    1.28      fi
     2.1 --- a/configure	Tue May 26 19:34:56 2015 -0300
     2.2 +++ b/configure	Tue May 26 19:54:06 2015 -0400
     2.3 @@ -9912,13 +9912,20 @@
     2.4      ;;
     2.5    esac
     2.6    # Ok, now we have the path, separated by spaces, we can step through it
     2.7 -  # and add multilib dir if necessary.
     2.8 +  # and add multilib dir if necessary...
     2.9    lt_tmp_lt_search_path_spec=
    2.10 -  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
    2.11 +  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
    2.12 +  # ...but if some path already ends with the multilib dir we assume
    2.13 +  # that all is fine and trust -print-search-dirs as is (GCC 4.2 or newer).
    2.14 +  case "$lt_multi_os_dir; $lt_search_path_spec " in
    2.15 +  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
    2.16 +    lt_multi_os_dir=
    2.17 +    ;;
    2.18 +  esac
    2.19    for lt_sys_path in $lt_search_path_spec; do
    2.20 -    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
    2.21 -      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
    2.22 -    else
    2.23 +    if test -d "$lt_sys_path$lt_multi_os_dir"; then
    2.24 +      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
    2.25 +    elif test -n "$lt_multi_os_dir"; then
    2.26        test -d "$lt_sys_path" && \
    2.27  	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
    2.28      fi