mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 22:23:22 +00:00
Java API: build system bugfixes
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
ffb1fc37df
commit
f5cdc14737
1 changed files with 13 additions and 15 deletions
|
@ -30,7 +30,6 @@ CC=getenv("CC", None)
|
||||||
CPPFLAGS=getenv("CPPFLAGS", "")
|
CPPFLAGS=getenv("CPPFLAGS", "")
|
||||||
CXXFLAGS=getenv("CXXFLAGS", "")
|
CXXFLAGS=getenv("CXXFLAGS", "")
|
||||||
LDFLAGS=getenv("LDFLAGS", "")
|
LDFLAGS=getenv("LDFLAGS", "")
|
||||||
JDK_HOME=getenv("JDK_HOME", None)
|
|
||||||
JNI_HOME=getenv("JNI_HOME", None)
|
JNI_HOME=getenv("JNI_HOME", None)
|
||||||
|
|
||||||
CXX_COMPILERS=['g++', 'clang++']
|
CXX_COMPILERS=['g++', 'clang++']
|
||||||
|
@ -214,12 +213,13 @@ def find_jni_h(path):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def check_java():
|
def check_java():
|
||||||
global JDK_HOME
|
|
||||||
global JNI_HOME
|
global JNI_HOME
|
||||||
global JAVAC
|
global JAVAC
|
||||||
|
|
||||||
|
JDK_HOME = getenv('JDK_HOME', None) # we only need to check this locally.
|
||||||
|
|
||||||
if is_verbose():
|
if is_verbose():
|
||||||
print("Finding JDK_HOME...")
|
print("Finding javac ...")
|
||||||
|
|
||||||
if JDK_HOME != None:
|
if JDK_HOME != None:
|
||||||
if IS_WINDOWS:
|
if IS_WINDOWS:
|
||||||
|
@ -234,13 +234,14 @@ def check_java():
|
||||||
ind = 'javac';
|
ind = 'javac';
|
||||||
if IS_WINDOWS:
|
if IS_WINDOWS:
|
||||||
ind = ind + '.exe'
|
ind = ind + '.exe'
|
||||||
paths = os.getenv('path', None)
|
paths = os.getenv('PATH', None)
|
||||||
spaths = paths.split(os.pathsep)
|
if paths:
|
||||||
for i in range(0, len(spaths)):
|
spaths = paths.split(os.pathsep)
|
||||||
cmb = os.path.join(spaths[i], ind)
|
for i in range(0, len(spaths)):
|
||||||
if os.path.exists(cmb):
|
cmb = os.path.join(spaths[i], ind)
|
||||||
JAVAC = cmb
|
if os.path.exists(cmb):
|
||||||
break
|
JAVAC = cmb
|
||||||
|
break
|
||||||
|
|
||||||
if JAVAC == None:
|
if JAVAC == None:
|
||||||
raise MKException('No java compiler in the path, please adjust your PATH or set JDK_HOME to the location of the JDK.')
|
raise MKException('No java compiler in the path, please adjust your PATH or set JDK_HOME to the location of the JDK.')
|
||||||
|
@ -297,7 +298,6 @@ def check_java():
|
||||||
cdirs[len(cdirs):] = extra_dirs
|
cdirs[len(cdirs):] = extra_dirs
|
||||||
|
|
||||||
for dir in cdirs:
|
for dir in cdirs:
|
||||||
print dir
|
|
||||||
q = find_jni_h(dir)
|
q = find_jni_h(dir)
|
||||||
if q != False:
|
if q != False:
|
||||||
JNI_HOME = q
|
JNI_HOME = q
|
||||||
|
@ -1425,8 +1425,7 @@ def mk_config():
|
||||||
if is_verbose():
|
if is_verbose():
|
||||||
print('64-bit: %s' % is64())
|
print('64-bit: %s' % is64())
|
||||||
if is_java_enabled():
|
if is_java_enabled():
|
||||||
print('JDK Home: %s' % JDK_HOME)
|
print('JNI Bindings: %s' % JNI_HOME)
|
||||||
print('JNI Home: %s' % JNI_HOME)
|
|
||||||
print('Java Compiler: %s' % JAVAC)
|
print('Java Compiler: %s' % JAVAC)
|
||||||
else:
|
else:
|
||||||
global CXX, CC, GMP, CPPFLAGS, CXXFLAGS, LDFLAGS
|
global CXX, CC, GMP, CPPFLAGS, CXXFLAGS, LDFLAGS
|
||||||
|
@ -1529,8 +1528,7 @@ def mk_config():
|
||||||
print('gprof: enabled')
|
print('gprof: enabled')
|
||||||
print('Python version: %s' % distutils.sysconfig.get_python_version())
|
print('Python version: %s' % distutils.sysconfig.get_python_version())
|
||||||
if is_java_enabled():
|
if is_java_enabled():
|
||||||
print('JDK Home: %s' % JDK_HOME)
|
print('JNI Bindings: %s' % JNI_HOME)
|
||||||
print('JNI Home: %s' % JNI_HOME)
|
|
||||||
print('Java Compiler: %s' % JAVAC)
|
print('Java Compiler: %s' % JAVAC)
|
||||||
|
|
||||||
def mk_install(out):
|
def mk_install(out):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue