mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
Fix compile errors for FreeBSD
This commit is contained in:
parent
5be6aefa8f
commit
b614a05a12
@ -178,8 +178,8 @@ unload_dso(void *dso_handle) {
|
|||||||
|
|
||||||
string
|
string
|
||||||
load_dso_error() {
|
load_dso_error() {
|
||||||
char *message = dlerror();
|
const char *message = dlerror();
|
||||||
if (message != (char *)NULL) {
|
if (message != (const char *)NULL) {
|
||||||
return std::string(message);
|
return std::string(message);
|
||||||
}
|
}
|
||||||
return "No error.";
|
return "No error.";
|
||||||
|
@ -805,7 +805,9 @@ def CompileLink(dll, obj, opts):
|
|||||||
if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' -L' + BracketNameWithQuotes(dir)
|
if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' -L' + BracketNameWithQuotes(dir)
|
||||||
for (opt, name) in LIBNAMES:
|
for (opt, name) in LIBNAMES:
|
||||||
if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' ' + BracketNameWithQuotes(name)
|
if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' ' + BracketNameWithQuotes(name)
|
||||||
cmd = cmd + " -lpthread -ldl"
|
cmd = cmd + " -lpthread"
|
||||||
|
if (not sys.platform.startswith("freebsd")):
|
||||||
|
cmd = cmd + " -ldl"
|
||||||
if (sys.platform == "darwin"):
|
if (sys.platform == "darwin"):
|
||||||
cmd = cmd + " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"] + " -arch ppc -arch i386"
|
cmd = cmd + " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"] + " -arch ppc -arch i386"
|
||||||
|
|
||||||
@ -1124,6 +1126,8 @@ def WriteConfigSettings():
|
|||||||
if (sys.platform.startswith("freebsd")):
|
if (sys.platform.startswith("freebsd")):
|
||||||
dtool_config["IS_LINUX"] = 'UNDEF'
|
dtool_config["IS_LINUX"] = 'UNDEF'
|
||||||
dtool_config["IS_FREEBSD"] = '1'
|
dtool_config["IS_FREEBSD"] = '1'
|
||||||
|
dtool_config["HAVE_ALLOCA_H"] = 'UNDEF'
|
||||||
|
dtool_config["HAVE_MALLOC_H"] = 'UNDEF'
|
||||||
|
|
||||||
if (OPTIMIZE <= 3):
|
if (OPTIMIZE <= 3):
|
||||||
if (dtool_config["HAVE_NET"] != 'UNDEF'):
|
if (dtool_config["HAVE_NET"] != 'UNDEF'):
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
import sys,os,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue,signal,shutil,platform
|
import sys,os,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue,signal,shutil,platform
|
||||||
|
from distutils import sysconfig
|
||||||
|
|
||||||
SUFFIX_INC=[".cxx",".c",".h",".I",".yxx",".lxx",".mm"]
|
SUFFIX_INC=[".cxx",".c",".h",".I",".yxx",".lxx",".mm"]
|
||||||
SUFFIX_DLL=[".dll",".dlo",".dle",".dli",".dlm",".mll",".exe",".pyd"]
|
SUFFIX_DLL=[".dll",".dlo",".dle",".dli",".dlm",".mll",".exe",".pyd"]
|
||||||
@ -895,15 +896,8 @@ def SdkLocatePython():
|
|||||||
exit("Could not find the python framework!")
|
exit("Could not find the python framework!")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
os.system("python -V > "+OUTPUTDIR+"/tmp/pythonversion 2>&1")
|
SDK["PYTHON"]=sysconfig.get_python_inc()
|
||||||
pv=ReadFile(OUTPUTDIR+"/tmp/pythonversion")
|
SDK["PYTHONVERSION"]="python"+sysconfig.get_python_version()
|
||||||
if (pv.startswith("Python ")==0):
|
|
||||||
exit("python -V did not produce the expected output")
|
|
||||||
pv = pv[7:10]
|
|
||||||
if (os.path.isdir("/usr/include/python"+pv)==0):
|
|
||||||
exit("Python reports version "+pv+" but /usr/include/python"+pv+" is not installed.")
|
|
||||||
SDK["PYTHON"]="/usr/include/python"+pv
|
|
||||||
SDK["PYTHONVERSION"]="python"+pv
|
|
||||||
|
|
||||||
def SdkLocateVisualStudio():
|
def SdkLocateVisualStudio():
|
||||||
if (sys.platform != "win32"): return
|
if (sys.platform != "win32"): return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user