diff --git a/sc2/build/config_proginfo b/sc2/build/config_proginfo index c85e81b74..915ea6f55 100644 --- a/sc2/build/config_proginfo +++ b/sc2/build/config_proginfo @@ -39,18 +39,41 @@ PROG_tr_VERSION='' # Describe the libaries (possibly) used: LIB_SDL_NAME="Simple DirectMedia Layer" -LIB_SDL_CFLAGS='$(sdl-config --cflags)' -LIB_SDL_LDFLAGS='$(sdl-config --libs)' -LIB_SDL_VERSION='$(sdl-config --version)' + +if [ `uname` = 'FreeBSD' ]; then + LIB_SDL_CFLAGS='$(sdl11-config --cflags)'; +else + LIB_SDL_CFLAGS='$(sdl-config --cflags)'; +fi +if [ `uname` = 'FreeBSD' ]; then + LIB_SDL_LDFLAGS='$(sdl11-config --libs)'; +else + LIB_SDL_LDFLAGS='$(sdl-config --libs)'; +fi +if [ `uname` = 'FreeBSD' ]; then + LIB_SDL_VERSION='$(sdl11-config --version)'; +else + LIB_SDL_VERSION='$(sdl-config --version)'; +fi LIB_SDL_mixer_NAME="SDL_mixer" -LIB_SDL_mixer_CFLAGS="" -LIB_SDL_mixer_LDFLAGS="-lSDL_mixer" +if [ `uname` = 'FreeBSD' ]; then + LIB_SDL_mixer_CFLAGS="$LIB_SDL_CFLAGS" + LIB_SDL_mixer_LDFLAGS="$LIB_SDL_LDFLAGS -lSDL_mixer" +else + LIB_SDL_mixer_CFLAGS="" + LIB_SDL_mixer_LDFLAGS="-lSDL_mixer" +fi LIB_SDL_mixer_VERSION="" LIB_SDL_image_NAME="SDL_image" -LIB_SDL_image_CFLAGS="" -LIB_SDL_image_LDFLAGS="-lSDL_image" +if [ `uname` = 'FreeBSD' ]; then + LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS" + LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS -lSDL_image" +else + LIB_SDL_image_CFLAGS="" + LIB_SDL_image_LDFLAGS="-lSDL_image" +fi LIB_SDL_image_VERSION="" LIB_openal_NAME="OpenAL" @@ -58,9 +81,15 @@ LIB_openal_CFLAGS="" LIB_openal_LDFLAGS="-lopenal" LIB_openal_VERSION="" + LIB_opengl_NAME="OpenGL" -LIB_opengl_CFLAGS="" -LIB_opengl_LDFLAGS="-lGL" +if [ `uname` = 'FreeBSD' ]; then + LIB_opengl_CFLAGS="-I/usr/X11R6/include -D_THREAD_SAFE" + LIB_opengl_LDFLAGS="-L/usr/X11R6/lib -lX11 -lXaw -pthreads -lGL" +else + LIB_opengl_CFLAGS="" + LIB_opengl_LDFLAGS="-lGL" +fi LIB_opengl_VERSION="" LIB_vorbis_NAME="Vorbis" @@ -69,7 +98,12 @@ LIB_vorbis_LDFLAGS="-lvorbis" LIB_vorbis_VERSION="" LIB_vorbisfile_NAME="Vorbisfile" -LIB_vorbisfile_CFLAGS="" -LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis" +if [ `uname` = 'FreeBSD' ]; then + LIB_vorbisfile_CFLAGS="-I/usr/local/include" + LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis" +else + LIB_vorbisfile_CFLAGS="" + LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis" +fi LIB_vorbisfile_VERSION="" diff --git a/sc2/src/sc2code/libs/sound/sdl/modfuncs.c b/sc2/src/sc2code/libs/sound/sdl/modfuncs.c index 3776b4dfd..c9d98e7df 100644 --- a/sc2/src/sc2code/libs/sound/sdl/modfuncs.c +++ b/sc2/src/sc2code/libs/sound/sdl/modfuncs.c @@ -28,6 +28,8 @@ #ifdef WIN32 #include #include +#elif defined __FreeBSD__ +#include #else #include #endif diff --git a/sc2/src/sc2code/libs/sound/sdl/play.c b/sc2/src/sc2code/libs/sound/sdl/play.c index b3bedee91..b03941fa2 100644 --- a/sc2/src/sc2code/libs/sound/sdl/play.c +++ b/sc2/src/sc2code/libs/sound/sdl/play.c @@ -24,6 +24,8 @@ #ifdef WIN32 #include +#elif defined __FreeBSD__ +#include #else #include #endif diff --git a/sc2/src/sc2code/libs/sound/sdl/sound.c b/sc2/src/sc2code/libs/sound/sdl/sound.c index 855877bdf..1805c6a48 100644 --- a/sc2/src/sc2code/libs/sound/sdl/sound.c +++ b/sc2/src/sc2code/libs/sound/sdl/sound.c @@ -24,6 +24,8 @@ #ifdef WIN32 #include #pragma comment (lib, "SDL_mixer.lib") +#elif defined __FreeBSD__ +#include #else #include #endif diff --git a/sc2/src/sc2code/libs/sound/sdl/trackplayer.c b/sc2/src/sc2code/libs/sound/sdl/trackplayer.c index 8ef672f64..a30a50e8c 100644 --- a/sc2/src/sc2code/libs/sound/sdl/trackplayer.c +++ b/sc2/src/sc2code/libs/sound/sdl/trackplayer.c @@ -24,6 +24,8 @@ #ifdef WIN32 #include +#elif defined __FreeBSD__ +#include #else #include #endif