Ignore:
Timestamp:
Oct 15, 2013 5:06:12 PM (7 years ago)
Author:
stefan
Message:

revert r2394:HEAD - releases are not to be modified

Location:
releases/0.7.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/0.7.8

  • releases/0.7.8/coin.m4

    r2974 r2985  
    230230
    231231AC_DEFUN([AC_COIN_MINGW_LD_FIX],
    232 [AC_REQUIRE([AC_COIN_ENABLE_MSVC])
    233  case $build in
     232[case $build in
    234233  *-mingw*)
    235234    if test "${LD+set}" = set; then :; else
     
    238237    ;;
    239238 esac
    240  if test $enable_msvc = yes ; then
    241    if test "x${LD+set}" = xset; then :; else
    242      LD=link
    243    fi
    244  fi
     239 case $enable_doscompile in
     240   msvc)
     241     if test "x${LD+set}" = xset; then :; else
     242       LD=link
     243     fi
     244     ;;
     245 esac
    245246])
    246247
    247248###########################################################################
    248 #                          COIN_ENABLE_MSVC                               #
     249#                        COIN_ENABLE_DOSCOMPILE                           #
    249250###########################################################################
    250251
    251252# This macro is invoked by any PROG_compiler macro to establish the
    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).
     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).
    258264# It's the responsibility of individual PROG_compiler macros to ensure that
    259265# they correctly set the compiler search list and preprocess, compile, and
    260266# link flags. This is tied to compiler setup because in practice invocations
    261267# of the preprocessor and linker are made through the compiler.
    262 # For backward compatibility, we also check for --enable-doscompile=msvc.
    263 
    264 AC_DEFUN([AC_COIN_ENABLE_MSVC],
     268
     269AC_DEFUN([AC_COIN_ENABLE_DOSCOMPILE],
    265270[AC_REQUIRE([AC_CANONICAL_BUILD])
    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
     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])
    287299  fi
    288300])
     
    301313AC_DEFUN([AC_COIN_PROG_CXX],
    302314[AC_REQUIRE([AC_COIN_PROG_CC]) #Let's try if that overcomes configuration problem with VC++ 6.0
    303 AC_REQUIRE([AC_COIN_ENABLE_MSVC])
     315AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
    304316AC_LANG_PUSH(C++)
    305317
     
    315327case $build in
    316328  *-cygwin* | *-mingw*)
    317       if test "$enable_msvc" = yes ; then
    318          comps="icl cl g++"
    319       else
    320          comps="g++ icl cl"
    321       fi ;;
     329             if test "$enable_doscompile" = msvc ; then
     330               comps="icl cl"
     331             else
     332               comps="g++ cl"
     333             fi ;;
    322334  *-*-solaris*)
    323335             comps="CC xlC_r aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
     
    406418            coin_warn_cxxflags="-pedantic-errors $coin_warn_cxxflags"
    407419            ;;
     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          ;;
    408428        esac
    409429    esac
     
    705725AC_DEFUN([AC_COIN_PROG_CC],
    706726[AC_REQUIRE([AC_COIN_MINGW_LD_FIX])
    707 AC_REQUIRE([AC_COIN_ENABLE_MSVC])
     727AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
    708728AC_LANG_PUSH(C)
    709729
     
    738758case $build in
    739759  *-cygwin* | *-mingw*)
    740              if test "$enable_msvc" = yes ; then
    741                comps="icl cl gcc"
     760             if test "$enable_doscompile" = msvc ; then
     761               comps="icl cl"
    742762             else
    743                comps="gcc icl cl"
     763               comps="gcc cl"
    744764             fi ;;
    745765  *-*-solaris*)
     
    819839            ;;
    820840        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
    821849    esac
    822850  fi
     
    9941022AC_DEFUN([AC_COIN_PROG_F77],
    9951023[AC_REQUIRE([AC_COIN_MINGW_LD_FIX])
    996 AC_REQUIRE([AC_COIN_ENABLE_MSVC])
     1024AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
    9971025AC_REQUIRE([AC_COIN_PROG_CC])
    9981026AC_REQUIRE([AC_COIN_F77_COMPS])
     
    10451073    coin_add_fflags="-pipe"
    10461074    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
    10471083  else
    10481084    case $build in
     
    12961332
    12971333AC_DEFUN([AC_COIN_FIND_F77],
    1298 [AC_REQUIRE([AC_COIN_ENABLE_MSVC])
     1334[AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
    12991335AC_REQUIRE([AC_COIN_F77_COMPS])
    13001336AC_MSG_NOTICE([Trying to determine Fortran compiler name])
     
    13081344[case $build in
    13091345  *-cygwin* | *-mingw*)
    1310      if test "$enable_msvc" = yes ; then
    1311        coin_f77_comps="ifort fl32 compile_f2c gfortran g95 g77"
     1346     if test "$enable_doscompile" = msvc ; then
     1347       coin_f77_comps="ifort fl32 compile_f2c"
    13121348     else
    13131349       coin_f77_comps="gfortran ifort g95 g77 fl32 compile_f2c"
     
    19732009[AC_REQUIRE([AC_PROG_LN_S])
    19742010AC_BEFORE([AC_COIN_PROG_CC], [$0])
    1975 AC_BEFORE([AC_COIN_ENABLE_MSVC], [$0])
     2011AC_BEFORE([AC_COIN_ENABLE_DOSCOMPILE], [$0])
    19762012
    19772013AC_MSG_CHECKING([which command should be used to link input files])
    19782014coin_link_input_cmd="$LN_S"
     2015if test "$enable_doscompile" = mingw; then
     2016  coin_link_input_cmd=cp
     2017fi
    19792018case "$CC" in
    19802019  clang* ) ;;
     
    26392678AC_DEFUN([AC_COIN_EXAMPLE_FILES],
    26402679[AC_REQUIRE([AC_COIN_CHECK_VPATH])
    2641 AC_REQUIRE([AC_COIN_ENABLE_MSVC])
     2680AC_REQUIRE([AC_COIN_ENABLE_DOSCOMPILE])
    26422681AC_REQUIRE([AC_PROG_LN_S])
    26432682
     
    26502689if test $coin_vpath_config = yes; then
    26512690  lnkcmd=
    2652   if test "$enable_msvc" = yes; then
     2691  if test "$enable_doscompile" != no; then
    26532692    lnkcmd=cp
    26542693  fi
     
    39293968# Try to autodetect the library for blas based on build system
    39303969  #AC_MSG_CHECKING([default locations for BLAS])
     3970  skip_lblas_check=no
    39313971  case $build in
    39323972    *-sgi-*)
     
    39694009     
    39704010    *-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
    39714016      case "$CC" in
    39724017        clang* ) ;;
     
    40134058  esac
    40144059
    4015   if test -z "$use_blas" ; then
     4060  if test -z "$use_blas" && test $skip_lblas_check = no; then
    40164061    AC_MSG_CHECKING([whether -lblas has BLAS])
    40174062    coin_need_flibs=no
     
    41384183    LIBS="$coin_save_LIBS"
    41394184  fi
     4185  skip_llapack_check=no
    41404186  if test -z "$use_lapack"; then
    41414187    # Try to autodetect the library for lapack based on build system
     
    41794225        # On cygwin, do this check only if doscompile is disabled. The prebuilt library
    41804226        # 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       
    41814234    esac
    41824235  fi
    41834236
    4184   if test -z "$use_lapack" ; then
     4237  if test -z "$use_lapack" && test $skip_llapack_check = no; then
    41854238    AC_MSG_CHECKING([whether -llapack has LAPACK])
    41864239    coin_need_flibs=no
Note: See TracChangeset for help on using the changeset viewer.