Changeset 1720 for trunk/Cbc


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

add check for readline, which is uses in CbcOrClpParam? (from Clp)

Location:
trunk/Cbc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/configure

    r1683 r1720  
    11021102                          disables deduction of Makefile dependencies from
    11031103                          package linker flags
     1104  --enable-gnu-packages   compile with GNU packages (disabled by default)
    11041105  --enable-cbc-parallel   enables compilation of the SMP version of Cbc
    11051106
     
    59825983*-*-irix6*)
    59835984  # Find out which ABI we are using.
    5984   echo '#line 5984 "configure"' > conftest.$ac_ext
     5985  echo '#line 5985 "configure"' > conftest.$ac_ext
    59855986  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    59865987  (eval $ac_compile) 2>&5
     
    71167117
    71177118# Provide some information about the compiler.
    7118 echo "$as_me:7118:" \
     7119echo "$as_me:7119:" \
    71197120     "checking for Fortran 77 compiler version" >&5
    71207121ac_compiler=`set X $ac_compile; echo $2`
     
    81838184   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81848185   -e 's:$: $lt_compiler_flag:'`
    8185    (eval echo "\"\$as_me:8185: $lt_compile\"" >&5)
     8186   (eval echo "\"\$as_me:8186: $lt_compile\"" >&5)
    81868187   (eval "$lt_compile" 2>conftest.err)
    81878188   ac_status=$?
    81888189   cat conftest.err >&5
    8189    echo "$as_me:8189: \$? = $ac_status" >&5
     8190   echo "$as_me:8190: \$? = $ac_status" >&5
    81908191   if (exit $ac_status) && test -s "$ac_outfile"; then
    81918192     # The compiler can only warn and ignore the option if not recognized
     
    84518452   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    84528453   -e 's:$: $lt_compiler_flag:'`
    8453    (eval echo "\"\$as_me:8453: $lt_compile\"" >&5)
     8454   (eval echo "\"\$as_me:8454: $lt_compile\"" >&5)
    84548455   (eval "$lt_compile" 2>conftest.err)
    84558456   ac_status=$?
    84568457   cat conftest.err >&5
    8457    echo "$as_me:8457: \$? = $ac_status" >&5
     8458   echo "$as_me:8458: \$? = $ac_status" >&5
    84588459   if (exit $ac_status) && test -s "$ac_outfile"; then
    84598460     # The compiler can only warn and ignore the option if not recognized
     
    85558556   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    85568557   -e 's:$: $lt_compiler_flag:'`
    8557    (eval echo "\"\$as_me:8557: $lt_compile\"" >&5)
     8558   (eval echo "\"\$as_me:8558: $lt_compile\"" >&5)
    85588559   (eval "$lt_compile" 2>out/conftest.err)
    85598560   ac_status=$?
    85608561   cat out/conftest.err >&5
    8561    echo "$as_me:8561: \$? = $ac_status" >&5
     8562   echo "$as_me:8562: \$? = $ac_status" >&5
    85628563   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    85638564   then
     
    1090010901  lt_status=$lt_dlunknown
    1090110902  cat > conftest.$ac_ext <<EOF
    10902 #line 10902 "configure"
     10903#line 10903 "configure"
    1090310904#include "confdefs.h"
    1090410905
     
    1100011001  lt_status=$lt_dlunknown
    1100111002  cat > conftest.$ac_ext <<EOF
    11002 #line 11002 "configure"
     11003#line 11003 "configure"
    1100311004#include "confdefs.h"
    1100411005
     
    1334413345   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1334513346   -e 's:$: $lt_compiler_flag:'`
    13346    (eval echo "\"\$as_me:13346: $lt_compile\"" >&5)
     13347   (eval echo "\"\$as_me:13347: $lt_compile\"" >&5)
    1334713348   (eval "$lt_compile" 2>conftest.err)
    1334813349   ac_status=$?
    1334913350   cat conftest.err >&5
    13350    echo "$as_me:13350: \$? = $ac_status" >&5
     13351   echo "$as_me:13351: \$? = $ac_status" >&5
    1335113352   if (exit $ac_status) && test -s "$ac_outfile"; then
    1335213353     # The compiler can only warn and ignore the option if not recognized
     
    1344813449   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1344913450   -e 's:$: $lt_compiler_flag:'`
    13450    (eval echo "\"\$as_me:13450: $lt_compile\"" >&5)
     13451   (eval echo "\"\$as_me:13451: $lt_compile\"" >&5)
    1345113452   (eval "$lt_compile" 2>out/conftest.err)
    1345213453   ac_status=$?
    1345313454   cat out/conftest.err >&5
    13454    echo "$as_me:13454: \$? = $ac_status" >&5
     13455   echo "$as_me:13455: \$? = $ac_status" >&5
    1345513456   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1345613457   then
     
    1501815019   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1501915020   -e 's:$: $lt_compiler_flag:'`
    15020    (eval echo "\"\$as_me:15020: $lt_compile\"" >&5)
     15021   (eval echo "\"\$as_me:15021: $lt_compile\"" >&5)
    1502115022   (eval "$lt_compile" 2>conftest.err)
    1502215023   ac_status=$?
    1502315024   cat conftest.err >&5
    15024    echo "$as_me:15024: \$? = $ac_status" >&5
     15025   echo "$as_me:15025: \$? = $ac_status" >&5
    1502515026   if (exit $ac_status) && test -s "$ac_outfile"; then
    1502615027     # The compiler can only warn and ignore the option if not recognized
     
    1512215123   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1512315124   -e 's:$: $lt_compiler_flag:'`
    15124    (eval echo "\"\$as_me:15124: $lt_compile\"" >&5)
     15125   (eval echo "\"\$as_me:15125: $lt_compile\"" >&5)
    1512515126   (eval "$lt_compile" 2>out/conftest.err)
    1512615127   ac_status=$?
    1512715128   cat out/conftest.err >&5
    15128    echo "$as_me:15128: \$? = $ac_status" >&5
     15129   echo "$as_me:15129: \$? = $ac_status" >&5
    1512915130   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1513015131   then
     
    1732917330   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1733017331   -e 's:$: $lt_compiler_flag:'`
    17331    (eval echo "\"\$as_me:17331: $lt_compile\"" >&5)
     17332   (eval echo "\"\$as_me:17332: $lt_compile\"" >&5)
    1733217333   (eval "$lt_compile" 2>conftest.err)
    1733317334   ac_status=$?
    1733417335   cat conftest.err >&5
    17335    echo "$as_me:17335: \$? = $ac_status" >&5
     17336   echo "$as_me:17336: \$? = $ac_status" >&5
    1733617337   if (exit $ac_status) && test -s "$ac_outfile"; then
    1733717338     # The compiler can only warn and ignore the option if not recognized
     
    1759717598   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1759817599   -e 's:$: $lt_compiler_flag:'`
    17599    (eval echo "\"\$as_me:17599: $lt_compile\"" >&5)
     17600   (eval echo "\"\$as_me:17600: $lt_compile\"" >&5)
    1760017601   (eval "$lt_compile" 2>conftest.err)
    1760117602   ac_status=$?
    1760217603   cat conftest.err >&5
    17603    echo "$as_me:17603: \$? = $ac_status" >&5
     17604   echo "$as_me:17604: \$? = $ac_status" >&5
    1760417605   if (exit $ac_status) && test -s "$ac_outfile"; then
    1760517606     # The compiler can only warn and ignore the option if not recognized
     
    1770117702   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1770217703   -e 's:$: $lt_compiler_flag:'`
    17703    (eval echo "\"\$as_me:17703: $lt_compile\"" >&5)
     17704   (eval echo "\"\$as_me:17704: $lt_compile\"" >&5)
    1770417705   (eval "$lt_compile" 2>out/conftest.err)
    1770517706   ac_status=$?
    1770617707   cat out/conftest.err >&5
    17707    echo "$as_me:17707: \$? = $ac_status" >&5
     17708   echo "$as_me:17708: \$? = $ac_status" >&5
    1770817709   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1770917710   then
     
    2482024821ac_compiler_gnu=$ac_cv_c_compiler_gnu
    2482124822
     24823
     24824
     24825# Check whether --enable-gnu-packages or --disable-gnu-packages was given.
     24826if test "${enable_gnu_packages+set}" = set; then
     24827  enableval="$enable_gnu_packages"
     24828  coin_enable_gnu=$enableval
     24829else
     24830  coin_enable_gnu=no
     24831fi;
     24832
     24833
     24834
     24835
     24836
     24837
     24838
     24839coin_has_readline=no
     24840if test $coin_enable_gnu = yes; then
     24841  #if test x"#include <stdio.h>" = x; then
     24842#  hdr="#include <readline/readline.h>"
     24843#else
     24844#  hdr="#include <stdio.h>"
     24845#fi
     24846#AC_CHECK_HEADERS([readline/readline.h],[coin_has_readline=yes],[],[$hdr])
     24847
     24848for ac_header in readline/readline.h
     24849do
     24850as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     24851echo "$as_me:$LINENO: checking for $ac_header" >&5
     24852echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     24853if eval "test \"\${$as_ac_Header+set}\" = set"; then
     24854  echo $ECHO_N "(cached) $ECHO_C" >&6
     24855else
     24856  cat >conftest.$ac_ext <<_ACEOF
     24857/* confdefs.h.  */
     24858_ACEOF
     24859cat confdefs.h >>conftest.$ac_ext
     24860cat >>conftest.$ac_ext <<_ACEOF
     24861/* end confdefs.h.  */
     24862#include <stdio.h>
     24863
     24864#include <$ac_header>
     24865_ACEOF
     24866rm -f conftest.$ac_objext
     24867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     24868  (eval $ac_compile) 2>conftest.er1
     24869  ac_status=$?
     24870  grep -v '^ *+' conftest.er1 >conftest.err
     24871  rm -f conftest.er1
     24872  cat conftest.err >&5
     24873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     24874  (exit $ac_status); } &&
     24875         { ac_try='test -z "$ac_c_werror_flag"
     24876                         || test ! -s conftest.err'
     24877  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     24878  (eval $ac_try) 2>&5
     24879  ac_status=$?
     24880  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     24881  (exit $ac_status); }; } &&
     24882         { ac_try='test -s conftest.$ac_objext'
     24883  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     24884  (eval $ac_try) 2>&5
     24885  ac_status=$?
     24886  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     24887  (exit $ac_status); }; }; then
     24888  eval "$as_ac_Header=yes"
     24889else
     24890  echo "$as_me: failed program was:" >&5
     24891sed 's/^/| /' conftest.$ac_ext >&5
     24892
     24893eval "$as_ac_Header=no"
     24894fi
     24895rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     24896fi
     24897echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     24898echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     24899if test `eval echo '${'$as_ac_Header'}'` = yes; then
     24900  cat >>confdefs.h <<_ACEOF
     24901#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     24902_ACEOF
     24903 coin_has_readline=yes
     24904fi
     24905
     24906done
     24907
     24908
     24909
     24910  coin_save_LIBS="$LIBS"
     24911  LIBS=
     24912  # First we check if tputs and friends are available
     24913  if test $coin_has_readline = yes; then
     24914    echo "$as_me:$LINENO: checking for library containing tputs" >&5
     24915echo $ECHO_N "checking for library containing tputs... $ECHO_C" >&6
     24916if test "${ac_cv_search_tputs+set}" = set; then
     24917  echo $ECHO_N "(cached) $ECHO_C" >&6
     24918else
     24919  ac_func_search_save_LIBS=$LIBS
     24920ac_cv_search_tputs=no
     24921cat >conftest.$ac_ext <<_ACEOF
     24922/* confdefs.h.  */
     24923_ACEOF
     24924cat confdefs.h >>conftest.$ac_ext
     24925cat >>conftest.$ac_ext <<_ACEOF
     24926/* end confdefs.h.  */
     24927
     24928/* Override any gcc2 internal prototype to avoid an error.  */
     24929#ifdef __cplusplus
     24930extern "C"
     24931#endif
     24932/* We use char because int might match the return type of a gcc2
     24933   builtin and then its argument prototype would still apply.  */
     24934char tputs ();
     24935int
     24936main ()
     24937{
     24938tputs ();
     24939  ;
     24940  return 0;
     24941}
     24942_ACEOF
     24943rm -f conftest.$ac_objext conftest$ac_exeext
     24944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     24945  (eval $ac_link) 2>conftest.er1
     24946  ac_status=$?
     24947  grep -v '^ *+' conftest.er1 >conftest.err
     24948  rm -f conftest.er1
     24949  cat conftest.err >&5
     24950  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     24951  (exit $ac_status); } &&
     24952         { ac_try='test -z "$ac_c_werror_flag"
     24953                         || test ! -s conftest.err'
     24954  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     24955  (eval $ac_try) 2>&5
     24956  ac_status=$?
     24957  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     24958  (exit $ac_status); }; } &&
     24959         { ac_try='test -s conftest$ac_exeext'
     24960  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     24961  (eval $ac_try) 2>&5
     24962  ac_status=$?
     24963  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     24964  (exit $ac_status); }; }; then
     24965  ac_cv_search_tputs="none required"
     24966else
     24967  echo "$as_me: failed program was:" >&5
     24968sed 's/^/| /' conftest.$ac_ext >&5
     24969
     24970fi
     24971rm -f conftest.err conftest.$ac_objext \
     24972      conftest$ac_exeext conftest.$ac_ext
     24973if test "$ac_cv_search_tputs" = no; then
     24974  for ac_lib in ncurses termcap curses; do
     24975    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
     24976    cat >conftest.$ac_ext <<_ACEOF
     24977/* confdefs.h.  */
     24978_ACEOF
     24979cat confdefs.h >>conftest.$ac_ext
     24980cat >>conftest.$ac_ext <<_ACEOF
     24981/* end confdefs.h.  */
     24982
     24983/* Override any gcc2 internal prototype to avoid an error.  */
     24984#ifdef __cplusplus
     24985extern "C"
     24986#endif
     24987/* We use char because int might match the return type of a gcc2
     24988   builtin and then its argument prototype would still apply.  */
     24989char tputs ();
     24990int
     24991main ()
     24992{
     24993tputs ();
     24994  ;
     24995  return 0;
     24996}
     24997_ACEOF
     24998rm -f conftest.$ac_objext conftest$ac_exeext
     24999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     25000  (eval $ac_link) 2>conftest.er1
     25001  ac_status=$?
     25002  grep -v '^ *+' conftest.er1 >conftest.err
     25003  rm -f conftest.er1
     25004  cat conftest.err >&5
     25005  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     25006  (exit $ac_status); } &&
     25007         { ac_try='test -z "$ac_c_werror_flag"
     25008                         || test ! -s conftest.err'
     25009  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     25010  (eval $ac_try) 2>&5
     25011  ac_status=$?
     25012  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     25013  (exit $ac_status); }; } &&
     25014         { ac_try='test -s conftest$ac_exeext'
     25015  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     25016  (eval $ac_try) 2>&5
     25017  ac_status=$?
     25018  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     25019  (exit $ac_status); }; }; then
     25020  ac_cv_search_tputs="-l$ac_lib"
     25021break
     25022else
     25023  echo "$as_me: failed program was:" >&5
     25024sed 's/^/| /' conftest.$ac_ext >&5
     25025
     25026fi
     25027rm -f conftest.err conftest.$ac_objext \
     25028      conftest$ac_exeext conftest.$ac_ext
     25029  done
     25030fi
     25031LIBS=$ac_func_search_save_LIBS
     25032fi
     25033echo "$as_me:$LINENO: result: $ac_cv_search_tputs" >&5
     25034echo "${ECHO_T}$ac_cv_search_tputs" >&6
     25035if test "$ac_cv_search_tputs" != no; then
     25036  test "$ac_cv_search_tputs" = "none required" || LIBS="$ac_cv_search_tputs $LIBS"
     25037
     25038else
     25039  coin_has_readline=no
     25040fi
     25041
     25042  fi
     25043
     25044  # Now we check for readline
     25045  if test $coin_has_readline = yes; then
     25046    echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
     25047echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
     25048if test "${ac_cv_lib_readline_readline+set}" = set; then
     25049  echo $ECHO_N "(cached) $ECHO_C" >&6
     25050else
     25051  ac_check_lib_save_LIBS=$LIBS
     25052LIBS="-lreadline  $LIBS"
     25053cat >conftest.$ac_ext <<_ACEOF
     25054/* confdefs.h.  */
     25055_ACEOF
     25056cat confdefs.h >>conftest.$ac_ext
     25057cat >>conftest.$ac_ext <<_ACEOF
     25058/* end confdefs.h.  */
     25059
     25060/* Override any gcc2 internal prototype to avoid an error.  */
     25061#ifdef __cplusplus
     25062extern "C"
     25063#endif
     25064/* We use char because int might match the return type of a gcc2
     25065   builtin and then its argument prototype would still apply.  */
     25066char readline ();
     25067int
     25068main ()
     25069{
     25070readline ();
     25071  ;
     25072  return 0;
     25073}
     25074_ACEOF
     25075rm -f conftest.$ac_objext conftest$ac_exeext
     25076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     25077  (eval $ac_link) 2>conftest.er1
     25078  ac_status=$?
     25079  grep -v '^ *+' conftest.er1 >conftest.err
     25080  rm -f conftest.er1
     25081  cat conftest.err >&5
     25082  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     25083  (exit $ac_status); } &&
     25084         { ac_try='test -z "$ac_c_werror_flag"
     25085                         || test ! -s conftest.err'
     25086  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     25087  (eval $ac_try) 2>&5
     25088  ac_status=$?
     25089  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     25090  (exit $ac_status); }; } &&
     25091         { ac_try='test -s conftest$ac_exeext'
     25092  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     25093  (eval $ac_try) 2>&5
     25094  ac_status=$?
     25095  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     25096  (exit $ac_status); }; }; then
     25097  ac_cv_lib_readline_readline=yes
     25098else
     25099  echo "$as_me: failed program was:" >&5
     25100sed 's/^/| /' conftest.$ac_ext >&5
     25101
     25102ac_cv_lib_readline_readline=no
     25103fi
     25104rm -f conftest.err conftest.$ac_objext \
     25105      conftest$ac_exeext conftest.$ac_ext
     25106LIBS=$ac_check_lib_save_LIBS
     25107fi
     25108echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
     25109echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
     25110if test $ac_cv_lib_readline_readline = yes; then
     25111  :
     25112else
     25113  coin_has_readline=no
     25114fi
     25115
     25116  fi
     25117
     25118  if test $coin_has_readline = yes; then
     25119
     25120                    CBCLIB_LIBS="-lreadline $LIBS $CBCLIB_LIBS"
     25121                    CBCLIB_PCLIBS="-lreadline $LIBS $CBCLIB_PCLIBS"
     25122                    CBCLIB_LIBS_INSTALLED="-lreadline $LIBS $CBCLIB_LIBS_INSTALLED"
     25123
     25124                    CBCGENERIC_LIBS="-lreadline $LIBS $CBCGENERIC_LIBS"
     25125                    CBCGENERIC_PCLIBS="-lreadline $LIBS $CBCGENERIC_PCLIBS"
     25126                    CBCGENERIC_LIBS_INSTALLED="-lreadline $LIBS $CBCGENERIC_LIBS_INSTALLED"
     25127
     25128
     25129cat >>confdefs.h <<\_ACEOF
     25130#define COIN_HAS_READLINE 1
     25131_ACEOF
     25132
     25133  fi
     25134
     25135  LIBS="$coin_save_LIBS"
     25136fi
    2482225137
    2482325138
  • trunk/Cbc/configure.ac

    r1679 r1720  
    8282AC_COIN_CHECK_CXX_CHEADER(float)
    8383AC_COIN_CHECK_CXX_CHEADER(ieeefp)
     84
     85AC_COIN_CHECK_GNU_READLINE(CbcLib CbcGeneric)
    8486
    8587#############################################################################
  • trunk/Cbc/src/config.h.in

    r1668 r1720  
    6262#undef COIN_HAS_OSITESTS
    6363
     64/* Define to 1 if readline is available */
     65#undef COIN_HAS_READLINE
     66
    6467/* Define to 1 if the Sample package is available */
    6568#undef COIN_HAS_SAMPLE
     
    103106/* Define to 1 if you have the <memory.h> header file. */
    104107#undef HAVE_MEMORY_H
     108
     109/* Define to 1 if you have the <readline/readline.h> header file. */
     110#undef HAVE_READLINE_READLINE_H
    105111
    106112/* Define to 1 if you have the <stdint.h> header file. */
Note: See TracChangeset for help on using the changeset viewer.