~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to .pc/python_compat/configure

  • Committer: Package Import Robot
  • Author(s): Michael Hanke
  • Date: 2012-03-30 12:40:01 UTC
  • mfrom: (9.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120330124001-ze0lhxm5uwq2e3mo
Tags: 3.4.2-2
Added patch to handle a missing CFLAGS variable in Python's sysconfig
report (Closes: #661658).

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
major=3
10
10
minor=4
11
 
micro=0
12
 
release_date="10/19/2011"
 
11
micro=2
 
12
release_date="02/10/2012"
13
13
 
14
14
build_user=`whoami`
15
15
build_host=`uname -n`
72
72
perl_path="/usr"
73
73
python_path="/usr"
74
74
xrootd_path="/usr"
 
75
cvmfs_path="/usr"
75
76
mpi_path="/usr/local"
76
77
zlib_path="/usr"
 
78
swig_path="/usr"
77
79
 
78
80
xrootd_arch=auto
79
81
globus_flavor=auto
104
106
config_dcap_path=no
105
107
config_irods_path=no
106
108
config_xrootd_path=no
 
109
config_cvmfs_path=no
107
110
config_mpi_path=no
 
111
config_swig_path=auto
108
112
 
109
113
if [ "X${GLOBUS_LOCATION}" != "X" ]
110
114
then
188
192
                        xrootd_path=$1
189
193
                        config_xrootd_path=yes
190
194
                        ;;
 
195
                --with-cvmfs-path)
 
196
                        shift
 
197
                        cvmfs_path=$1
 
198
                        config_cvmfs_path=yes
 
199
                        ;;
191
200
                --with-zlib-path)
192
201
                        shift
193
202
                        zlib_path=$1
198
207
                        mpi_path=$1
199
208
                        config_mpi_path=yes
200
209
                        ;;
 
210
                --with-swig-path)
 
211
                        shift
 
212
                        swig_path=$1
 
213
                        config_swig_path=yes
 
214
                        ;;
201
215
                --without-system-sand)
202
216
                        include_package_sand=""
203
217
                        if [ $include_package_allpairs != "" ]
261
275
    python
262
276
    xrootd
263
277
    zlib
 
278
    cvmfs
 
279
    swig
264
280
 
265
281
And SYSTEM may be:
266
282
    sand
472
488
        fi
473
489
 
474
490
        ccflags="${ccflags} -DHAS_MYSQL -DHAS_BXGRID"
 
491
 
 
492
        # MySQL requires zlib
 
493
        if library_search z ${zlib_path}
 
494
        then
 
495
                if [ X${zlib_path} != X/usr ]
 
496
                then
 
497
                    
 
498
                        ccflags="${ccflags} -I${zlib_path}/include"
 
499
                        ldflags="${ldflags} -L${zlib_path}/lib"
 
500
                fi
 
501
        else
 
502
                echo "*** Sorry, I couldn't find zlib in $zlib_path"
 
503
                echo "*** Check --with-zlib-path and try again."
 
504
                exit 1
 
505
        fi
475
506
else
476
507
        if [ $config_mysql_path = yes ]
477
508
        then
489
520
        usempi="true"
490
521
        ccflags="${ccflags} -I${mpi_path}/include -DHAS_MPI"
491
522
else
492
 
    usempi="false"
493
 
    if [ $config_mpi_path = yes ]
494
 
    then
495
 
        echo "*** Sorry, I couldn't find mpicc or mpi.h in $mpi_path"
496
 
        echo "*** Check --with-mpi-path and try again."
497
 
        exit 1
498
 
    else
499
 
        echo "*** skipping mpi support"
500
 
    fi
 
523
        usempi="false"
 
524
        if [ $config_mpi_path = yes ]
 
525
        then
 
526
                echo "*** Sorry, I couldn't find mpicc or mpi.h in $mpi_path"
 
527
                echo "*** Check --with-mpi-path and try again."
 
528
                exit 1
 
529
        else
 
530
                echo "*** skipping mpi support"
 
531
        fi
 
532
fi
 
533
 
 
534
if [ $config_swig_path != no ]
 
535
then
 
536
        swig=""
 
537
        if check_file ${swig_path}/bin/swig
 
538
        then
 
539
                swig=${swig_path}/bin/swig
 
540
        else
 
541
                if check_path swig
 
542
                then
 
543
                        swig=`which swig`
 
544
                else
 
545
                        echo "*** skipping swig bindings for work queue"
 
546
                fi
 
547
        fi
 
548
 
 
549
        if [ -n "$swig" ]
 
550
        then
 
551
                swig_version=`${swig} -version | grep -i version | awk '{print $3}'`
 
552
                if [ `format_version $swig_version` -ge `format_version 1.3.40` ]
 
553
                then
 
554
                        packages="${packages} ${include_package_work_queue}"
 
555
                else
 
556
                        echo "*** Sorry, I need swig >= 1.3.40"
 
557
                        echo "*** skipping swig bindings for work queue"
 
558
                fi
 
559
        fi
 
560
else
 
561
        if [ $config_swig_path = yes ]
 
562
        then
 
563
                echo "*** Sorry, I couldn't find swig in $swig_path"
 
564
                echo "*** Check --with=swig-path and try again."
 
565
                exit 1
 
566
        else
 
567
                echo "*** skipping swig bindings for work queue"
 
568
        fi
501
569
fi
502
570
 
503
571
if [ $config_xrootd_path != no ] && check_file ${xrootd_path}/include/xrootd/XrdVersion.hh
536
604
        fi
537
605
fi
538
606
 
 
607
if [ $config_cvmfs_path != no ] && check_file ${cvmfs_path}/cvmfs/src/libcvmfs.h
 
608
then
 
609
        ccflags="${ccflags} -I${cvmfs_path}/cvmfs/src -DHAS_CVMFS"
 
610
 
 
611
        for library in cvmfs/src/cvmfs sqlite3/src/sqlite3 libcurl/src/lib/.libs/curl
 
612
        do
 
613
                lib_path=${cvmfs_path}/`dirname ${library}`
 
614
                library=`basename ${library}`
 
615
                if ! library_search $library ${lib_path}
 
616
                then
 
617
                        echo "*** Couldn't find $library in ${lib_path}"
 
618
                        exit 1
 
619
                fi
 
620
        done
 
621
else
 
622
        if [ $config_cvmfs_path = yes ]
 
623
        then
 
624
                echo "*** Sorry, I couldn't find cvmfs in ${cvmfs_path}"
 
625
                echo "*** Check --with-cvmfs-path and try again."
 
626
                exit 1
 
627
        else
 
628
                echo "*** skipping cvmfs support"
 
629
        fi
 
630
fi
 
631
 
539
632
##########################################################################
540
633
# SWITCH BACK TO DYNAMIC LINKING FOR COMMON SYSTEM LIBRARIES
541
634
##########################################################################
558
651
 
559
652
        if [ $build_sys = LINUX ]
560
653
        then
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}"
562
655
        else 
563
656
                library_search ncurses ${readline_path}
564
657
                library_search termcap ${readline_path}
592
685
        echo "*** skipping fuse support"
593
686
fi
594
687
 
595
 
if library_search z ${zlib_path}
596
 
then
597
 
        if [ X${zlib_path} != X/usr ]
598
 
        then
599
 
                ccflags="${ccflags} -I${zlib_path}/include"
600
 
                ldflags="${ldflags} -L${zlib_path}/lib"
601
 
        fi
602
 
else
603
 
        echo "*** Sorry, I couldn't find zlib in $zlib_path"
604
 
        echo "*** Check --with-zlib-path and try again."
605
 
        exit 1
606
 
fi
607
 
 
608
688
# Solaris places kerberos includes in a strange place.
609
689
 
610
690
if [ -d ${krb5_path}/include/kerberosv5 ]
635
715
        fi
636
716
fi
637
717
 
638
 
if check_path swig
639
 
then
640
 
        packages="${packages} ${include_package_work_queue}"
641
 
else
642
 
        echo "*** skipping swig bindings for work queue"
643
 
fi
644
 
 
645
718
if [ $config_perl_path != no ]
646
719
then
647
720
        if check_file ${perl_path}/bin/perl
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 ]
695
768
                then
696
769
                        if check_file ${python_path}/include/python2.$python_minor_version/Python.h
697
770
                        then
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)
708
783
EOF
709
784
                                ${python} > $python_ldflags_file <<EOF
767
842
        ldflags="${ldflags} -ldl"
768
843
fi
769
844
 
770
 
ldflags="${ldflags} -lstdc++ -lpthread -lz -lc -lm"
 
845
#Hack to get chirp to compile on cygwin.
 
846
if [ ${build_sys} != CYGWIN ]
 
847
then
 
848
        ldflags="${ldflags} -lstdc++ -lpthread -lz -lc -lm"
 
849
else
 
850
        ldflags="${ldflags} -lstdc++ -lpthread -lz -lm"
 
851
fi
 
852
 
771
853
 
772
854
if [ $build_sys = DARWIN ]
773
855
then
851
933
 
852
934
CCTOOLS_AR=ar
853
935
 
 
936
CCTOOLS_SWIG=${swig}
 
937
 
854
938
CCTOOLS_PERL=${perl}
855
939
CCTOOLS_PERL_CCFLAGS=${perl_ccflags}
856
940
CCTOOLS_PERL_LDFLAGS=${perl_ldflags}
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}
863
947
 
864
948
CCTOOLS_WORK_QUEUE_BINDINGS=${work_queue_bindings}
865
949