Changeset 2987
- Timestamp:
- Oct 15, 2013 10:08:12 PM (8 years ago)
- Location:
- stable/0.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/0.7
-
stable/0.7/coin.m4
r2891 r2987 230 230 231 231 AC_DEFUN([AC_COIN_MINGW_LD_FIX], 232 [case $build in 232 [AC_REQUIRE([AC_COIN_ENABLE_MSVC]) 233 case $build in 233 234 *-mingw*) 234 235 if test "${LD+set}" = set; then :; else … … 237 238 ;; 238 239 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 246 245 ]) 247 246 248 247 ########################################################################### 249 # COIN_ENABLE_DOSCOMPILE #248 # COIN_ENABLE_MSVC # 250 249 ########################################################################### 251 250 252 251 # 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). 264 258 # It's the responsibility of individual PROG_compiler macros to ensure that 265 259 # they correctly set the compiler search list and preprocess, compile, and 266 260 # link flags. This is tied to compiler setup because in practice invocations 267 261 # 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 264 AC_DEFUN([AC_COIN_ENABLE_MSVC], 270 265 [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 299 287 fi 300 288 ]) … … 313 301 AC_DEFUN([AC_COIN_PROG_CXX], 314 302 [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])303 AC_REQUIRE([AC_COIN_ENABLE_MSVC]) 316 304 AC_LANG_PUSH(C++) 317 305 … … 327 315 case $build in 328 316 *-cygwin* | *-mingw*) 329 if test "$enable_doscompile" = msvc; then330 comps="icl cl"331 332 comps="g++cl"333 317 if test "$enable_msvc" = yes ; then 318 comps="icl cl g++" 319 else 320 comps="g++ icl cl" 321 fi ;; 334 322 *-*-solaris*) 335 323 comps="CC xlC_r aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;; … … 418 406 coin_warn_cxxflags="-pedantic-errors $coin_warn_cxxflags" 419 407 ;; 420 esac421 422 case $enable_doscompile in423 mingw)424 CXXFLAGS="-mno-cygwin"425 AC_TRY_LINK(,[int i=0; i++;],[coin_add_cxxflags="-mno-cygwin $coin_add_cxxflags"])426 CXXFLAGS=427 ;;428 408 esac 429 409 esac … … 725 705 AC_DEFUN([AC_COIN_PROG_CC], 726 706 [AC_REQUIRE([AC_COIN_MINGW_LD_FIX]) 727 AC_REQUIRE([AC_COIN_ENABLE_ DOSCOMPILE])707 AC_REQUIRE([AC_COIN_ENABLE_MSVC]) 728 708 AC_LANG_PUSH(C) 729 709 … … 758 738 case $build in 759 739 *-cygwin* | *-mingw*) 760 if test "$enable_ doscompile" = msvc; then761 comps="icl cl "740 if test "$enable_msvc" = yes ; then 741 comps="icl cl gcc" 762 742 else 763 comps="gcc cl"743 comps="gcc icl cl" 764 744 fi ;; 765 745 *-*-solaris*) … … 839 819 ;; 840 820 esac 841 case $enable_doscompile in842 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 esac849 821 esac 850 822 fi … … 1022 994 AC_DEFUN([AC_COIN_PROG_F77], 1023 995 [AC_REQUIRE([AC_COIN_MINGW_LD_FIX]) 1024 AC_REQUIRE([AC_COIN_ENABLE_ DOSCOMPILE])996 AC_REQUIRE([AC_COIN_ENABLE_MSVC]) 1025 997 AC_REQUIRE([AC_COIN_PROG_CC]) 1026 998 AC_REQUIRE([AC_COIN_F77_COMPS]) … … 1073 1045 coin_add_fflags="-pipe" 1074 1046 coin_dbg_fflags="-g -O0" 1075 case $enable_doscompile in1076 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 esac1083 1047 else 1084 1048 case $build in … … 1332 1296 1333 1297 AC_DEFUN([AC_COIN_FIND_F77], 1334 [AC_REQUIRE([AC_COIN_ENABLE_ DOSCOMPILE])1298 [AC_REQUIRE([AC_COIN_ENABLE_MSVC]) 1335 1299 AC_REQUIRE([AC_COIN_F77_COMPS]) 1336 1300 AC_MSG_NOTICE([Trying to determine Fortran compiler name]) … … 1344 1308 [case $build in 1345 1309 *-cygwin* | *-mingw*) 1346 if test "$enable_ doscompile" = msvc; then1347 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" 1348 1312 else 1349 1313 coin_f77_comps="gfortran ifort g95 g77 fl32 compile_f2c" … … 2009 1973 [AC_REQUIRE([AC_PROG_LN_S]) 2010 1974 AC_BEFORE([AC_COIN_PROG_CC], [$0]) 2011 AC_BEFORE([AC_COIN_ENABLE_ DOSCOMPILE], [$0])1975 AC_BEFORE([AC_COIN_ENABLE_MSVC], [$0]) 2012 1976 2013 1977 AC_MSG_CHECKING([which command should be used to link input files]) 2014 1978 coin_link_input_cmd="$LN_S" 2015 if test "$enable_doscompile" = mingw; then2016 coin_link_input_cmd=cp2017 fi2018 1979 case "$CC" in 2019 1980 clang* ) ;; … … 2678 2639 AC_DEFUN([AC_COIN_EXAMPLE_FILES], 2679 2640 [AC_REQUIRE([AC_COIN_CHECK_VPATH]) 2680 AC_REQUIRE([AC_COIN_ENABLE_ DOSCOMPILE])2641 AC_REQUIRE([AC_COIN_ENABLE_MSVC]) 2681 2642 AC_REQUIRE([AC_PROG_LN_S]) 2682 2643 … … 2689 2650 if test $coin_vpath_config = yes; then 2690 2651 lnkcmd= 2691 if test "$enable_ doscompile" != no; then2652 if test "$enable_msvc" = yes; then 2692 2653 lnkcmd=cp 2693 2654 fi … … 3968 3929 # Try to autodetect the library for blas based on build system 3969 3930 #AC_MSG_CHECKING([default locations for BLAS]) 3970 skip_lblas_check=no3971 3931 case $build in 3972 3932 *-sgi-*) … … 4009 3969 4010 3970 *-cygwin* | *-mingw*) 4011 # On cygwin, consider -lblas only if doscompile is disabled. The prebuilt4012 # library will want to link with cygwin, hence won't run standalone in DOS.4013 if test "$enable_doscompile" = mingw; then4014 skip_lblas_check=yes4015 fi4016 3971 case "$CC" in 4017 3972 clang* ) ;; … … 4058 4013 esac 4059 4014 4060 if test -z "$use_blas" && test $skip_lblas_check = no; then4015 if test -z "$use_blas" ; then 4061 4016 AC_MSG_CHECKING([whether -lblas has BLAS]) 4062 4017 coin_need_flibs=no … … 4183 4138 LIBS="$coin_save_LIBS" 4184 4139 fi 4185 skip_llapack_check=no4186 4140 if test -z "$use_lapack"; then 4187 4141 # Try to autodetect the library for lapack based on build system … … 4225 4179 # On cygwin, do this check only if doscompile is disabled. The prebuilt library 4226 4180 # will want to link with cygwin, hence won't run standalone in DOS. 4227 4228 *-cygwin*)4229 if test "$enable_doscompile" = mingw; then4230 skip_llapack_check=yes4231 fi4232 ;;4233 4234 4181 esac 4235 4182 fi 4236 4183 4237 if test -z "$use_lapack" && test $skip_llapack_check = no; then4184 if test -z "$use_lapack" ; then 4238 4185 AC_MSG_CHECKING([whether -llapack has LAPACK]) 4239 4186 coin_need_flibs=no -
stable/0.7/compile_f2c
- Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset
for help on using the changeset viewer.