Changeset 594


Ignore:
Timestamp:
Oct 6, 2007 9:52:22 PM (12 years ago)
Author:
lou
Message:

Correctly handle Solaris x86. Change handling of libsunperf to be compatible
with Studio 11 and Studio 12.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r519 r594  
    508508
    509509save_cxxflags="$CXXFLAGS"
    510 # For sparc-sun-solaris, promote Studio/Workshop compiler to front of list.
     510# For *-*-solaris*, promote Studio/Workshop compiler to front of list.
    511511case $build in
    512512  *-cygwin* | *-mingw*)
     
    516516               comps="g++ cl"
    517517             fi ;;
    518   sparc-sun-solaris*)
     518  *-*-solaris*)
    519519             comps="CC xlC aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
    520520  *-darwin*) comps="g++ c++ CC" ;;
     
    636636        esac
    637637        ;;
    638       *-sun-*)
     638      *-*-solaris*)
    639639          coin_opt_cxxflags="-O4"
    640640          coin_dbg_cxxflags="-g"
     
    779779      CXXLIBS="-L/opt/aCC/lib -l++ -lstd_v2 -lCsup_v2 -lm -lcl -lc"
    780780      ;;
    781     *-sun-*)
     781    *-*-solaris*)
    782782      CXXLIBS="-lCstd -lCrun"
    783783    esac
     
    880880
    881881save_cflags="$CFLAGS"
    882 # For sparc-sun-solaris, promote Studio/Workshop compiler to front of list.
     882# For *-*-solaris*, promote Studio/Workshop compiler to front of list.
    883883# ToDo: If Studio/Workshop cc is not present, we may find /usr/ucb/cc, which
    884884# is likely to be a non-functional shell. But many installations will have
     
    891891               comps="gcc cl"
    892892             fi ;;
    893   sparc-sun-solaris*)
     893  *-*-solaris*)
    894894             comps="cc xlc gcc pgcc icc" ;;
    895895  *-linux-*) comps="xlc gcc cc pgcc icc" ;;
     
    992992        coin_dbg_cflags="-g"
    993993        ;;
    994       *-sun-*)
     994      *-*-solaris*)
    995995        coin_opt_cflags="-xO4"
    996996        coin_dbg_cflags="-g"
     
    12081208        coin_dbg_fflags="-C -g"
    12091209        ;;
    1210       *-sun-*)
     1210      *-*-solaris*)
    12111211        coin_opt_fflags="-O4"
    12121212        coin_dbg_fflags="-g"
     
    13811381# Auxilliary macro to make sure both COIN_PROG_F77 and COIN_FIND_F77 use
    13821382# the same search lists for compiler names.
    1383 # For sparc-sun-solaris, promote Studio/Workshop compilers to front of list.
     1383# For *-*-solaris*, promote Studio/Workshop compilers to front of list.
    13841384AC_DEFUN([AC_COIN_F77_COMPS],
    13851385[case $build in
     
    13901390       coin_f77_comps="gfortran g77 ifort fl32 compile_f2c"
    13911391     fi ;;
    1392   sparc-sun-solaris*)
     1392  *-*-solaris*)
    13931393     coin_f77_comps="f95 f90 f77 xlf fort77 gfortran g77 pgf90 pgf77 ifort ifc frt af77" ;;
    13941394  *) coin_f77_comps="xlf fort77 gfortran f77 g77 pgf90 pgf77 ifort ifc frt af77" ;;
     
    19351935    *-mingw32)
    19361936        RPATH_FLAGS=nothing ;;
    1937     *-sun-*)
     1937    *-*-solaris*)
    19381938        RPATH_FLAGS=
    19391939        for dir in $1; do
     
    27612761                         SAVE_LIBS="$LIBS"])
    27622762      ;;
    2763     *-sun-*)
     2763
     2764# Ideally, we'd use -library=sunperf, but it's an imperfect world. Studio
     2765# cc doesn't recognise -library, it wants -xlic_lib. Studio 12 CC doesn't
     2766# recognise -xlic_lib. Libtool doesn't like -xlic_lib anyway. Sun claims
     2767# that CC and cc will understand -library in Studio 13. The main extra
     2768# function of -xlic_lib and -library is to arrange for the Fortran run-time
     2769# libraries to be linked for C++ and C. We can arrange that explicitly.
     2770    *-*-solaris*)
    27642771      SAVE_LIBS="$LIBS"
    2765       AC_MSG_CHECKING([whether -xlic_lib=sunperf has BLAS])
    2766       LIBS="-xlic_lib=sunperf $LIBS"
     2772      AC_MSG_CHECKING([for BLAS in libsunperf])
     2773      LIBS="-lsunperf $FLIBS $LIBS"
    27672774      AC_COIN_TRY_FLINK([daxpy],
    27682775                        [AC_MSG_RESULT([yes])
    2769                          use_blas='-xlic_lib=sunperf'
    2770                          ADDLIBS="-xlic_lib=sunperf $ADDLIBS"],
     2776                         use_blas='-lsunperf'
     2777                         ADDLIBS="-lsunperf $ADDLIBS"
     2778                         coin_need_flibs=yes],
    27712779                        [AC_MSG_RESULT([no])
    27722780                         LIBS="$SAVE_LIBS"])
     
    28822890                           SAVE_LIBS="$LIBS"])
    28832891        ;;
    2884       *-sun-*)
    2885         SAVE_LIBS="$LIBS"
    2886         AC_MSG_CHECKING([whether -xlic_lib=sunperf has LAPACK])
    2887         LIBS="-xlic_lib=sunperf $LIBS"
    2888         AC_COIN_TRY_FLINK([dsyev],
    2889                           [AC_MSG_RESULT([yes])
    2890                            use_lapack='-xlic_lib=sunperf'
    2891                            ADDLIBS="-xlic_lib=sunperf $ADDLIBS"],
    2892                           [AC_MSG_RESULT([no])
    2893                            LIBS="$SAVE_LIBS"])
     2892
     2893# See comments in COIN_HAS_BLAS.
     2894      *-*-solaris*)
     2895      SAVE_LIBS="$LIBS"
     2896      AC_MSG_CHECKING([for LAPACK in libsunperf])
     2897      LIBS="-lsunperf $FLIBS $LIBS"
     2898      AC_COIN_TRY_FLINK([dsyev],
     2899                        [AC_MSG_RESULT([yes])
     2900                         use_blas='-lsunperf'
     2901                         ADDLIBS="-lsunperf $ADDLIBS"
     2902                         coin_need_flibs=yes],
     2903                        [AC_MSG_RESULT([no])
     2904                         LIBS="$SAVE_LIBS"])
    28942905        ;;
    28952906# On cygwin, do this check only if doscompile is disabled. The prebuilt library
Note: See TracChangeset for help on using the changeset viewer.