# HG changeset patch # User Ryan C. Gordon # Date 1016268480 0 # Node ID 259daddc2d6b84a0312c3a6e7f263aba9746f5fe # Parent 2444b4128efd7510d65c1f095b81b00d96de25d3 PhysicsFS support tied into build system. diff -r 2444b4128efd -r 259daddc2d6b configure.in --- a/configure.in Sat Mar 16 08:47:29 2002 +0000 +++ b/configure.in Sat Mar 16 08:48:00 2002 +0000 @@ -226,6 +226,19 @@ fi fi +dnl Check for PhysicsFS http://icculus.org/physfs/ +AC_ARG_ENABLE(physfs, +[ --enable-physfs enable PhysicsFS in playsound [default=yes]], + , enable_physfs=yes) +if test x$enable_physfs = xyes; then + AC_CHECK_HEADER(physfs.h, have_physfs_hdr=yes) + AC_CHECK_LIB(physfs, PHYSFS_init, have_physfs_lib=yes) + if test x$have_physfs_hdr = xyes -a x$have_physfs_lib = xyes; then + use_physicsfs="yes" + fi +fi + + dnl Check for efence (!!! FIXME : This doesn't work.) dnl AC_ARG_ENABLE(efence, dnl [ --enable-efence enable ElectricFence usage [default=no]], @@ -253,6 +266,7 @@ dnl Add Makefile conditionals AM_CONDITIONAL(USE_TIMIDITY, test x$enable_midi = xyes) AM_CONDITIONAL(USE_MPGLIB, test x$enable_mpglib = xyes) +AM_CONDITIONAL(USE_PHYSICSFS, test x$use_physicsfs = xyes) AC_OUTPUT([ Makefile diff -r 2444b4128efd -r 259daddc2d6b playsound/Makefile.am --- a/playsound/Makefile.am Sat Mar 16 08:47:29 2002 +0000 +++ b/playsound/Makefile.am Sat Mar 16 08:48:00 2002 +0000 @@ -2,4 +2,17 @@ INCLUDES = -I$(top_srcdir) -playsound_LDADD = ../libSDL_sound.la +if USE_PHYSICSFS +PHYSFS_CFLG = -DSUPPORT_PHYSFS=1 +PHYSFS_SRCS = physfsrwops.c +PHYSFS_LIBS = -lphysfs +else +PHYSFS_CFLG = +PHYSFS_SRCS = +PHYSFS_LIBS = +endif + +playsound_CFLAGS = $(PHYSFS_CFLG) +playsound_LDADD = ../libSDL_sound.la $(PHYSFS_LIBS) +playsound_SOURCES = playsound.c $(PHYSFS_SRCS) + diff -r 2444b4128efd -r 259daddc2d6b playsound/playsound.c --- a/playsound/playsound.c Sat Mar 16 08:47:29 2002 +0000 +++ b/playsound/playsound.c Sat Mar 16 08:48:00 2002 +0000 @@ -33,7 +33,6 @@ #include "SDL.h" #include "SDL_sound.h" -#define SUPPORT_PHYSFS 0 #if SUPPORT_PHYSFS #include #include "physfs.h"