Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
aa85f44e26

+ 3 - 0
dtool/Config.Irix.pp

@@ -28,6 +28,9 @@
 #define HAVE_GETOPT 1
 #define HAVE_GETOPT 1
 #define HAVE_GETOPT_LONG_ONLY
 #define HAVE_GETOPT_LONG_ONLY
 
 
+// Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
+#define IOCTL_TERMINAL_WIDTH 1
+
 // Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
 // Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
 // to nonempty if we should use <iostream>, or empty if we should use
 // to nonempty if we should use <iostream>, or empty if we should use
 // <iostream.h>.
 // <iostream.h>.

+ 3 - 0
dtool/Config.Linux.pp

@@ -28,6 +28,9 @@
 #define HAVE_GETOPT 1
 #define HAVE_GETOPT 1
 #define HAVE_GETOPT_LONG_ONLY 1
 #define HAVE_GETOPT_LONG_ONLY 1
 
 
+// Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
+#define IOCTL_TERMINAL_WIDTH 1
+
 // Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
 // Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
 // to nonempty if we should use <iostream>, or empty if we should use
 // to nonempty if we should use <iostream>, or empty if we should use
 // <iostream.h>.
 // <iostream.h>.

+ 3 - 0
dtool/Config.Win32.pp

@@ -28,6 +28,9 @@
 #define HAVE_GETOPT
 #define HAVE_GETOPT
 #define HAVE_GETOPT_LONG_ONLY
 #define HAVE_GETOPT_LONG_ONLY
 
 
+// Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
+#define IOCTL_TERMINAL_WIDTH
+
 // Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
 // Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
 // to nonempty if we should use <iostream>, or empty if we should use
 // to nonempty if we should use <iostream>, or empty if we should use
 // <iostream.h>.
 // <iostream.h>.

+ 78 - 56
dtool/Config.pp

@@ -26,11 +26,6 @@
 // to redefine the same variables in different packages (for instance,
 // to redefine the same variables in different packages (for instance,
 // in dtool and in panda).
 // in dtool and in panda).
 //
 //
-// If you *do* decide to make changes directly to this file, you
-// should also comment out the line near the bottom that includes the
-// file $[TOPDIRPREFIX]Config.$[PLATFORM].pp, to avoid stomping on the
-// changes you make.
-//
 // The syntax in this file resembles some hybrid between C++
 // The syntax in this file resembles some hybrid between C++
 // preprocessor declarations and GNU make variables.  This is the same
 // preprocessor declarations and GNU make variables.  This is the same
 // syntax used in the various ppremake system configure files; it's
 // syntax used in the various ppremake system configure files; it's
@@ -85,64 +80,109 @@
 // define the variable to be a nonempty string.  To indicate "no",
 // define the variable to be a nonempty string.  To indicate "no",
 // define the variable to be an empty string.
 // define the variable to be an empty string.
 
 
+// Many of the HAVE_* variables are defined in terms of expressions
+// based on the paths and library names, etc., defined above.  These
+// are defined using the "defer" command, so that they are not
+// evaluated right away, giving the user an opportunity to redefine
+// the variables they depend on, or to redefine the HAVE_* variables
+// themselves (you can explicitly define a HAVE_* variable to some
+// nonempty string to force the package to be marked as installed).
+
 // Is Python installed, and should Python interfaces be generated?  If
 // Is Python installed, and should Python interfaces be generated?  If
 // Python is installed, which directory is it in?  (If the directory
 // Python is installed, which directory is it in?  (If the directory
 // is someplace standard like /usr/include, you may leave it blank.)
 // is someplace standard like /usr/include, you may leave it blank.)
-#define HAVE_PYTHON 1
-#define PYTHON_INCLUDE /usr/local/include/python1.6
-#define PYTHON_LIB
+#define PYTHON_IPATH /usr/local/include/python1.6
+#define PYTHON_LPATH
+#defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]]
 
 
 // Is NSPR installed, and where?
 // Is NSPR installed, and where?
-#define HAVE_NSPR 1
-#define NSPR_INCLUDE /usr/local/mozilla/dist/*/include
-#define NSPR_LIB
+#define NSPR_IPATH /usr/local/mozilla/dist/*/include
+#define NSPR_LPATH
+#define NSPR_LIBS nspr3
+#defer HAVE_NSPR $[libtest $[NSPR_LPATH],$[NSPR_LIBS]]
 
 
 // Is VRPN installed, and where?
 // Is VRPN installed, and where?
