Changeset 1113


Ignore:
Timestamp:
Aug 22, 2008 12:40:06 PM (11 years ago)
Author:
andreasw
Message:

Merged in changes from https://projects.coin-or.org/svn/BuildTools/stable/BSP (rev 1055 to rev 1103)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r1082 r1113  
    517517             fi ;;
    518518  *-*-solaris*)
    519              comps="CC xlC aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
     519             comps="CC xlC_r aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
    520520  *-darwin*) comps="g++ c++ CC" ;;
    521           *) comps="xlC aCC CC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
     521          *) comps="xlC_r aCC CC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
    522522esac
    523523
     
    574574        coin_add_cxxflags="-pipe"
    575575        coin_dbg_cxxflags="-g"
    576         coin_warn_cxxflags="-pedantic-errors -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion"
    577         case $enable_doscompile in
    578           mingw)
    579             CXXFLAGS="-mno-cygwin"
    580             AC_TRY_LINK(,[int i=0; i++;],
    581                         [coin_add_cxxflags="-mno-cygwin $coin_add_cxxflags"])
    582             CXXFLAGS=
    583             ;;
    584         esac
     576        coin_warn_cxxflags="-Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas"
     577        case $build in
     578          *-darwin*)
     579            ;;
     580          *)
     581            coin_warn_cxxflags="-pedantic-errors $coin_warn_cxxflags"
     582            ;;
     583        esac
     584
     585        case $enable_doscompile in
     586          mingw)
     587            CXXFLAGS="-mno-cygwin"
     588            AC_TRY_LINK(,[int i=0; i++;],[coin_add_cxxflags="-mno-cygwin $coin_add_cxxflags"])
     589            CXXFLAGS=
     590          ;;
     591        esac
    585592    esac
    586593  fi
     
    609616        case "$CXX" in
    610617          icpc* | */icpc*)
    611             coin_opt_cxxflags="-O3 -ip"
     618            coin_opt_cxxflags="-O3 -ip -mp1"
    612619            coin_add_cxxflags=""
    613620            coin_dbg_cxxflags="-g"
     
    628635          xlC* | */xlC* | mpxlC* | */mpxlC*)
    629636            coin_opt_cxxflags="-O -qarch=auto -qcache=auto -qtune=auto -qmaxmem=-1"
    630             coin_add_cxxflags="-bmaxdata:0x80000000 -qrtti=dyna -qsuppress=1500-036 -qsuppress=1500-029"
     637            coin_add_cxxflags="-bmaxdata:0x80000000 -qrtti=dyna -qsuppress=1500-036 -qsuppress=1500-029 -qsourcetype=c++"
    631638            coin_dbg_cxxflags="-g"
    632639            ;;
     
    757764    case "$CXX" in
    758765      icpc* | */icpc*)
    759         CXXLIBS=""
     766        CXXLIBS="-lstdc++"
    760767        ;;
    761768      *)
     
    773780      case "$CXX" in
    774781      icpc* | */icpc*)
    775         CXXLIBS=""
     782        CXXLIBS="-lstdc++"
    776783             ;;
    777784      pgCC* | */pgCC*)
     
    952959        coin_add_cflags="-pipe"
    953960        coin_dbg_cflags="-g"
    954         coin_warn_cflags="-pedantic-errors -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall"
     961        coin_warn_cflags="-Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas"
     962        case $build in
     963          *-darwin*)
     964            ;;
     965          *)
     966            coin_warn_cflags="-pedantic-errors $coin_warn_cflags"
     967            ;;
     968        esac
    955969        case $enable_doscompile in
    956970          mingw)
     
    982996        case "$CC" in
    983997          icc* | */icc*)
    984             coin_opt_cflags="-O3 -ip"
     998            coin_opt_cflags="-O3 -ip -mp1"
    985999            coin_add_cflags=""
    9861000            coin_dbg_cflags="-g"
     
    11841198        case $F77 in
    11851199          ifort* | */ifort* | IFORT* | */IFORT* )
    1186             coin_opt_fflags='-O3'
    1187             coin_add_fflags='-fpp -nologo -MT'
    1188             coin_dbg_fflags='-debug'
     1200            coin_opt_fflags='-MT -O3'
     1201            coin_add_fflags='-fpp -nologo'
     1202            coin_dbg_fflags='-MTd -debug'
    11891203          ;;
    11901204          compile_f2c*)
     
    13571371  case $build in
    13581372  # The following is a fix to define FLIBS for ifort on Windows
     1373  # In its original version, it linked in libifcorert.lib or libifcorertd.lib on Windows/ifort explicitly.
     1374  # However, this seem to create a dependency on libifcorert.dll (or libifcorertd.dll) in the executables.
     1375  # This is seem to be unnecessary, libifcorert(d).lib has been removed from the link line.
    13591376     *-cygwin* | *-mingw*)
    13601377       case "$F77" in
    13611378         ifort* | */ifort* | IFORT* | */IFORT*)
    1362            FLIBS="-link libifcorert.lib $LIBS /NODEFAULTLIB:libc.lib";;
     1379           FLIBS="-link $LIBS /NODEFAULTLIB:libc.lib"
     1380#           if "$coin_debug_compile" = true ; then
     1381#             FLIBS="-link $LIBS /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib"
     1382#           else
     1383#             FLIBS="-link $LIBS /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmtd.lib"
     1384#           fi
     1385           ;;
    13631386         compile_f2c*)
    13641387           FLIBS=`$F77 -FLIBS` ;;
     
    14101433     fi ;;
    14111434  *-*-solaris*)
    1412      coin_f77_comps="f95 f90 f77 xlf fort77 gfortran g77 pgf90 pgf77 ifort ifc frt af77" ;;
    1413   *) coin_f77_comps="xlf fort77 gfortran f77 g77 pgf90 pgf77 ifort ifc frt af77" ;;
     1435     coin_f77_comps="f95 f90 f77 xlf_r fort77 gfortran g77 pgf90 pgf77 ifort ifc frt af77" ;;
     1436  *) coin_f77_comps="xlf_r fort77 gfortran f77 g77 pgf90 pgf77 ifort ifc frt af77" ;;
    14141437 esac
    14151438])
     
    24112434    $lnkcmd $srcdir/$file $file
    24122435  done
    2413   EXAMPLE_CLEAN_FILES='$1'
     2436  EXAMPLE_CLEAN_FILES="$EXAMPLE_CLEAN_FILES $1"
    24142437else
    2415   EXAMPLE_CLEAN_FILES=
     2438  EXAMPLE_CLEAN_FILES="$EXAMPLE_CLEAN_FILES"
    24162439fi
    24172440
     
    30693092MAKEOKFILE=.MakeOk
    30703093
    3071 AC_ARG_WITH([mumps-dir],
    3072             AC_HELP_STRING([--with-mumps-dir],
    3073                            [specify directory where MUMPS is installed]),
    3074             [use_mumps="$withval"], [use_mumps=no])
    3075 
    3076 if test "$use_mumps" != "no"; then
    3077   if test -d $use_mumps; then :; else
    3078     AC_MSG_ERROR([User provided MUMPS directory $use_mumps does not exist.])
    3079   fi
    3080   mumps_dir=`cd $use_mumps; pwd`
    3081 
    3082   # library extension
    3083   AC_LANG_PUSH(C)
    3084   save_LIBS="$LIBS"
    3085   LIBS="$LIBS $FLIBS"
    3086   AC_CHECK_LIB([pthread],[pthread_create],[LIBS="-lpthread $save_LIBS"; ADDLIBS="-lpthread $ADDLIBS"],[LIBS="$save_LIBS"])
    3087   AC_LANG_POP(C)
    3088 
    3089   case "$CC" in
    3090     cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
    3091          libe=lib ;;
    3092       *) libe=a ;;
    3093   esac
    3094 
    3095   # Check if hearders are there
    3096   AC_COIN_CHECK_FILE([$mumps_dir/include/dmumps_c.h],
    3097                      [],
    3098                      [AC_MSG_ERROR([I cannot find headers for MUMPS])])
    3099   LIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $LIBS"
    3100   ADDLIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $ADDLIBS"
    3101   # Check if MUMPS actually works
    3102   AC_LANG_PUSH(C)
    3103   save_LIBS="$LIBS"
    3104   LIBS="$LIBS $FLIBS"
    3105   AC_TRY_LINK([void dmumps_c();],[dmumps_c()],[],
    3106               [AC_MSG_ERROR([User provided MUMPS library doesn't work])])
    3107   LIBS="$save_LIBS"
    3108   AC_LANG_POP(C)
    3109   coin_mumpssrcdir="$mumps_dir"
    3110 
    3111 else
     3094#check if user provides a MUMPS library (that works)
     3095AC_LANG_PUSH(C)
     3096AC_COIN_HAS_USER_LIBRARY(mumps, MUMPS, dmumps_c.h, dmumps_c)
     3097AC_LANG_POP(C)
     3098
     3099if test "$coin_has_mumps" = "true"; then  # user provided mumps library
     3100  use_mumps=yes
     3101  coin_has_mumps=yes
     3102
     3103  MUMPS_INCFLAGS="-I\`\$(CYGPATH_W) $MUMPSINCDIR\`"
     3104  ADDLIBS="$MUMPSLIB $ADDLIBS"
     3105
     3106else # no user provided library, so we try to build our own
    31123107  use_mumps=BUILD
    31133108
     
    31223117      AC_CHECK_LIB([pthread],[pthread_create],[LIBS="-lpthread $save_LIBS"; ADDLIBS="-lpthread $ADDLIBS"],[LIBS="save_LIBS"])
    31233118      AC_LANG_POP(C)
     3119 
     3120      MUMPS_INCFLAGS="-I\`\$(CYGPATH_W) $coin_mumpssrcdir/libseq\` -I\`\$(CYGPATH_W) $coin_mumpssrcdir/include\`"
    31243121    else
    31253122      use_mumps=
    31263123    fi
    31273124  fi
     3125
     3126  # if a user provided library is used, then COIN_HAS_USER_LIBRARY takes care of the COIN_HAS_MUMPS conditional and preprocessor symbol
     3127  AM_CONDITIONAL([COIN_HAS_MUMPS],[test x"$use_mumps" != x])
     3128  if test x"$use_mumps" != x; then
     3129    AC_DEFINE([COIN_HAS_MUMPS],[1],[If defined, the MUMPS Library is available.])
     3130    coin_has_mumps=yes
     3131  else
     3132    coin_has_mumps=no
     3133  fi
     3134  AC_MSG_CHECKING([whether MUMPS is available])
     3135  AC_MSG_RESULT([$coin_has_mumps])
    31283136fi
    31293137
    31303138if test x"$use_mumps" != x; then
    3131 
    3132   # and we need the Fortran runtime libraries if we want to link with C/C++
     3139  # we need the Fortran runtime libraries if we want to link with C/C++
    31333140  coin_need_flibs=yes
    31343141
    3135   MUMPS_INCFLAGS="-I\`\$(CYGPATH_W) $coin_mumpssrcdir/libseq\` -I\`\$(CYGPATH_W) $coin_mumpssrcdir/include\`"
    31363142  AC_SUBST(MUMPS_INCFLAGS)
    31373143fi
    31383144
    3139 AM_CONDITIONAL([COIN_HAS_MUMPS],[test x"$use_mumps" != x])
    31403145AM_CONDITIONAL([COIN_BUILD_MUMPS],[test "$use_mumps" = BUILD])
    31413146
    3142 AC_MSG_CHECKING([whether MUMPS is available])
    3143 
    3144 if test x"$use_mumps" = x || test "$use_mumps" = no; then
    3145   coin_has_mumps=no
    3146 else
    3147   coin_has_mumps=yes
    3148   AC_DEFINE([COIN_HAS_MUMPS],[1],
    3149             [If defined, the MUMPS Library is available.])
    3150 fi
    3151 AC_MSG_RESULT([$coin_has_mumps])
    31523147]) # AC_COIN_HAS_MUMPS
    31533148
  • trunk/compile_f2c/INSTALL

    r585 r1113  
    2121
    2222   In the source directory (libf2c), type 'nmake -f makefile.vc all'
     23
     24   If you encounter an error during the compilation of "err.c" due to
     25   a missing unistd.h, edit the makefile.vc file and add -DNO_ISATTY
     26   to the CFLAGS (line 9).
    2327
    2428   If you encounter an error during the compilation of "arithchk.c"
Note: See TracChangeset for help on using the changeset viewer.