1 # This Python script contains all the machine dependent settings
2 # needed during the build process.
6 # Get compiler flags from Archlinux's /etc/makepkg.conf.
8 #r, w = popen2.popen2("source /etc/makepkg.conf ; echo $CFLAGS")
9 #CXXFLAGS = r.readline().strip()
13 # Compilers to be used.
18 cxx = os.getenv("CXX")
21 f77 = os.getenv("F77")
25 flags = os.getenv("CXXFLAGS")
28 fflags = os.getenv("FFLAGS")
31 link_flags = os.getenv("LDFLAGS")
32 if link_flags == None:
40 # Note: for the Fortran name definition you can define one of the following
41 # preprocessor macros:
43 # FORTRAN_SYMBOLS_WITHOUT_TRAILING_UNDERSCORES
44 # FORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE
45 # FORTRAN_SYMBOLS_WITH_DOUBLE_TRAILING_UNDERSCORES
49 base_flags = " -DFORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE -DNDEBUG "
50 flags_noopt = base_flags
51 flags = flags + base_flags
52 fflags = fflags + base_flags
57 if os.path.isdir("/usr/include/python2"):
58 include_dirs.append("/usr/include/python2")
59 include_dirs.append("/usr/lib/python2/site-packages")
60 elif os.path.isdir("/usr/include/python2.7"):
61 include_dirs.append("/usr/include/python2.7")
62 include_dirs.append("/usr/lib/python2.7/site-packages")
63 elif os.path.isdir("/usr/include/python2.6"):
64 include_dirs.append("/usr/include/python2.6")
65 include_dirs.append("/usr/lib/python2.6/site-packages")
66 elif os.path.isdir("/usr/include/python2.5"):
67 include_dirs.append("/usr/include/python2.5")
68 include_dirs.append("/usr/lib/python2.5/site-packages")
69 elif os.path.isdir("/usr/include/python2.4"):
70 include_dirs.append("/usr/include/python2.4")
71 include_dirs.append("/usr/lib/python2.4/site-packages")
72 elif os.path.isdir("/usr/include/python2.3"):
73 include_dirs.append("/usr/include/python2.3")
74 include_dirs.append("/usr/lib/python2.3/site-packages")
76 print "Python dir not found!"
81 #library_dirs = ["/opt/intel/mkl8/lib/32"]
85 libs = ["boost_python", "blitz", "lapack", "blas", "gfortran"]
86 #libs = ["boost_python", "blitz", "mkl_lapack64", "mkl", "gfortran"]
92 extra_files = [("doc", ["docs/camfr.pdf"])]