diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | configure.ac | 28 |
2 files changed, 33 insertions, 0 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-11-25 Oscar Fuentes <ofv@wanadoo.es> | ||
| 2 | |||
| 3 | * configure.ac [MINGW]: Set $canonical default value as per the | ||
| 4 | compiler's target. | ||
| 5 | |||
| 1 | 2014-11-24 Glenn Morris <rgm@gnu.org> | 6 | 2014-11-24 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * configure.ac [HAVE_W32]: Generate nt/*.rc files when HAVE_W32, | 8 | * configure.ac [HAVE_W32]: Generate nt/*.rc files when HAVE_W32, |
diff --git a/configure.ac b/configure.ac index 0f1508f3a94..6b6b1c7d22f 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -145,6 +145,34 @@ case $canonical in | |||
| 145 | *-mingw*) | 145 | *-mingw*) |
| 146 | . $srcdir/nt/mingw-cfg.site | 146 | . $srcdir/nt/mingw-cfg.site |
| 147 | 147 | ||
| 148 | # When we build with MinGW under MSYS, we are cross-compiling. Hence | ||
| 149 | # we can't rely on the output of MSYS `uname' for the architecture | ||
| 150 | # (32 bit MinGW compiler with 64 bit MSYS2, for instance) and must | ||
| 151 | # use the compiler's target, unless when the user explicitly | ||
| 152 | # provides one: | ||
| 153 | if test -z $target_alias; then | ||
| 154 | AC_MSG_CHECKING([the compiler's target]) | ||
| 155 | if test -z $CC; then | ||
| 156 | cc=gcc | ||
| 157 | else | ||
| 158 | cc=$CC | ||
| 159 | fi | ||
| 160 | t=`$cc -v 2>&1 | sed -n 's/Target: //p'` | ||
| 161 | case "$t" in | ||
| 162 | *-*) canonical=$t | ||
| 163 | ;; | ||
| 164 | "") AC_MSG_ERROR([Impossible to obtain $cc compiler target. | ||
| 165 | Please explicitly provide --target]) | ||
| 166 | ;; | ||
| 167 | *) AC_MSG_WARN([Compiler reported non-standard target. | ||
| 168 | Defaulting to $canonical.]) | ||
| 169 | ;; | ||
| 170 | esac | ||
| 171 | AC_MSG_RESULT([$canonical]) | ||
| 172 | else | ||
| 173 | canonical=$target_alias | ||
| 174 | fi | ||
| 175 | |||
| 148 | case $srcdir in | 176 | case $srcdir in |
| 149 | /* | ?:*) | 177 | /* | ?:*) |
| 150 | # srcdir is an absolute path. In this case, force the format | 178 | # srcdir is an absolute path. In this case, force the format |