Ignore:
Timestamp:
Nov 30, 2006, 11:41:52 PM (13 years ago)
Author:
Sam Hocevar
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r1439 r1449  
    1717AC_PROG_CXXCPP
    1818_AM_DEPENDENCIES([OBJC])
    19 OBJC="${CXX}"
     19OBJC="${CC}"
    2020AC_SUBST(OBJC)
    2121AC_SUBST(OBJCFLAGS)
     
    200200if test "${enable_cocoa}" != "no"; then
    201201  ac_cv_my_have_cocoa="no"
    202   AC_LANG_PUSH(C++)
    203   savedCPPFLAGS="${CPPFLAGS}"
    204   CPPFLAGS="${CPPFLAGS} -ObjC"
    205202  AC_CHECK_HEADERS(Cocoa/Cocoa.h,
    206203   [ac_cv_my_have_cocoa="yes"])
    207204  if test "${ac_cv_my_have_cocoa}" = "yes"; then
     205    case x${target} in
     206    xpowerpc*darwin*)
     207      # 10.3 needed to link with X11
     208      MACOSX_SDK=/Developer/SDKs/MacOSX10.3.9.sdk
     209      GCC_VERSION=3.3
     210      ARCH="-arch ppc"
     211      MACOSX_SDK_CFLAGS="-nostdinc -isystem ${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOSX_SDK}/usr/include"
     212      MACOSX_SDK_CXXFLAGS="-nostdinc++ -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++ -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++/ppc-darwin -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++/backward"
     213      MACOSX_SDK_LDFLAGS="-L${MACOSX_SDK}/usr/lib/gcc/darwin -L${MACOSX_SDK}/usr/lib/gcc/darwin/${GCC_VERSION} -L${MACOSX_SDK}/usr/lib"
     214      ;;
     215    x*86*darwin*)
     216      MACOSX_SDK=/Developer/SDKs/MacOSX10.4u.sdk
     217      GCC_VERSION=4.0
     218      ARCH="-arch i386"
     219      MACOSX_SDK_CFLAGS="-isysroot ${MACOSX_SDK}"
     220      MACOSX_SDK_CXXFLAGS="${MACOSX_SDK_CFLAGS}"
     221      ;;
     222    esac
     223    CC=gcc-${GCC_VERSION}
     224    CXX=g++-${GCC_VERSION}
     225    MACOSX_SDK_FRAMEWORKS="-F${MACOSX_SDK}/System/Library/Frameworks"
     226    CPPFLAGS="${CPPFLAGS} ${ARCH} ${MACOSX_SDK_FRAMEWORKS}"
     227    CFLAGS="${CFLAGS} ${MACOSX_SDK_CFLAGS}"
     228    CXXFLAGS="${CXXFLAGS} ${MACOSX_SDK_CXXFLAGS}"
     229    OBJCFLAGS="${OBJCFLAGS} ${MACOSX_SDK_CFLAGS}"
     230    LDFLAGS="${ARCH} ${MACOSX_SDK_LDFLAGS} ${LDFLAGS}"
    208231    AC_DEFINE(USE_COCOA, 1, Define to 1 to activate the Cocoa backend driver)
    209     CACA_LIBS="${CACA_LIBS} -Wl,-framework,Carbon,-framework,Cocoa"
     232    CACA_LIBS="${CACA_LIBS} -Wl,-syslibroot,${MACOSX_SDK},-framework,Cocoa"
    210233    CACA_DRIVERS="${CACA_DRIVERS} cocoa"
    211234  elif test "${enable_cocoa}" = "yes"; then
    212235    AC_MSG_ERROR([cannot find Cocoa development files])
    213236  fi
    214   CPPFLAGS="${savedCPPFLAGS}"
    215   AC_LANG_POP(C++)
    216237fi
    217238AM_CONDITIONAL(USE_COCOA, test "${ac_cv_my_have_cocoa}" = "yes")
     
    287308# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
    288309# [Jylam] Removed -Wshadow in order to avoid ncurses/gl conflict
    289 # (Comme quoi on est pas les seuls porcs)
     310# (Comme quoi on n'est pas les seuls porcs)
    290311CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
    291312
Note: See TracChangeset for help on using the changeset viewer.