Skip to content

Commit aa85f44

Browse files
committed
*** empty log message ***
1 parent 83e0bd6 commit aa85f44

File tree

13 files changed

+208
-403
lines changed

13 files changed

+208
-403
lines changed

dtool/Config.Irix.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
#define HAVE_GETOPT 1
2929
#define HAVE_GETOPT_LONG_ONLY
3030

31+
// Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
32+
#define IOCTL_TERMINAL_WIDTH 1
33+
3134
// Should we include <iostream> or <iostream.h>? Define HAVE_IOSTREAM
3235
// to nonempty if we should use <iostream>, or empty if we should use
3336
// <iostream.h>.

dtool/Config.Linux.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
#define HAVE_GETOPT 1
2929
#define HAVE_GETOPT_LONG_ONLY 1
3030

31+
// Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
32+
#define IOCTL_TERMINAL_WIDTH 1
33+
3134
// Should we include <iostream> or <iostream.h>? Define HAVE_IOSTREAM
3235
// to nonempty if we should use <iostream>, or empty if we should use
3336
// <iostream.h>.

dtool/Config.Win32.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
#define HAVE_GETOPT
2929
#define HAVE_GETOPT_LONG_ONLY
3030

31+
// Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
32+
#define IOCTL_TERMINAL_WIDTH
33+
3134
// Should we include <iostream> or <iostream.h>? Define HAVE_IOSTREAM
3235
// to nonempty if we should use <iostream>, or empty if we should use
3336
// <iostream.h>.

dtool/Config.pp

Lines changed: 78 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
// to redefine the same variables in different packages (for instance,
2727
// in dtool and in panda).
2828
//
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-
//
3429
// The syntax in this file resembles some hybrid between C++
3530
// preprocessor declarations and GNU make variables. This is the same
3631
// syntax used in the various ppremake system configure files; it's
@@ -85,64 +80,109 @@
8580
// define the variable to be a nonempty string. To indicate "no",
8681
// define the variable to be an empty string.
8782

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+
8891
// Is Python installed, and should Python interfaces be generated? If
8992
// Python is installed, which directory is it in? (If the directory
9093
// 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]]
9497

9598
// 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]]
99103

100104
// 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]]
104108

105109
// 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]]
109114

110115
// 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]]
121134

122135
// 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
126143

127144
// 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]]
131149

132150
// Should we try to build the WGL interface?
133151
#define HAVE_WGL
134152

153+
// Should we try to build the SGI-specific glxdisplay?
154+
#define HAVE_SGIGL
155+
135156
// Should we try to build the DirectX interface?
136157
#define HAVE_DX
137158

138159
// Do you want to build the Renderman interface?
139160
#define HAVE_RIB
140161

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
146186

147187

148188
//////////////////////////////////////////////////////////////////////
@@ -152,21 +192,3 @@
152192
// these variables for correctness too. As above, these are
153193
// unnecessary when BUILD_TYPE is "autoconf".
154194
//////////////////////////////////////////////////////////////////////
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

dtool/LocalSetup.pp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@
9393
$[undef] HAVE_GL
9494
#endif
9595

96-
/* Define if we have GLU installed. */
97-
#if $[HAVE_GLU]
98-
$[define] HAVE_GLU 1
99-
#else
100-
$[undef] HAVE_GLU
101-
#endif
102-
10396
/* Define if we have GLX installed and want to build for GLX. */
10497
#if $[HAVE_GLX]
10598
$[define] HAVE_GLX 1
@@ -156,6 +149,13 @@
156149
$[undef] HAVE_GETOPT_LONG_ONLY
157150
#endif
158151

152+
/* Define if you have ioctl(TIOCGWINSZ) to determine terminal width. */
153+
#if $[IOCTL_TERMINAL_WIDTH]
154+
$[define] IOCTL_TERMINAL_WIDTH 1
155+
#else
156+
$[undef] IOCTL_TERMINAL_WIDTH
157+
#endif
158+
159159
/* Define if you have the <io.h> header file. */
160160
#if $[HAVE_IO_H]
161161
$[define] HAVE_IO_H 1

dtool/Package.pp

