diff --git a/configure.ac b/configure.ac index 5d48572..abadcec 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,11 @@ AC_SUBST(LT_VERSION) AM_PROG_CC_C_O AC_PROG_CPP +AC_PROG_OBJC +_AM_DEPENDENCIES([OBJC]) +OBJC="${CC}" +AC_SUBST(OBJC) +AC_SUBST(OBJCFLAGS) AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL @@ -116,8 +121,27 @@ if test "${ac_cv_my_have_gdi}" != "no"; then fi AM_CONDITIONAL(USE_GDI, test "${ac_cv_my_have_gdi}" = "yes") -if test "${ac_cv_my_have_il}" = "no" -a "${ac_cv_my_have_ole}" = "no" -a "${ac_cv_my_have_sdl}" = "no" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no"; then - AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2 or OpenCV, please install one of them]]) +# Use Cocoa? +ac_cv_my_have_cocoa="no" +AC_CHECK_HEADERS(/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h, +[ + MACOSX_SDK_FRAMEWORKS="-F${MACOSX_SDK}/System/Library/Frameworks" + CPPFLAGS="${CPPFLAGS} ${ARCH} ${MACOSX_SDK_FRAMEWORKS}" + CFLAGS="${CFLAGS} ${MACOSX_SDK_CFLAGS}" + CXXFLAGS="${CXXFLAGS} ${MACOSX_SDK_CXXFLAGS}" + OBJCFLAGS="${OBJCFLAGS} ${MACOSX_SDK_CFLAGS}" + LDFLAGS="${ARCH} ${MACOSX_SDK_LDFLAGS} ${LDFLAGS}" + AC_DEFINE(USE_COCOA, 1, Define to 1 to activate the Cocoa backend driver) +# CACA_LIBS="${CACA_LIBS} -Wl,-syslibroot,${MACOSX_SDK},-framework,Cocoa" +# CACA_DRIVERS="${CACA_DRIVERS} cocoa" + ac_cv_my_have_cocoa="yes"], + [ac_cv_my_have_cocoa="no"] + ) +AM_CONDITIONAL(USE_COCOA, test "${ac_cv_my_have_cocoa}" = "yes") + + +if test "${ac_cv_my_have_il}" = "no" -a "${ac_cv_my_have_ole}" = "no" -a "${ac_cv_my_have_sdl}" = "no" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no" -a "${ac_cv_my_have_cocoa}" = "no"; then + AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2, Cocoa, or OpenCV, please install one of them]]) fi # Build The Pimp? @@ -127,6 +151,7 @@ PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0], [:]) PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0], [:]) AM_CONDITIONAL(USE_CSHARP, test "${gmcs}" != "no") + AC_CONFIG_FILES([ Makefile pipi/Makefile diff --git a/pipi-sharp/pipi-sharp.dll.config b/pipi-sharp/pipi-sharp.dll.config index 77c2739..baf33c7 100644 --- a/pipi-sharp/pipi-sharp.dll.config +++ b/pipi-sharp/pipi-sharp.dll.config @@ -1,3 +1,4 @@ + diff --git a/pipi-sharp/pipi-sharp.dll.config.in b/pipi-sharp/pipi-sharp.dll.config.in index 9e302f8..dbb6126 100644 --- a/pipi-sharp/pipi-sharp.dll.config.in +++ b/pipi-sharp/pipi-sharp.dll.config.in @@ -1,3 +1,4 @@ +