Mercurial > sdl-ios-xcode
diff configure.in @ 3170:b7a48f533966
Initial work on power subsystem for SDL 1.3.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 07 Jun 2009 06:06:35 +0000 |
parents | 6338b7f2d024 |
children | 510e3f36c04a |
line wrap: on
line diff
--- a/configure.in Sun Jun 07 02:45:55 2009 +0000 +++ b/configure.in Sun Jun 07 06:06:35 2009 +0000 @@ -250,6 +250,14 @@ else SOURCES="$SOURCES $srcdir/src/haptic/*.c" fi +AC_ARG_ENABLE(power, +AC_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]), + , enable_power=yes) +if test x$enable_power != xyes; then + AC_DEFINE(SDL_POWER_DISABLED) +else + SOURCES="$SOURCES $srcdir/src/power/*.c" +fi AC_ARG_ENABLE(cdrom, AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [[default=yes]]]), , enable_cdrom=yes) @@ -2446,6 +2454,16 @@ esac fi fi + # Set up files for the power library + if test x$enable_power = xyes; then + case $ARCH in + linux) + AC_DEFINE(SDL_POWER_LINUX) + SOURCES="$SOURCES $srcdir/src/power/linux/*.c" + have_power=yes + ;; + esac + fi # Set up files for the cdrom library if test x$enable_cdrom = xyes; then case $ARCH in @@ -2620,6 +2638,12 @@ SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c" have_loadso=yes fi + # Set up files for the system power library + if test x$enable_power = xyes; then + AC_DEFINE(SDL_POWER_WINDOWS) + SOURCES="$SOURCES $srcdir/src/power/windows/*.c" + have_power=yes + fi # Set up the system libraries we need EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer" # The Win32 platform requires special setup @@ -2691,6 +2715,11 @@ have_haptic=yes fi fi + if test x$enable_power = xyes; then + AC_DEFINE(SDL_POWER_WINDOWS) + SOURCES="$SOURCES $srcdir/src/power/windows/SDL_syspower.c" + have_power=yes + fi # Set up files for the cdrom library if test x$enable_cdrom = xyes; then AC_DEFINE(SDL_CDROM_WIN32) @@ -2842,6 +2871,12 @@ have_haptic=yes EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback" fi + # Set up files for the power library + if test x$enable_power = xyes; then + AC_DEFINE(SDL_POWER_MACOSX) + SOURCES="$SOURCES $srcdir/src/power/macosx/*.c" + have_power=yes + fi # Set up files for the cdrom library if test x$enable_cdrom = xyes; then AC_DEFINE(SDL_CDROM_MACOSX)