Skip to content

Commit

Permalink
fixes for cross compilation with MinGW
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@4647 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Jan 11, 2006
1 parent 1777f15 commit 037a737
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
30 changes: 26 additions & 4 deletions acinclude.m4
Expand Up @@ -160,6 +160,10 @@ if test -f $QTDIR/include/qt/qglobal.h; then
elif test -f $QTDIR/include/qt3/qglobal.h; then
QTINC=$QTDIR/include/qt3
QTVERTEST=$QTDIR/include/qt3
elif test -f $QTDIR/include/Qt/qglobal.h -a -f $QTDIR/src/corelib/global/qglobal.h; then
# Windows: $QTDIR/include/Qt/qglobal.h includes $QTDIR/src/corelib/global/qglobal.h
QTINC=$QTDIR/include
QTVERTEST=$QTDIR/src/corelib/global/
elif test -f $QTDIR/include/Qt/qglobal.h; then
QTINC=$QTDIR/include
QTVERTEST=$QTDIR/include/Qt
Expand Down Expand Up @@ -232,10 +236,18 @@ if test $QT_MAJOR = "4" ; then
# Hard code things for the moment
# Check that moc is in path
AC_CHECK_PROG(MOC, moc, $QTDIR/bin/moc, , $QTDIR/bin)
if test x$MOC = x ; then
AC_MSG_ERROR([*** moc must be in path])
if test $cross_compiling = "yes" ; then # MinGW
AC_CHECK_PROG(MOC, moc, moc)
if test x$MOC = x ; then
AC_MSG_ERROR([*** moc must be in path])
fi
else
AC_CHECK_PROG(MOC, moc, $QTDIR/bin/moc, , $QTDIR/bin)
if test x$MOC = x ; then
AC_MSG_ERROR([*** moc must be in path])
fi
fi
# uic3 is the Qt user interface compiler in Qt3 legacy mode
AC_PATH_PROG(UIC, uic, , [$PATH:$QTDIR/bin])
if test x$UIC = x ; then
Expand Down Expand Up @@ -373,6 +385,9 @@ AC_MSG_RESULT([$QT_IS_EMBEDDED])
QT_GUILINK=""
QASSISTANTCLIENT_LDADD="-lqassistantclient"
case "${host}" in
*-mingw*)
QT_LIBS="-lQtCore4 -lQt3Support4 -lQtGui4 -lQtNetwork4 -lQtXml4"
;;
*irix*)
QT_LIBS="$QT_LIB"
if test $QT_IS_STATIC = yes ; then
Expand Down Expand Up @@ -453,7 +468,14 @@ if test x"$QT_IS_MT" = "xyes" ; then
QT_CXXFLAGS="$QT_CXXFLAGS -D_REENTRANT -DQT_THREAD_SUPPORT"
fi
QT_LDADD="-L$QTDIR/${_lib} $QT_LIBS"
case "${host}" in
*-mingw*)
QT_LDADD="-L$QTDIR/${_lib} $QT_LIBS"
;;
*)
QT_LDADD="-L$QTDIR/${_lib} $QT_LIBS"
;;
esac
if test x$QT_IS_STATIC = xyes ; then
OLDLIBS="$LIBS"
Expand Down
3 changes: 3 additions & 0 deletions configure.in
Expand Up @@ -330,6 +330,9 @@ if test -n "$with_grass" -a x"$with_grass" != "xno"; then
if test ! -f "$GISLIB"; then
GISLIB=`ls $with_grass/${_lib}/libgrass_gis.a 2> /dev/null`
fi
if test ! -f "$GISLIB"; then
GISLIB=`ls $with_grass/${_lib}/grass_gis.dll 2> /dev/null`
fi

if test ! -f "$GISLIB"; then
AC_MSG_ERROR( [GRASS library not found in $with_grass/${_lib}] )
Expand Down

0 comments on commit 037a737

Please sign in to comment.