Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7769 in orxonox.OLD for branches/osx


Ignore:
Timestamp:
May 23, 2006, 12:45:40 PM (19 years ago)
Author:
ponder
Message:

If QT-frameworks ( macosx ) are present, the library directories for QT_LIB are also returned correctly.
Added pck-config to handle macosx-specific stuff. Maybe we could use if throughout the configure.ac?
Removed direct.h from the util/file.cc includes.

Location:
branches/osx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/osx/acinclude.m4

    r7670 r7769  
    135135    for _lib_directory in ${QT_COMMON_LIB_DIRECTORIES}
    136136    do
    137       if test -e ${_lib_directory}/libQtCore.so || test -e ${_lib_directory}/libQtCore4.a ; then
     137      if test -e ${_lib_directory}/libQtCore.so || test -e ${_lib_directory}/libQtCore4.a || \
     138                        test -e ${_lib_directory}/QtCore.framework ; then
    138139        QT_LIB_DIRECTORY=${_lib_directory}
    139140        break
    140       fi
     141          fi
    141142    done
    142143    if test -n ${QT_LIB_DIRECTORY} ; then
     
    194195    fi
    195196
    196     echo "QT_LIBS = ${QT_LIBS}"
    197     echo "QT_CXXFLAGS = ${QT_CXXFLAGS}"
    198     echo "QT_LD_FLAGS = ${QT_LDFLAGS}"
     197    echo "QT_LIBS          = ${QT_LIBS}"
     198    echo "QT_CXXFLAGS      = ${QT_CXXFLAGS}"
     199    echo "QT_LD_FLAGS      = ${QT_LDFLAGS}"
    199200    echo "QT_BIN_DIRECTORY = ${QT_BIN_DIRECTORY}"
    200201
  • branches/osx/configure.ac

    r7766 r7769  
    432432 *darwin*)
    433433 echo "OS X detected"
    434 
    435434 osX="yes"
    436 
    437  CPPFLAGS="-I/$prefix/include $CPPFLAGS"
    438  LDFLAGS="$LDFLAGS -L$prefix/lib"
     435 QT_PREFIX="$prefix"
     436 CPPFLAGS="-I/$prefix/include $CPPFLAGS -F$prefix/lib"
     437 LDFLAGS="$LDFLAGS -L$prefix/lib -F$prefix/lib"
     438 PCK_CONFIG_PATH='/opt/local'
    439439# checking gl header
    440440   AC_CHECK_HEADERS([OpenGL/gl.h] ,,
    441441      [AC_MSG_ERROR([cannot find opengl headers]) ])
    442 # cheking for GLU-header
     442# checking for GLU-header
    443443    AC_CHECK_HEADERS([OpenGL/glu.h] ,,
    444444      [AC_MSG_ERROR([cannot find opengl headers]) ])
     
    461461   fi
    462462
    463 
     463 LIBS="$LIBS"
    464464   AC_CHECK_HEADERS([OpenAL/al.h] ,,
    465465      [AC_MSG_ERROR([cannot find opengl headers]) ])
     
    471471       SDL_CFLAGS=`sdl-config --cflags`
    472472       SDL_LIBS=`sdl-config --libs`
    473        CXXFL\AGS="$CXXFLAGS $SDL_CFLAGS"
     473       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    474474       LIBS="$LIBS $SDL_LIBS"
    475475   AC_CHECK_HEADERS([SDL/SDL.h] ,,
     
    565565# QT #
    566566#----#
    567 AX_CHECK_QT([${QT_PREFIX}], [QtCore QtCore4],, [http://www.trolltech.com])
    568 if test x$have_qt = xno ; then
    569     WITH_QT=no
     567if test `uname` = "Darwin" ; then
     568        PKG_CONFIG_PATH="$prefix"
     569        PKG_CHECK_MODULES( QT, QtCore >= 4.01 )
     570        QT_INCLUDE_DIR= $($PKG_CONFIG --variable=includedir QtGui)
     571        EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
     572        AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
     573                AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
     574
     575        AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
     576                        QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
     577                        AC_MSG_WARN([QWidget not found])))
     578            AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
     579            AC_CHECK_PROG(MOC, [moc], [moc])
     580
     581            AC_SUBST(QT_CFLAGS)
     582            AC_SUBST(QT_LIBS)
     583else
     584        AX_CHECK_QT([${QT_PREFIX}], [QtCore QtCore4],, [http://www.trolltech.com])
     585        if test x$have_qt = xno ; then
     586                WITH_QT=no
     587        fi
    570588fi
    571589
  • branches/osx/src/lib/util/file.cc

    r7674 r7769  
    2323#include <fstream>
    2424
    25 #ifdef __unix__
     25#ifdef __unix__ 
    2626#include <unistd.h>
    2727#elif __WIN32__ || _MS_DOS_
    2828#include <dir.h>
    2929#else
    30 #include <direct.h>
     30//#include <direct.h>
    3131#endif
    3232
Note: See TracChangeset for help on using the changeset viewer.