-#define HAVE_VRPN
-#define VRPN_INCLUDE
-#define VRPN_LIB
+#define VRPN_IPATH
+#define VRPN_LPATH
+#defer HAVE_VRPN $[isdir $[VRPN_IPATH]]
 
 
 // Is ZLIB installed, and where?
 // Is ZLIB installed, and where?
-#define HAVE_ZLIB 1
-#define ZLIB_INCLUDE
-#define ZLIB_LIB
+#define ZLIB_IPATH
+#define ZLIB_LPATH
+#define ZLIB_LIBS z
+#defer HAVE_ZLIB $[libtest $[ZLIB_LPATH],$[ZLIB_LIBS]]
 
 
 // Is the sox libst library installed, and where?
 // Is the sox libst library installed, and where?
-#define HAVE_SOXST
-#define SOXST_INCLUDE
-#define SOXST_LIB
-
-// Is OpenGL installed, and where?
-#define HAVE_GL 1
-#define GL_INCLUDE
-#define GL_LIB
-#define GLU_INCLUDE
-#define GLU_LIB
+#define SOXST_IPATH
+#define SOXST_LPATH
+#define SOXST_LIBS st
+#defer HAVE_SOXST $[libtest $[SOXST_LPATH],$[SOXST_LIBS]]
+
+// Is OpenGL installed, and where?  This should include libGL as well
+// as libGLU, if they are in different places.
+#define GL_IPATH
+#define GL_LPATH
+#if $[eq $[PLATFORM],Win32]
+  #define GL_LIBS \
+     opengl32.lib glu32.lib winmm.lib kernel32.lib \
+     oldnames.lib mswsock.lib ws2_32.lib \
+     advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib
+#else
+  #define GL_LIBS GL GLU
+#endif
+#defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
 
 
 // How about GLX?
 // How about GLX?
-#define HAVE_GLX 1
-#define GLX_INCLUDE
-#define GLX_LIB
+#define GLX_IPATH
+#define GLX_LPATH
+#if $[eq $[PLATFORM],Win32]
+  #defer HAVE_GLX
+#else
+  #defer HAVE_GLX $[HAVE_GL]
+#endif
 
 
 // Glut?
 // Glut?
-#define HAVE_GLUT
-#define GLUT_INCLUDE
-#define GLUT_LIB
+#define GLUT_IPATH
+#define GLUT_LPATH
+#define GLUT_LIBS glut
+#defer HAVE_GLUT $[libtest $[GLUT_LPATH],$[GLUT_LIBS]]
 
 
 // Should we try to build the WGL interface?
 // Should we try to build the WGL interface?
 #define HAVE_WGL
 #define HAVE_WGL
 
 
+// Should we try to build the SGI-specific glxdisplay?
+#define HAVE_SGIGL
+
 // Should we try to build the DirectX interface?
 // Should we try to build the DirectX interface?
 #define HAVE_DX
 #define HAVE_DX
 
 
 // Do you want to build the Renderman interface?
 // Do you want to build the Renderman interface?
 #define HAVE_RIB
 #define HAVE_RIB
 
 
-// Is Mikmod installed?
-#define HAVE_MIKMOD
-#define MIKMOD_CFLAGS
-#define MIKMOD_INCLUDE
-#define MIKMOD_LIB
+// Is Mikmod installed?  How should we run the libmikmod-config program?
+#define MIKMOD_CONFIG libmikmod-config
+#defer HAVE_MIKMOD $[bintest $[MIKMOD_CONFIG]]
+
+// Is Gtk-- installed?  How should we run the gtkmm-config program?
+// This matters only to programs in PANDATOOL.
+#define GTKMM_CONFIG gtkmm-config
+#defer HAVE_GTKMM $[bintest $[GTKMM_CONFIG]]
+
+// Is Maya installed?  This matters only to programs in PANDATOOL.
+#define MAYA_LOCATION /usr/aw/maya2.5
+#defer HAVE_MAYA $[isdir $[MAYA_LOCATION]]
+
+// What additional libraries must we link with for network-dependent
+// code?
+#if $[eq $[PLATFORM],Win32]
+  #define NET_LIBS ws2_32.lib
+#endif
+
+// What additional libraries must we link with for audio-dependent
+// code?
+#if $[eq $[PLATFORM],Win32]
+  #define AUDIO_LIBS winmm.lib dsound.lib user32.lib ole32.lib dxguid.lib
+#endif
 
 
 
 
 //////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////
