Changeset 3252


Ignore:
Timestamp:
Jun 29, 2014 10:11:29 PM (5 years ago)
Author:
stefan
Message:

reenable check for gmp

Location:
ThirdParty/Glpk/branches/autotools-update
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Glpk/branches/autotools-update/config_glpk.h.in

    r3248 r3252  
    11/* config_glpk.h.in.  Generated from configure.ac by autoheader.  */
     2
     3/* Define to 1 if GMP is available */
     4#undef COIN_HAS_GMP
    25
    36/* SVN revision number of project */
     
    2124/* Define to 1 if you have the <dlfcn.h> header file. */
    2225#undef HAVE_DLFCN_H
     26
     27/* Define to 1 if GMP is available */
     28#undef HAVE_GMP
    2329
    2430/* Define to 1 if you have the <inttypes.h> header file. */
  • ThirdParty/Glpk/branches/autotools-update/configure

    r3250 r3252  
    781781with_sysroot
    782782enable_libtool_lock
     783enable_gmp
    783784enable_odbc
    784785enable_mysql
     
    14251426                          speeds up one-time build
    14261427  --disable-libtool-lock  avoid locking (might break parallel builds)
     1428  --disable-gmp           do not compile with GNU multiple precision library
    14271429  --enable-odbc           enable MathProg ODBC support [[default=auto]]
    14281430  --enable-mysql          enable MathProg MySQL support [[default=auto]]
     
    1238412386
    1238512387
    12386 #AC_COIN_CHECK_GMP(Glpk)
    12387 #if test $coin_has_gmp = yes; then
    12388 #  AC_DEFINE([HAVE_GMP],[1],[Define to 1 if GMP is available])
    12389 #fi
     12388
     12389
     12390# Check whether --enable-gmp was given.
     12391if test "${enable_gmp+set}" = set; then :
     12392  enableval=$enable_gmp; coin_enable_gmp=$enableval
     12393else
     12394  coin_enable_gmp=yes
     12395fi
     12396
     12397
     12398coin_has_gmp=no
     12399if test $coin_enable_gmp = yes; then
     12400  ac_ext=c
     12401ac_cpp='$CPP $CPPFLAGS'
     12402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     12403ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     12404ac_compiler_gnu=$ac_cv_c_compiler_gnu
     12405
     12406  ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
     12407if test "x$ac_cv_header_gmp_h" = xyes; then :
     12408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lgmp" >&5
     12409$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; }
     12410if ${ac_cv_lib_gmp___gmpz_init+:} false; then :
     12411  $as_echo_n "(cached) " >&6
     12412else
     12413  ac_check_lib_save_LIBS=$LIBS
     12414LIBS="-lgmp  $LIBS"
     12415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     12416/* end confdefs.h.  */
     12417
     12418/* Override any GCC internal prototype to avoid an error.
     12419   Use char because int might match the return type of a GCC
     12420   builtin and then its argument prototype would still apply.  */
     12421#ifdef __cplusplus
     12422extern "C"
     12423#endif
     12424char __gmpz_init ();
     12425int
     12426main ()
     12427{
     12428return __gmpz_init ();
     12429  ;
     12430  return 0;
     12431}
     12432_ACEOF
     12433if ac_fn_c_try_link "$LINENO"; then :
     12434  ac_cv_lib_gmp___gmpz_init=yes
     12435else
     12436  ac_cv_lib_gmp___gmpz_init=no
     12437fi
     12438rm -f core conftest.err conftest.$ac_objext \
     12439    conftest$ac_exeext conftest.$ac_ext
     12440LIBS=$ac_check_lib_save_LIBS
     12441fi
     12442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5
     12443$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; }
     12444if test "x$ac_cv_lib_gmp___gmpz_init" = xyes; then :
     12445  coin_has_gmp=yes
     12446fi
     12447
     12448fi
     12449
     12450
     12451
     12452  if test $coin_has_gmp = yes ; then
     12453    GLPK_LIBS="-lgmp $GLPK_LIBS"
     12454
     12455$as_echo "#define COIN_HAS_GMP 1" >>confdefs.h
     12456
     12457  fi
     12458  ac_ext=c
     12459ac_cpp='$CPP $CPPFLAGS'
     12460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     12461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     12462ac_compiler_gnu=$ac_cv_c_compiler_gnu
     12463
     12464fi
     12465
     12466if test $coin_has_gmp = yes; then
     12467
     12468$as_echo "#define HAVE_GMP 1" >>confdefs.h
     12469
     12470fi
    1239012471
    1239112472ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
     
    1240212483
    1240312484
    12404 #AC_COIN_CHECK_LIBM(Glpk)
     12485#Does Glpk needs -lm? AC_COIN_CHECK_LIBM(Glpk)
    1240512486
    1240612487###########################################################################
  • ThirdParty/Glpk/branches/autotools-update/configure.ac

    r3250 r3252  
    5151AC_LANG_PUSH(C)
    5252
    53 #AC_COIN_CHECK_GMP(Glpk)
    54 #if test $coin_has_gmp = yes; then
    55 #  AC_DEFINE([HAVE_GMP],[1],[Define to 1 if GMP is available])
    56 #fi
     53AC_COIN_CHECK_GMP(Glpk)
     54if test $coin_has_gmp = yes; then
     55  AC_DEFINE([HAVE_GMP],[1],[Define to 1 if GMP is available])
     56fi
    5757
    5858AC_CHECK_FUNC([vsnprintf])
     
    6060AC_LANG_POP(C)
    6161
    62 #AC_COIN_CHECK_LIBM(Glpk)
     62#Does Glpk needs -lm? AC_COIN_CHECK_LIBM(Glpk)
    6363
    6464###########################################################################
Note: See TracChangeset for help on using the changeset viewer.