diff --git a/dtool/Config.pp b/dtool/Config.pp index 7364a22779..804c719c5e 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -1153,6 +1153,12 @@ #endif #defer HAVE_BULLET $[libtest $[BULLET_LPATH],$[BULLET_LIBS]] +// libvorbisfile is used for reading Ogg Vorbis audio files (.ogg). +#define VORBIS_IPATH +#define VORBIS_LPATH +#define VORBIS_LIBS $[if $[WINDOWS_PLATFORM],libogg_static.lib libvorbis_static.lib libvorbisfile_static.lib,ogg vorbis vorbisfile] +#defer HAVE_VORBIS $[libtest $[VORBIS_LPATH],$[VORBIS_LIBS]] + // Define this to explicitly indicate the given platform string within // the resulting Panda runtime. Normally it is best to leave this // undefined, in which case Panda will determine the best value diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 1564d044d4..686ae673ee 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -240,6 +240,11 @@ #else #print - Did not find Bullet Physics #endif +#if $[HAVE_VORBIS] +#print + libvorbis (Ogg Vorbis Decoder) +#else +#print - Did not find libvorbis (Ogg Vorbis Decoder) +#endif #print #if $[and $[HAVE_INTERROGATE],$[HAVE_PYTHON]] @@ -340,6 +345,9 @@ $[cdefine HAVE_FCOLLADA] /* Define if we have ARToolKit available. */ $[cdefine HAVE_ARTOOLKIT] +/* Define if we have libvorbisfile available. */ +$[cdefine HAVE_VORBIS] + /* Define if we have OpenSSL installed. */ $[cdefine HAVE_OPENSSL] $[cdefine REPORT_OPENSSL_ERRORS] @@ -377,9 +385,6 @@ $[cdefine HAVE_SQUISH] /* Define if we have Berkeley DB installed. */ $[cdefine HAVE_BDB] -/* Define if we have VRPN installed. */ -$[cdefine HAVE_VRPN] - /* Define if we have HELIX installed. */ $[cdefine HAVE_HELIX] diff --git a/dtool/Package.pp b/dtool/Package.pp index 9da3e85a29..460d176859 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -391,6 +391,11 @@ #set BULLET_LIBS $[BULLET_LIBS] #set HAVE_BULLET $[HAVE_BULLET] +#set VORBIS_IPATH $[unixfilename $[VORBIS_IPATH]] +#set VORBIS_LPATH $[unixfilename $[VORBIS_LPATH]] +#set VORBIS_LIBS $[VORBIS_LIBS] +#set HAVE_VORBIS $[HAVE_VORBIS] + // Now infer a few more variables based on what was defined. #if $[and $[HAVE_GTK],$[PKG_CONFIG]] #define cflags $[shell $[PKG_CONFIG] gtk+-2.0 --cflags] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 119b021eb3..667ef24ed4 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -510,6 +510,12 @@ #define bullet_libs $[BULLET_LIBS] #endif +#if $[HAVE_VORBIS] + #define vorbis_ipath $[wildcard $[VORBIS_IPATH]] + #define vorbis_lpath $[wildcard $[VORBIS_LPATH]] + #define vorbis_libs $[VORBIS_LIBS] +#endif + // We define these two variables true here in the global scope; a // particular Sources.pp file can redefine these to be false to // prevent a particular directory or target from being built in