Lines changed: 78 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,83 @@
11
//
22
// Package.pp
33
//
4-
// This file defines a few more configuration variables that are
5-
// inconvenient to store in Config.pp, simply because they are more
6-
// specific to a particular package and not likely to be edited by a
7-
// configuring user.
4+
// This file defines certain configuration variables that are to be
5+
// written into the various make scripts. It is processed by ppremake
6+
// (along with the Sources.pp files in each of the various
7+
// directories) to generate build scripts appropriate to each
8+
// environment.
9+
//
10+
// This is the package-specific file, which should be at the top of
11+
// every source hierarchy. It generally gets the ball rolling, and is
12+
// responsible for explicitly including all of the relevent Config.pp
13+
// files.
14+
815

916
// What is the name and version of this source tree?
10-
#define PACKAGE dtool
11-
#define VERSION 0.80
17+
#if $[eq $[PACKAGE],]
18+
#define PACKAGE dtool
19+
#define VERSION 0.80
20+
#endif
21+
22+
23+
// Pull in the package-level Config file. This contains a lot of
24+
// configuration variables that the user might want to fine-tune.
25+
#include $[THISDIRPREFIX]Config.pp
26+
27+
// Also get the platform-specific config file. This defines a few
28+
// more variables that are more likely to be platform-dependent and
29+
// are less likely to be directly modified by the user.
30+
#include $[THISDIRPREFIX]Config.$[PLATFORM].pp
31+
32+
// If the environment variable PPREMAKE_CONFIG is set, it points to a
33+
// user-customized Config.pp file, for instance in the user's home
34+
// directory. This file might redefine any of the variables defined
35+
// above.
36+
#if $[ne $[PPREMAKE_CONFIG],]
37+
#include $[PPREMAKE_CONFIG]
38+
#endif
39+
40+
// Now evaluate all of our deferred variable definitions from
41+
// Config.pp.
42+
#set HAVE_PYTHON $[HAVE_PYTHON]
43+
#set HAVE_NSPR $[HAVE_NSPR]
44+
#set HAVE_VRPN $[HAVE_VRPN]
45+
#set HAVE_ZLIB $[HAVE_ZLIB]
46+
#set HAVE_SOXST $[HAVE_SOXST]
47+
#set HAVE_GL $[HAVE_GL]
48+
#set HAVE_GLX $[HAVE_GLX]
49+
#set HAVE_GLUT $[HAVE_GLUT]
50+
#set HAVE_WGL $[HAVE_WGL]
51+
#set HAVE_SGIGL $[HAVE_SGIGL]
52+
#set HAVE_DX $[HAVE_DX]
53+
#set HAVE_RIB $[HAVE_RIB]
54+
#set HAVE_MIKMOD $[HAVE_MIKMOD]
55+
#set HAVE_GTKMM $[HAVE_GTKMM]
56+
#set HAVE_MAYA $[HAVE_MAYA]
57+
58+
59+
// Now infer a few more variables based on what was defined.
60+
#if $[and $[HAVE_MIKMOD],$[MIKMOD_CONFIG]]
61+
#define cflags $[shell $[MIKMOD_CONFIG] --cflags]
62+
#define libs $[shell $[MIKMOD_CONFIG] --libs]
63+
64+
#define MIKMOD_CFLAGS $[filter-out -I%,$[cflags]]
65+
#define MIKMOD_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
66+
#define MIKMOD_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
67+
#define MIKMOD_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
68+
#endif
69+
70+
// Now infer a few more variables based on what was defined.
71+
#if $[and $[HAVE_GTKMM],$[GTKMM_CONFIG]]
72+
#define cflags $[shell $[GTKMM_CONFIG] --cflags]
73+
#define libs $[shell $[GTKMM_CONFIG] --libs]
74+
75+
#define GTKMM_CFLAGS $[filter-out -I%,$[cflags]]
76+
#define GTKMM_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
77+
#define GTKMM_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
78+
#define GTKMM_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
79+
#endif
80+
81+
82+
// Finally, include the system configure file.
83+
#include $[PPREMAKE_DIR]/System.pp

panda/Config.Irix.pp

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)