~ubuntu-branches/ubuntu/trusty/spice/trusty-proposed

« back to all changes in this revision

Viewing changes to compile

  • Committer: Package Import Robot
  • Author(s): Liang Guo
  • Date: 2013-05-10 09:10:16 UTC
  • mfrom: (7.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20130510091016-jpqqitwsvhqq9eub
Tags: 0.12.2-0nocelt3
Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Wrapper for compilers which do not understand '-c -o'.
3
3
 
4
 
scriptversion=2012-01-04.17; # UTC
 
4
scriptversion=2012-03-05.13; # UTC
5
5
 
6
 
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
7
 
# Software Foundation, Inc.
 
6
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
8
7
# Written by Tom Tromey <tromey@cygnus.com>.
9
8
#
10
9
# This program is free software; you can redistribute it and/or modify
79
78
  esac
80
79
}
81
80
 
 
81
# func_cl_dashL linkdir
 
82
# Make cl look for libraries in LINKDIR
 
83
func_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
 
96
func_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
  done
 
116
  IFS=$save_IFS
 
117
 
 
118
  if test "$found" != yes; then
 
119
    lib=$lib.lib
 
120
  fi
 
121
}
 
122
 
82
123
# func_cl_wrapper cl arg...
83
124
# Adjust compile command to suit cl
84
125
func_cl_wrapper ()
109
150
              ;;
110
151
          esac
111
152
          ;;
 
153
        -I)
 
154
          eat=1
 
155
          func_file_conv "$2" mingw
 
156
          set x "$@" -I"$file"
 
157
          shift
 
158
          ;;
112
159
        -I*)
113
160
          func_file_conv "${1#-I}" mingw
114
161
          set x "$@" -I"$file"
115
162
          shift
116
163
          ;;
 
164
        -l)
 
165
          eat=1
 
166
          func_cl_dashl "$2"
 
167
          set x "$@" "$lib"
 
168
          shift
 
169
          ;;
117
170
        -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"
 
171
          func_cl_dashl "${1#-l}"
 
172
          set x "$@" "$lib"
139
173
          shift
140
174
          ;;
 
175
        -L)
 
176
          eat=1
 
177
          func_cl_dashL "$2"
 
178
          ;;
141
179
        -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"
 
180
          func_cl_dashL "${1#-L}"
149
181
          ;;
150
182
        -static)
151
183
          shared=false