Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • automake/compile

    r00cc023 r59310bf  
    22# Wrapper for compilers which do not understand '-c -o'.
    33
    4 scriptversion=2012-01-04.17; # UTC
    5 
    6 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
    7 # Software Foundation, Inc.
     4scriptversion=2012-10-14.11; # UTC
     5
     6# Copyright (C) 1999-2014 Free Software Foundation, Inc.
    87# Written by Tom Tromey <tromey@cygnus.com>.
    98#
     
    7877      ;;
    7978  esac
     79}
     80
     81# func_cl_dashL linkdir
     82# Make cl look for libraries in LINKDIR
     83func_cl_dashL ()
     84{
     85  func_file_conv "$1"
     86  if test -z "$lib_path"; then
     87    lib_path=$file
     88  else
     89    lib_path="$lib_path;$file"
     90  fi
     91  linker_opts="$linker_opts -LIBPATH:$file"
     92}
     93
     94# func_cl_dashl library
     95# Do a library search-path lookup for cl
     96func_cl_dashl ()
     97{
     98  lib=$1
     99  found=no
     100  save_IFS=$IFS
     101  IFS=';'
     102  for dir in $lib_path $LIB
     103  do
     104    IFS=$save_IFS
     105    if $shared && test -f "$dir/$lib.dll.lib"; then
     106      found=yes
     107      lib=$dir/$lib.dll.lib
     108      break
     109    fi
     110    if test -f "$dir/$lib.lib"; then
     111      found=yes
     112      lib=$dir/$lib.lib
     113      break
     114    fi
     115    if test -f "$dir/lib$lib.a"; then
     116      found=yes
     117      lib=$dir/lib$lib.a
     118      break
     119    fi
     120  done
     121  IFS=$save_IFS
     122
     123  if test "$found" != yes; then
     124    lib=$lib.lib
     125  fi
    80126}
    81127
     
    110156          esac
    111157          ;;
     158        -I)
     159          eat=1
     160          func_file_conv "$2" mingw
     161          set x "$@" -I"$file"
     162          shift
     163          ;;
    112164        -I*)
    113165          func_file_conv "${1#-I}" mingw
     
    115167          shift
    116168          ;;
     169        -l)
     170          eat=1
     171          func_cl_dashl "$2"
     172          set x "$@" "$lib"
     173          shift
     174          ;;
    117175        -l*)
    118           lib=${1#-l}
    119           found=no
    120           save_IFS=$IFS
    121           IFS=';'
    122           for dir in $lib_path $LIB
    123           do
    124             IFS=$save_IFS
    125             if $shared && test -f "$dir/$lib.dll.lib"; then
    126               found=yes
    127               set x "$@" "$dir/$lib.dll.lib"
    128               break
    129             fi
    130             if test -f "$dir/$lib.lib"; then
    131               found=yes
    132               set x "$@" "$dir/$lib.lib"
    133               break
    134             fi
    135           done
    136           IFS=$save_IFS
    137 
    138           test "$found" != yes && set x "$@" "$lib.lib"
    139           shift
     176          func_cl_dashl "${1#-l}"
     177          set x "$@" "$lib"
     178          shift
     179          ;;
     180        -L)
     181          eat=1
     182          func_cl_dashL "$2"
    140183          ;;
    141184        -L*)
    142           func_file_conv "${1#-L}"
    143           if test -z "$lib_path"; then
    144             lib_path=$file
    145           else
    146             lib_path="$lib_path;$file"
    147           fi
    148           linker_opts="$linker_opts -LIBPATH:$file"
     185          func_cl_dashL "${1#-L}"
    149186          ;;
    150187        -static)
Note: See TracChangeset for help on using the changeset viewer.