@@ -152,21 +192,3 @@
 // these variables for correctness too.  As above, these are
 // these variables for correctness too.  As above, these are
 // unnecessary when BUILD_TYPE is "autoconf".
 // unnecessary when BUILD_TYPE is "autoconf".
 //////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////
-#include $[TOPDIRPREFIX]Config.$[PLATFORM].pp
-
-
-// Also pull in whatever package-specific variables there may be.
-#include $[TOPDIRPREFIX]Package.pp
-
-
-// If the environment variable PPREMAKE_CONFIG is set, it points to a
-// user-customized Config.pp file, for instance in the user's home
-// directory.  This file might redefine any of the variables defined
-// above.
-#if $[ne $[PPREMAKE_CONFIG],]
-  #include $[PPREMAKE_CONFIG]
-#endif
-
-
-// Finally, include the system configure file.
-#include $[PPREMAKE_DIR]/System.pp

+ 7 - 7
dtool/LocalSetup.pp

@@ -93,13 +93,6 @@ $[define] HAVE_GL 1
 $[undef] HAVE_GL
 $[undef] HAVE_GL
 #endif
 #endif
 
 
-/* Define if we have GLU installed.  */
-#if $[HAVE_GLU]
-$[define] HAVE_GLU 1
-#else
-$[undef] HAVE_GLU
-#endif
-
 /* Define if we have GLX installed and want to build for GLX.  */
 /* Define if we have GLX installed and want to build for GLX.  */
 #if $[HAVE_GLX]
 #if $[HAVE_GLX]
 $[define] HAVE_GLX 1
 $[define] HAVE_GLX 1
@@ -156,6 +149,13 @@ $[define] HAVE_GETOPT_LONG_ONLY 1
 $[undef] HAVE_GETOPT_LONG_ONLY
 $[undef] HAVE_GETOPT_LONG_ONLY
 #endif
 #endif
 
 
+/* Define if you have ioctl(TIOCGWINSZ) to determine terminal width. */
+#if $[IOCTL_TERMINAL_WIDTH]
+$[define] IOCTL_TERMINAL_WIDTH 1
+#else
+$[undef] IOCTL_TERMINAL_WIDTH
+#endif
+
 /* Define if you have the <io.h> header file.  */
 /* Define if you have the <io.h> header file.  */
 #if $[HAVE_IO_H]
 #if $[HAVE_IO_H]
 $[define] HAVE_IO_H 1
 $[define] HAVE_IO_H 1

+ 78 - 6
dtool/Package.pp

@@ -1,11 +1,83 @@
 //
 //
 // Package.pp
 // Package.pp
 //
 //
-// This file defines a few more configuration variables that are
-// inconvenient to store in Config.pp, simply because they are more
-// specific to a particular package and not likely to be edited by a
-// configuring user.
+// This file defines certain configuration variables that are to be
+// written into the various make scripts.  It is processed by ppremake
+// (along with the Sources.pp files in each of the various
+// directories) to generate build scripts appropriate to each
+// environment.
+//
+// This is the package-specific file, which should be at the top of
+// every source hierarchy.  It generally gets the ball rolling, and is
+// responsible for explicitly including all of the relevent Config.pp
+// files.
+
 
 
 // What is the name and version of this source tree?
 // What is the name and version of this source tree?
-#define PACKAGE dtool
-#define VERSION 0.80
+#if $[eq $[PACKAGE],]
+  #define PACKAGE dtool
+  #define VERSION 0.80
+#endif
+
+
+// Pull in the package-level Config file.  This contains a lot of
+// configuration variables that the user might want to fine-tune.
+#include $[THISDIRPREFIX]Config.pp
+
+// Also get the platform-specific config file.  This defines a few
+// more variables that are more likely to be platform-dependent and
+// are less likely to be directly modified by the user.
+#include $[THISDIRPREFIX]Config.$[PLATFORM].pp
+
+// If the environment variable PPREMAKE_CONFIG is set, it points to a
+// user-customized Config.pp file, for instance in the user's home
+// directory.  This file might redefine any of the variables defined
+// above.
+#if $[ne $[PPREMAKE_CONFIG],]
+  #include $[PPREMAKE_CONFIG]
+#endif
+
+// Now evaluate all of our deferred variable definitions from
+// Config.pp.
+#set HAVE_PYTHON $[HAVE_PYTHON]
+#set HAVE_NSPR $[HAVE_NSPR]
+#set HAVE_VRPN $[HAVE_VRPN]
+#set HAVE_ZLIB $[HAVE_ZLIB]
+#set HAVE_SOXST $[HAVE_SOXST]
+#set HAVE_GL $[HAVE_GL]
+#set HAVE_GLX $[HAVE_GLX]
+#set HAVE_GLUT $[HAVE_GLUT]
+#set HAVE_WGL $[HAVE_WGL]
+#set HAVE_SGIGL $[HAVE_SGIGL]
+#set HAVE_DX $[HAVE_DX]
+#set HAVE_RIB $[HAVE_RIB]
+#set HAVE_MIKMOD $[HAVE_MIKMOD]
+#set HAVE_GTKMM $[HAVE_GTKMM]
+#set HAVE_MAYA $[HAVE_MAYA]
+
+
+// Now infer a few more variables based on what was defined.
+#if $[and $[HAVE_MIKMOD],$[MIKMOD_CONFIG]]
+  #define cflags $[shell $[MIKMOD_CONFIG] --cflags]
+  #define libs $[shell $[MIKMOD_CONFIG] --libs]
+
+  #define MIKMOD_CFLAGS $[filter-out -I%,$[cflags]]
+  #define MIKMOD_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
+  #define MIKMOD_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
+  #define MIKMOD_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
+#endif
+
+// Now infer a few more variables based on what was defined.
+#if $[and $[HAVE_GTKMM],$[GTKMM_CONFIG]]
+  #define cflags $[shell $[GTKMM_CONFIG] --cflags]
+  #define libs $[shell $[GTKMM_CONFIG] --libs]
+
+  #define GTKMM_CFLAGS $[filter-out -I%,$[cflags]]
+  #define GTKMM_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
+  #define GTKMM_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
+  #define GTKMM_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
+#endif
+
+
+// Finally, include the system configure file.
+#include $[PPREMAKE_DIR]/System.pp

+ 0 - 55
panda/Config.Irix.pp

@@ -1,55 +0,0 @@
-//
-// Config.Irix.pp
-//
-// This file defines some custom config variables for the SGI/Irix
-// platform.  It makes some initial guesses about compiler features,
-// etc.
-//
-
-// Is the platform big-endian (like an SGI workstation) or
-// little-endian (like a PC)?  Define this to the empty string to
-// indicate little-endian, or nonempty to indicate big-endian.
-#define WORDS_BIGENDIAN 1
-
-// Does the C++ compiler support namespaces?
-#define HAVE_NAMESPACE 1
-
-// Does the C++ compiler support ios::binary?
-#define HAVE_IOS_BINARY
-
-// Do we have a gettimeofday() function?
-#define HAVE_GETTIMEOFDAY 1
-
-// Does gettimeofday() take only one parameter?
-#define GETTIMEOFDAY_ONE_PARAM
-
-// Do we have getopt() and/or getopt_long_only() built into the
-// system?
-#define HAVE_GETOPT 1
-#define HAVE_GETOPT_LONG_ONLY
-
-// Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
-// to nonempty if we should use <iostream>, or empty if we should use
-// <iostream.h>.
-#define HAVE_IOSTREAM
-
-// Do we have a true stringstream class defined in <sstream>?
-#define HAVE_SSTREAM
-
-// Do we have <io.h>?
-#define HAVE_IO_H
-
-// Do we have <malloc.h>?
-#define HAVE_MALLOC_H 1
-
-// Do we have <alloca.h>?
-#define HAVE_ALLOCA_H 1
-
-// Do we have <minmax.h>?
-#define HAVE_MINMAX_H
-
-// Do we have <sys/types.h>?
-#define HAVE_SYS_TYPES_H 1
-
-// Do we have <unistd.h>?
-#define HAVE_UNISTD_H 1

+ 0 - 55
panda/Config.Linux.pp

@@ -1,55 +0,0 @@
-//
-// Config.Linux.pp
-//
-// This file defines some custom config variables for the Linux
-// platform.  It makes some initial guesses about compiler features,
-// etc.
-//
-
-// Is the platform big-endian (like an SGI workstation) or
-// little-endian (like a PC)?  Define this to the empty string to
-// indicate little-endian, or nonempty to indicate big-endian.
-#define WORDS_BIGENDIAN
-
-// Does the C++ compiler support namespaces?
-#define HAVE_NAMESPACE 1
-
-// Does the C++ compiler support ios::binary?
-#define HAVE_IOS_BINARY 1
-
-// Do we have a gettimeofday() function?
-#define HAVE_GETTIMEOFDAY 1
-
-// Does gettimeofday() take only one parameter?
-#define GETTIMEOFDAY_ONE_PARAM
-
-// Do we have getopt() and/or getopt_long_only() built into the
-// system?
-#define HAVE_GETOPT 1
-#define HAVE_GETOPT_LONG_ONLY 1
-
-// Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
-// to nonempty if we should use <iostream>, or empty if we should use
-// <iostream.h>.
-#define HAVE_IOSTREAM
-
-// Do we have a true stringstream class defined in <sstream>?
-#define HAVE_SSTREAM
-
-// Do we have <io.h>?
-#define HAVE_IO_H
-
-// Do we have <malloc.h>?
-#define HAVE_MALLOC_H 1
-
-// Do we have <alloca.h>?
-#define HAVE_ALLOCA_H 1
-
-// Do we have <minmax.h>?
-#define HAVE_MINMAX_H
-
-// Do we have <sys/types.h>?
-#define HAVE_SYS_TYPES_H 1
-
-// Do we have <unistd.h>?
-#define HAVE_UNISTD_H 1

+ 0 - 55
panda/Config.Win32.pp

@@ -1,55 +0,0 @@
-//
-// Config.Win32.pp
-//
-// This file defines some custom config variables for the Windows
-// platform.  It makes some initial guesses about compiler features,
-// etc.
-//
-
-// Is the platform big-endian (like an SGI workstation) or
-// little-endian (like a PC)?  Define this to the empty string to
-// indicate little-endian, or nonempty to indicate big-endian.
-#define WORDS_BIGENDIAN
-
-// Does the C++ compiler support namespaces?
-#define HAVE_NAMESPACE 1
-
-// Does the C++ compiler support ios::binary?
-#define HAVE_IOS_BINARY 1
-
-// Do we have a gettimeofday() function?
-#define HAVE_GETTIMEOFDAY
-
-// Does gettimeofday() take only one parameter?
-#define GETTIMEOFDAY_ONE_PARAM
-
-// Do we have getopt() and/or getopt_long_only() built into the
-// system?
-#define HAVE_GETOPT
-#define HAVE_GETOPT_LONG_ONLY
-
-// Should we include <iostream> or <iostream.h>?  Define HAVE_IOSTREAM
-// to nonempty if we should use <iostream>, or empty if we should use
-// <iostream.h>.
-#define HAVE_IOSTREAM 1
-
-// Do we have a true stringstream class defined in <sstream>?
-#define HAVE_SSTREAM 1
-
-// Do we have <io.h>?
-#define HAVE_IO_H 1
-
-// Do we have <malloc.h>?
-#define HAVE_MALLOC_H 1
-
-// Do we have <alloca.h>?
-#define HAVE_ALLOCA_H
-
-// Do we have <minmax.h>?
-#define HAVE_MINMAX_H 1
-
-// Do we have <sys/types.h>?
-#define HAVE_SYS_TYPES_H 1
-
-// Do we have <unistd.h>?
-#define HAVE_UNISTD_H

+ 6 - 160
panda/Config.pp

@@ -6,167 +6,13 @@
 // with the Sources.pp files in each of the various directories) to
 // with the Sources.pp files in each of the various directories) to
 // generate build scripts appropriate to each environment.
 // generate build scripts appropriate to each environment.
 //
 //
-// ppremake is capable of generating generic Unix autoconf/automake
-// style build scripts, as well as makefiles customized for SGI's
-// MipsPRO compiler or for Microsoft's Visual C++.  It can also
-// generate Microsoft Developer's Studio project files directly.  In
-// principle, it can be extended to generate suitable build script
-// files for any number of different build environments.
-//
-// All of these build scripts can be tuned for a particular
-// environment via this file.  This is the place for the user to
-// specify which external packages are installed and where, or to
-// enable or disable certain optional features.  However, it is
-// suggested that rather than modify this file directly, you create a
-// custom file in your home directory and there redefine whatever
-// variables are appropriate, and set the environment variable
-// PPREMAKE_CONFIG to refer to it.  In this way, you can easily get an
-// updated source tree (including a new Config.pp) without risking
-// accidentally losing your customizations.  This also avoids having
-// to redefine the same variables in different packages (for instance,
-// in dtool and in panda).
-//
-// If you *do* decide to make changes directly to this file, you
-// should also comment out the line near the bottom that includes the
-// file $[TOPDIRPREFIX]Config.$[PLATFORM].pp, to avoid stomping on the
-// changes you make.
-//
-// The syntax in this file resembles some hybrid between C++
-// preprocessor declarations and GNU make variables.  This is the same
-// syntax used in the various ppremake system configure files; it's
-// designed to be easy to use as a macro language to generate
-// makefiles and their ilk.
-// 
-
-// What kind of build scripts are we generating?  This selects a
-// suitable template file from the ppremake system files.  The
-// allowable choices, at present, are:
-//
-//  autoconf  - Generate configure.in and a series of Makefile.am files,
-//              suitable for using with autoconf/automake.  Not quite
-//              there yet.
-//  stopgap   - Generate original Cary-style Makefile/Makefile.install/etc.
-//              files, to ease transition to the new system.
-//
-#define BUILD_TYPE stopgap
-
-// Define the directory in which the system ppremake files are
-// installed.
-#define PPREMAKE_DIR /usr/local/panda/share
-
-
-// In which directory should this package be installed when you type
-// "make install"?  This has no meaning when BUILD_TYPE is "stopgap".
-#define INSTALL_DIR /usr/local/panda
-
-
-// What level of compiler optimization/debug symbols should we build?
-// The various optimize levels are defined as follows:
-//
-//   1 - No compiler optimizations, full debug symbols
-//   2 - Full compiler optimizations, full debug symbols
-//         (if the compiler supports this)
-//   3 - Full compiler optimizations, no debug symbols
-//   4 - Full optimizations, no debug symbols, and asserts removed
-//
-// Setting this has no effect when BUILD_TYPE is "stopgap".  In this
-// case, the compiler optimizations are selected by setting the
-// environment variable OPTIMIZE accordingly at compile time.
-#define OPTIMIZE 1
-
-
-
-////////////////////////////////////////////////////////////////////
-// The remaining variables are considered only if BUILD_TYPE is not
-// "autoconf".  (Autoconf can determine these directly.)
-////////////////////////////////////////////////////////////////////
-
-// NOTE: In the following, to indicate "yes" to a yes/no question,
-// define the variable to be a nonempty string.  To indicate "no",
-// define the variable to be an empty string.
+// There are not too many variables to declare at this level; most of
+// them are defined in the DTOOL-specific Config.pp.
 
 
-// Is Python installed, and should Python interfaces be generated?  If
-// Python is installed, which directory is it in?  (If the directory
-// is someplace standard like /usr/include, you may leave it blank.)
-#define HAVE_PYTHON 1
-#define PYTHON_INCLUDE /usr/local/include/python1.6
-#define PYTHON_LIB
 
 
-// Is NSPR installed, and where?
-#define HAVE_NSPR 1
-#define NSPR_INCLUDE /usr/local/mozilla/dist/*/include
-#define NSPR_LIB
-
-// Is VRPN installed, and where?
-#define HAVE_VRPN
-#define VRPN_INCLUDE
-#define VRPN_LIB
-
-// Is ZLIB installed, and where?
-#define HAVE_ZLIB 1
-#define ZLIB_INCLUDE
-#define ZLIB_LIB
-
-// Is the sox libst library installed, and where?
-#define HAVE_SOXST
-#define SOXST_INCLUDE
-#define SOXST_LIB
-
-// Is OpenGL installed, and where?
-#define HAVE_GL 1
-#define GL_INCLUDE
-#define GL_LIB
-#define GLU_INCLUDE
-#define GLU_LIB
-
-// How about GLX?
-#define HAVE_GLX 1
-#define GLX_INCLUDE
-#define GLX_LIB
-
-// Glut?
-#define HAVE_GLUT
-#define GLUT_INCLUDE
-#define GLUT_LIB
-
-// Should we try to build the WGL interface?
-#define HAVE_WGL
-
-// Should we try to build the DirectX interface?
-#define HAVE_DX
-
-// Do you want to build the Renderman interface?
-#define HAVE_RIB
-
-// Is Mikmod installed?
-#define HAVE_MIKMOD
-#define MIKMOD_CFLAGS
-#define MIKMOD_INCLUDE
-#define MIKMOD_LIB
-
-
-//////////////////////////////////////////////////////////////////////
-// There are also some additional variables that control specific
-// compiler/platform features or characteristics, defined in the
-// platform specific file Config.platform.pp.  Be sure to inspect
-// these variables for correctness too.  As above, these are
-// unnecessary when BUILD_TYPE is "autoconf".
-//////////////////////////////////////////////////////////////////////
-#include $[TOPDIRPREFIX]Config.$[PLATFORM].pp
-
-
-// Also pull in whatever package-specific variables there may be.
-#include $[TOPDIRPREFIX]Package.pp
-
-
-// If the environment variable PPREMAKE_CONFIG is set, it points to a
-// user-customized Config.pp file, for instance in the user's home
-// directory.  This file might redefine any of the variables defined
-// above.
-#if $[ne $[PPREMAKE_CONFIG],]
-  #include $[PPREMAKE_CONFIG]
+// Where should we find DTOOL?  This will come from the environment
+// variable if it is set.
+#if $[eq $[DTOOL],]
+  #define DTOOL /usr/local/panda
 #endif
 #endif
 
 
