mkvtoolnix/ac/mingw.m4
Moritz Bunkus 56fb138489 Only check for windres during cross-builds
windres is not needed for non-Windows builds and should
therefore only be checked if we are cross-compiling.
Otherwise warnings or errors could confuse the user.
2009-02-25 15:50:19 +01:00

28 lines
519 B
Plaintext

dnl
dnl Check for mingw
dnl
AC_CACHE_CHECK([if being compiled with mingw32],
[ac_cv_mingw32],[
if test "x`$CXX --version | grep -i mingw`" = "x" ; then
ac_cv_mingw32=no
else
ac_cv_mingw32=yes
fi])
if test "x$ac_cv_mingw32" = "xyes"; then
export MINGW=1
MINGW_GUIAPP=-mwindows
LIBMTXCOMMONDLL=1
EXEEXT=.exe
AC_CHECK_TOOL(WINDRES, windres, :)
else
LIBMTXCOMMONDLL=0
fi
AC_SUBST(MINGW)
AC_SUBST(MINGW_LIBS)
AC_SUBST(MINGW_GUIAPP)
AC_SUBST(LIBMTXCOMMONDLL)
AC_SUBST(EXEEXT)