474
490
ccflags="${ccflags} -DHAS_MYSQL -DHAS_BXGRID"
492
# MySQL requires zlib
493
if library_search z ${zlib_path}
495
if [ X${zlib_path} != X/usr ]
498
ccflags="${ccflags} -I${zlib_path}/include"
499
ldflags="${ldflags} -L${zlib_path}/lib"
502
echo "*** Sorry, I couldn't find zlib in $zlib_path"
503
echo "*** Check --with-zlib-path and try again."
476
507
if [ $config_mysql_path = yes ]
490
521
ccflags="${ccflags} -I${mpi_path}/include -DHAS_MPI"
493
if [ $config_mpi_path = yes ]
495
echo "*** Sorry, I couldn't find mpicc or mpi.h in $mpi_path"
496
echo "*** Check --with-mpi-path and try again."
499
echo "*** skipping mpi support"
524
if [ $config_mpi_path = yes ]
526
echo "*** Sorry, I couldn't find mpicc or mpi.h in $mpi_path"
527
echo "*** Check --with-mpi-path and try again."
530
echo "*** skipping mpi support"
534
if [ $config_swig_path != no ]
537
if check_file ${swig_path}/bin/swig
539
swig=${swig_path}/bin/swig
545
echo "*** skipping swig bindings for work queue"
551
swig_version=`${swig} -version | grep -i version | awk '{print $3}'`
552
if [ `format_version $swig_version` -ge `format_version 1.3.40` ]
554
packages="${packages} ${include_package_work_queue}"
556
echo "*** Sorry, I need swig >= 1.3.40"
557
echo "*** skipping swig bindings for work queue"
561
if [ $config_swig_path = yes ]
563
echo "*** Sorry, I couldn't find swig in $swig_path"
564
echo "*** Check --with=swig-path and try again."
567
echo "*** skipping swig bindings for work queue"
503
571
if [ $config_xrootd_path != no ] && check_file ${xrootd_path}/include/xrootd/XrdVersion.hh
607
if [ $config_cvmfs_path != no ] && check_file ${cvmfs_path}/cvmfs/src/libcvmfs.h
609
ccflags="${ccflags} -I${cvmfs_path}/cvmfs/src -DHAS_CVMFS"
611
for library in cvmfs/src/cvmfs sqlite3/src/sqlite3 libcurl/src/lib/.libs/curl
613
lib_path=${cvmfs_path}/`dirname ${library}`
614
library=`basename ${library}`
615
if ! library_search $library ${lib_path}
617
echo "*** Couldn't find $library in ${lib_path}"
622
if [ $config_cvmfs_path = yes ]
624
echo "*** Sorry, I couldn't find cvmfs in ${cvmfs_path}"
625
echo "*** Check --with-cvmfs-path and try again."
628
echo "*** skipping cvmfs support"
539
632
##########################################################################
540
633
# SWITCH BACK TO DYNAMIC LINKING FOR COMMON SYSTEM LIBRARIES
541
634
##########################################################################
559
652
if [ $build_sys = LINUX ]
561
cctools_readline_ldflags="${link_no_as_needed} -lncurses -ltermcap -lhistory ${link_as_needed}"
654
cctools_readline_ldflags="-lreadline ${link_no_as_needed} -lncurses -lhistory ${link_as_needed}"
563
656
library_search ncurses ${readline_path}
564
657
library_search termcap ${readline_path}
592
685
echo "*** skipping fuse support"
595
if library_search z ${zlib_path}
597
if [ X${zlib_path} != X/usr ]
599
ccflags="${ccflags} -I${zlib_path}/include"
600
ldflags="${ldflags} -L${zlib_path}/lib"
603
echo "*** Sorry, I couldn't find zlib in $zlib_path"
604
echo "*** Check --with-zlib-path and try again."
608
688
# Solaris places kerberos includes in a strange place.
610
690
if [ -d ${krb5_path}/include/kerberosv5 ]
691
764
echo "python version is ${python_version}"
692
765
python_major_version=`echo ${python_version} | cut -d . -f 1`
693
766
python_minor_version=`echo ${python_version} | cut -d . -f 2`
694
if [ $python_major_version -eq 2 -a $python_minor_version -ge 4 ]
767
if [ "$python_major_version" -eq 2 -a "$python_minor_version" -ge 4 ]
696
769
if check_file ${python_path}/include/python2.$python_minor_version/Python.h
703
776
from distutils import sysconfig
704
777
flags = ['-I' + sysconfig.get_python_inc(),
705
778
'-I' + sysconfig.get_python_inc(plat_specific=True)]
706
flags.extend(sysconfig.get_config_var('CFLAGS').split())
779
syscfgflags = sysconfig.get_config_var('CFLAGS')
780
if not syscfgflags is None:
781
flags.extend(syscfgflags.split())
707
782
print ' '.join(flags)
709
784
${python} > $python_ldflags_file <<EOF
767
842
ldflags="${ldflags} -ldl"
770
ldflags="${ldflags} -lstdc++ -lpthread -lz -lc -lm"
845
#Hack to get chirp to compile on cygwin.
846
if [ ${build_sys} != CYGWIN ]
848
ldflags="${ldflags} -lstdc++ -lpthread -lz -lc -lm"
850
ldflags="${ldflags} -lstdc++ -lpthread -lz -lm"
772
854
if [ $build_sys = DARWIN ]
859
943
CCTOOLS_PYTHON=${python}
860
944
CCTOOLS_PYTHON_CCFLAGS=${python_ccflags}
861
945
CCTOOLS_PYTHON_LDFLAGS=${python_ldflags}
862
CCTOOLS_PYTHON_VERSION=${python_version}
946
CCTOOLS_PYTHON_VERSION=${python_major_version}.${python_minor_version}
864
948
CCTOOLS_WORK_QUEUE_BINDINGS=${work_queue_bindings}