VirtualBox

Changeset 8037 in vbox


Ignore:
Timestamp:
Apr 16, 2008 1:16:00 PM (17 years ago)
Author:
vboxsync
Message:

configure: try to detect SDL on Mac, make lack of sdl_ttf nofatal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r8018 r8037  
    909909{
    910910  test_header SDL
    911   if which_wrapper sdl-config > /dev/null; then
    912     FLGSDL=`sdl-config --cflags`
    913     INCSDL=`strip_I "$FLGSDL"`
    914     LIBSDL=`sdl-config --libs`
    915     LIBSDLMAIN="-lSDLmain"
    916     [ "$OS" = "linux" -o "$OS" = "darwin" -o "$OS" = "solaris" ] && LIBSDLMAIN=""
     911  if [ "$OS" = "darwin" ]; then
     912    if [ -d "/System/Library/Frameworks/SDL.framework/SDL" ]; then
     913      PATH_SDK_LIBSDL="/System/Library/Framework/SDL.frameworks"
     914    elif [ -d "/Library/Frameworks/SDL.framework/SDL" ]; then
     915      PATH_SDK_LIBSDL="/Library/Frameworks/SDL.framework"
     916    fi
     917    if [ -n "$PATH_SDK_LIBSDL" ]; then
     918      foundsdl=1
     919      INCSDL="$PATH_SDK_LIBSDL/Headers"
     920      FLDSDL="-framework SDL"
     921    fi
     922  else
     923    if which_wrapper sdl-config > /dev/null; then
     924      FLGSDL=`sdl-config --cflags`
     925      INCSDL=`strip_I "$FLGSDL"`
     926      LIBSDL=`sdl-config --libs`
     927      LIBSDLMAIN="-lSDLmain"
     928      FLDSDL=
     929      foundsdl=1
     930    fi
     931  fi
     932  [ "$OS" = "linux" -o "$OS" = "darwin" -o "$OS" = "solaris" ] && LIBSDLMAIN=""
     933  if [ -n "$foundsdl" ]; then
    917934    cat > .tmp_src.cc << EOF
    918935#include <cstdio>
     
    933950EOF
    934951    [ -n "$INCSDL" ] && I_INCSDL=`prefix_I "$INCSDL"`
    935     if test_compile "$LIBSDL $LIBSDLMAIN $I_INCSDL" SDL SDL; then
     952    if test_compile "$LIBSDL $LIBSDLMAIN $I_INCSDL $FLDSDL" SDL SDL; then
    936953      if test_execute; then
    937954        cnf_append "LIB_SDK_LIBSDL_SDL"     "`strip_l "$LIBSDL"`"
    938955        cnf_append "SDK_LIBSDL_LIBPATH"     "`strip_L "$LIBSDL"`"
    939956        cnf_append "LIB_SDK_LIBSDL_SDLMAIN" "`strip_l "$LIBSDLMAIN"`"
    940         [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS" "$INCSDL"
     957        [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS"    "$INCSDL"
     958        [ -n "$FLDSDL" ] && cnf_append "SDK_LIBSDL_LDFLAGS" "$FLDSDL"
    941959      fi
    942960    fi
     
    974992}
    975993EOF
    976   if test_compile "-lSDL_ttf $I_INCSDL" SDL_ttf SDL_ttf; then
    977     test_execute
     994  if test_compile "-lSDL_ttf1 $I_INCSDL" SDL_ttf SDL_ttf nofatal; then
     995    test_execute nofatal
    978996  fi
    979997}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette