Forráskód Böngészése

add support for Berkeley DB

David Rose 19 éve
szülő
commit
fa2e6e4992
4 módosított fájl, 26 hozzáadás és 12 törlés
  1. 9 5
      dtool/Config.pp
  2. 7 2
      dtool/LocalSetup.pp
  3. 5 0
      dtool/Package.pp
  4. 5 5
      dtool/pptempl/Global.pp

+ 9 - 5
dtool/Config.pp

@@ -438,11 +438,15 @@
 #defer HAVE_FFTW $[libtest $[FFTW_LPATH],$[FFTW_LIBS]]
 
 
-// Is NURBS++ installed, and where?
-#define NURBSPP_IPATH /usr/local/include/nurbs++
-#define NURBSPP_LPATH /usr/local/lib
-#define NURBSPP_LIBS nurbsf matrixN matrixI matrix
-#defer HAVE_NURBSPP $[libtest $[NURBSPP_LPATH],$[NURBSPP_LIBS]]
+// Is Berkeley DB installed, and where?  Presently, this is only used
+// for some applications (egg-optchar in particular) in Pandatool, and
+// it is completely optional there.  If available, egg-optchar takes
+// advantage of it to allow the optimization of very large numbers of
+// models in one pass, that might otherwise exceed available memory.
+#define BDB_IPATH
+#define BDB_LPATH
+#define BDB_LIBS db db_cxx
+#defer HAVE_BDB $[libtest $[BDB_LPATH],$[BDB_LIBS]]
 
 // Is Cg installed, and where?
 #if $[WINDOWS_PLATFORM]

+ 7 - 2
dtool/LocalSetup.pp

@@ -41,6 +41,11 @@
 #else
 #print - Did not find fftw
 #endif
+#if $[HAVE_BDB]
+#print + Berkeley DB
+#else
+#print - Did not find Berkeley DB
+#endif
 #if $[HAVE_CG]
 #print + Nvidia Cg High Level Shading Language
 #else
@@ -181,8 +186,8 @@ $[cdefine HAVE_TIFF]
 /* Define if we have libfftw installed.  */
 $[cdefine HAVE_FFTW]
 
-/* Define if we have NURBS++ installed.  */
-$[cdefine HAVE_NURBSPP]
+/* Define if we have Berkeley DB installed.  */
+$[cdefine HAVE_BDB]
 
 /* Define if we have VRPN installed.  */
 $[cdefine HAVE_VRPN]

+ 5 - 0
dtool/Package.pp

@@ -138,6 +138,11 @@
 #set FFTW_LIBS $[FFTW_LIBS]
 #set HAVE_FFTW $[HAVE_FFTW]
 
+#set BDB_IPATH $[unixfilename $[BDB_IPATH]]
+#set BDB_LPATH $[unixfilename $[BDB_LPATH]]
+#set BDB_LIBS $[BDB_LIBS]
+#set HAVE_BDB $[HAVE_BDB]
+
 #set CG_IPATH $[unixfilename $[CG_IPATH]]
 #set CG_LPATH $[unixfilename $[CG_LPATH]]
 #set CG_LIBS $[CG_LIBS]

+ 5 - 5
dtool/pptempl/Global.pp

@@ -204,11 +204,11 @@
   #define fftw_libs $[FFTW_LIBS]
 #endif
 
-#if $[HAVE_NURBSPP]
-  #define nurbspp_ipath $[wildcard $[NURBSPP_IPATH]]
-  #define nurbspp_lpath $[wildcard $[NURBSPP_LPATH]]
-  #define nurbspp_cflags $[NURBSPP_CFLAGS]
-  #define nurbspp_libs $[NURBSPP_LIBS]
+#if $[HAVE_BDB]
+  #define bdb_ipath $[wildcard $[BDB_IPATH]]
+  #define bdb_lpath $[wildcard $[BDB_LPATH]]
+  #define bdb_cflags $[BDB_CFLAGS]
+  #define bdb_libs $[BDB_LIBS]
 #endif
 
 #if $[HAVE_CG]