Changeset 1910


Ignore:
Timestamp:
May 8, 2013 1:50:32 PM (9 years ago)
Author:
tkr
Message:

Adding explicit linking of libraries

Location:
trunk/Osi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Osi/configure

    r1885 r1910  
    10871087                          icl/link). Default when mentioned: mingw. Default
    10881088                          when not mentioned: disabled.
     1089
    10891090  --enable-static[=PKGS]
    10901091                          build static libraries [default=no]
     
    19671968echo "$as_me: DOS compile style is: $enable_doscompile" >&6;}
    19681969  fi
     1970
     1971
     1972# Check whether --enable-static-standardlibs or --disable-static-standardlibs was given.
     1973if test "${enable_static_standardlibs+set}" = set; then
     1974  enableval="$enable_static_standardlibs"
     1975  case "$enableval" in
     1976     no | yes | auto ) ;;
     1977     *)
     1978       { { echo "$as_me:$LINENO: error: invalid argument for --enable-static-standardlibs: $enableval" >&5
     1979echo "$as_me: error: invalid argument for --enable-static-standardlibs: $enableval" >&2;}
     1980   { (exit 1); exit 1; }; } ;;
     1981   esac
     1982   use_static_standardlibs=$enableval
     1983else
     1984  use_static_standardlibs=no
     1985fi;
     1986
    19691987
    19701988
     
    30933111    CFLAGS="$OPT_CFLAGS"
    30943112  fi
     3113
    30953114else
    30963115  CFLAGS="$CFLAGS $ADD_CFLAGS $CDEFS"
     
    32613280esac
    32623281
     3282# check whether to add flags for static linking against standard libraries to LDFLAGS
     3283if test x$use_static_standardlibs != xno ; then
     3284  case $build in
     3285    *-mingw*)
     3286      static_standardlib_flag=-static
     3287      ;;
     3288    *)
     3289      static_standardlib_flag=-static-libgcc
     3290      ;;
     3291  esac
     3292  case " $LDFLAGS " in
     3293    *" $static_standardlib_flag "* ) ;;
     3294    *)
     3295    echo "$as_me:$LINENO: checking whether linking with $static_standardlib_flag works" >&5
     3296echo $ECHO_N "checking whether linking with $static_standardlib_flag works... $ECHO_C" >&6
     3297    coin_save_LDFLAGS="$LDFLAGS"
     3298    LDFLAGS="$LDFLAGS $static_standardlib_flag"
     3299    cat >conftest.$ac_ext <<_ACEOF
     3300/* confdefs.h.  */
     3301_ACEOF
     3302cat confdefs.h >>conftest.$ac_ext
     3303cat >>conftest.$ac_ext <<_ACEOF
     3304/* end confdefs.h.  */
     3305
     3306int
     3307main ()
     3308{
     3309int i=0;
     3310  ;
     3311  return 0;
     3312}
     3313_ACEOF
     3314rm -f conftest.$ac_objext conftest$ac_exeext
     3315if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     3316  (eval $ac_link) 2>conftest.er1
     3317  ac_status=$?
     3318  grep -v '^ *+' conftest.er1 >conftest.err
     3319  rm -f conftest.er1
     3320  cat conftest.err >&5
     3321  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3322  (exit $ac_status); } &&
     3323         { ac_try='test -z "$ac_c_werror_flag"
     3324                         || test ! -s conftest.err'
     3325  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3326  (eval $ac_try) 2>&5
     3327  ac_status=$?
     3328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3329  (exit $ac_status); }; } &&
     3330         { ac_try='test -s conftest$ac_exeext'
     3331  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3332  (eval $ac_try) 2>&5
     3333  ac_status=$?
     3334  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3335  (exit $ac_status); }; }; then
     3336  echo "$as_me:$LINENO: result: yes" >&5
     3337echo "${ECHO_T}yes" >&6
     3338else
     3339  echo "$as_me: failed program was:" >&5
     3340sed 's/^/| /' conftest.$ac_ext >&5
     3341
     3342echo "$as_me:$LINENO: result: no" >&5
     3343echo "${ECHO_T}no" >&6
     3344       LDFLAGS="$coin_save_LDFLAGS"
     3345       if test $use_static_standardlibs = yes ; then
     3346         { { echo "$as_me:$LINENO: error: failed to link with $static_standardlib_flag" >&5
     3347echo "$as_me: error: failed to link with $static_standardlib_flag" >&2;}
     3348   { (exit 1); exit 1; }; }
     3349       fi
     3350
     3351fi
     3352rm -f conftest.err conftest.$ac_objext \
     3353      conftest$ac_exeext conftest.$ac_ext
     3354    ;;
     3355  esac
     3356fi
     3357
    32633358ac_ext=c
    32643359ac_cpp='$CPP $CPPFLAGS'
     
    32703365
    32713366 #Let's try if that overcomes configuration problem with VC++ 6.0
     3367
    32723368
    32733369ac_ext=cc
     
    42094305esac
    42104306
     4307# check whether to add flag for static linking against standard libraries to LDFLAGS
     4308if test x$use_static_standardlibs != xno ; then
     4309  case $build in
     4310    *-mingw*)
     4311      static_standardlib_flag=-static
     4312      ;;
     4313    *)
     4314      static_standardlib_flag=-static-libstdc++
     4315      ;;
     4316  esac
     4317  case " $LDFLAGS " in
     4318    *" $static_standardlib_flag "* ) ;;
     4319    *)
     4320    echo "$as_me:$LINENO: checking whether linking with $static_standardlib_flag works" >&5
     4321echo $ECHO_N "checking whether linking with $static_standardlib_flag works... $ECHO_C" >&6
     4322    coin_save_LDFLAGS="$LDFLAGS"
     4323    LDFLAGS="$LDFLAGS $static_standardlib_flag"
     4324    cat >conftest.$ac_ext <<_ACEOF
     4325/* confdefs.h.  */
     4326_ACEOF
     4327cat confdefs.h >>conftest.$ac_ext
     4328cat >>conftest.$ac_ext <<_ACEOF
     4329/* end confdefs.h.  */
     4330
     4331int
     4332main ()
     4333{
     4334int i=0;
     4335  ;
     4336  return 0;
     4337}
     4338_ACEOF
     4339rm -f conftest.$ac_objext conftest$ac_exeext
     4340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4341  (eval $ac_link) 2>conftest.er1
     4342  ac_status=$?
     4343  grep -v '^ *+' conftest.er1 >conftest.err
     4344  rm -f conftest.er1
     4345  cat conftest.err >&5
     4346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4347  (exit $ac_status); } &&
     4348         { ac_try='test -z "$ac_cxx_werror_flag"
     4349                         || test ! -s conftest.err'
     4350  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4351  (eval $ac_try) 2>&5
     4352  ac_status=$?
     4353  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4354  (exit $ac_status); }; } &&
     4355         { ac_try='test -s conftest$ac_exeext'
     4356  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4357  (eval $ac_try) 2>&5
     4358  ac_status=$?
     4359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4360  (exit $ac_status); }; }; then
     4361  echo "$as_me:$LINENO: result: yes" >&5
     4362echo "${ECHO_T}yes" >&6
     4363else
     4364  echo "$as_me: failed program was:" >&5
     4365sed 's/^/| /' conftest.$ac_ext >&5
     4366
     4367echo "$as_me:$LINENO: result: no" >&5
     4368echo "${ECHO_T}no" >&6
     4369       LDFLAGS="$coin_save_LDFLAGS"
     4370       if test $use_static_standardlibs = yes ; then
     4371         { { echo "$as_me:$LINENO: error: failed to link with $static_standardlib_flag" >&5
     4372echo "$as_me: error: failed to link with $static_standardlib_flag" >&2;}
     4373   { (exit 1); exit 1; }; }
     4374       fi
     4375
     4376fi
     4377rm -f conftest.err conftest.$ac_objext \
     4378      conftest$ac_exeext conftest.$ac_ext
     4379    ;;
     4380  esac
     4381fi
     4382
    42114383ac_ext=c
    42124384ac_cpp='$CPP $CPPFLAGS'
     
    59656137*-*-irix6*)
    59666138  # Find out which ABI we are using.
    5967   echo '#line 5967 "configure"' > conftest.$ac_ext
     6139  echo '#line 6139 "configure"' > conftest.$ac_ext
    59686140  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    59696141  (eval $ac_compile) 2>&5
     
    70997271
    71007272# Provide some information about the compiler.
    7101 echo "$as_me:7101:" \
     7273echo "$as_me:7273:" \
    71027274     "checking for Fortran 77 compiler version" >&5
    71037275ac_compiler=`set X $ac_compile; echo $2`
     
    81668338   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81678339   -e 's:$: $lt_compiler_flag:'`
    8168    (eval echo "\"\$as_me:8168: $lt_compile\"" >&5)
     8340   (eval echo "\"\$as_me:8340: $lt_compile\"" >&5)
    81698341   (eval "$lt_compile" 2>conftest.err)
    81708342   ac_status=$?
    81718343   cat conftest.err >&5
    8172    echo "$as_me:8172: \$? = $ac_status" >&5
     8344   echo "$as_me:8344: \$? = $ac_status" >&5
    81738345   if (exit $ac_status) && test -s "$ac_outfile"; then
    81748346     # The compiler can only warn and ignore the option if not recognized
     
    84348606   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    84358607   -e 's:$: $lt_compiler_flag:'`
    8436    (eval echo "\"\$as_me:8436: $lt_compile\"" >&5)
     8608   (eval echo "\"\$as_me:8608: $lt_compile\"" >&5)
    84378609   (eval "$lt_compile" 2>conftest.err)
    84388610   ac_status=$?
    84398611   cat conftest.err >&5
    8440    echo "$as_me:8440: \$? = $ac_status" >&5
     8612   echo "$as_me:8612: \$? = $ac_status" >&5
    84418613   if (exit $ac_status) && test -s "$ac_outfile"; then
    84428614     # The compiler can only warn and ignore the option if not recognized
     
    85388710   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    85398711   -e 's:$: $lt_compiler_flag:'`
    8540    (eval echo "\"\$as_me:8540: $lt_compile\"" >&5)
     8712   (eval echo "\"\$as_me:8712: $lt_compile\"" >&5)
    85418713   (eval "$lt_compile" 2>out/conftest.err)
    85428714   ac_status=$?
    85438715   cat out/conftest.err >&5
    8544    echo "$as_me:8544: \$? = $ac_status" >&5
     8716   echo "$as_me:8716: \$? = $ac_status" >&5
    85458717   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    85468718   then
     
    1088311055  lt_status=$lt_dlunknown
    1088411056  cat > conftest.$ac_ext <<EOF
    10885 #line 10885 "configure"
     11057#line 11057 "configure"
    1088611058#include "confdefs.h"
    1088711059
     
    1098311155  lt_status=$lt_dlunknown
    1098411156  cat > conftest.$ac_ext <<EOF
    10985 #line 10985 "configure"
     11157#line 11157 "configure"
    1098611158#include "confdefs.h"
    1098711159
     
    1332713499   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1332813500   -e 's:$: $lt_compiler_flag:'`
    13329    (eval echo "\"\$as_me:13329: $lt_compile\"" >&5)
     13501   (eval echo "\"\$as_me:13501: $lt_compile\"" >&5)
    1333013502   (eval "$lt_compile" 2>conftest.err)
    1333113503   ac_status=$?
    1333213504   cat conftest.err >&5
    13333    echo "$as_me:13333: \$? = $ac_status" >&5
     13505   echo "$as_me:13505: \$? = $ac_status" >&5
    1333413506   if (exit $ac_status) && test -s "$ac_outfile"; then
    1333513507     # The compiler can only warn and ignore the option if not recognized
     
    1343113603   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1343213604   -e 's:$: $lt_compiler_flag:'`
    13433    (eval echo "\"\$as_me:13433: $lt_compile\"" >&5)
     13605   (eval echo "\"\$as_me:13605: $lt_compile\"" >&5)
    1343413606   (eval "$lt_compile" 2>out/conftest.err)
    1343513607   ac_status=$?
    1343613608   cat out/conftest.err >&5
    13437    echo "$as_me:13437: \$? = $ac_status" >&5
     13609   echo "$as_me:13609: \$? = $ac_status" >&5
    1343813610   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1343913611   then
     
    1500115173   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1500215174   -e 's:$: $lt_compiler_flag:'`
    15003    (eval echo "\"\$as_me:15003: $lt_compile\"" >&5)
     15175   (eval echo "\"\$as_me:15175: $lt_compile\"" >&5)
    1500415176   (eval "$lt_compile" 2>conftest.err)
    1500515177   ac_status=$?
    1500615178   cat conftest.err >&5
    15007    echo "$as_me:15007: \$? = $ac_status" >&5
     15179   echo "$as_me:15179: \$? = $ac_status" >&5
    1500815180   if (exit $ac_status) && test -s "$ac_outfile"; then
    1500915181     # The compiler can only warn and ignore the option if not recognized
     
    1510515277   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1510615278   -e 's:$: $lt_compiler_flag:'`
    15107    (eval echo "\"\$as_me:15107: $lt_compile\"" >&5)
     15279   (eval echo "\"\$as_me:15279: $lt_compile\"" >&5)
    1510815280   (eval "$lt_compile" 2>out/conftest.err)
    1510915281   ac_status=$?
    1511015282   cat out/conftest.err >&5
    15111    echo "$as_me:15111: \$? = $ac_status" >&5
     15283   echo "$as_me:15283: \$? = $ac_status" >&5
    1511215284   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1511315285   then
     
    1731217484   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1731317485   -e 's:$: $lt_compiler_flag:'`
    17314    (eval echo "\"\$as_me:17314: $lt_compile\"" >&5)
     17486   (eval echo "\"\$as_me:17486: $lt_compile\"" >&5)
    1731517487   (eval "$lt_compile" 2>conftest.err)
    1731617488   ac_status=$?
    1731717489   cat conftest.err >&5
    17318    echo "$as_me:17318: \$? = $ac_status" >&5
     17490   echo "$as_me:17490: \$? = $ac_status" >&5
    1731917491   if (exit $ac_status) && test -s "$ac_outfile"; then
    1732017492     # The compiler can only warn and ignore the option if not recognized
     
    1758017752   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1758117753   -e 's:$: $lt_compiler_flag:'`
    17582    (eval echo "\"\$as_me:17582: $lt_compile\"" >&5)
     17754   (eval echo "\"\$as_me:17754: $lt_compile\"" >&5)
    1758317755   (eval "$lt_compile" 2>conftest.err)
    1758417756   ac_status=$?
    1758517757   cat conftest.err >&5
    17586    echo "$as_me:17586: \$? = $ac_status" >&5
     17758   echo "$as_me:17758: \$? = $ac_status" >&5
    1758717759   if (exit $ac_status) && test -s "$ac_outfile"; then
    1758817760     # The compiler can only warn and ignore the option if not recognized
     
    1768417856   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1768517857   -e 's:$: $lt_compiler_flag:'`
    17686    (eval echo "\"\$as_me:17686: $lt_compile\"" >&5)
     17858   (eval echo "\"\$as_me:17858: $lt_compile\"" >&5)
    1768717859   (eval "$lt_compile" 2>out/conftest.err)
    1768817860   ac_status=$?
    1768917861   cat out/conftest.err >&5
    17690    echo "$as_me:17690: \$? = $ac_status" >&5
     17862   echo "$as_me:17862: \$? = $ac_status" >&5
    1769117863   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1769217864   then
  • trunk/Osi/src/Osi/Makefile.am

    r1881 r1910  
    3434        OsiSolverInterface.cpp OsiSolverInterface.hpp \
    3535        OsiSolverParameters.hpp
     36
     37# List all additionally required libraries
     38libOsi_la_LIBADD = $(OSILIB_LIBS)
    3639
    3740# This is for libtool
  • trunk/Osi/src/Osi/Makefile.in

    r1735 r1910  
    6565libLTLIBRARIES_INSTALL = $(INSTALL)
    6666LTLIBRARIES = $(lib_LTLIBRARIES)
    67 libOsi_la_LIBADD =
     67am__DEPENDENCIES_1 =
     68libOsi_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
    6869am_libOsi_la_OBJECTS = OsiAuxInfo.lo OsiBranchingObject.lo \
    6970        OsiChooseVariable.lo OsiColCut.lo OsiCut.lo OsiCuts.lo \
     
    360361
    361362
     363# List all additionally required libraries
     364libOsi_la_LIBADD = $(OSILIB_LIBS)
     365
    362366# This is for libtool
    363367libOsi_la_LDFLAGS = $(LT_LDFLAGS)
Note: See TracChangeset for help on using the changeset viewer.