Changeset 352
- Timestamp:
- Jun 13, 2007 3:49:55 PM (14 years ago)
- Location:
- stable/0.5
- Files:
-
- 3 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
stable/0.5/coin.m4
r310 r352 1 # Copyright (C) 2006, 2007 International Business Machines. .1 # Copyright (C) 2006, 2007 International Business Machines. 2 2 # All Rights Reserved. 3 3 # This file is distributed under the Common Public License. … … 782 782 # now that CPPFLAGS contains -mno-cygwin when it needs it. -- lh, 061214 -- 783 783 784 # AW 070609: I restored the previous version, since otherwise the warnings 785 # still pop up for the cl compiler 786 784 787 AC_DEFUN([AC_COIN_CHECK_HEADER], 785 [ #if test x"$4" = x; then786 #hdr="#include <$1>"787 #else788 #hdr="$4"789 #fi790 AC_CHECK_HEADERS([$1],[$2],[$3],[$ 4])788 [if test x"$4" = x; then 789 hdr="#include <$1>" 790 else 791 hdr="$4" 792 fi 793 AC_CHECK_HEADERS([$1],[$2],[$3],[$hdr]) 791 794 ]) # AC_COIN_CHECK_HEADER 792 795 … … 1134 1137 coin_dbg_fflags='-debug' 1135 1138 ;; 1139 compile_f2c*) 1140 coin_opt_fflags='-MT -O2' 1141 coin_add_fflags='-nologo -wd4996' 1142 coin_dbg_fflags='-MTd' 1143 ;; 1136 1144 esac 1137 1145 ;; … … 1277 1285 AC_LANG_PUSH([Fortran 77]) 1278 1286 1287 save_FLIBS="$FLIBS" 1288 1279 1289 AC_F77_WRAPPERS 1280 1290 1281 # This is to correct a missing exclusion in autoconf 2.59 1282 if test x"$FLIBS" != x; then 1283 my_flibs= 1284 for flag in $FLIBS; do 1285 case $flag in 1286 -lcrt*.o) ;; 1287 *) my_flibs="$my_flibs $flag" ;; 1288 esac 1289 done 1290 FLIBS="$my_flibs" 1291 fi 1292 1293 case $build in 1294 # The following is a fix to define FLIBS for ifort on Windows 1295 *-cygwin* | *-mingw*) 1296 case "$F77" in 1297 ifort* | */ifort* | IFORT* | */IFORT*) 1291 if test x"$save_FLIBS" != x; then 1292 FLIBS="$save_FLIBS" 1293 else 1294 # This is to correct a missing exclusion in autoconf 2.59 1295 if test x"$FLIBS" != x; then 1296 my_flibs= 1297 for flag in $FLIBS; do 1298 case $flag in 1299 -lcrt*.o) ;; 1300 *) my_flibs="$my_flibs $flag" ;; 1301 esac 1302 done 1303 FLIBS="$my_flibs" 1304 fi 1305 1306 case $build in 1307 # The following is a fix to define FLIBS for ifort on Windows 1308 *-cygwin* | *-mingw*) 1309 case "$F77" in 1310 ifort* | */ifort* | IFORT* | */IFORT*) 1298 1311 FLIBS="-link libifcorert.lib $LIBS /NODEFAULTLIB:libc.lib";; 1299 esac;; 1300 *-hp-*) 1301 FLIBS="$FLIBS -lm";; 1302 *-ibm-*) 1303 FLIBS=`echo $FLIBS | sed 's/-lc)/-lc/g'` ;; 1304 *-linux-*) 1305 case "$F77" in 1306 pgf77* | */pgf77* | pgf90* | */pgf90*) 1312 compile_f2c*) 1313 FLIBS=`$F77 -FLIBS` ;; 1314 esac;; 1315 *-hp-*) 1316 FLIBS="$FLIBS -lm";; 1317 *-ibm-*) 1318 FLIBS=`echo $FLIBS | sed 's/-lc)/-lc/g'` ;; 1319 *-linux-*) 1320 case "$F77" in 1321 pgf77* | */pgf77* | pgf90* | */pgf90*) 1307 1322 # ask linker to go through the archives multiple times 1308 1323 # (the Fortran compiler seems to do that automatically... 1309 FLIBS="-Wl,--start-group $FLIBS -Wl,--end-group" ;; 1310 esac 1311 esac 1324 FLIBS="-Wl,--start-group $FLIBS -Wl,--end-group" ;; 1325 esac 1326 esac 1327 ac_cv_f77_libs="$FLIBS" 1328 fi 1329 1330 AC_LANG_POP([Fortran 77]) 1312 1331 1313 1332 ]) # AC_COIN_F77_WRAPPERS … … 1335 1354 *-cygwin* | *-mingw*) 1336 1355 if test "$enable_doscompile" = msvc ; then 1337 coin_f77_comps="ifort fl32 "1356 coin_f77_comps="ifort fl32 compile_f2c" 1338 1357 else 1339 coin_f77_comps="gfortran g77 ifort fl32 "1358 coin_f77_comps="gfortran g77 ifort fl32 compile_f2c" 1340 1359 fi ;; 1341 1360 sparc-sun-solaris*) … … 1777 1796 # Correct cygpath for minGW (ToDo!) 1778 1797 AC_MSG_NOTICE([Build is "$build".]) 1798 mydos2unix='| dos2unix' 1779 1799 case $build in 1780 1800 *-mingw*) 1781 1801 CYGPATH_W=echo 1802 mydos2unix= 1782 1803 ;; 1783 1804 esac … … 1803 1824 -e 's%lib /OUT:%lib -OUT:%' \ 1804 1825 -e "s%cygpath -w%$CYGPATH_W%" \ 1805 -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo \\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \1826 -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo '"$mydos2unix"'\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \ 1806 1827 -e 's/$AR t/lib -nologo -list/' \ 1807 1828 -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \ … … 1955 1976 if test x"$coin_vpath_link_files" = x; then : ; else 1956 1977 lnkcmd= 1957 if test "$enable_doscompile" = yes; then1978 if test "$enable_doscompile" = mingw; then 1958 1979 lnkcmd=cp 1959 1980 fi … … 2283 2304 test $m4_tolower(coin_has_$1) != skipping]) 2284 2305 AC_MSG_RESULT([$m4_tolower(coin_has_$1)]) 2285 ]) # AC_COIN_HAS 2306 ]) # AC_COIN_HAS_PROJECT 2286 2307 2287 2308 ########################################################################### 2288 2309 # COIN_HAS_USER_LIBRARY # 2289 2310 ########################################################################### 2290 2291 # This macro sets up usage of a library with header files. It defines 2292 # the LBRYINCDIR variable, and it defines COIN_HAS_LBRY preprocessor 2293 # macro and makefile conditional. The first argument should be the 2294 # full name (LibraryName) of the library, and the second argument (in 2295 # upper case letters) the abbreviation (LBRY). This macro also 2296 # introduces the configure arguments --with-libraryname-incdir and 2297 # --with-libraryname-lib which have to be both given by a user to use 2298 # this solver to tell the configure script where the include files and 2299 # the library are located. Those arguments can also be given as 2300 # environement variables LBRYINCDIR and LBRYLIB, but a --with-* 2301 # argument overwrites an environment variable. If a third argument is 2302 # given, it is assumed that this is the name of a header file that can 2303 # be checked for in the given include directory, and if a fourth 2304 # argument is given, it is assumed to be the name of a C function 2305 # which is given and defined in the library, and a test is done to 2306 # check if that symbol is defined in the library. 2307 # If it possible to disable the check, by specifying 2308 # --disable-libraryname-libcheck - this is a workaround for platforms 2309 # where checks don't work (yet) properly. 2311 # This macro sets up usage of a user library with header files. The assumption 2312 # is that the header file(s) and library do not reside in standard system 2313 # directories, hence both the include directory and link flags must be 2314 # specified. There are two mandatory arguments and two optional arguments. 2315 # 2316 # The first argument (mandatory) should be a name (LibraryName) for the 2317 # library. The second argument (mandatory) should be an abbreviation in 2318 # upper case letters (LBRY) for the library. Ultimately, the macro will 2319 # specify two variables, LBRYINCDIR and LBRYLIB, to be substituted in files 2320 # generated during configuration; a preprocessor symbol COIN_HAS_LBRY; and a 2321 # matching automake conditional COIN_HAS_LBRY. LBRYINCDIR should specify the 2322 # directory containing include files for the library. LBRYLIB should specify 2323 # the flags necessary to link to the library. 2324 # 2325 # The macro defines three configure arguments, --with-libraryname-incdir, 2326 # --with-libraryname-lib, and --disable-libraryname-libcheck, by converting 2327 # LibraryName to lower case. 2328 # 2329 # LBRYINCDIR and LBRYLIB can be specified as environment variables or as 2330 # part of the configure command using --with-libraryname-incdir and 2331 # --with-libraryname-lib, respectively. Command line arguments override 2332 # environment variables. 2333 # 2334 # If a third argument is given, it should specify a file in LBRYINCDIR. The 2335 # macro will check for the presence of the file. If a fourth argument is given, 2336 # it should specify a function name, `fname'. The macro will attempt to link a 2337 # trivial program containing a parameterless call to the function, `fname()', 2338 # using the LBRYLIB flags. The link check uses C as the language; this has been 2339 # adequate to date but has limitations. It is possible to disable the link 2340 # check by specifying --disable-libraryname-libcheck. This is a workaround for 2341 # instances where the link check does not work properly, for whatever reason. 2342 # If you're trying to link to a Fortran library, consider using F77_FUNC or 2343 # FC_FUNC to obtain a mangled fname appropriate for use from C code. For a C++ 2344 # library, you're on your own unless the library declares some function with 2345 # extern "C" linkage. Otherwise, you'll have to somehow find the mangled C++ 2346 # name. 2310 2347 2311 2348 AC_DEFUN([AC_COIN_HAS_USER_LIBRARY], 2312 [ AC_REQUIRE([AC_COIN_PROJECTDIR_INIT])2313 AC_MSG_CHECKING(if user provides library for $1)2349 [ AC_REQUIRE([AC_COIN_PROJECTDIR_INIT]) 2350 AC_MSG_CHECKING(if user provides library for $1) 2314 2351 2315 2352 # Check for header file directory 2316 AC_ARG_WITH(m4_tolower($1)-incdir, 2317 AC_HELP_STRING([--with-m4_tolower($1)-incdir], 2318 [specify the directory with the header files for library $1]), 2319 [$2INCDIR=`cd $withval; pwd`]) 2353 2354 AC_ARG_WITH(m4_tolower($1)-incdir, 2355 AS_HELP_STRING([--with-m4_tolower($1)-incdir], 2356 [specify the header file directory for library $1]), 2357 [$2INCDIR=`cd $withval; pwd`]) 2358 2320 2359 # Check for library directory 2321 AC_ARG_WITH(m4_tolower($1)-lib, 2322 AC_HELP_STRING([--with-m4_tolower($1)-lib], 2323 [specify the flags to link with the library $1]), 2324 [$2LIB=$withval]) 2360 2361 AC_ARG_WITH(m4_tolower($1)-lib, 2362 AS_HELP_STRING([--with-m4_tolower($1)-lib], 2363 [specify the flags used to link with the library $1]), 2364 [$2LIB=$withval]) 2365 2325 2366 # Switch to disable library check if requested 2326 AC_ARG_ENABLE(m4_tolower($1)-libcheck, 2327 AC_HELP_STRING([--enable-m4_tolower($1)-libcheck], 2328 [use disable-m4_tolower($1)-libcheck to skip the link check at configuration time]), 2329 [m4_tolower($1)_libcheck=$enableval], 2330 [m4_tolower($1)_libcheck=yes]) 2331 2332 if test x"$$2INCDIR" != x || test x"$$2LIB" != x; then 2333 m4_tolower(coin_has_$2)=true 2334 else 2335 m4_tolower(coin_has_$2)=false 2336 fi 2337 2338 if test $m4_tolower(coin_has_$2) = true; then 2339 # Check either both arguments or none are given 2340 if test x"$$2INCDIR" = x || test x"$$2LIB" = x; then 2341 AC_MSG_ERROR([You need to specify both --with-m4_tolower($1)-incdir and --with-m4_tolower($1)-lib if you want to use library $1]) 2342 fi 2343 AC_MSG_RESULT(yes) 2344 # Check if the given header file is there 2345 m4_ifvaln([$3],[AC_CHECK_FILE([$$2INCDIR/$3],[], 2346 [AC_MSG_ERROR([Cannot find file $3 in $$2INCDIR])])]) 2347 # Check if the symbol is provided in the library 2348 # ToDo: FOR NOW WE ASSUME THAT WE ARE USING THE C++ COMPILER 2349 m4_ifvaln([$4],[if test x"$m4_tolower($1)_libcheck" != xno; then 2350 coin_save_LIBS="$LIBS" 2351 LIBS="$$2LIB $ADDLIBS" 2352 AC_MSG_CHECKING([whether symbol $4 is available with $2]) 2353 AC_LANG_PUSH(C) 2354 # ToDo find out what to do about extern "C" 2355 # AC_TRY_LINK([extern "C" {void $4();}],[$4()], 2356 AC_TRY_LINK([void $4();],[$4()], 2357 [AC_MSG_RESULT(yes)], 2358 [AC_MSG_RESULT(no) 2359 AC_MSG_ERROR([Cannot find symbol $4 with $2])]) 2360 AC_LANG_POP(C) 2361 LIBS="$coin_save_LIBS" 2362 fi]) 2363 ADDLIBS="$$2LIB $ADDLIBS" 2364 AC_DEFINE(COIN_HAS_$2,[1],[Define to 1 if the $1 package is used]) 2365 else 2366 AC_MSG_RESULT(no) 2367 fi 2368 2369 AC_SUBST($2INCDIR) 2370 AC_SUBST($2LIB) 2371 AM_CONDITIONAL(COIN_HAS_$2, 2372 test $m4_tolower(coin_has_$2) = true) 2373 ]) #AC_COIN_HAS_SOLVER 2367 2368 AC_ARG_ENABLE(m4_tolower($1)-libcheck, 2369 AS_HELP_STRING([--enable-m4_tolower($1)-libcheck], 2370 [use disable-m4_tolower($1)-libcheck to skip the link 2371 check at configuration time]), 2372 [m4_tolower($1)_libcheck=$enableval], 2373 [m4_tolower($1)_libcheck=yes]) 2374 2375 # At this point, if we're going to use the library, both LBRYINCDIR and 2376 # LBRYLIB must be defined and not empty. 2377 2378 if test x"$$2INCDIR" != x || test x"$$2LIB" != x; then 2379 if test x"$$2INCDIR" = x || test x"$$2LIB" = x; then 2380 AC_MSG_ERROR([You need to specify both an include directory and link flags to use library $1. Use --with-m4_tolower($1)-incdir of environment variable $$2INCDIR to specify the include directory. Use --with-m4_tolower($1)-lib or environment variable $$2LIB to specify link flags.]) 2381 fi 2382 m4_tolower(coin_has_$2)=true 2383 AC_MSG_RESULT(yes) 2384 else 2385 m4_tolower(coin_has_$2)=false 2386 AC_MSG_RESULT(no) 2387 fi 2388 2389 # If we have instructions for use, consider header and link checks. 2390 2391 if test $m4_tolower(coin_has_$2) = true; then 2392 2393 # If argument 3 (file) is given, check for the file. Typically this will be a 2394 # header file, but that's not assumed. 2395 2396 m4_ifval([$3], 2397 [AC_CHECK_FILE([$$2INCDIR/$3],[], 2398 [AC_MSG_ERROR([Cannot find file $3 in $$2INCDIR])])]) 2399 2400 # Now see if we can link the function. There are arguments for and against 2401 # assuming argument 3 is a header file declaring the function. A correct 2402 # function declaration is the main argument in favour. Having to cope with 2403 # possible dependencies or other oddities are the main arguments against. 2404 # Force the use of C as the best single choice amongst C++, C, and Fortran. 2405 # Obviously, this has limits. 2406 2407 m4_ifvaln([$4], 2408 [if test x"$m4_tolower($1)_libcheck" != xno; then 2409 coin_save_LIBS="$LIBS" 2410 LIBS="$$2LIB $ADDLIBS" 2411 coin_$2_link=no 2412 AC_LANG_PUSH(C) 2413 for fnm in $4 ; do 2414 AC_MSG_CHECKING([whether symbol $fnm is available with $2]) 2415 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[$fnm()]])], 2416 [AC_MSG_RESULT(yes) 2417 coin_$2_link=yes 2418 break], 2419 [AC_MSG_RESULT(no)]) 2420 done 2421 AC_LANG_POP(C) 2422 if test x"$coin_$2_link" = xyes ; then 2423 LIBS="$coin_save_LIBS" 2424 else 2425 AC_MSG_ERROR([Cannot find symbol(s) $4 with $2]) 2426 fi 2427 fi]) 2428 2429 # If we make it this far, we've verified the file and linked the function. Add 2430 # the necessary link flags to ADDLIBS and define the preprocessor symbol 2431 # COIN_HAS_LBRY. 2432 2433 ADDLIBS="$$2LIB $ADDLIBS" 2434 AC_DEFINE(COIN_HAS_$2,[1],[Define to 1 if the $1 package is used]) 2435 fi 2436 2437 # Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the 2438 # automake conditional. These actions must occur unconditionally. 2439 2440 AC_SUBST($2INCDIR) 2441 AC_SUBST($2LIB) 2442 AM_CONDITIONAL(COIN_HAS_$2, test $m4_tolower(coin_has_$2) = true) 2443 ]) #AC_COIN_HAS_USER_LIBRARY 2374 2444 2375 2445 ########################################################################### … … 2669 2739 if test x"$use_lapack" != x; then 2670 2740 if test "$use_lapack" = "BUILD"; then 2671 # Don't check for course code if this is executed in ThirdParty/ Blas2741 # Don't check for course code if this is executed in ThirdParty/Lapack 2672 2742 if test "$PACKAGE_NAME" != ThirdPartyLapack; then 2673 2743 if test -r $coin_lapackobjdir/.MakeOk; then :; else -
stable/0.5/headers/configall_system_msc.h
r290 r352 16 16 /* #undef F77_DUMMY_MAIN */ 17 17 18 #ifndef COIN_USE_F2C 18 19 /* Define to a macro mangling the given C identifier (in lower and upper 19 20 case), which must not contain underscores, for linking with Fortran. */ 20 # define F77_FUNC(name,NAME) NAME21 # define F77_FUNC(name,NAME) NAME 21 22 22 23 /* As F77_FUNC, but for C identifiers containing underscores. */ 23 #define F77_FUNC_(name,NAME) NAME 24 # define F77_FUNC_(name,NAME) NAME 25 #else 26 /* Define to a macro mangling the given C identifier (in lower and upper 27 case), which must not contain underscores, for linking with Fortran. */ 28 # define F77_FUNC(name,NAME) name ## _ 29 30 /* As F77_FUNC, but for C identifiers containing underscores. */ 31 # define F77_FUNC_(name,NAME) name ## __ 32 #endif 24 33 25 34 /* Define if F77 and FC dummy `main' functions are identical. */ -
stable/0.5/run_autotools
- Property svn:keywords set to Author Date Id Revision
r215 r352 1 1 #!/bin/sh 2 3 # Copyright (C) 2006, 2007 International Business Machines. 4 # All Rights Reserved. 5 # This file is distributed under the Common Public License. 6 # It is part of the BuildTools project in COIN-OR (www.coin-or.org) 7 # 8 ## $Id$ 9 # 10 # Author: Andreas Waechter IBM 2006-04-14 11 2 12 3 13 ver_autoconf='2.59'
Note: See TracChangeset
for help on using the changeset viewer.