If an .so file is present for LIBDWARF, set LIBDWARFSTATIC to false, etc.
[dyninst.git] / autodyninst / check_lib_type.py
1 #!/usr/bin/python
2 # quick hack: is a located library static?
3 # false if shared, true otherwise
4 import os
5 import sys
6 lib_name = sys.argv[1]
7 lib_dir = sys.argv[2]
8 dir = os.listdir(lib_dir)
9 for file in dir:
10         has_name = file.find(lib_name)
11         has_dot_so = file.find('.so')
12         if(has_name > -1 and has_dot_so > -1):
13                 print "false"
14                 sys.exit(0)
15 print "true"
16 sys.exit(0)