|
[Rivet-svn] r2495 - trunkblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Jun 21 19:12:40 BST 2010
Author: buckley Date: Mon Jun 21 19:12:46 2010 New Revision: 2495 Log: Adding configure-time check for SWIG functionality and compatibility with the C++ compiler Modified: trunk/ChangeLog trunk/configure.ac Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Mon Jun 21 18:16:34 2010 (r2494) +++ trunk/ChangeLog Mon Jun 21 19:12:46 2010 (r2495) @@ -1,3 +1,20 @@ +2010-06-21 Andy Buckley <andy at insectnation.org> + + * Making SWIG configure-time check include testing for + incompatibilities with the C++ compiler (re. the recurring _const_ + char* literals issue). + + * Various tweaks to scripts: make-plots and compare-histos + processes are now renamed (on Linux), rivet-config is avoided when + computing the Rivet version,and RIVET_REF_PATH is also set using + the rivet --analysis-path* flags. compare-histos now uses multiple + ref data paths for .aida file globbing. + + * Hendrik changed VetoedFinalState comparison to always return + UNDEFINED if vetoing on the results of other FS projections is + being used. This is the only simple way to avoid problems + emanating from the remainingFinalState thing. + 2010-06-19 Andy Buckley <andy at insectnation.org> * Adding --analysis-path and --analysis-path-append command-line Modified: trunk/configure.ac ============================================================================== --- trunk/configure.ac Mon Jun 21 18:16:34 2010 (r2494) +++ trunk/configure.ac Mon Jun 21 19:12:46 2010 (r2495) @@ -202,17 +202,48 @@ AC_MSG_WARN([Can't build Python extension since header file $python_header cannot be found]) enable_pyext=no fi + else + AC_MSG_WARN([Can't build Python extension since python can't be found]) + enable_pyext=no fi fi -## SWIG version checks +## SWIG checks if test x$enable_pyext == xyes; then AC_PROG_SWIG if test x$SWIG == x; then AC_MSG_WARN([Can't build Python extension since swig could not be found]) - ## TODO: Test that SWIG makes a compilable source file... - ## cf. g++ 4.x requires that string literal is "_const_ char*" enable_pyext=no + else + ## Test that SWIG makes a compilable source file... + ## cf. g++ 4.x requires that string literal is "_const_ char*" + cat > conftest.i <<EOL +%module conftest +%{ + void foo(); +%} +void foo(); +EOL + AC_MSG_CHECKING([if $SWIG can make a Python function wrapper]) + flag_ok=yes + stat_string=`$SWIG -c++ -python conftest.i 2>&1 1>&5` ; test -z "$stat_string" || flag_ok=no + AC_MSG_RESULT([$flag_ok]) + if test x$flag_ok != xyes; then + AC_MSG_WARN([Can't build Python extension since $SWIG is not able to make a Python wrapper]) + enable_pyext=no + else + AC_MSG_CHECKING([if $SWIG is compatible with the $CXX compiler]) + flag_ok=yes + if test x$flag_ok == xyes; then + stat_string=`$CXX -c conftest_wrap.cxx -I$python_incpath 2>&1 1>&5` ; test -z "$stat_string" || flag_ok=no + fi + AC_MSG_RESULT([$flag_ok]) + if test x$flag_ok != xyes; then + AC_MSG_WARN([Can't build Python extension since $SWIG is not compatible with $CXX]) + enable_pyext=no + fi + fi fi + rm -rf conftest* fi ## Finish if test x$enable_pyext == xyes; then
More information about the Rivet-svn mailing list |