configure: Added a generic macro for checking for Mingw programs.

This commit is contained in:
Alexandre Julliard 2007-01-01 13:14:21 +01:00
parent 638182bbba
commit eae0dc23ab
2 changed files with 15 additions and 3 deletions

12
aclocal.m4 vendored
View File

@ -131,6 +131,18 @@ else
fi
rm -f conf$$ conf$$.file])
dnl **** Check for a mingw program, trying the various mingw prefixes ****
dnl
dnl Usage: WINE_CHECK_MINGW_PROG(variable,prog,[value-if-not-found],[path])
dnl
AC_DEFUN([WINE_CHECK_MINGW_PROG],
[AC_CHECK_PROGS([$1],
m4_foreach([ac_wine_prefix],
[i586-mingw32msvc, i386-mingw32msvc, i386-mingw32, mingw32, mingw],
[ac_wine_prefix-$2 ]),
[$3],[$4])])
dnl **** Create nonexistent directories from config.status ****
dnl
dnl Usage: WINE_CONFIG_EXTRA_DIR(dirname)

View File

@ -1101,9 +1101,9 @@ case $host_os in
AC_SUBST(CROSSTEST,"")
if test "$cross_compiling" = "no"
then
AC_CHECK_PROGS(CROSSCC,i586-mingw32msvc-gcc i386-mingw32msvc-gcc i386-mingw32-gcc mingw32-gcc mingw-gcc,false)
AC_CHECK_PROGS(DLLTOOL,i586-mingw32msvc-dlltool i386-mingw32msvc-dlltool i386-mingw32-dlltool mingw32-dlltool mingw-dlltool,false)
AC_CHECK_PROGS(CROSSWINDRES,i586-mingw32msvc-windres i386-mingw32msvc-windres i386-mingw32-windres mingw32-windres mingw-windres,false)
WINE_CHECK_MINGW_PROG(CROSSCC,gcc,false)
WINE_CHECK_MINGW_PROG(DLLTOOL,dlltool,false)
WINE_CHECK_MINGW_PROG(CROSSWINDRES,windres,false)
if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
fi
;;