Changeset 2974 for releases/0.7.8


Ignore:
Timestamp:
Oct 15, 2013 11:11:01 AM (7 years ago)
Author:
tkr
Message:

Merging r2961:2963 from trunk

Location:
releases/0.7.8
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • releases/0.7.8

  • releases/0.7.8/coin.m4

    r2891 r2974  
    230230
    231231AC_DEFUN([AC_COIN_MINGW_LD_FIX],
    232 [case $build in
     232[AC_REQUIRE([AC_COIN_ENABLE_MSVC])
     233 case $build in
    233234  *-mingw*)
    234235    if test "${LD+set}" = set; then :; else
     
    237238    ;;
    238239 esac
    239  case $enable_doscompile in
    240    msvc)
    241      if test "x${LD+set}" = xset; then :; else
    242        LD=link
    243      fi
    244      ;;
    245  esac
     240 if test $enable_msvc = yes ; then
     241   if test "x${LD+set}" = xset; then :; else
     242     LD=link
     243   fi
     244 fi
    246245])
    247246
    248247###########################################################################
    249 #                        COIN_ENABLE_DOSCOMPILE                           #
     248#                          COIN_ENABLE_MSVC                               #
    250249###########################################################################
    251250
    252251# This macro is invoked by any PROG_compiler macro to establish the
    253 # --enable-doscompile option, used when one wants to compile an executable
    254 # under Cygwin which also runs directly under DOS (without requiring
    255 # Cygwin1.dll). The job of this macro is to make sure the option is correct and
    256 # to set enable_doscompile. Legal values are mingw, msvc, and no (disabled).
    257 # mingw: Fake mingw under cygwin, using GCC tools and -mno-cygwin. The most
    258 #        important thing here is that preprocess, compile, and link steps
    259 #        *all* see -mno-cygwin.
    260 # msvc:  Assume the presence of cl/link. It's the user's responsibility to
    261 #        make sure their PATH is correct. In particular, that MSVC link is
    262 #        found and not cygwin link (we want to do code linking, not file
    263 #        linking).
     252# --enable-msvc option.
     253# The job of this macro is to make sure the option is correct and
     254# to set enable_msvc. Legal values are yes and no (disabled).
     255# If set, assume the presence of cl/link. It's the user's responsibility to
     256# make sure their PATH is correct. In particular, that MSVC link is found
     257# and not cygwin link (we want to do code linking, not file linking).
    264258# It's the responsibility of individual PROG_compiler macros to ensure that
    265259# they correctly set the compiler search list and preprocess, compile, and
    266260# link flags. This is tied to compiler setup because in practice invocations
    267261# of the preprocessor and linker are made through the compiler.
    268 
    269 AC_DEFUN([AC_COIN_ENABLE_DOSCOMPILE],
     262# For backward compatibility, we also check for --enable-doscompile=msvc.
     263
     264AC_DEFUN([AC_COIN_ENABLE_MSVC],
    270265[AC_REQUIRE([AC_CANONICAL_BUILD])
    271  AC_ARG_ENABLE([doscompile],
    272   [AC_HELP_STRING([--enable-doscompile],
    273                   [Under Cygwin, compile so that executables run under DOS.
    274                    Set to mingw to use gcc/g++/ld with -mno-cygwin.
    275                    Set to msvc to use cl/link (or icl/link).
    276                    Default when mentioned: mingw.
    277                    Default when not mentioned: disabled.])],
    278   [if test "$enable_doscompile" != no; then
    279      case $build in
    280        *-cygwin* | *-mingw*) ;;
    281        *) AC_MSG_ERROR([--enable-doscompile option makes sense only under Cygwin or MinGW]) ;;
    282      esac
    283    fi],
    284   [enable_doscompile=no])
    285  case "$enable_doscompile" in
    286    mingw)
    287      case $build in
    288        *-mingw*) enable_doscompile=no ;;
    289      esac
    290      ;;
    291    msvc|no) ;;
    292    yes) enable_doscompile=mingw ;;
    293    *) AC_MSG_ERROR([Invalid value $enable_doscompile for --enable-doscompile.
    294                     Try configure --help=recursive.])
    295       ;;
    296   esac
    297   if test "$enable_doscompile" != no ; then
    298     AC_MSG_NOTICE([DOS compile style is: $enable_doscompile])
     266
     267  # for backward compatibility
     268  AC_ARG_ENABLE([doscompile],,[enable_doscompile=$enableval],[enable_doscompile=no])
     269 
     270  AC_ARG_ENABLE([msvc],
     271    [AC_HELP_STRING([--enable-msvc],
     272                    [Prefer (i)cl/ifort/link over GNU on MinGW/Cygwin.])],
     273    [enable_msvc=$enableval],
     274    [enable_msvc=no
     275     if test "$enable_doscompile" = msvc ; then
     276       enable_msvc=yes
     277     elif test "$enable_doscompile" != no ; then
     278       AC_MSG_ERROR([--enable-doscompile=$enable_doscompile not supported anymore.])
     279     fi
     280    ])
     281
     282  if test "$enable_msvc" = yes; then
     283    case $build in
     284      *-cygwin* | *-mingw*) ;;
     285      *) AC_MSG_ERROR([--enable-msvc option makes sense only under Cygwin or MinGW]) ;;
     286    esac
    299287  fi
    300288])
     
    313301AC_DEFUN([AC_COIN_PROG_CXX],
    314302[AC_REQUIRE([AC_COIN_PROG_CC]) #Let's try if that overcomes configuration problem with VC++ 6.0
    315 AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
     303AC_REQUIRE([AC_COIN_ENABLE_MSVC])
    316304AC_LANG_PUSH(C++)
    317305
     
    327315case $build in
    328316  *-cygwin* | *-mingw*)
    329              if test "$enable_doscompile" = msvc ; then
    330                comps="icl cl"
    331              else
    332                comps="g++ cl"
    333              fi ;;
     317      if test "$enable_msvc" = yes ; then
     318         comps="icl cl g++"
     319      else
     320         comps="g++ icl cl"
     321      fi ;;
    334322  *-*-solaris*)
    335323             comps="CC xlC_r aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
     
    418406            coin_warn_cxxflags="-pedantic-errors $coin_warn_cxxflags"
    419407            ;;
    420         esac
    421 
    422         case $enable_doscompile in
    423           mingw)
    424             CXXFLAGS="-mno-cygwin"
    425             AC_TRY_LINK(,[int i=0; i++;],[coin_add_cxxflags="-mno-cygwin $coin_add_cxxflags"])
    426             CXXFLAGS=
    427           ;;
    428408        esac
    429409    esac
     
    725705AC_DEFUN([AC_COIN_PROG_CC],
    726706[AC_REQUIRE([AC_COIN_MINGW_LD_FIX])
    727 AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
     707AC_REQUIRE([AC_COIN_ENABLE_MSVC])
    728708AC_LANG_PUSH(C)
    729709
     
    758738case $build in
    759739  *-cygwin* | *-mingw*)
    760              if test "$enable_doscompile" = msvc ; then
    761                comps="icl cl"
     740             if test "$enable_msvc" = yes ; then
     741               comps="icl cl gcc"
    762742             else
    763                comps="gcc cl"
     743               comps="gcc icl cl"
    764744             fi ;;
    765745  *-*-solaris*)
     
    839819            ;;
    840820        esac
    841         case $enable_doscompile in
    842           mingw)
    843             CFLAGS="-mno-cygwin"
    844             AC_TRY_LINK([],[int i=0; i++;],
    845                         [coin_add_cflags="-mno-cygwin $coin_add_cflags"])
    846             CFLAGS=
    847           ;;
    848         esac
    849821    esac
    850822  fi
     
    1022994AC_DEFUN([AC_COIN_PROG_F77],
    1023995[AC_REQUIRE([AC_COIN_MINGW_LD_FIX])
    1024 AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
     996AC_REQUIRE([AC_COIN_ENABLE_MSVC])
    1025997AC_REQUIRE([AC_COIN_PROG_CC])
    1026998AC_REQUIRE([AC_COIN_F77_COMPS])
     
    10731045    coin_add_fflags="-pipe"
    10741046    coin_dbg_fflags="-g -O0"
    1075     case $enable_doscompile in
    1076       mingw)
    1077         FFLAGS="-mno-cygwin"
    1078         AC_TRY_LINK(,[      write(*,*) 'Hello world'],
    1079                     [coin_add_fflags="-mno-cygwin $coin_add_fflags"])
    1080         FFLAGS=
    1081       ;;
    1082     esac
    10831047  else
    10841048    case $build in
     
    13321296
    13331297AC_DEFUN([AC_COIN_FIND_F77],
    1334 [AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
     1298[AC_REQUIRE([AC_COIN_ENABLE_MSVC])
    13351299AC_REQUIRE([AC_COIN_F77_COMPS])
    13361300AC_MSG_NOTICE([Trying to determine Fortran compiler name])
     
    13441308[case $build in
    13451309  *-cygwin* | *-mingw*)
    1346      if test "$enable_doscompile" = msvc ; then
    1347        coin_f77_comps="ifort fl32 compile_f2c"
     1310     if test "$enable_msvc" = yes ; then
     1311       coin_f77_comps="ifort fl32 compile_f2c gfortran g95 g77"
    13481312     else
    13491313       coin_f77_comps="gfortran ifort g95 g77 fl32 compile_f2c"
     
    20091973[AC_REQUIRE([AC_PROG_LN_S])
    20101974AC_BEFORE([AC_COIN_PROG_CC], [$0])
    2011 AC_BEFORE([AC_COIN_ENABLE_DOSCOMPILE], [$0])
     1975AC_BEFORE([AC_COIN_ENABLE_MSVC], [$0])
    20121976
    20131977AC_MSG_CHECKING([which command should be used to link input files])
    20141978coin_link_input_cmd="$LN_S"
    2015 if test "$enable_doscompile" = mingw; then
    2016   coin_link_input_cmd=cp
    2017 fi
    20181979case "$CC" in
    20191980  clang* ) ;;
     
    26782639AC_DEFUN([AC_COIN_EXAMPLE_FILES],
    26792640[AC_REQUIRE([AC_COIN_CHECK_VPATH])
    2680 AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
     2641AC_REQUIRE([AC_COIN_ENABLE_MSVC])
    26812642AC_REQUIRE([AC_PROG_LN_S])
    26822643
     
    26892650if test $coin_vpath_config = yes; then
    26902651  lnkcmd=
    2691   if test "$enable_doscompile" != no; then
     2652  if test "$enable_msvc" = yes; then
    26922653    lnkcmd=cp
    26932654  fi
     
    39683929# Try to autodetect the library for blas based on build system
    39693930  #AC_MSG_CHECKING([default locations for BLAS])
    3970   skip_lblas_check=no
    39713931  case $build in
    39723932    *-sgi-*)
     
    40093969     
    40103970    *-cygwin* | *-mingw*)
    4011 # On cygwin, consider -lblas only if doscompile is disabled. The prebuilt
    4012 # library will want to link with cygwin, hence won't run standalone in DOS.
    4013       if test "$enable_doscompile" = mingw; then
    4014         skip_lblas_check=yes
    4015       fi
    40163971      case "$CC" in
    40173972        clang* ) ;;
     
    40584013  esac
    40594014
    4060   if test -z "$use_blas" && test $skip_lblas_check = no; then
     4015  if test -z "$use_blas" ; then
    40614016    AC_MSG_CHECKING([whether -lblas has BLAS])
    40624017    coin_need_flibs=no
     
    41834138    LIBS="$coin_save_LIBS"
    41844139  fi
    4185   skip_llapack_check=no
    41864140  if test -z "$use_lapack"; then
    41874141    # Try to autodetect the library for lapack based on build system
     
    42254179        # On cygwin, do this check only if doscompile is disabled. The prebuilt library
    42264180        # will want to link with cygwin, hence won't run standalone in DOS.
    4227        
    4228       *-cygwin*)
    4229         if test "$enable_doscompile" = mingw; then
    4230           skip_llapack_check=yes
    4231         fi
    4232         ;;
    4233        
    42344181    esac
    42354182  fi
    42364183
    4237   if test -z "$use_lapack" && test $skip_llapack_check = no; then
     4184  if test -z "$use_lapack" ; then
    42384185    AC_MSG_CHECKING([whether -llapack has LAPACK])
    42394186    coin_need_flibs=no
  • releases/0.7.8/compile_f2c

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.