Conditionally compile in one of platform/sdl/clipboard* depending on the host platform we're compiling for

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5946 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-09-06 22:39:43 +00:00
parent 3d866e1a8c
commit d4923de07a
2 changed files with 27 additions and 0 deletions

View File

@ -24,4 +24,15 @@ LIBS += $(SDL_LIBS)
libbetawidget_la_SOURCES += $(PLATFORM)/event.c $(PLATFORM)/init.c \
$(PLATFORM)/time.c
if MINGW32
libbetawidget_la_SOURCES += $(PLATFORM)/clipboardWin32.c
else
if MACOSX
libbetawidget_la_SOURCES += $(PLATFORM)/clipboardOSX.m
else
# Assume X11 if none of the above match
libbetawidget_la_SOURCES += $(PLATFORM)/clipboardX11.c
endif
endif
noinst_HEADERS += $(PLATFORM)/event.h $(PLATFORM)/init.h

View File

@ -12,6 +12,8 @@ AC_CANONICAL_HOST
# Checks for programs.
AC_PROG_CC
# Objective C is used when compiling for OSX (platform/sdl/clipboardOSX.m)
AC_PROG_OBJC
# By default don't build shared libraries
AC_DISABLE_SHARED
@ -32,6 +34,20 @@ if test "x$enable_static" = "xyes" ; then
PKG_CONFIG="${PKG_CONFIG} --static"
fi
# Check for operating system
case ${host_os} in
*mingw32*)
host_os_mingw32=yes
;;
*darwin*)
host_os_macosx=yes
;;
*)
;;
esac
AM_CONDITIONAL([MINGW32], test "x$host_os_mingw32" = "xyes")
AM_CONDITIONAL([MACOSX], test "x$host_os_macosx" = "xyes")
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdint.h stdlib.h string.h])