mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-03 01:01:44 +00:00
makefiles: Normalize the host architecture in makedep instead of configure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
34fea20cd3
commit
0f83b83cd5
|
@ -31,8 +31,8 @@ fontdir = ${datadir}/wine/fonts
|
|||
nlsdir = ${datadir}/wine/nls
|
||||
dlldir = ${libdir}/wine
|
||||
srcdir = @srcdir@
|
||||
host_cpu = @host_cpu@
|
||||
SHELL = /bin/sh
|
||||
ARCH = @ARCH@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CPPBIN = @CPPBIN@
|
||||
|
|
14
configure
vendored
14
configure
vendored
|
@ -774,7 +774,6 @@ AR
|
|||
BISON
|
||||
FLEX
|
||||
TOOLSDIR
|
||||
ARCH
|
||||
TARGETFLAGS
|
||||
LD
|
||||
CPPBIN
|
||||
|
@ -5896,19 +5895,6 @@ then
|
|||
--enable-win64 should be used in the 64-bit build tree, --with-wine64 in the 32-bit Wow64 build tree." "$LINENO" 5
|
||||
fi
|
||||
|
||||
case $host_cpu in
|
||||
*i[3456789]86*) ARCH="i386"
|
||||
;;
|
||||
*x86_64*) ARCH="x86_64"
|
||||
;;
|
||||
*aarch64*) ARCH="aarch64"
|
||||
;;
|
||||
*arm*) ARCH="arm"
|
||||
;;
|
||||
*) ARCH=""
|
||||
;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the directory containing the Wine tools" >&5
|
||||
$as_echo_n "checking for the directory containing the Wine tools... " >&6; }
|
||||
if ${wine_cv_toolsdir+:} false; then :
|
||||
|
|
|
@ -243,15 +243,6 @@ then
|
|||
--enable-win64 should be used in the 64-bit build tree, --with-wine64 in the 32-bit Wow64 build tree.])
|
||||
fi
|
||||
|
||||
dnl Normalize CPU architecture
|
||||
case $host_cpu in
|
||||
*i[[3456789]]86*) AC_SUBST(ARCH,"i386") ;;
|
||||
*x86_64*) AC_SUBST(ARCH,"x86_64") ;;
|
||||
*aarch64*) AC_SUBST(ARCH,"aarch64") ;;
|
||||
*arm*) AC_SUBST(ARCH,"arm") ;;
|
||||
*) AC_SUBST(ARCH,"") ;;
|
||||
esac
|
||||
|
||||
AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
|
||||
[wine_cv_toolsdir="$with_wine_tools"
|
||||
if test -z "$with_wine_tools"; then
|
||||
|
|
|
@ -157,7 +157,7 @@ static const char *tools_ext;
|
|||
static const char *exe_ext;
|
||||
static const char *dll_ext;
|
||||
static const char *man_ext;
|
||||
static const char *arch;
|
||||
static const char *host_cpu;
|
||||
static const char *pe_dir;
|
||||
static const char *so_dir;
|
||||
static const char *crosstarget;
|
||||
|
@ -526,6 +526,30 @@ static void strarray_qsort( struct strarray *array, int (*func)(const char **, c
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* normalize_arch
|
||||
*/
|
||||
static const char *normalize_arch( const char *arch )
|
||||
{
|
||||
unsigned int i, j;
|
||||
|
||||
static const char *map[][8] =
|
||||
{
|
||||
/* normalized aliases */
|
||||
{ "i386", "i486", "i586", "i686", "ia32" },
|
||||
{ "x86_64", "amd64", "x86-64", "x86_amd64", "x64" },
|
||||
{ "aarch64", "arm64" },
|
||||
{ "arm" },
|
||||
};
|
||||
|
||||
for (i = 0; i < sizeof(map) / sizeof(map[0]); i++)
|
||||
for (j = 0; map[i][j]; j++)
|
||||
if (!strncmp( arch, map[i][j], strlen(map[i][j]) ))
|
||||
return map[i][0];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* output_filename
|
||||
*/
|
||||
|
@ -4410,7 +4434,7 @@ int main( int argc, char *argv[] )
|
|||
exe_ext = get_expanded_make_variable( top_makefile, "EXEEXT" );
|
||||
man_ext = get_expanded_make_variable( top_makefile, "api_manext" );
|
||||
dll_ext = (exe_ext && !strcmp( exe_ext, ".exe" )) ? "" : ".so";
|
||||
arch = get_expanded_make_variable( top_makefile, "ARCH" );
|
||||
host_cpu = get_expanded_make_variable( top_makefile, "host_cpu" );
|
||||
crosstarget = get_expanded_make_variable( top_makefile, "CROSSTARGET" );
|
||||
crossdebug = get_expanded_make_variable( top_makefile, "CROSSDEBUG" );
|
||||
fontforge = get_expanded_make_variable( top_makefile, "FONTFORGE" );
|
||||
|
@ -4431,10 +4455,10 @@ int main( int argc, char *argv[] )
|
|||
if (!exe_ext) exe_ext = "";
|
||||
if (!tools_ext) tools_ext = "";
|
||||
if (!man_ext) man_ext = "3w";
|
||||
if (arch)
|
||||
if (host_cpu && (host_cpu = normalize_arch( host_cpu )))
|
||||
{
|
||||
so_dir = strmake( "$(dlldir)/%s-unix", arch );
|
||||
pe_dir = strmake( "$(dlldir)/%s-windows", arch );
|
||||
so_dir = strmake( "$(dlldir)/%s-unix", host_cpu );
|
||||
pe_dir = strmake( "$(dlldir)/%s-windows", host_cpu );
|
||||
}
|
||||
else
|
||||
so_dir = pe_dir = "$(dlldir)";
|
||||
|
|
Loading…
Reference in a new issue