From 6a6bb38cb7a6218818fec2842e408cd70a8ba72a Mon Sep 17 00:00:00 2001 From: Stefan Vigerske Date: Thu, 20 Aug 2020 14:40:02 +0200 Subject: [PATCH] only build GamsOsi if OsiCpx, OsiGrb, OsiMsk, or OsiXpr available --- configure | 751 ++++++++++++++++++++++++++------------------------- configure.ac | 6 +- 2 files changed, 388 insertions(+), 369 deletions(-) diff --git a/configure b/configure index a35b988c..b7ff3e47 100755 --- a/configure +++ b/configure @@ -698,6 +698,8 @@ COIN_HAS_CBC_TRUE GAMSCBC_PCFILES GAMSCBC_CFLAGS GAMSCBC_LFLAGS +COIN_HAS_OSI_FALSE +COIN_HAS_OSI_TRUE COIN_HAS_OSIXPR_FALSE COIN_HAS_OSIXPR_TRUE COIN_HAS_OSIMSK_FALSE @@ -706,8 +708,6 @@ COIN_HAS_OSIGRB_FALSE COIN_HAS_OSIGRB_TRUE COIN_HAS_OSICPX_FALSE COIN_HAS_OSICPX_TRUE -COIN_HAS_OSI_FALSE -COIN_HAS_OSI_TRUE GAMSOSI_PCFILES GAMSOSI_CFLAGS GAMSOSI_LFLAGS @@ -875,9 +875,6 @@ with_gnu_ld with_sysroot enable_libtool_lock with_dot -with_osi -with_osi_lflags -with_osi_cflags with_osicpx with_osicpx_lflags with_osicpx_cflags @@ -890,6 +887,9 @@ with_osimsk_cflags with_osixpr with_osixpr_lflags with_osixpr_cflags +with_osi +with_osi_lflags +with_osi_cflags with_cbc with_cbc_lflags with_cbc_cflags @@ -1598,15 +1598,6 @@ Optional Packages: compiler's sysroot if not specified). --with-dot use dot (from graphviz) when creating documentation with doxygen if available; --without-dot to disable - --with-osi Use Osi. If an argument is given, 'yes' is - equivalent to --with-osi, 'no' is - equivalent to --without-osi. Any other argument is - applied as for --with-osi-lflags - --with-osi-lflags Linker flags for Osi appropriate for your - environment. (Most often, -l specs for libraries.) - --with-osi-cflags Compiler flags for Osi appropriate for your - environment. (Most often, -I specs for header file - directories.) --with-osicpx Use OsiCpx. If an argument is given, 'yes' is equivalent to --with-osicpx, 'no' is equivalent to --without-osicpx. Any other argument @@ -1643,6 +1634,15 @@ Optional Packages: --with-osixpr-cflags Compiler flags for OsiXpr appropriate for your environment. (Most often, -I specs for header file directories.) + --with-osi Use Osi. If an argument is given, 'yes' is + equivalent to --with-osi, 'no' is + equivalent to --without-osi. Any other argument is + applied as for --with-osi-lflags + --with-osi-lflags Linker flags for Osi appropriate for your + environment. (Most often, -l specs for libraries.) + --with-osi-cflags Compiler flags for Osi appropriate for your + environment. (Most often, -I specs for header file + directories.) --with-cbc Use Cbc. If an argument is given, 'yes' is equivalent to --with-cbc, 'no' is equivalent to --without-cbc. Any other argument is @@ -17135,8 +17135,8 @@ $as_echo "$as_me: $PKG_CONFIG path is \"$COIN_PKG_CONFIG_PATH\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for package Osi" >&5 -$as_echo_n "checking for package Osi... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for package OsiCpx" >&5 +$as_echo_n "checking for package OsiCpx... " >&6; } @@ -17144,37 +17144,37 @@ $as_echo_n "checking for package Osi... " >&6; } # Check to see if the user has set an override to skip this primary. - coin_has_osi=noInfo + coin_has_osicpx=noInfo if test x"$COIN_SKIP_PROJECTS" != x ; then for pkg in $COIN_SKIP_PROJECTS ; do - if test "$pkg" = "$osi" ; then - coin_has_osi=skipping + if test "$pkg" = "$osicpx" ; then + coin_has_osicpx=skipping fi done fi - if test "$coin_has_osi" != skipping ; then + if test "$coin_has_osicpx" != skipping ; then -# Check whether --with-osi was given. -if test "${with_osi+set}" = set; then : - withval=$with_osi; +# Check whether --with-osicpx was given. +if test "${with_osicpx+set}" = set; then : + withval=$with_osicpx; fi -# Check whether --with-osi-lflags was given. -if test "${with_osi_lflags+set}" = set; then : - withval=$with_osi_lflags; +# Check whether --with-osicpx-lflags was given. +if test "${with_osicpx_lflags+set}" = set; then : + withval=$with_osicpx_lflags; fi -# Check whether --with-osi-cflags was given. -if test "${with_osi_cflags+set}" = set; then : - withval=$with_osi_cflags; +# Check whether --with-osicpx-cflags was given. +if test "${with_osicpx_cflags+set}" = set; then : + withval=$with_osicpx_cflags; fi @@ -17186,56 +17186,56 @@ fi dflt_action=yes # Initialize variables for the primary package. - coin_has_osi=noInfo - osi_lflags= - osi_cflags= - osi_data= - osi_pcfiles= + coin_has_osicpx=noInfo + osicpx_lflags= + osicpx_cflags= + osicpx_data= + osicpx_pcfiles= # --with-prim is always present. - withval="$with_osi" + withval="$with_osicpx" if test -n "$withval" ; then case "$withval" in no ) - coin_has_osi=skipping + coin_has_osicpx=skipping ;; yes ) - coin_has_osi=requested + coin_has_osicpx=requested ;; build ) - coin_has_osi=build + coin_has_osicpx=build ;; * ) - coin_has_osi=yes - osi_lflags="$withval" + coin_has_osicpx=yes + osicpx_lflags="$withval" ;; esac fi # Specifying --with-prim=no overrides the individual options for lflags and cflags. - if test "$coin_has_osi" != skipping ; then - withval="$with_osi_lflags" + if test "$coin_has_osicpx" != skipping ; then + withval="$with_osicpx_lflags" if test -n "$withval" ; then case "$withval" in build | no | yes ) as_fn_error $? "\"$withval\" is not valid here; please specify linker flags appropriate for your environment." "$LINENO" 5 ;; * ) - coin_has_osi=yes - osi_lflags="$withval" + coin_has_osicpx=yes + osicpx_lflags="$withval" ;; esac fi - withval="$with_osi_cflags" + withval="$with_osicpx_cflags" if test -n "$withval" ; then case "$withval" in build | no | yes ) as_fn_error $? "\"$withval\" is not valid here; please specify compiler flags appropriate for your environment." "$LINENO" 5 ;; * ) - coin_has_osi=yes - osi_cflags="$withval" + coin_has_osicpx=yes + osicpx_cflags="$withval" ;; esac fi @@ -17254,16 +17254,16 @@ fi # If there are no user options (noInfo) and the default is no, we're skipping. # Otherwise, the default must be yes or build; consider the package requested. # A default action we don't recognise defaults to yes. - if test "$coin_has_osi" = noInfo ; then + if test "$coin_has_osicpx" = noInfo ; then case $dflt_action in no ) - coin_has_osi=skipping + coin_has_osicpx=skipping ;; build ) - coin_has_osi=build + coin_has_osicpx=build ;; * ) - coin_has_osi=requested + coin_has_osicpx=requested ;; esac fi @@ -17272,36 +17272,36 @@ fi # For requested or build, try pkgconf, if it's available. # If it's not available, well, hope that the user knows their system # and prim can be used with no additional flags. - case $coin_has_osi in + case $coin_has_osicpx in requested | build ) - if test -n "$PKG_CONFIG" -a "osi" != skip ; then - pcfile="osi" + if test -n "$PKG_CONFIG" -a "osi-cplex" != skip ; then + pcfile="osi-cplex" if test -n "$PKG_CONFIG" ; then if PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --exists "$pcfile" ; then - OSI_VERSIONS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --modversion "$pcfile" 2>/dev/null | tr '\n' ' '` - coin_has_osi=yes - osi_data=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --variable=datadir "$pcfile" 2>/dev/null` - osi_pcfiles="$pcfile" + OSICPX_VERSIONS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --modversion "$pcfile" 2>/dev/null | tr '\n' ' '` + coin_has_osicpx=yes + osicpx_data=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --variable=datadir "$pcfile" 2>/dev/null` + osicpx_pcfiles="$pcfile" else - OSI_PKG_ERRORS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "$pcfile"` - coin_has_osi=no + OSICPX_PKG_ERRORS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "$pcfile"` + coin_has_osicpx=no fi else - as_fn_error $? "\"Cannot check for existence of module osi without pkgconf\"" "$LINENO" 5 + as_fn_error $? "\"Cannot check for existence of module osicpx without pkgconf\"" "$LINENO" 5 fi else - coin_has_osi=no + coin_has_osicpx=no fi ;; skipping | yes ) ;; * ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unexpected status \"$coin_has_osi\" in COIN_FIND_PRIM_PKG" >&5 -$as_echo "$as_me: WARNING: Unexpected status \"$coin_has_osi\" in COIN_FIND_PRIM_PKG" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unexpected status \"$coin_has_osicpx\" in COIN_FIND_PRIM_PKG" >&5 +$as_echo "$as_me: WARNING: Unexpected status \"$coin_has_osicpx\" in COIN_FIND_PRIM_PKG" >&2;} ;; esac @@ -17313,56 +17313,56 @@ $as_echo "$as_me: WARNING: Unexpected status \"$coin_has_osi\" in COIN_FIND_PRIM # Define BUILDTOOLS_DEBUG to enable debugging output if test "$BUILDTOOLS_DEBUG" = 1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: FIND_PRIM_PKG result for osi: \"$coin_has_osi\"" >&5 -$as_echo "$as_me: FIND_PRIM_PKG result for osi: \"$coin_has_osi\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Collected values for package 'osi'" >&5 -$as_echo "$as_me: Collected values for package 'osi'" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: osi_lflags is \"$osi_lflags\"" >&5 -$as_echo "$as_me: osi_lflags is \"$osi_lflags\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: osi_cflags is \"$osi_cflags\"" >&5 -$as_echo "$as_me: osi_cflags is \"$osi_cflags\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: osi_data is \"$osi_data\"" >&5 -$as_echo "$as_me: osi_data is \"$osi_data\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: osi_pcfiles is \"$osi_pcfiles\"" >&5 -$as_echo "$as_me: osi_pcfiles is \"$osi_pcfiles\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: FIND_PRIM_PKG result for osicpx: \"$coin_has_osicpx\"" >&5 +$as_echo "$as_me: FIND_PRIM_PKG result for osicpx: \"$coin_has_osicpx\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Collected values for package 'osicpx'" >&5 +$as_echo "$as_me: Collected values for package 'osicpx'" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: osicpx_lflags is \"$osicpx_lflags\"" >&5 +$as_echo "$as_me: osicpx_lflags is \"$osicpx_lflags\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: osicpx_cflags is \"$osicpx_cflags\"" >&5 +$as_echo "$as_me: osicpx_cflags is \"$osicpx_cflags\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: osicpx_data is \"$osicpx_data\"" >&5 +$as_echo "$as_me: osicpx_data is \"$osicpx_data\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: osicpx_pcfiles is \"$osicpx_pcfiles\"" >&5 +$as_echo "$as_me: osicpx_pcfiles is \"$osicpx_pcfiles\"" >&6;} fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coin_has_osi" >&5 -$as_echo "$coin_has_osi" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coin_has_osicpx" >&5 +$as_echo "$coin_has_osicpx" >&6; } - if test "$PKG_CONFIG$coin_has_osi" = no ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check for Osi via pkg-config was skipped as no pkg-config available. If Osi was meant to be found, then consider installing pkg-config or provide appropriate --with-osi-lflags, --with-osi-cflags, etc." >&5 -$as_echo "$as_me: WARNING: Check for Osi via pkg-config was skipped as no pkg-config available. If Osi was meant to be found, then consider installing pkg-config or provide appropriate --with-osi-lflags, --with-osi-cflags, etc." >&2;} + if test "$PKG_CONFIG$coin_has_osicpx" = no ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check for OsiCpx via pkg-config was skipped as no pkg-config available. If OsiCpx was meant to be found, then consider installing pkg-config or provide appropriate --with-osicpx-lflags, --with-osicpx-cflags, etc." >&5 +$as_echo "$as_me: WARNING: Check for OsiCpx via pkg-config was skipped as no pkg-config available. If OsiCpx was meant to be found, then consider installing pkg-config or provide appropriate --with-osicpx-lflags, --with-osicpx-cflags, etc." >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coin_has_osi due to COIN_SKIP_PROJECTS" >&5 -$as_echo "$coin_has_osi due to COIN_SKIP_PROJECTS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coin_has_osicpx due to COIN_SKIP_PROJECTS" >&5 +$as_echo "$coin_has_osicpx due to COIN_SKIP_PROJECTS" >&6; } fi # Possibilities are `yes', 'no', or `skipping'. Normalise to `yes' or `no'. - if test "$coin_has_osi" != yes ; then - coin_has_osi=no + if test "$coin_has_osicpx" != yes ; then + coin_has_osicpx=no fi - if test $coin_has_osi = yes; then - COIN_HAS_OSI_TRUE= - COIN_HAS_OSI_FALSE='#' + if test $coin_has_osicpx = yes; then + COIN_HAS_OSICPX_TRUE= + COIN_HAS_OSICPX_FALSE='#' else - COIN_HAS_OSI_TRUE='#' - COIN_HAS_OSI_FALSE= + COIN_HAS_OSICPX_TRUE='#' + COIN_HAS_OSICPX_FALSE= fi # If we have located the package, define preprocessor symbol PKG_HAS_PRIM and # augment the necessary variables for the client packages. - if test $coin_has_osi = yes ; then + if test $coin_has_osicpx = yes ; then -$as_echo "#define GAMSLINKS_HAS_OSI 1" >>confdefs.h +$as_echo "#define GAMSLINKS_HAS_OSICPX 1" >>confdefs.h - if test -n "$osi_pcfiles" ; then GAMSOSI_PCFILES="$osi_pcfiles $GAMSOSI_PCFILES" ; fi - GAMSOSI_LFLAGS="$osi_lflags $GAMSOSI_LFLAGS" - GAMSOSI_CFLAGS="$osi_cflags $GAMSOSI_CFLAGS" + if test -n "$osicpx_pcfiles" ; then GAMSOSI_PCFILES="$osicpx_pcfiles $GAMSOSI_PCFILES" ; fi + GAMSOSI_LFLAGS="$osicpx_lflags $GAMSOSI_LFLAGS" + GAMSOSI_CFLAGS="$osicpx_cflags $GAMSOSI_CFLAGS" @@ -17371,8 +17371,8 @@ $as_echo "#define GAMSLINKS_HAS_OSI 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for package OsiCpx" >&5 -$as_echo_n "checking for package OsiCpx... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for package OsiGrb" >&5 +$as_echo_n "checking for package OsiGrb... " >&6; } @@ -17380,37 +17380,37 @@ $as_echo_n "checking for package OsiCpx... " >&6; } # Check to see if the user has set an override to skip this primary. - coin_has_osicpx=noInfo + coin_has_osigrb=noInfo if test x"$COIN_SKIP_PROJECTS" != x ; then for pkg in $COIN_SKIP_PROJECTS ; do - if test "$pkg" = "$osicpx" ; then - coin_has_osicpx=skipping + if test "$pkg" = "$osigrb" ; then + coin_has_osigrb=skipping fi done fi - if test "$coin_has_osicpx" != skipping ; then + if test "$coin_has_osigrb" != skipping ; then -# Check whether --with-osicpx was given. -if test "${with_osicpx+set}" = set; then : - withval=$with_osicpx; +# Check whether --with-osigrb was given. +if test "${with_osigrb+set}" = set; then : + withval=$with_osigrb; fi -# Check whether --with-osicpx-lflags was given. -if test "${with_osicpx_lflags+set}" = set; then : - withval=$with_osicpx_lflags; +# Check whether --with-osigrb-lflags was given. +if test "${with_osigrb_lflags+set}" = set; then : + withval=$with_osigrb_lflags; fi -# Check whether --with-osicpx-cflags was given. -if test "${with_osicpx_cflags+set}" = set; then : - withval=$with_osicpx_cflags; +# Check whether --with-osigrb-cflags was given. +if test "${with_osigrb_cflags+set}" = set; then : + withval=$with_osigrb_cflags; fi @@ -17422,292 +17422,56 @@ fi dflt_action=yes # Initialize variables for the primary package. - coin_has_osicpx=noInfo - osicpx_lflags= - osicpx_cflags= - osicpx_data= - osicpx_pcfiles= + coin_has_osigrb=noInfo + osigrb_lflags= + osigrb_cflags= + osigrb_data= + osigrb_pcfiles= # --with-prim is always present. - withval="$with_osicpx" + withval="$with_osigrb" if test -n "$withval" ; then case "$withval" in no ) - coin_has_osicpx=skipping + coin_has_osigrb=skipping ;; yes ) - coin_has_osicpx=requested + coin_has_osigrb=requested ;; build ) - coin_has_osicpx=build + coin_has_osigrb=build ;; * ) - coin_has_osicpx=yes - osicpx_lflags="$withval" + coin_has_osigrb=yes + osigrb_lflags="$withval" ;; esac fi # Specifying --with-prim=no overrides the individual options for lflags and cflags. - if test "$coin_has_osicpx" != skipping ; then - withval="$with_osicpx_lflags" + if test "$coin_has_osigrb" != skipping ; then + withval="$with_osigrb_lflags" if test -n "$withval" ; then case "$withval" in build | no | yes ) as_fn_error $? "\"$withval\" is not valid here; please specify linker flags appropriate for your environment." "$LINENO" 5 ;; * ) - coin_has_osicpx=yes - osicpx_lflags="$withval" + coin_has_osigrb=yes + osigrb_lflags="$withval" ;; esac fi - withval="$with_osicpx_cflags" + withval="$with_osigrb_cflags" if test -n "$withval" ; then case "$withval" in build | no | yes ) as_fn_error $? "\"$withval\" is not valid here; please specify compiler flags appropriate for your environment." "$LINENO" 5 ;; * ) - coin_has_osicpx=yes - osicpx_cflags="$withval" - ;; - esac - fi - fi - - - - # At this point, coin_has_prim can be one of - # - noInfo (no user options specified), - # - skipping (user said no), - # - requested, - # - build (user said yes or build and gave no further guidance), - # - or yes (user specified one or more --with-prim options). - # If we're already at yes or skipping, we're done looking. - - # If there are no user options (noInfo) and the default is no, we're skipping. - # Otherwise, the default must be yes or build; consider the package requested. - # A default action we don't recognise defaults to yes. - if test "$coin_has_osicpx" = noInfo ; then - case $dflt_action in - no ) - coin_has_osicpx=skipping - ;; - build ) - coin_has_osicpx=build - ;; - * ) - coin_has_osicpx=requested - ;; - esac - fi - - # Now coin_has_prim can be one of skipping, yes, requested, or build. - # For requested or build, try pkgconf, if it's available. - # If it's not available, well, hope that the user knows their system - # and prim can be used with no additional flags. - case $coin_has_osicpx in - requested | build ) - if test -n "$PKG_CONFIG" -a "osi-cplex" != skip ; then - pcfile="osi-cplex" - - - - if test -n "$PKG_CONFIG" ; then - if PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --exists "$pcfile" ; then - OSICPX_VERSIONS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --modversion "$pcfile" 2>/dev/null | tr '\n' ' '` - coin_has_osicpx=yes - osicpx_data=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --variable=datadir "$pcfile" 2>/dev/null` - osicpx_pcfiles="$pcfile" - else - OSICPX_PKG_ERRORS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "$pcfile"` - coin_has_osicpx=no - fi - else - as_fn_error $? "\"Cannot check for existence of module osicpx without pkgconf\"" "$LINENO" 5 - fi - - else - coin_has_osicpx=no - fi - ;; - skipping | yes ) - ;; - * ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unexpected status \"$coin_has_osicpx\" in COIN_FIND_PRIM_PKG" >&5 -$as_echo "$as_me: WARNING: Unexpected status \"$coin_has_osicpx\" in COIN_FIND_PRIM_PKG" >&2;} - ;; - esac - - # The final value of coin_has_prim will be yes, no, or skipping. - # No means we looked (with pkgconfig) and didn't find anything. - # Skipping means the user said `don't use.' - # Yes means we have something, from the user or from pkgconfig. - # Note that we haven't run a useability test! - - # Define BUILDTOOLS_DEBUG to enable debugging output - if test "$BUILDTOOLS_DEBUG" = 1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: FIND_PRIM_PKG result for osicpx: \"$coin_has_osicpx\"" >&5 -$as_echo "$as_me: FIND_PRIM_PKG result for osicpx: \"$coin_has_osicpx\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Collected values for package 'osicpx'" >&5 -$as_echo "$as_me: Collected values for package 'osicpx'" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: osicpx_lflags is \"$osicpx_lflags\"" >&5 -$as_echo "$as_me: osicpx_lflags is \"$osicpx_lflags\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: osicpx_cflags is \"$osicpx_cflags\"" >&5 -$as_echo "$as_me: osicpx_cflags is \"$osicpx_cflags\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: osicpx_data is \"$osicpx_data\"" >&5 -$as_echo "$as_me: osicpx_data is \"$osicpx_data\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: osicpx_pcfiles is \"$osicpx_pcfiles\"" >&5 -$as_echo "$as_me: osicpx_pcfiles is \"$osicpx_pcfiles\"" >&6;} - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coin_has_osicpx" >&5 -$as_echo "$coin_has_osicpx" >&6; } - - if test "$PKG_CONFIG$coin_has_osicpx" = no ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check for OsiCpx via pkg-config was skipped as no pkg-config available. If OsiCpx was meant to be found, then consider installing pkg-config or provide appropriate --with-osicpx-lflags, --with-osicpx-cflags, etc." >&5 -$as_echo "$as_me: WARNING: Check for OsiCpx via pkg-config was skipped as no pkg-config available. If OsiCpx was meant to be found, then consider installing pkg-config or provide appropriate --with-osicpx-lflags, --with-osicpx-cflags, etc." >&2;} - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coin_has_osicpx due to COIN_SKIP_PROJECTS" >&5 -$as_echo "$coin_has_osicpx due to COIN_SKIP_PROJECTS" >&6; } - fi - - # Possibilities are `yes', 'no', or `skipping'. Normalise to `yes' or `no'. - if test "$coin_has_osicpx" != yes ; then - coin_has_osicpx=no - fi - - if test $coin_has_osicpx = yes; then - COIN_HAS_OSICPX_TRUE= - COIN_HAS_OSICPX_FALSE='#' -else - COIN_HAS_OSICPX_TRUE='#' - COIN_HAS_OSICPX_FALSE= -fi - - - # If we have located the package, define preprocessor symbol PKG_HAS_PRIM and - # augment the necessary variables for the client packages. - if test $coin_has_osicpx = yes ; then - -$as_echo "#define GAMSLINKS_HAS_OSICPX 1" >>confdefs.h - - if test -n "$osicpx_pcfiles" ; then GAMSOSI_PCFILES="$osicpx_pcfiles $GAMSOSI_PCFILES" ; fi - GAMSOSI_LFLAGS="$osicpx_lflags $GAMSOSI_LFLAGS" - GAMSOSI_CFLAGS="$osicpx_cflags $GAMSOSI_CFLAGS" - - - - fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for package OsiGrb" >&5 -$as_echo_n "checking for package OsiGrb... " >&6; } - - - - - - - # Check to see if the user has set an override to skip this primary. - coin_has_osigrb=noInfo - if test x"$COIN_SKIP_PROJECTS" != x ; then - for pkg in $COIN_SKIP_PROJECTS ; do - if test "$pkg" = "$osigrb" ; then - coin_has_osigrb=skipping - fi - done - fi - - if test "$coin_has_osigrb" != skipping ; then - - - - -# Check whether --with-osigrb was given. -if test "${with_osigrb+set}" = set; then : - withval=$with_osigrb; -fi - - - -# Check whether --with-osigrb-lflags was given. -if test "${with_osigrb_lflags+set}" = set; then : - withval=$with_osigrb_lflags; -fi - - - -# Check whether --with-osigrb-cflags was given. -if test "${with_osigrb_cflags+set}" = set; then : - withval=$with_osigrb_cflags; -fi - - - - - - - - dflt_action=yes - - # Initialize variables for the primary package. - coin_has_osigrb=noInfo - osigrb_lflags= - osigrb_cflags= - osigrb_data= - osigrb_pcfiles= - - # --with-prim is always present. - withval="$with_osigrb" - if test -n "$withval" ; then - case "$withval" in - no ) - coin_has_osigrb=skipping - ;; - yes ) - coin_has_osigrb=requested - ;; - build ) - coin_has_osigrb=build - ;; - * ) - coin_has_osigrb=yes - osigrb_lflags="$withval" - ;; - esac - fi - - # Specifying --with-prim=no overrides the individual options for lflags and cflags. - if test "$coin_has_osigrb" != skipping ; then - withval="$with_osigrb_lflags" - if test -n "$withval" ; then - case "$withval" in - build | no | yes ) - as_fn_error $? "\"$withval\" is not valid here; please specify linker flags appropriate for your environment." "$LINENO" 5 - ;; - * ) - coin_has_osigrb=yes - osigrb_lflags="$withval" - ;; - esac - fi - - withval="$with_osigrb_cflags" - if test -n "$withval" ; then - case "$withval" in - build | no | yes ) - as_fn_error $? "\"$withval\" is not valid here; please specify compiler flags appropriate for your environment." "$LINENO" 5 - ;; - * ) - coin_has_osigrb=yes - osigrb_cflags="$withval" + coin_has_osigrb=yes + osigrb_cflags="$withval" ;; esac fi @@ -18312,6 +18076,253 @@ $as_echo "#define GAMSLINKS_HAS_OSIXPR 1" >>confdefs.h fi +if test $coin_has_osicpx$coin_has_osigrb$coin_has_osimsk$coin_has_osixpr != "nononono" ; then + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for package Osi" >&5 +$as_echo_n "checking for package Osi... " >&6; } + + + + + + + # Check to see if the user has set an override to skip this primary. + coin_has_osi=noInfo + if test x"$COIN_SKIP_PROJECTS" != x ; then + for pkg in $COIN_SKIP_PROJECTS ; do + if test "$pkg" = "$osi" ; then + coin_has_osi=skipping + fi + done + fi + + if test "$coin_has_osi" != skipping ; then + + + + +# Check whether --with-osi was given. +if test "${with_osi+set}" = set; then : + withval=$with_osi; +fi + + + +# Check whether --with-osi-lflags was given. +if test "${with_osi_lflags+set}" = set; then : + withval=$with_osi_lflags; +fi + + + +# Check whether --with-osi-cflags was given. +if test "${with_osi_cflags+set}" = set; then : + withval=$with_osi_cflags; +fi + + + + + + + + dflt_action=yes + + # Initialize variables for the primary package. + coin_has_osi=noInfo + osi_lflags= + osi_cflags= + osi_data= + osi_pcfiles= + + # --with-prim is always present. + withval="$with_osi" + if test -n "$withval" ; then + case "$withval" in + no ) + coin_has_osi=skipping + ;; + yes ) + coin_has_osi=requested + ;; + build ) + coin_has_osi=build + ;; + * ) + coin_has_osi=yes + osi_lflags="$withval" + ;; + esac + fi + + # Specifying --with-prim=no overrides the individual options for lflags and cflags. + if test "$coin_has_osi" != skipping ; then + withval="$with_osi_lflags" + if test -n "$withval" ; then + case "$withval" in + build | no | yes ) + as_fn_error $? "\"$withval\" is not valid here; please specify linker flags appropriate for your environment." "$LINENO" 5 + ;; + * ) + coin_has_osi=yes + osi_lflags="$withval" + ;; + esac + fi + + withval="$with_osi_cflags" + if test -n "$withval" ; then + case "$withval" in + build | no | yes ) + as_fn_error $? "\"$withval\" is not valid here; please specify compiler flags appropriate for your environment." "$LINENO" 5 + ;; + * ) + coin_has_osi=yes + osi_cflags="$withval" + ;; + esac + fi + fi + + + + # At this point, coin_has_prim can be one of + # - noInfo (no user options specified), + # - skipping (user said no), + # - requested, + # - build (user said yes or build and gave no further guidance), + # - or yes (user specified one or more --with-prim options). + # If we're already at yes or skipping, we're done looking. + + # If there are no user options (noInfo) and the default is no, we're skipping. + # Otherwise, the default must be yes or build; consider the package requested. + # A default action we don't recognise defaults to yes. + if test "$coin_has_osi" = noInfo ; then + case $dflt_action in + no ) + coin_has_osi=skipping + ;; + build ) + coin_has_osi=build + ;; + * ) + coin_has_osi=requested + ;; + esac + fi + + # Now coin_has_prim can be one of skipping, yes, requested, or build. + # For requested or build, try pkgconf, if it's available. + # If it's not available, well, hope that the user knows their system + # and prim can be used with no additional flags. + case $coin_has_osi in + requested | build ) + if test -n "$PKG_CONFIG" -a "osi" != skip ; then + pcfile="osi" + + + + if test -n "$PKG_CONFIG" ; then + if PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --exists "$pcfile" ; then + OSI_VERSIONS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --modversion "$pcfile" 2>/dev/null | tr '\n' ' '` + coin_has_osi=yes + osi_data=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --variable=datadir "$pcfile" 2>/dev/null` + osi_pcfiles="$pcfile" + else + OSI_PKG_ERRORS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "$pcfile"` + coin_has_osi=no + fi + else + as_fn_error $? "\"Cannot check for existence of module osi without pkgconf\"" "$LINENO" 5 + fi + + else + coin_has_osi=no + fi + ;; + skipping | yes ) + ;; + * ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unexpected status \"$coin_has_osi\" in COIN_FIND_PRIM_PKG" >&5 +$as_echo "$as_me: WARNING: Unexpected status \"$coin_has_osi\" in COIN_FIND_PRIM_PKG" >&2;} + ;; + esac + + # The final value of coin_has_prim will be yes, no, or skipping. + # No means we looked (with pkgconfig) and didn't find anything. + # Skipping means the user said `don't use.' + # Yes means we have something, from the user or from pkgconfig. + # Note that we haven't run a useability test! + + # Define BUILDTOOLS_DEBUG to enable debugging output + if test "$BUILDTOOLS_DEBUG" = 1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: FIND_PRIM_PKG result for osi: \"$coin_has_osi\"" >&5 +$as_echo "$as_me: FIND_PRIM_PKG result for osi: \"$coin_has_osi\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Collected values for package 'osi'" >&5 +$as_echo "$as_me: Collected values for package 'osi'" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: osi_lflags is \"$osi_lflags\"" >&5 +$as_echo "$as_me: osi_lflags is \"$osi_lflags\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: osi_cflags is \"$osi_cflags\"" >&5 +$as_echo "$as_me: osi_cflags is \"$osi_cflags\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: osi_data is \"$osi_data\"" >&5 +$as_echo "$as_me: osi_data is \"$osi_data\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: osi_pcfiles is \"$osi_pcfiles\"" >&5 +$as_echo "$as_me: osi_pcfiles is \"$osi_pcfiles\"" >&6;} + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coin_has_osi" >&5 +$as_echo "$coin_has_osi" >&6; } + + if test "$PKG_CONFIG$coin_has_osi" = no ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check for Osi via pkg-config was skipped as no pkg-config available. If Osi was meant to be found, then consider installing pkg-config or provide appropriate --with-osi-lflags, --with-osi-cflags, etc." >&5 +$as_echo "$as_me: WARNING: Check for Osi via pkg-config was skipped as no pkg-config available. If Osi was meant to be found, then consider installing pkg-config or provide appropriate --with-osi-lflags, --with-osi-cflags, etc." >&2;} + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coin_has_osi due to COIN_SKIP_PROJECTS" >&5 +$as_echo "$coin_has_osi due to COIN_SKIP_PROJECTS" >&6; } + fi + + # Possibilities are `yes', 'no', or `skipping'. Normalise to `yes' or `no'. + if test "$coin_has_osi" != yes ; then + coin_has_osi=no + fi + + if test $coin_has_osi = yes; then + COIN_HAS_OSI_TRUE= + COIN_HAS_OSI_FALSE='#' +else + COIN_HAS_OSI_TRUE='#' + COIN_HAS_OSI_FALSE= +fi + + + # If we have located the package, define preprocessor symbol PKG_HAS_PRIM and + # augment the necessary variables for the client packages. + if test $coin_has_osi = yes ; then + +$as_echo "#define GAMSLINKS_HAS_OSI 1" >>confdefs.h + + if test -n "$osi_pcfiles" ; then GAMSOSI_PCFILES="$osi_pcfiles $GAMSOSI_PCFILES" ; fi + GAMSOSI_LFLAGS="$osi_lflags $GAMSOSI_LFLAGS" + GAMSOSI_CFLAGS="$osi_cflags $GAMSOSI_CFLAGS" + + + + fi + +else + if false; then + COIN_HAS_OSI_TRUE= + COIN_HAS_OSI_FALSE='#' +else + COIN_HAS_OSI_TRUE='#' + COIN_HAS_OSI_FALSE= +fi + +fi @@ -21826,10 +21837,6 @@ if test -z "${COIN_HAS_PKGCONFIG_TRUE}" && test -z "${COIN_HAS_PKGCONFIG_FALSE}" as_fn_error $? "conditional \"COIN_HAS_PKGCONFIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${COIN_HAS_OSI_TRUE}" && test -z "${COIN_HAS_OSI_FALSE}"; then - as_fn_error $? "conditional \"COIN_HAS_OSI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${COIN_HAS_OSICPX_TRUE}" && test -z "${COIN_HAS_OSICPX_FALSE}"; then as_fn_error $? "conditional \"COIN_HAS_OSICPX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -21846,6 +21853,14 @@ if test -z "${COIN_HAS_OSIXPR_TRUE}" && test -z "${COIN_HAS_OSIXPR_FALSE}"; then as_fn_error $? "conditional \"COIN_HAS_OSIXPR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${COIN_HAS_OSI_TRUE}" && test -z "${COIN_HAS_OSI_FALSE}"; then + as_fn_error $? "conditional \"COIN_HAS_OSI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${COIN_HAS_OSI_TRUE}" && test -z "${COIN_HAS_OSI_FALSE}"; then + as_fn_error $? "conditional \"COIN_HAS_OSI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${COIN_HAS_CBC_TRUE}" && test -z "${COIN_HAS_CBC_FALSE}"; then as_fn_error $? "conditional \"COIN_HAS_CBC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index b62c340f..7d8e43c5 100644 --- a/configure.ac +++ b/configure.ac @@ -42,11 +42,15 @@ AC_COIN_DOXYGEN ############################################################################# # check which solvers are available -AC_COIN_CHK_PKG(Osi, [GamsOsi], [osi]) AC_COIN_CHK_PKG(OsiCpx, [GamsOsi], [osi-cplex]) AC_COIN_CHK_PKG(OsiGrb, [GamsOsi], [osi-gurobi]) AC_COIN_CHK_PKG(OsiMsk, [GamsOsi], [osi-mosek]) AC_COIN_CHK_PKG(OsiXpr, [GamsOsi], [osi-xpress]) +if test $coin_has_osicpx$coin_has_osigrb$coin_has_osimsk$coin_has_osixpr != "nononono" ; then + AC_COIN_CHK_PKG(Osi, [GamsOsi], [osi]) +else + AM_CONDITIONAL(COIN_HAS_OSI,false) +fi AC_COIN_CHK_PKG(Cbc, [GamsCbc], [cbc]) AC_COIN_CHK_PKG(Ipopt, [GamsIpopt], [ipopt]) AC_COIN_CHK_PKG(Bonmin, [GamsBonmin], [bonmin])