added PYTHON_FRAMEWORK

This commit is contained in:
Dave Schuyler 2004-04-02 02:41:14 +00:00
parent 26ece6b730
commit 9693d442cd
3 changed files with 14 additions and 3 deletions

View File

@ -15,6 +15,8 @@
/* Define if we have Python installed. */ /* Define if we have Python installed. */
$[cdefine HAVE_PYTHON] $[cdefine HAVE_PYTHON]
/* Define if we have Python as a framework (Mac OS X). */
$[cdefine PYTHON_FRAMEWORK]
/* Define if we have RAD game tools, Miles Sound System installed. */ /* Define if we have RAD game tools, Miles Sound System installed. */
$[cdefine HAVE_RAD_MSS] $[cdefine HAVE_RAD_MSS]

View File

@ -9,7 +9,12 @@
#include "dtoolbase.h" #include "dtoolbase.h"
#undef HAVE_LONG_LONG #undef HAVE_LONG_LONG
#include "Python.h"
#ifdef PYTHON_FRAMEWORK
#include "Python/Python.h"
#else
#include "Python.h"
#endif
extern "C" { extern "C" {

View File

@ -41,8 +41,12 @@ InterfaceMakerPython(InterrogateModuleDef *def) :
void InterfaceMakerPython:: void InterfaceMakerPython::
write_includes(ostream &out) { write_includes(ostream &out) {
InterfaceMaker::write_includes(out); InterfaceMaker::write_includes(out);
out << "#undef HAVE_LONG_LONG\n" out << "#undef HAVE_LONG_LONG\n\n"
<< "#include <Python.h>\n\n"; << "#if PYTHON_FRAMEWORK\n"
<< " #include \"Python/Python.h\"\n"
<< "#else\n"
<< " #include \"Python.h\"\n"
<< "#endif\n\n";
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////