Changeset 2424


Ignore:
Timestamp:
Sep 3, 2011 1:05:41 PM (8 years ago)
Author:
stefan
Message:

sync with trunk rev2423

Location:
stable/0.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable/0.7

  • stable/0.7/coin.m4

    r2337 r2424  
    20672067
    20682068# This macro defined the --enable-gnu-packages flag.  This can be used
    2069 # to check if a user wants to compile GNU packges (such as readline or
    2070 # zlib) into the executable.  By default, GNU packages are disabled.
     2069# to check if a user wants to compile GNU packges (such as readline)
     2070# into the executable.  By default, GNU packages are disabled.
    20712071# This also defines the automake conditional COIN_ENABLE_GNU_PACKAGES
    20722072
     
    21122112# it adds the linker flag to the variables X_LIBS, X_PCLIBS, and X_LIBS_INSTALLED.
    21132113
     2114# TODO the macro name should be changed to AC_COIN_CHECK_ZLIB
     2115
    21142116AC_DEFUN([AC_COIN_CHECK_GNU_ZLIB],
    2115 [AC_REQUIRE([AC_COIN_ENABLE_GNU_PACKAGES])
     2117[
    21162118AC_BEFORE([AC_COIN_PROG_CXX],[$0])
    21172119AC_BEFORE([AC_COIN_PROG_CC],[$0])
     
    21202122
    21212123coin_has_zlib=no
    2122 if test $coin_enable_gnu = yes; then
     2124
     2125AC_ARG_ENABLE([zlib],
     2126              [AC_HELP_STRING([--disable-zlib],[do not compile with compression library zlib])],
     2127              [coin_enable_zlib=$enableval],
     2128              [coin_enable_zlib=yes])
     2129
     2130if test $coin_enable_zlib = yes; then
    21232131  AC_COIN_CHECK_HEADER([zlib.h],[coin_has_zlib=yes])
    21242132
    21252133  if test $coin_has_zlib = yes; then
    2126     AC_CHECK_LIB([z],[gzopen],
    2127                  [coin_foreach_w([myvar], [$1], [
     2134    AC_CHECK_LIB([z],[gzopen],[:],[coin_has_zlib=no])
     2135  fi
     2136
     2137  if test $coin_has_zlib = yes; then
     2138    coin_foreach_w([myvar], [$1], [
    21282139                    m4_toupper(myvar)_LIBS="-lz $m4_toupper(myvar)_LIBS"
    21292140                    m4_toupper(myvar)_PCLIBS="-lz $m4_toupper(myvar)_PCLIBS"
    21302141                    m4_toupper(myvar)_LIBS_INSTALLED="-lz $m4_toupper(myvar)_LIBS_INSTALLED"
    2131                   ])
    2132                  :],
    2133                  [coin_has_zlib=no])
    2134   fi
    2135 
    2136   if test $coin_has_zlib = yes; then
     2142                   ])
    21372143    AC_DEFINE([COIN_HAS_ZLIB],[1],[Define to 1 if zlib is available])
    21382144  fi
     
    21512157# of arguments X, it adds the linker flag to the variables X_LIBS, X_PCLIBS, and X_LIBS_INSTALLED.
    21522158
     2159# TODO the macro name should be changed to AC_COIN_CHECK_BZLIB
     2160
    21532161AC_DEFUN([AC_COIN_CHECK_GNU_BZLIB],
    2154 [AC_REQUIRE([AC_COIN_ENABLE_GNU_PACKAGES])
     2162[
    21552163AC_BEFORE([AC_COIN_PROG_CXX],[$0])
    21562164AC_BEFORE([AC_COIN_PROG_CC],[$0])
     
    21582166AC_BEFORE([$0],[AC_COIN_FINALIZE])
    21592167
     2168AC_ARG_ENABLE([bzlib],
     2169              [AC_HELP_STRING([--disable-bzlib],[do not compile with compression library bzlib])],
     2170              [coin_enable_bzlib=$enableval],
     2171              [coin_enable_bzlib=yes])
     2172
    21602173coin_has_bzlib=no
    2161 if test $coin_enable_gnu = yes; then
     2174if test $coin_enable_bzlib = yes; then
    21622175  AC_COIN_CHECK_HEADER([bzlib.h],[coin_has_bzlib=yes])
    21632176
    21642177  if test $coin_has_bzlib = yes; then
    2165     AC_CHECK_LIB([bz2],[BZ2_bzReadOpen],
    2166                  [coin_foreach_w([myvar], [$1], [
     2178    AC_CHECK_LIB([bz2],[BZ2_bzReadOpen],[:],[coin_has_bzlib=no])
     2179  fi
     2180
     2181  if test $coin_has_bzlib = yes; then
     2182    coin_foreach_w([myvar], [$1], [
    21672183                    m4_toupper(myvar)_LIBS="-lbz2 $m4_toupper(myvar)_LIBS"
    21682184                    m4_toupper(myvar)_PCLIBS="-lbz2 $m4_toupper(myvar)_PCLIBS"
    21692185                    m4_toupper(myvar)_LIBS_INSTALLED="-lbz2 $m4_toupper(myvar)_LIBS_INSTALLED"
    21702186                  ])
    2171                  :],
    2172                  [coin_has_bzlib=no])
    2173   fi
    2174 
    2175   if test $coin_has_bzlib = yes; then
    21762187    AC_DEFINE([COIN_HAS_BZLIB],[1],[Define to 1 if bzlib is available])
    21772188  fi
     
    22152226  # Now we check for readline
    22162227  if test $coin_has_readline = yes; then
    2217     AC_CHECK_LIB([readline],[readline],
    2218                  [coin_foreach_w([myvar], [$1], [
     2228    AC_CHECK_LIB([readline],[readline],[:],[coin_has_readline=no])
     2229  fi
     2230
     2231  if test $coin_has_readline = yes; then
     2232    coin_foreach_w([myvar], [$1], [
    22192233                    m4_toupper(myvar)_LIBS="-lreadline $LIBS $m4_toupper(myvar)_LIBS"
    22202234                    m4_toupper(myvar)_PCLIBS="-lreadline $LIBS $m4_toupper(myvar)_PCLIBS"
    22212235                    m4_toupper(myvar)_LIBS_INSTALLED="-lreadline $LIBS $m4_toupper(myvar)_LIBS_INSTALLED"
    2222                   ])
    2223                  :],
    2224                  [coin_has_readline=no])
    2225   fi
    2226 
    2227   if test $coin_has_readline = yes; then
     2236                   ])
    22282237    AC_DEFINE([COIN_HAS_READLINE],[1],[Define to 1 if readline is available])
    22292238  fi
     
    22322241fi
    22332242]) # AC_COIN_CHECK_GNU_READLINE
     2243
     2244###########################################################################
     2245#                              COIN_CHECK_GMP                             #
     2246###########################################################################
     2247
     2248# This macro checks for the gmp library.  If found, it defines the C
     2249# preprocessor variable COIN_HAS_GMP.  Further, for a (space separated) list
     2250# of arguments X, it adds the linker flag to the variables X_LIBS, X_PCLIBS, and X_LIBS_INSTALLED.
     2251
     2252AC_DEFUN([AC_COIN_CHECK_GMP],
     2253[
     2254AC_BEFORE([AC_COIN_PROG_CXX],[$0])
     2255AC_BEFORE([AC_COIN_PROG_CC],[$0])
     2256AC_BEFORE([AC_COIN_PROG_F77],[$0])
     2257AC_BEFORE([$0],[AC_COIN_FINALIZE])
     2258
     2259AC_ARG_ENABLE([gmp],
     2260              [AC_HELP_STRING([--disable-gmp],[do not compile with GNU multiple precision library])],
     2261              [coin_enable_gmp=$enableval],
     2262              [coin_enable_gmp=yes])
     2263
     2264coin_has_gmp=no
     2265if test $coin_enable_gmp = yes; then
     2266  AC_COIN_CHECK_HEADER([gmp.h],[AC_CHECK_LIB([gmp],[__gmpz_init],[coin_has_gmp=yes])])
     2267 
     2268  if test $coin_has_gmp = yes ; then
     2269    coin_foreach_w([myvar], [$1], [
     2270                    m4_toupper(myvar)_LIBS="-lgmp $m4_toupper(myvar)_LIBS"
     2271                    m4_toupper(myvar)_PCLIBS="-lgmp $m4_toupper(myvar)_PCLIBS"
     2272                    m4_toupper(myvar)_LIBS_INSTALLED="-lgmp $m4_toupper(myvar)_LIBS_INSTALLED"
     2273                   ])
     2274    AC_DEFINE([COIN_HAS_GMP],[1],[Define to 1 if GMP is available])
     2275  fi
     2276fi
     2277]) # AC_COIN_CHECK_GMP
    22342278
    22352279###########################################################################
  • 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.