From 3c2e1c7b91c4587f2b6b4e7b0b97579f579f34d8 Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Thu, 5 Jul 2001 03:47:45 +0000 Subject: [PATCH] disable building mpg123 conditionally --- dtool/Config.pp | 3 +++ dtool/pptempl/Global.pp | 5 +++++ panda/src/mpg123/Sources.pp | 2 ++ 3 files changed, 10 insertions(+) diff --git a/dtool/Config.pp b/dtool/Config.pp index 8f24bd39c7..351dc81230 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -322,6 +322,9 @@ #define RAD_MSS_LIBS Mss32 #defer HAVE_RAD_MSS $[libtest $[RAD_MSS_LPATH],$[RAD_MSS_LIBS]] +// Is Panda using the mpg123 library to play mp3, requiring it be built? +#define USE_MPG123 1 + // Is Gtk-- installed? How should we run the gtkmm-config program? // This matters only to programs in PANDATOOL. #define GTKMM_CONFIG gtkmm-config diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 5aae3a4180..8c088088fd 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -208,6 +208,9 @@ #define AUDIO_IPATH $[RAD_MSS_IPATH] #define AUDIO_LPATH $[RAD_MSS_LPATH] #define AUDIO_LIBS $[RAD_MSS_LIBS] + + // Miles will play mp3, so we dont need the mpg123 lib + #define USE_MPG123 #endif #if $[HAVE_AUDIO] @@ -243,6 +246,7 @@ $[or $[not $[DIRECTORY_IF_IPC]],$[HAVE_IPC]], \ $[or $[not $[DIRECTORY_IF_NET]],$[HAVE_NET]], \ $[or $[not $[DIRECTORY_IF_AUDIO]],$[HAVE_AUDIO]], \ + $[or $[not $[DIRECTORY_IF_MPG123]],$[USE_MPG123]], \ $[or $[not $[DIRECTORY_IF_INTERROGATE]],$[HAVE_INTERROGATE]], \ 1 ] @@ -273,6 +277,7 @@ $[or $[not $[TARGET_IF_IPC]],$[HAVE_IPC]], \ $[or $[not $[TARGET_IF_NET]],$[HAVE_NET]], \ $[or $[not $[TARGET_IF_AUDIO]],$[HAVE_AUDIO]], \ + $[or $[not $[TARGET_IF_MPG123]],$[USE_MPG123]], \ 1 ] // This takes advantage of the above two variables to get the actual diff --git a/panda/src/mpg123/Sources.pp b/panda/src/mpg123/Sources.pp index fbea81b8da..031c2b1531 100644 --- a/panda/src/mpg123/Sources.pp +++ b/panda/src/mpg123/Sources.pp @@ -1,3 +1,5 @@ +#define DIRECTORY_IF_MPG123 yes + #begin static_lib_target #define TARGET mpg123 #define SOURCES \