|
26 | 26 | // to redefine the same variables in different packages (for instance, |
27 | 27 | // in dtool and in panda). |
28 | 28 | // |
29 | | -// If you *do* decide to make changes directly to this file, you |
30 | | -// should also comment out the line near the bottom that includes the |
31 | | -// file $[TOPDIRPREFIX]Config.$[PLATFORM].pp, to avoid stomping on the |
32 | | -// changes you make. |
33 | | -// |
34 | 29 | // The syntax in this file resembles some hybrid between C++ |
35 | 30 | // preprocessor declarations and GNU make variables. This is the same |
36 | 31 | // syntax used in the various ppremake system configure files; it's |
|
85 | 80 | // define the variable to be a nonempty string. To indicate "no", |
86 | 81 | // define the variable to be an empty string. |
87 | 82 |
|
| 83 | +// Many of the HAVE_* variables are defined in terms of expressions |
| 84 | +// based on the paths and library names, etc., defined above. These |
| 85 | +// are defined using the "defer" command, so that they are not |
| 86 | +// evaluated right away, giving the user an opportunity to redefine |
| 87 | +// the variables they depend on, or to redefine the HAVE_* variables |
| 88 | +// themselves (you can explicitly define a HAVE_* variable to some |
| 89 | +// nonempty string to force the package to be marked as installed). |
| 90 | + |
88 | 91 | // Is Python installed, and should Python interfaces be generated? If |
89 | 92 | // Python is installed, which directory is it in? (If the directory |
90 | 93 | // is someplace standard like /usr/include, you may leave it blank.) |
91 | | -#define HAVE_PYTHON 1 |
92 | | -#define PYTHON_INCLUDE /usr/local/include/python1.6 |
93 | | -#define PYTHON_LIB |
| 94 | +#define PYTHON_IPATH /usr/local/include/python1.6 |
| 95 | +#define PYTHON_LPATH |
| 96 | +#defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]] |
94 | 97 |
|
95 | 98 | // Is NSPR installed, and where? |
96 | | -#define HAVE_NSPR 1 |
97 | | -#define NSPR_INCLUDE /usr/local/mozilla/dist/*/include |
98 | | -#define NSPR_LIB |
| 99 | +#define NSPR_IPATH /usr/local/mozilla/dist/*/include |
| 100 | +#define NSPR_LPATH |
| 101 | +#define NSPR_LIBS nspr3 |
| 102 | +#defer HAVE_NSPR $[libtest $[NSPR_LPATH],$[NSPR_LIBS]] |
99 | 103 |
|
100 | 104 | // Is VRPN installed, and where? |
101 | | -#define HAVE_VRPN |
102 | | -#define VRPN_INCLUDE |
103 | | -#define VRPN_LIB |
| 105 | +#define VRPN_IPATH |
| 106 | +#define VRPN_LPATH |
| 107 | +#defer HAVE_VRPN $[isdir $[VRPN_IPATH]] |
104 | 108 |
|
105 | 109 | // Is ZLIB installed, and where? |
106 | | -#define HAVE_ZLIB 1 |
107 | | -#define ZLIB_INCLUDE |
108 | | -#define ZLIB_LIB |
| 110 | +#define ZLIB_IPATH |
| 111 | +#define ZLIB_LPATH |
| 112 | +#define ZLIB_LIBS z |
| 113 | +#defer HAVE_ZLIB $[libtest $[ZLIB_LPATH],$[ZLIB_LIBS]] |
109 | 114 |
|
110 | 115 | // Is the sox libst library installed, and where? |
111 | | -#define HAVE_SOXST |
112 | | -#define SOXST_INCLUDE |
113 | | -#define SOXST_LIB |
114 | | - |
115 | | -// Is OpenGL installed, and where? |
116 | | -#define HAVE_GL 1 |
117 | | -#define GL_INCLUDE |
118 | | -#define GL_LIB |
119 | | -#define GLU_INCLUDE |
120 | | -#define GLU_LIB |
| 116 | +#define SOXST_IPATH |
| 117 | +#define SOXST_LPATH |
| 118 | +#define SOXST_LIBS st |
| 119 | +#defer HAVE_SOXST $[libtest $[SOXST_LPATH],$[SOXST_LIBS]] |
| 120 | + |
| 121 | +// Is OpenGL installed, and where? This should include libGL as well |
| 122 | +// as libGLU, if they are in different places. |
| 123 | +#define GL_IPATH |
| 124 | +#define GL_LPATH |
| 125 | +#if $[eq $[PLATFORM],Win32] |
| 126 | + #define GL_LIBS \ |
| 127 | + opengl32.lib glu32.lib winmm.lib kernel32.lib \ |
| 128 | + oldnames.lib mswsock.lib ws2_32.lib \ |
| 129 | + advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib |
| 130 | +#else |
| 131 | + #define GL_LIBS GL GLU |
| 132 | +#endif |
| 133 | +#defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]] |
121 | 134 |
|
122 | 135 | // How about GLX? |
123 | | -#define HAVE_GLX 1 |
124 | | -#define GLX_INCLUDE |
125 | | -#define GLX_LIB |
| 136 | +#define GLX_IPATH |
| 137 | +#define GLX_LPATH |
| 138 | +#if $[eq $[PLATFORM],Win32] |
| 139 | + #defer HAVE_GLX |
| 140 | +#else |
| 141 | + #defer HAVE_GLX $[HAVE_GL] |
| 142 | +#endif |
126 | 143 |
|
127 | 144 | // Glut? |
128 | | -#define HAVE_GLUT |
129 | | -#define GLUT_INCLUDE |
130 | | -#define GLUT_LIB |
| 145 | +#define GLUT_IPATH |
| 146 | +#define GLUT_LPATH |
| 147 | +#define GLUT_LIBS glut |
| 148 | +#defer HAVE_GLUT $[libtest $[GLUT_LPATH],$[GLUT_LIBS]] |
131 | 149 |
|
132 | 150 | // Should we try to build the WGL interface? |
133 | 151 | #define HAVE_WGL |
134 | 152 |
|
| 153 | +// Should we try to build the SGI-specific glxdisplay? |
| 154 | +#define HAVE_SGIGL |
| 155 | + |
135 | 156 | // Should we try to build the DirectX interface? |
136 | 157 | #define HAVE_DX |
137 | 158 |
|
138 | 159 | // Do you want to build the Renderman interface? |
139 | 160 | #define HAVE_RIB |
140 | 161 |
|
141 | | -// Is Mikmod installed? |
142 | | -#define HAVE_MIKMOD |
143 | | -#define MIKMOD_CFLAGS |
144 | | -#define MIKMOD_INCLUDE |
145 | | -#define MIKMOD_LIB |
| 162 | +// Is Mikmod installed? How should we run the libmikmod-config program? |
| 163 | +#define MIKMOD_CONFIG libmikmod-config |
| 164 | +#defer HAVE_MIKMOD $[bintest $[MIKMOD_CONFIG]] |
| 165 | + |
| 166 | +// Is Gtk-- installed? How should we run the gtkmm-config program? |
| 167 | +// This matters only to programs in PANDATOOL. |
| 168 | +#define GTKMM_CONFIG gtkmm-config |
| 169 | +#defer HAVE_GTKMM $[bintest $[GTKMM_CONFIG]] |
| 170 | + |
| 171 | +// Is Maya installed? This matters only to programs in PANDATOOL. |
| 172 | +#define MAYA_LOCATION /usr/aw/maya2.5 |
| 173 | +#defer HAVE_MAYA $[isdir $[MAYA_LOCATION]] |
| 174 | + |
| 175 | +// What additional libraries must we link with for network-dependent |
| 176 | +// code? |
| 177 | +#if $[eq $[PLATFORM],Win32] |
| 178 | + #define NET_LIBS ws2_32.lib |
| 179 | +#endif |
| 180 | + |
| 181 | +// What additional libraries must we link with for audio-dependent |
| 182 | +// code? |
| 183 | +#if $[eq $[PLATFORM],Win32] |
| 184 | + #define AUDIO_LIBS winmm.lib dsound.lib user32.lib ole32.lib dxguid.lib |
| 185 | +#endif |
146 | 186 |
|
147 | 187 |
|
148 | 188 | ////////////////////////////////////////////////////////////////////// |
|
152 | 192 | // these variables for correctness too. As above, these are |
153 | 193 | // unnecessary when BUILD_TYPE is "autoconf". |
154 | 194 | ////////////////////////////////////////////////////////////////////// |
155 | | -#include $[TOPDIRPREFIX]Config.$[PLATFORM].pp |
156 | | - |
157 | | - |
158 | | -// Also pull in whatever package-specific variables there may be. |
159 | | -#include $[TOPDIRPREFIX]Package.pp |
160 | | - |
161 | | - |
162 | | -// If the environment variable PPREMAKE_CONFIG is set, it points to a |
163 | | -// user-customized Config.pp file, for instance in the user's home |
164 | | -// directory. This file might redefine any of the variables defined |
165 | | -// above. |
166 | | -#if $[ne $[PPREMAKE_CONFIG],] |
167 | | - #include $[PPREMAKE_CONFIG] |
168 | | -#endif |
169 | | - |
170 | | - |
171 | | -// Finally, include the system configure file. |
172 | | -#include $[PPREMAKE_DIR]/System.pp |
|
0 commit comments