ソースを参照

only include -lnet if it is available

David Rose 21 年 前
コミット
a5d5321c60

+ 2 - 1
direct/src/distributed/ConnectionRepository.py

@@ -129,7 +129,8 @@ class ConnectionRepository(DirectObject.DirectObject, CConnectionRepository):
                     dclass.setClassDef(classDef)
 
             self.dclassesByName[className] = dclass
-            self.dclassesByNumber[number] = dclass
+            if number >= 0:
+                self.dclassesByNumber[number] = dclass
 
     def importModule(self, dcImports, moduleName, importSymbols):
         """ Imports the indicated moduleName and all of its symbols

+ 4 - 1
direct/src/distributed/Sources.pp

@@ -8,9 +8,12 @@
   #define LOCAL_LIBS \
     directbase dcparser
   #define OTHER_LIBS \
-    downloader:c net:c panda:m express:c pandaexpress:m \
+    downloader:c panda:m express:c pandaexpress:m \
     interrogatedb:c dconfig:c dtoolconfig:m \
     dtoolutil:c dtoolbase:c dtool:m
+  #if $[and $[HAVE_NET],$[HAVE_NSPR]] \
+    #define OTHER_LIBS net:c $[OTHER_LIBS]
+  #endif
 
   #define SOURCES \
     config_distributed.cxx config_distributed.h \