Changeset 248 for trunk


Ignore:
Timestamp:
Mar 12, 2007 7:58:59 PM (13 years ago)
Author:
andreasw
Message:

first version of Mumps 3rd party

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r243 r248  
    488488             fi ;;
    489489  sparc-sun-solaris*)
    490              comps="CC xlC aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
     490             comps="CC xlC aCC icpc g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
    491491  *-darwin*) comps="g++ c++ CC" ;;
    492           *) comps="xlC aCC CC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
     492          *) comps="xlC aCC CC icpc g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
    493493esac
    494494
     
    851851             fi ;;
    852852  sparc-sun-solaris*)
    853              comps="cc xlc gcc pgcc icc" ;;
    854   *-linux-*) comps="xlc gcc cc pgcc icc" ;;
    855   *)         comps="xlc_r xlc cc gcc pgcc icc" ;;
     853             comps="cc xlc icc gcc pgcc icc" ;;
     854  *-linux-*) comps="xlc icc gcc cc pgcc icc" ;;
     855  *)         comps="xlc_r xlc icc cc gcc pgcc icc" ;;
    856856esac
    857857
     
    13311331       coin_f77_comps="ifort fl32"
    13321332     else
    1333        coin_f77_comps="gfortran g77 ifort fl32"
     1333       coin_f77_comps="ifort gfortran g77 fl32"
    13341334     fi ;;
    13351335  sparc-sun-solaris*)
    13361336     coin_f77_comps="f95 f90 f77 xlf fort77 gfortran g77 pgf90 pgf77 ifort ifc frt af77" ;;
    1337   *) coin_f77_comps="xlf fort77 gfortran f77 g77 pgf90 pgf77 ifort ifc frt af77" ;;
     1337  *) coin_f77_comps="xlf fort77 ifort ifc gfortran f77 g77 pgf90 pgf77 frt af77" ;;
    13381338 esac
    13391339])
     
    23872387  if test "$PACKAGE_NAME" != ThirdPartyASL; then
    23882388    # If we are configuring ThirdParty/ASL, don't check
    2389     AC_CHECK_FILE([$coin_aslobjdir/.MakeOk],[],
    2390                   [AC_MSG_ERROR([option \"BUILD\" specified for asldir, but directory is not configure (sources missing?)])])
     2389    if test -r $coin_aslobjdir/.MakeOk; then :; else
     2390      AC_MSG_ERROR([option \"BUILD\" specified for asldir, but directory is not configure (sources missing?)])
     2391    fi
    23912392  fi
    23922393elif test -z "$use_asldir"; then
    23932394 # try to find sources - if not given don't compile
    23942395  if test "$PACKAGE_NAME" != ThirdPartyASL; then
    2395     AC_CHECK_FILE([$coin_aslobjdir/.MakeOk],[use_asldir=BUILD],[use_asldir=no])
     2396    if test -r $coin_aslobjdir/.MakeOk; then
     2397      use_asldir=BUILD
     2398    else
     2399      use_asldir=no
     2400    fi
    23962401  else
    23972402    use_asldir=no
     
    25362541    # Don't check for course code if this is executed in ThirdParty/Blas
    25372542    if test "$PACKAGE_NAME" != ThirdPartyBlas; then
    2538       AC_CHECK_FILE([$coin_blasobjdir/.MakeOk],[],
    2539                     [AC_MSG_ERROR([option \"BUILD\" specified for Blas, but $coin_blasobjdir directory is not properly configured])])
     2543      if test -r $coin_blasobjdir/.MakeOk; then :; else
     2544        AC_MSG_ERROR([option \"BUILD\" specified for Blas, but $coin_blasobjdir directory is not properly configured])
     2545      fi
    25402546    fi
    25412547  elif test "$use_blas" != no ; then
     
    25992605  if test -z "$use_blas"; then
    26002606    if test "$PACKAGE_NAME" != ThirdPartyBlas; then
    2601       AC_MSG_CHECKING([if BLAS can be built.])
    2602       AC_CHECK_FILE([$coin_blasobjdir/.MakeOk],[use_blas=BUILD])
     2607      if test -r $coin_blasobjdir/.MakeOk; then
     2608        use_blas=BUILD
     2609      fi
    26032610    fi
    26042611  fi
     
    26482655    # Don't check for course code if this is executed in ThirdParty/Blas
    26492656    if test "$PACKAGE_NAME" != ThirdPartyLapack; then
    2650       AC_CHECK_FILE([$coin_lapackobjdir/.MakeOk],[],
    2651                     [AC_MSG_ERROR([option \"BUILD\" specified for LAPACK, but $coin_lapackobjdir directory is not configured])])
     2657      if test -r $coin_lapackobjdir/.MakeOk; then :; else
     2658        AC_MSG_ERROR([option \"BUILD\" specified for LAPACK, but $coin_lapackobjdir directory is not configured])
     2659      fi
    26522660    fi
    26532661  else
     
    27192727  if test -z "$use_lapack"; then
    27202728    if test "$PACKAGE_NAME" != ThirdPartyLapack; then
    2721       AC_CHECK_FILE([$coin_lapackobjdir/.MakeOk],[use_lapack=BUILD])
     2729      if test -r $coin_lapackobjdir/.MakeOk; then
     2730        use_lapack=BUILD
     2731      fi
    27222732    fi
    27232733  fi
     
    27392749fi
    27402750]) # AC_COIN_HAS_LAPACK
     2751
     2752###########################################################################
     2753#                            COIN_HAS_MUMPS                               #
     2754###########################################################################
     2755
     2756# This macro checks for a library containing the MUMPS library.  It
     2757# checks if the user has provided an argument for the MUMPS library,
     2758# and if not, it checks whether the MUMPS ThirdParty/Mumps directory has
     2759# been configured.  It adds to ADDLIBS any flags required to link with
     2760# an externally provided MUMPS.  It defines the makefile conditional
     2761# and preprocessor macro COIN_HAS_MUMPS, if MUMPS is available, and it
     2762# defines the makefile conditional COIN_BUILD_MUMPS, if MUMPS is
     2763# compiled within COIN.
     2764
     2765AC_DEFUN([AC_COIN_HAS_MUMPS],
     2766[
     2767if test "$PACKAGE_NAME" = ThirdPartyMumps; then
     2768  coin_mumpsobjdir=../Mumps
     2769else
     2770  coin_mumpsobjdir=../ThirdParty/Mumps
     2771fi
     2772coin_mumpssrcdir=$abs_source_dir/$coin_mumpsobjdir
     2773
     2774mumps_ver=4.6.4
     2775
     2776MAKEOKFILE=.MakeOk
     2777
     2778AC_ARG_WITH([mumps-dir],
     2779            AC_HELP_STRING([--with-mumps-dir],
     2780                           [specify directory where MUMPS is installed]),
     2781            [use_mumps="$withval"], [use_mumps=no])
     2782
     2783if test "$use_mumps" != "no"; then
     2784  if test -d $use_mumps; then :; else
     2785    AC_MSG_ERROR([User provided MUMPS directory $use_mumps does not exist.])
     2786  fi
     2787  mumps_dir=`cd $use_mumps; pwd`
     2788
     2789  # library extension
     2790  case "$CC" in
     2791    cl* | */cl* | CL* | */CL*)
     2792         libe=lib ;;
     2793      *) libe=a ;;
     2794  esac
     2795
     2796  # Check if hearders are there
     2797  AC_CHECK_FILE([$mumps_dir/include/dmumps_c.h],
     2798                [],
     2799                [AC_MSG_ERROR([I cannot find headers for MUMPS])])
     2800  LIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $LIBS"
     2801  ADDLIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $ADDLIBS"
     2802  # Check if MUMPS actually works
     2803  AC_LANG_PUSH(C)
     2804  save_LIBS="$LIBS"
     2805  LIBS="$LIBS $FLIBS"
     2806  AC_TRY_LINK([void dmumps_c();],[dmumps_c()],[],
     2807              [AC_MSG_ERROR([User provided MUMPS library doesn't work])])
     2808  LIBS="$save_LIBS"
     2809  AC_LANG_POP(C)
     2810
     2811else
     2812  use_mumps=BUILD
     2813
     2814  # Check if the MUMPS' ThirdParty project has been configured
     2815  if test "$PACKAGE_NAME" != ThirdPartyMumps; then
     2816    if test -r $coin_mumpsobjdir/.MakeOk; then
     2817      use_mumps=BUILD
     2818    else
     2819      use_mumps=
     2820    fi
     2821  fi
     2822fi
     2823
     2824if test x"$use_mumps" != x; then
     2825  # Mumps needs pthreads
     2826  AC_LANG_PUSH(C)
     2827  AC_CHECK_LIB([pthread],[pthread_create],[LIBS="-lpthread $LIBS"; ADDLIBS="-lpthread $ADDLIBS"],[])
     2828  AC_LANG_POP(C)
     2829
     2830  # and we need the Fortran runtime libraries if we want to link with C/C++
     2831  coin_need_flibs=yes
     2832
     2833  MUMPS_INCFLAGS="-I`$CYGPATH_W $coin_mumpssrcdir/MUMPS_${mumps_ver}/libseq` -I`$CYGPATH_W $coin_mumpssrcdir/MUMPS_${mumps_ver}/include`"
     2834  AC_SUBST(MUMPS_INCFLAGS)
     2835fi
     2836
     2837AM_CONDITIONAL([COIN_HAS_MUMPS],[test x"$use_mumps" != x])
     2838AM_CONDITIONAL([COIN_BUILD_MUMPS],[test "$use_mumps" = BUILD])
     2839
     2840if test x"$use_mumps" = x || test "$use_mumps" = no; then
     2841  coin_has_mumps=no
     2842else
     2843  coin_has_mumps=yes
     2844  AC_DEFINE([COIN_HAS_MUMPS],[1],
     2845            [If defined, the MUMPS Library is available.])
     2846fi
     2847]) # AC_COIN_HAS_MUMPS
     2848
Note: See TracChangeset for help on using the changeset viewer.