Ignore:
Timestamp:
Nov 14, 2006, 7:02:29 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Added all the glue needed for a Cocoa output driver.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r1370 r1396  
    1616AC_PROG_CXX
    1717AC_PROG_CXXCPP
     18_AM_DEPENDENCIES([OBJC])
     19OBJC="${CXX}"
     20AC_SUBST(OBJC)
     21AC_SUBST(OBJCFLAGS)
    1822AM_PROG_AS
    1923
     
    4953AC_ARG_ENABLE(gl,
    5054  [  --enable-gl             OpenGL support (autodetected)])
     55AC_ARG_ENABLE(cocoa,
     56  [  --enable-cocoa          Cocoa support (autodetected)])
    5157AC_ARG_ENABLE(network,
    5258  [  --enable-network        Network support (autodetected)])
     
    191197  fi
    192198fi
     199
     200if test "${enable_cocoa}" != "no"; then
     201  ac_cv_my_have_cocoa="no"
     202  AC_LANG_PUSH(C++)
     203  savedCPPFLAGS="${CPPFLAGS}"
     204  CPPFLAGS="${CPPFLAGS} -ObjC"
     205  AC_CHECK_HEADERS(Cocoa/Cocoa.h,
     206   [ac_cv_my_have_cocoa="yes"])
     207  if test "${ac_cv_my_have_cocoa}" = "yes"; then
     208    AC_DEFINE(USE_COCOA, 1, Define to 1 to activate the Cocoa backend driver)
     209    CACA_LIBS="${CACA_LIBS} -Wl,-framework,Cocoa"
     210    CACA_DRIVERS="${CACA_DRIVERS} cocoa"
     211  elif test "${enable_cocoa}" = "yes"; then
     212    AC_MSG_ERROR([cannot find Cocoa development files])
     213  fi
     214  CPPFLAGS="${savedCPPFLAGS}"
     215  AC_LANG_POP(C++)
     216fi
     217AM_CONDITIONAL(USE_COCOA, test "${ac_cv_my_have_cocoa}" = "yes")
    193218
    194219if test "${enable_ncurses}" != "no"; then
Note: See TracChangeset for help on using the changeset viewer.