2 # Copyright (C) 2010-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Make sure the file name translation in the 'compile' script works
22 get_shell_script compile
24 # Use a dummy cl, since cl isn't readily available on all systems
32 cat >>configure.ac
<< 'END'
34 AC_CONFIG_FILES
([check_host
], [chmod +x check_host
])
40 # This will be sourced, nor executed.
41 cat >check_host.
in << 'END'
46 skip_
"target OS is not MinGW"
54 || skip_
"not on MinGW or Cygwin, and winepath not available"
65 cwd
=$
(pwd) || fatal_
"cannot get current directory"
67 # POSIX mandates that the compiler accepts a space between the -I,
68 # -l and -L options and their respective arguments. Traditionally,
69 # this should work also without a space. Try both usages.
71 # Check if "compile cl" transforms absolute file names to
72 # host format (e.g /somewhere -> c:/msys/1.0/somewhere).
73 res
=$
(.
/compile .
/cl
-L${sp}"$cwd" |
sed -e 's/-link -LIBPATH://')