-
-// Finally, include the system configure file.
-#include $[PPREMAKE_DIR]/System.pp

+ 29 - 6
panda/Package.pp

@@ -1,11 +1,34 @@
 //
 //
 // Package.pp
 // Package.pp
 //
 //
-// This file defines a few more configuration variables that are
-// inconvenient to store in Config.pp, simply because they are more
-// specific to a particular package and not likely to be edited by a
-// configuring user.
+// This file defines certain configuration variables that are to be
+// written into the various make scripts.  It is processed by ppremake
+// (along with the Sources.pp files in each of the various
+// directories) to generate build scripts appropriate to each
+// environment.
+//
+// This is the package-specific file, which should be at the top of
+// every source hierarchy.  It generally gets the ball rolling, and is
+// responsible for explicitly including all of the relevent Config.pp
+// files.
+
+
 
 
 // What is the name and version of this source tree?
 // What is the name and version of this source tree?
-#define PACKAGE panda
-#define VERSION 0.80
+#if $[eq $[PACKAGE],]
+  #define PACKAGE panda
+  #define VERSION 0.80
+#endif
+
+
+// Pull in the package-level Config file.  This contains a few
+// configuration variables that the user might want to fine-tune.
+#include $[THISDIRPREFIX]Config.pp
+
+
+// Also get the DTOOL Package file and everything that includes.
+#if $[eq $[wildcard $[DTOOL]],]
+  #error Directory defined by $DTOOL not found!  Are you attached properly?
+#endif
+
+#include $[DTOOL]/Package.pp

+ 1 - 1
panda/metalibs/panda/Sources.pp

@@ -15,7 +15,7 @@
     gsgmisc light linmath mathutil net pnm \
     gsgmisc light linmath mathutil net pnm \
     pnmimagetypes pnmimage sgattrib sgmanip sgraph sgraphutil \
     pnmimagetypes pnmimage sgattrib sgmanip sgraph sgraphutil \
     switchnode text tform tiff lerp loader putil effects \
     switchnode text tform tiff lerp loader putil effects \
-     audio audio_load_midi audio_load_st audio_load_wav pandabase 
+    audio pandabase 
 
 
 #define LOCAL_LIBS downloader event ipc express pandabase
 #define LOCAL_LIBS downloader event ipc express pandabase
 #define OTHER_LIBS dtool
 #define OTHER_LIBS dtool

+ 0 - 2
panda/src/configfiles/Sources.pp

@@ -1,4 +1,2 @@
-#define OTHER_LIBS interrogatedb:c dconfig:c dtoolutil:c dtoolbase:c dtool:m
-
 #define INSTALL_DATA \
 #define INSTALL_DATA \
   panda.emacs panda.emacs.Xdefaults panda.init Configrc
   panda.emacs panda.emacs.Xdefaults panda.init Configrc