Changeset 1295


Ignore:
Timestamp:
Jan 29, 2020 10:41:06 AM (2 months ago)
Author:
stefan
Message:

fixup dsyevx wrapper

  • add check for lapack
  • call dysevx and not dsyev
Location:
branches/autotools-update/Couenne
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/autotools-update/Couenne/configure

    r1293 r1295  
    655655coin_have_latex
    656656coin_have_doxygen
     657COIN_HAS_LAPACK_FALSE
     658COIN_HAS_LAPACK_TRUE
    657659COIN_HAS_CPLEX_FALSE
    658660COIN_HAS_CPLEX_TRUE
     
    861863with_cplex_lflags
    862864with_cplex_cflags
     865with_lapack
     866with_lapack_lflags
     867with_lapack_cflags
    863868with_dot
    864869'
     
    16191624                          environment. (Most often, -l specs for libraries.)
    16201625  --with-cplex-cflags     Compiler flags for Cplex appropriate for your
     1626                          environment. (Most often, -I specs for header file
     1627                          directories.)
     1628  --with-lapack           Use lapack. If an argument is given, 'yes' is
     1629                          equivalent to --with-lapack, 'no' is
     1630                          equivalent to --without-lapack. Any other argument
     1631                          is applied as for --with-lapack-lflags
     1632  --with-lapack-lflags    Linker flags for lapack appropriate for your
     1633                          environment. (Most often, -l specs for libraries.)
     1634  --with-lapack-cflags    Compiler flags for lapack appropriate for your
    16211635                          environment. (Most often, -I specs for header file
    16221636                          directories.)
     
    1937819392
    1937919393
     19394# for dsyevx in sdpcuts
     19395
     19396# Make sure the necessary variables exist for each client package.
     19397
     19398
     19399
     19400
     19401
     19402# Set up command line arguments with DEF_PRIM_ARGS.
     19403
     19404
     19405
     19406
     19407# Check whether --with-lapack was given.
     19408if test "${with_lapack+set}" = set; then :
     19409  withval=$with_lapack;
     19410fi
     19411
     19412
     19413
     19414# Check whether --with-lapack-lflags was given.
     19415if test "${with_lapack_lflags+set}" = set; then :
     19416  withval=$with_lapack_lflags;
     19417fi
     19418
     19419
     19420
     19421# Check whether --with-lapack-cflags was given.
     19422if test "${with_lapack_cflags+set}" = set; then :
     19423  withval=$with_lapack_cflags;
     19424fi
     19425
     19426
     19427
     19428
     19429
     19430# Give FIND_PRIM_PKG a chance to look for user-specified lapack flags,
     19431# but skip any checks via a .pc file. The result (coin_has_lapack) will
     19432# be one of yes (the user specified something), no (user specified nothing),
     19433# or skipping (user said do not use). We'll also have variables
     19434# lapack_lflags, lapack_cflags, lapack_data, and lapack_pcfiles.
     19435
     19436
     19437
     19438  dflt_action=yes
     19439
     19440# Initialize variables for the primary package.
     19441
     19442  coin_has_lapack=noInfo
     19443  lapack_lflags=
     19444  lapack_cflags=
     19445  lapack_data=
     19446  lapack_pcfiles=
     19447
     19448# --with-prim is always present. If the client specified dataonly, its value
     19449# is assigned to prim_data.
     19450
     19451  withval=$with_lapack
     19452  if test -n "$withval" ; then
     19453    case "$withval" in
     19454      no )
     19455        coin_has_lapack=skipping
     19456        ;;
     19457      yes )
     19458        coin_has_lapack=requested
     19459        ;;
     19460      build )
     19461        coin_has_lapack=build
     19462        ;;
     19463      * )
     19464        coin_has_lapack=yes
     19465        lapack_lflags=$withval
     19466        ;;
     19467    esac
     19468  fi
     19469
     19470# --with-prim-libs and --with-prim-cflags are present unless the client
     19471# specified dataonly. Specifying --with-prim=no overrides the individual
     19472# options for libs and cflags.
     19473
     19474  if test "$coin_has_lapack" != skipping ; then
     19475       withval=$with_lapack_lflags
     19476       if test -n "$withval" ; then
     19477         case "$withval" in
     19478           build | no | yes )
     19479             as_fn_error $? "\"$withval\" is not valid here; please specify linker flags appropriate for your environment." "$LINENO" 5
     19480             ;;
     19481           * )
     19482             coin_has_lapack=yes
     19483             lapack_lflags=$withval
     19484             ;;
     19485         esac
     19486       fi
     19487
     19488       withval=$with_lapack_cflags
     19489       if test -n "$withval" ; then
     19490         case "$withval" in
     19491           build | no | yes )
     19492             as_fn_error $? "\"$withval\" is not valid here; please specify compiler flags appropriate for your environment." "$LINENO" 5
     19493             ;;
     19494           * )
     19495             coin_has_lapack=yes
     19496             lapack_cflags="$withval"
     19497             ;;
     19498         esac
     19499       fi
     19500     fi
     19501
     19502# --with-prim-data will be present unless the client specified nodata.
     19503# Specifying --with-prim=no overrides the individual option for data.
     19504
     19505
     19506
     19507# At this point, coin_has_prim can be one of noInfo (no user options
     19508# specified), skipping (user said no), requested or build (user said yes
     19509# or build and gave no further guidance), or yes (user specified one or
     19510# more --with-prim options). If we're already at yes or skipping, we're
     19511# done looking.
     19512
     19513# If there are no user options (noInfo) and the default is no, we're skipping.
     19514# Otherwise, the default must be yes or build; consider the package requested.
     19515# A default action we don't recognise defaults to yes.
     19516
     19517  if test "$coin_has_lapack" = noInfo ; then
     19518    case $dflt_action in
     19519      no )
     19520        coin_has_lapack=skipping
     19521        ;;
     19522      build )
     19523        coin_has_lapack=build
     19524        ;;
     19525      * )
     19526        coin_has_lapack=requested
     19527        ;;
     19528    esac
     19529  fi
     19530
     19531# Now coin_has_prim can be one of skipping, yes, requested, or build. For
     19532# requested or build, try pkgconf, if it's available. If it's not available,
     19533# well, hope that the user knows their system and prim can be used with no
     19534# additional flags.
     19535
     19536  case $coin_has_lapack in
     19537    requested | build )
     19538      if test -n "$PKG_CONFIG" -a "skip" != skip ; then
     19539        pcfile="skip"
     19540
     19541
     19542
     19543  if test -n "$PKG_CONFIG" ; then
     19544    if PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --exists "$pcfile" ; then
     19545      LAPACK_VERSIONS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --modversion "$pcfile" 2>/dev/null | tr '\n' ' '`
     19546      coin_has_lapack=yes
     19547           lapack_data=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --variable=datadir "$pcfile" 2>/dev/null`
     19548           lapack_pcfiles="$pcfile"
     19549    else
     19550      LAPACK_PKG_ERRORS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "$pcfile"`
     19551      coin_has_lapack=no
     19552    fi
     19553  else
     19554    as_fn_error $? "\"Cannot check for existence of module lapack without pkgconf\"" "$LINENO" 5
     19555  fi
     19556
     19557      else
     19558        coin_has_lapack=no
     19559        # AC_MSG_WARN([skipped check via pkgconf as no pkgconf available])
     19560      fi
     19561      ;;
     19562    skipping | yes )
     19563      ;;
     19564    * )
     19565      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unexpected status \"$coin_has_lapack\" in COIN_FIND_PRIM_PKG" >&5
     19566$as_echo "$as_me: WARNING: Unexpected status \"$coin_has_lapack\" in COIN_FIND_PRIM_PKG" >&2;}
     19567      ;;
     19568  esac
     19569
     19570# The final value of coin_has_prim will be yes, no, or skipping. No means
     19571# we looked (with pkgconfig) and didn't find anything. Skipping means the
     19572# user said `don't use.' Yes means we have something, from the user or
     19573# from pkgconfig. Note that we haven't run a useability test!
     19574
     19575# Define BUILDTOOLS_DEBUG to enable debugging output
     19576
     19577    if test "$BUILDTOOLS_DEBUG" = 1 ; then
     19578      { $as_echo "$as_me:${as_lineno-$LINENO}: FIND_PRIM_PKG result for lapack: \"$coin_has_lapack\"" >&5
     19579$as_echo "$as_me: FIND_PRIM_PKG result for lapack: \"$coin_has_lapack\"" >&6;}
     19580      { $as_echo "$as_me:${as_lineno-$LINENO}: Collected values for package 'lapack'" >&5
     19581$as_echo "$as_me: Collected values for package 'lapack'" >&6;}
     19582      { $as_echo "$as_me:${as_lineno-$LINENO}: lapack_lflags is \"$lapack_lflags\"" >&5
     19583$as_echo "$as_me: lapack_lflags is \"$lapack_lflags\"" >&6;}
     19584      { $as_echo "$as_me:${as_lineno-$LINENO}: lapack_cflags is \"$lapack_cflags\"" >&5
     19585$as_echo "$as_me: lapack_cflags is \"$lapack_cflags\"" >&6;}
     19586      { $as_echo "$as_me:${as_lineno-$LINENO}: lapack_data is \"$lapack_data\"" >&5
     19587$as_echo "$as_me: lapack_data is \"$lapack_data\"" >&6;}
     19588      { $as_echo "$as_me:${as_lineno-$LINENO}: lapack_pcfiles is \"$lapack_pcfiles\"" >&5
     19589$as_echo "$as_me: lapack_pcfiles is \"$lapack_pcfiles\"" >&6;}
     19590    fi
     19591
     19592
     19593
     19594# If FIND_PRIM_PKG found something, then we'll do a link check to figure
     19595# out whether it is working and what the name mangling scheme is.
     19596# This sets dsyev_namemangling
     19597  if test "$coin_has_lapack" = yes ; then
     19598
     19599  # setup LIBS by adding $lapack_lflags and those from $lapack_pcfiles
     19600  ac_save_LIBS="$LIBS"
     19601  LIBS="$lapack_lflags $LIBS"
     19602  if test -n "$lapack_pcfiles" ; then
     19603
     19604      temp_LFLAGS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --libs $lapack_pcfiles`
     19605      LIBS="$temp_LFLAGS $LIBS"
     19606    fi
     19607
     19608  dsyev_namemangling=unknown
     19609
     19610  # FIXME we had "extra underscore" as additional option for ac_extra
     19611  #   but since there is no use for ac_extra below, was there any use for it?
     19612  for ac_extra in "no extra underscore" ; do
     19613    for ac_case in "lower case" "upper case" ; do
     19614      for ac_trail in "underscore" "no underscore" ; do
     19615        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     19616        case $ac_case in
     19617          "lower case")
     19618            ac_name=dsyev
     19619            ;;
     19620          "upper case")
     19621            ac_name=DSYEV
     19622            ;;
     19623        esac
     19624        if test "$ac_trail" = underscore ; then
     19625          ac_name=${ac_name}_
     19626        fi
     19627        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     19628$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     19629        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     19630/* end confdefs.h.  */
     19631#ifdef __cplusplus
     19632             extern "C"
     19633             #endif
     19634             void $ac_name();
     19635int
     19636main ()
     19637{
     19638$ac_name()
     19639  ;
     19640  return 0;
     19641}
     19642_ACEOF
     19643if ac_fn_c_try_link "$LINENO"; then :
     19644  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     19645           ac_success=yes
     19646else
     19647  ac_success=no
     19648fi
     19649rm -f core conftest.err conftest.$ac_objext \
     19650    conftest$ac_exeext conftest.$ac_ext
     19651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     19652$as_echo "$ac_success" >&6; }
     19653        if test $ac_success = yes ; then
     19654          break 3
     19655        fi
     19656      done
     19657    done
     19658  done
     19659  LIBS=$ac_save_LIBS
     19660
     19661  if test $ac_success = yes ; then
     19662    :
     19663    else as_fn_error $? "Could not find dsyev in Lapack" "$LINENO" 5
     19664  fi
     19665
     19666  fi
     19667
     19668# If FIND_PRIM_PKG didn't find anything, try a few more guesses for
     19669# optimized blas/lapack libs (based on build system type).
     19670  if test "$coin_has_lapack" = no ; then
     19671    case $build in
     19672      *-linux*)
     19673
     19674  # setup LIBS by adding -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm and those from
     19675  ac_save_LIBS="$LIBS"
     19676  LIBS="-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm $LIBS"
     19677
     19678
     19679  dsyev_namemangling=unknown
     19680
     19681  # FIXME we had "extra underscore" as additional option for ac_extra
     19682  #   but since there is no use for ac_extra below, was there any use for it?
     19683  for ac_extra in "no extra underscore" ; do
     19684    for ac_case in "lower case" "upper case" ; do
     19685      for ac_trail in "underscore" "no underscore" ; do
     19686        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     19687        case $ac_case in
     19688          "lower case")
     19689            ac_name=dsyev
     19690            ;;
     19691          "upper case")
     19692            ac_name=DSYEV
     19693            ;;
     19694        esac
     19695        if test "$ac_trail" = underscore ; then
     19696          ac_name=${ac_name}_
     19697        fi
     19698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     19699$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     19700        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     19701/* end confdefs.h.  */
     19702#ifdef __cplusplus
     19703             extern "C"
     19704             #endif
     19705             void $ac_name();
     19706int
     19707main ()
     19708{
     19709$ac_name()
     19710  ;
     19711  return 0;
     19712}
     19713_ACEOF
     19714if ac_fn_c_try_link "$LINENO"; then :
     19715  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     19716           ac_success=yes
     19717else
     19718  ac_success=no
     19719fi
     19720rm -f core conftest.err conftest.$ac_objext \
     19721    conftest$ac_exeext conftest.$ac_ext
     19722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     19723$as_echo "$ac_success" >&6; }
     19724        if test $ac_success = yes ; then
     19725          break 3
     19726        fi
     19727      done
     19728    done
     19729  done
     19730  LIBS=$ac_save_LIBS
     19731
     19732  if test $ac_success = yes ; then
     19733
     19734           coin_has_lapack=yes
     19735           lapack_lflags="-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm"
     19736
     19737  fi
     19738
     19739      ;;
     19740
     19741      *-sgi-*)
     19742
     19743  # setup LIBS by adding -lcomplib.sgimath and those from
     19744  ac_save_LIBS="$LIBS"
     19745  LIBS="-lcomplib.sgimath $LIBS"
     19746
     19747
     19748  dsyev_namemangling=unknown
     19749
     19750  # FIXME we had "extra underscore" as additional option for ac_extra
     19751  #   but since there is no use for ac_extra below, was there any use for it?
     19752  for ac_extra in "no extra underscore" ; do
     19753    for ac_case in "lower case" "upper case" ; do
     19754      for ac_trail in "underscore" "no underscore" ; do
     19755        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     19756        case $ac_case in
     19757          "lower case")
     19758            ac_name=dsyev
     19759            ;;
     19760          "upper case")
     19761            ac_name=DSYEV
     19762            ;;
     19763        esac
     19764        if test "$ac_trail" = underscore ; then
     19765          ac_name=${ac_name}_
     19766        fi
     19767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     19768$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     19769        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     19770/* end confdefs.h.  */
     19771#ifdef __cplusplus
     19772             extern "C"
     19773             #endif
     19774             void $ac_name();
     19775int
     19776main ()
     19777{
     19778$ac_name()
     19779  ;
     19780  return 0;
     19781}
     19782_ACEOF
     19783if ac_fn_c_try_link "$LINENO"; then :
     19784  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     19785           ac_success=yes
     19786else
     19787  ac_success=no
     19788fi
     19789rm -f core conftest.err conftest.$ac_objext \
     19790    conftest$ac_exeext conftest.$ac_ext
     19791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     19792$as_echo "$ac_success" >&6; }
     19793        if test $ac_success = yes ; then
     19794          break 3
     19795        fi
     19796      done
     19797    done
     19798  done
     19799  LIBS=$ac_save_LIBS
     19800
     19801  if test $ac_success = yes ; then
     19802
     19803          coin_has_lapack=yes
     19804          lapack_lflags=-lcomplib.sgimath
     19805
     19806  fi
     19807
     19808      ;;
     19809
     19810      *-*-solaris*)
     19811        # Ideally, we'd use -library=sunperf, but it's an imperfect world.
     19812        # Studio cc doesn't recognise -library, it wants -xlic_lib. Studio 12
     19813        # CC doesn't recognise -xlic_lib. Libtool doesn't like -xlic_lib
     19814        # anyway. Sun claims that CC and cc will understand -library in Studio
     19815        # 13. The main extra function of -xlic_lib and -library is to arrange
     19816        # for the Fortran run-time libraries to be linked for C++ and C. We
     19817        # can arrange that explicitly.
     19818
     19819  # setup LIBS by adding -lsunperf and those from
     19820  ac_save_LIBS="$LIBS"
     19821  LIBS="-lsunperf $LIBS"
     19822
     19823
     19824  dsyev_namemangling=unknown
     19825
     19826  # FIXME we had "extra underscore" as additional option for ac_extra
     19827  #   but since there is no use for ac_extra below, was there any use for it?
     19828  for ac_extra in "no extra underscore" ; do
     19829    for ac_case in "lower case" "upper case" ; do
     19830      for ac_trail in "underscore" "no underscore" ; do
     19831        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     19832        case $ac_case in
     19833          "lower case")
     19834            ac_name=dsyev
     19835            ;;
     19836          "upper case")
     19837            ac_name=DSYEV
     19838            ;;
     19839        esac
     19840        if test "$ac_trail" = underscore ; then
     19841          ac_name=${ac_name}_
     19842        fi
     19843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     19844$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     19845        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     19846/* end confdefs.h.  */
     19847#ifdef __cplusplus
     19848             extern "C"
     19849             #endif
     19850             void $ac_name();
     19851int
     19852main ()
     19853{
     19854$ac_name()
     19855  ;
     19856  return 0;
     19857}
     19858_ACEOF
     19859if ac_fn_c_try_link "$LINENO"; then :
     19860  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     19861           ac_success=yes
     19862else
     19863  ac_success=no
     19864fi
     19865rm -f core conftest.err conftest.$ac_objext \
     19866    conftest$ac_exeext conftest.$ac_ext
     19867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     19868$as_echo "$ac_success" >&6; }
     19869        if test $ac_success = yes ; then
     19870          break 3
     19871        fi
     19872      done
     19873    done
     19874  done
     19875  LIBS=$ac_save_LIBS
     19876
     19877  if test $ac_success = yes ; then
     19878
     19879          coin_has_lapack=yes
     19880          lapack_lflags=-lsunperf
     19881
     19882  fi
     19883
     19884      ;;
     19885
     19886      *-cygwin* | *-mingw* | *-msys*)
     19887        # check for 64-bit sequential MKL
     19888        if test "$enable_shared" = yes ; then
     19889
     19890  # setup LIBS by adding mkl_intel_lp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib and those from
     19891  ac_save_LIBS="$LIBS"
     19892  LIBS="mkl_intel_lp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib $LIBS"
     19893
     19894
     19895  dsyev_namemangling=unknown
     19896
     19897  # FIXME we had "extra underscore" as additional option for ac_extra
     19898  #   but since there is no use for ac_extra below, was there any use for it?
     19899  for ac_extra in "no extra underscore" ; do
     19900    for ac_case in "lower case" "upper case" ; do
     19901      for ac_trail in "underscore" "no underscore" ; do
     19902        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     19903        case $ac_case in
     19904          "lower case")
     19905            ac_name=dsyev
     19906            ;;
     19907          "upper case")
     19908            ac_name=DSYEV
     19909            ;;
     19910        esac
     19911        if test "$ac_trail" = underscore ; then
     19912          ac_name=${ac_name}_
     19913        fi
     19914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     19915$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     19916        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     19917/* end confdefs.h.  */
     19918#ifdef __cplusplus
     19919             extern "C"
     19920             #endif
     19921             void $ac_name();
     19922int
     19923main ()
     19924{
     19925$ac_name()
     19926  ;
     19927  return 0;
     19928}
     19929_ACEOF
     19930if ac_fn_c_try_link "$LINENO"; then :
     19931  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     19932           ac_success=yes
     19933else
     19934  ac_success=no
     19935fi
     19936rm -f core conftest.err conftest.$ac_objext \
     19937    conftest$ac_exeext conftest.$ac_ext
     19938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     19939$as_echo "$ac_success" >&6; }
     19940        if test $ac_success = yes ; then
     19941          break 3
     19942        fi
     19943      done
     19944    done
     19945  done
     19946  LIBS=$ac_save_LIBS
     19947
     19948  if test $ac_success = yes ; then
     19949    coin_has_lapack=yes
     19950             lapack_lflags="mkl_intel_lp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib"
     19951
     19952  fi
     19953
     19954        else
     19955
     19956  # setup LIBS by adding mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib and those from
     19957  ac_save_LIBS="$LIBS"
     19958  LIBS="mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib $LIBS"
     19959
     19960
     19961  dsyev_namemangling=unknown
     19962
     19963  # FIXME we had "extra underscore" as additional option for ac_extra
     19964  #   but since there is no use for ac_extra below, was there any use for it?
     19965  for ac_extra in "no extra underscore" ; do
     19966    for ac_case in "lower case" "upper case" ; do
     19967      for ac_trail in "underscore" "no underscore" ; do
     19968        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     19969        case $ac_case in
     19970          "lower case")
     19971            ac_name=dsyev
     19972            ;;
     19973          "upper case")
     19974            ac_name=DSYEV
     19975            ;;
     19976        esac
     19977        if test "$ac_trail" = underscore ; then
     19978          ac_name=${ac_name}_
     19979        fi
     19980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     19981$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     19982        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     19983/* end confdefs.h.  */
     19984#ifdef __cplusplus
     19985             extern "C"
     19986             #endif
     19987             void $ac_name();
     19988int
     19989main ()
     19990{
     19991$ac_name()
     19992  ;
     19993  return 0;
     19994}
     19995_ACEOF
     19996if ac_fn_c_try_link "$LINENO"; then :
     19997  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     19998           ac_success=yes
     19999else
     20000  ac_success=no
     20001fi
     20002rm -f core conftest.err conftest.$ac_objext \
     20003    conftest$ac_exeext conftest.$ac_ext
     20004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     20005$as_echo "$ac_success" >&6; }
     20006        if test $ac_success = yes ; then
     20007          break 3
     20008        fi
     20009      done
     20010    done
     20011  done
     20012  LIBS=$ac_save_LIBS
     20013
     20014  if test $ac_success = yes ; then
     20015    coin_has_lapack=yes
     20016             lapack_lflags="mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib"
     20017
     20018  fi
     20019
     20020        fi
     20021      ;;
     20022
     20023      *-darwin*)
     20024
     20025  # setup LIBS by adding -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm and those from
     20026  ac_save_LIBS="$LIBS"
     20027  LIBS="-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm $LIBS"
     20028
     20029
     20030  dsyev_namemangling=unknown
     20031
     20032  # FIXME we had "extra underscore" as additional option for ac_extra
     20033  #   but since there is no use for ac_extra below, was there any use for it?
     20034  for ac_extra in "no extra underscore" ; do
     20035    for ac_case in "lower case" "upper case" ; do
     20036      for ac_trail in "underscore" "no underscore" ; do
     20037        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     20038        case $ac_case in
     20039          "lower case")
     20040            ac_name=dsyev
     20041            ;;
     20042          "upper case")
     20043            ac_name=DSYEV
     20044            ;;
     20045        esac
     20046        if test "$ac_trail" = underscore ; then
     20047          ac_name=${ac_name}_
     20048        fi
     20049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     20050$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     20051        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     20052/* end confdefs.h.  */
     20053#ifdef __cplusplus
     20054             extern "C"
     20055             #endif
     20056             void $ac_name();
     20057int
     20058main ()
     20059{
     20060$ac_name()
     20061  ;
     20062  return 0;
     20063}
     20064_ACEOF
     20065if ac_fn_c_try_link "$LINENO"; then :
     20066  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     20067           ac_success=yes
     20068else
     20069  ac_success=no
     20070fi
     20071rm -f core conftest.err conftest.$ac_objext \
     20072    conftest$ac_exeext conftest.$ac_ext
     20073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     20074$as_echo "$ac_success" >&6; }
     20075        if test $ac_success = yes ; then
     20076          break 3
     20077        fi
     20078      done
     20079    done
     20080  done
     20081  LIBS=$ac_save_LIBS
     20082
     20083  if test $ac_success = yes ; then
     20084
     20085          coin_has_lapack=yes
     20086          lapack_lflags="-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm"
     20087
     20088  fi
     20089
     20090        if test "$coin_has_lapack" = no ; then
     20091
     20092  # setup LIBS by adding -framework Accelerate and those from
     20093  ac_save_LIBS="$LIBS"
     20094  LIBS="-framework Accelerate $LIBS"
     20095
     20096
     20097  dsyev_namemangling=unknown
     20098
     20099  # FIXME we had "extra underscore" as additional option for ac_extra
     20100  #   but since there is no use for ac_extra below, was there any use for it?
     20101  for ac_extra in "no extra underscore" ; do
     20102    for ac_case in "lower case" "upper case" ; do
     20103      for ac_trail in "underscore" "no underscore" ; do
     20104        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     20105        case $ac_case in
     20106          "lower case")
     20107            ac_name=dsyev
     20108            ;;
     20109          "upper case")
     20110            ac_name=DSYEV
     20111            ;;
     20112        esac
     20113        if test "$ac_trail" = underscore ; then
     20114          ac_name=${ac_name}_
     20115        fi
     20116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     20117$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     20118        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     20119/* end confdefs.h.  */
     20120#ifdef __cplusplus
     20121             extern "C"
     20122             #endif
     20123             void $ac_name();
     20124int
     20125main ()
     20126{
     20127$ac_name()
     20128  ;
     20129  return 0;
     20130}
     20131_ACEOF
     20132if ac_fn_c_try_link "$LINENO"; then :
     20133  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     20134           ac_success=yes
     20135else
     20136  ac_success=no
     20137fi
     20138rm -f core conftest.err conftest.$ac_objext \
     20139    conftest$ac_exeext conftest.$ac_ext
     20140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     20141$as_echo "$ac_success" >&6; }
     20142        if test $ac_success = yes ; then
     20143          break 3
     20144        fi
     20145      done
     20146    done
     20147  done
     20148  LIBS=$ac_save_LIBS
     20149
     20150  if test $ac_success = yes ; then
     20151
     20152            coin_has_lapack=yes
     20153            lapack_lflags="-framework Accelerate"
     20154
     20155  fi
     20156
     20157        fi
     20158      ;;
     20159    esac
     20160  fi
     20161
     20162# If none of the above worked, check whether lapack.pc blas.pc exists and links
     20163# We check for both to ensure that blas lib also appears on link line in case
     20164# someone wants to use Blas functions but tests only for Lapack.
     20165  if test "$coin_has_lapack" = no ; then
     20166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lapack.pc and blas.pc" >&5
     20167$as_echo_n "checking for lapack.pc and blas.pc... " >&6; }
     20168
     20169
     20170
     20171  if test -n "$PKG_CONFIG" ; then
     20172    if PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --exists "lapack blas" ; then
     20173      LAPACK_VERSIONS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --modversion "lapack blas" 2>/dev/null | tr '\n' ' '`
     20174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     20175$as_echo "yes" >&6; }
     20176
     20177  # setup LIBS by adding  and those from lapack
     20178  ac_save_LIBS="$LIBS"
     20179
     20180  if test -n "lapack" ; then
     20181
     20182      temp_LFLAGS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --libs lapack`
     20183      LIBS="$temp_LFLAGS $LIBS"
     20184    fi
     20185
     20186  dsyev_namemangling=unknown
     20187
     20188  # FIXME we had "extra underscore" as additional option for ac_extra
     20189  #   but since there is no use for ac_extra below, was there any use for it?
     20190  for ac_extra in "no extra underscore" ; do
     20191    for ac_case in "lower case" "upper case" ; do
     20192      for ac_trail in "underscore" "no underscore" ; do
     20193        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     20194        case $ac_case in
     20195          "lower case")
     20196            ac_name=dsyev
     20197            ;;
     20198          "upper case")
     20199            ac_name=DSYEV
     20200            ;;
     20201        esac
     20202        if test "$ac_trail" = underscore ; then
     20203          ac_name=${ac_name}_
     20204        fi
     20205        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     20206$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     20207        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     20208/* end confdefs.h.  */
     20209#ifdef __cplusplus
     20210             extern "C"
     20211             #endif
     20212             void $ac_name();
     20213int
     20214main ()
     20215{
     20216$ac_name()
     20217  ;
     20218  return 0;
     20219}
     20220_ACEOF
     20221if ac_fn_c_try_link "$LINENO"; then :
     20222  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     20223           ac_success=yes
     20224else
     20225  ac_success=no
     20226fi
     20227rm -f core conftest.err conftest.$ac_objext \
     20228    conftest$ac_exeext conftest.$ac_ext
     20229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     20230$as_echo "$ac_success" >&6; }
     20231        if test $ac_success = yes ; then
     20232          break 3
     20233        fi
     20234      done
     20235    done
     20236  done
     20237  LIBS=$ac_save_LIBS
     20238
     20239  if test $ac_success = yes ; then
     20240    coin_has_lapack=yes
     20241         lapack_pcfiles="lapack blas"
     20242    else as_fn_error $? "Could not find dsyev in Lapack from lapack.pc blas.pc." "$LINENO" 5
     20243  fi
     20244
     20245    else
     20246      LAPACK_PKG_ERRORS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "lapack blas"`
     20247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     20248$as_echo "no" >&6; }
     20249    fi
     20250  else
     20251    as_fn_error $? "\"Cannot check for existence of module lapack without pkgconf\"" "$LINENO" 5
     20252  fi
     20253
     20254  fi
     20255
     20256# TODO do we need another check with lapack.pc only?
     20257
     20258# If none of the above worked, try the generic -llapack -lblas as last resort.
     20259# We check for both to ensure that blas lib also appears on link line in case
     20260# someone wants to use Blas functions but tests only for Lapack.
     20261  if test "$coin_has_lapack" = no ; then
     20262
     20263  # setup LIBS by adding -llapack -lblas and those from
     20264  ac_save_LIBS="$LIBS"
     20265  LIBS="-llapack -lblas $LIBS"
     20266
     20267
     20268  dsyev_namemangling=unknown
     20269
     20270  # FIXME we had "extra underscore" as additional option for ac_extra
     20271  #   but since there is no use for ac_extra below, was there any use for it?
     20272  for ac_extra in "no extra underscore" ; do
     20273    for ac_case in "lower case" "upper case" ; do
     20274      for ac_trail in "underscore" "no underscore" ; do
     20275        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
     20276        case $ac_case in
     20277          "lower case")
     20278            ac_name=dsyev
     20279            ;;
     20280          "upper case")
     20281            ac_name=DSYEV
     20282            ;;
     20283        esac
     20284        if test "$ac_trail" = underscore ; then
     20285          ac_name=${ac_name}_
     20286        fi
     20287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function $ac_name in $LIBS" >&5
     20288$as_echo_n "checking for function $ac_name in $LIBS... " >&6; }
     20289        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     20290/* end confdefs.h.  */
     20291#ifdef __cplusplus
     20292             extern "C"
     20293             #endif
     20294             void $ac_name();
     20295int
     20296main ()
     20297{
     20298$ac_name()
     20299  ;
     20300  return 0;
     20301}
     20302_ACEOF
     20303if ac_fn_c_try_link "$LINENO"; then :
     20304  dsyev_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
     20305           ac_success=yes
     20306else
     20307  ac_success=no
     20308fi
     20309rm -f core conftest.err conftest.$ac_objext \
     20310    conftest$ac_exeext conftest.$ac_ext
     20311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_success" >&5
     20312$as_echo "$ac_success" >&6; }
     20313        if test $ac_success = yes ; then
     20314          break 3
     20315        fi
     20316      done
     20317    done
     20318  done
     20319  LIBS=$ac_save_LIBS
     20320
     20321  if test $ac_success = yes ; then
     20322
     20323      coin_has_lapack=yes
     20324      lapack_lflags="-llapack -lblas"
     20325
     20326  fi
     20327
     20328  fi
     20329
     20330# TODO do we need another check with -llapack only?
     20331
     20332# Time to set some variables. Create an automake conditional COIN_HAS_LAPACK.
     20333   if test $coin_has_lapack = yes; then
     20334  COIN_HAS_LAPACK_TRUE=
     20335  COIN_HAS_LAPACK_FALSE='#'
     20336else
     20337  COIN_HAS_LAPACK_TRUE='#'
     20338  COIN_HAS_LAPACK_FALSE=
     20339fi
     20340
     20341
     20342# If we've located the package, define preprocessor symbol COIN_HAS_LAPACK
     20343# and COIN_LAPACK_FUNC[_] and augment the necessary variables for the client packages.
     20344  if test $coin_has_lapack = yes ; then
     20345
     20346$as_echo "#define COIN_HAS_LAPACK 1" >>confdefs.h
     20347
     20348
     20349
     20350
     20351  case "${dsyev_namemangling}" in
     20352   "lower case, no underscore, no extra underscore")
     20353      $as_echo "#define COIN_LAPACK_FUNC(name,NAME) name" >>confdefs.h
     20354
     20355      $as_echo "#define COIN_LAPACK_FUNC_(name,NAME) name" >>confdefs.h
     20356 ;;
     20357   "lower case, no underscore, extra underscore")
     20358      $as_echo "#define COIN_LAPACK_FUNC(name,NAME) name" >>confdefs.h
     20359
     20360      $as_echo "#define COIN_LAPACK_FUNC_(name,NAME) name ## _" >>confdefs.h
     20361 ;;
     20362   "lower case, underscore, no extra underscore")
     20363      $as_echo "#define COIN_LAPACK_FUNC(name,NAME) name ## _" >>confdefs.h
     20364
     20365      $as_echo "#define COIN_LAPACK_FUNC_(name,NAME) name ## _" >>confdefs.h
     20366 ;;
     20367   "lower case, underscore, extra underscore")
     20368      $as_echo "#define COIN_LAPACK_FUNC(name,NAME) name ## _" >>confdefs.h
     20369
     20370      $as_echo "#define COIN_LAPACK_FUNC_(name,NAME) name ## __" >>confdefs.h
     20371 ;;
     20372   "upper case, no underscore, no extra underscore")
     20373      $as_echo "#define COIN_LAPACK_FUNC(name,NAME) NAME" >>confdefs.h
     20374
     20375      $as_echo "#define COIN_LAPACK_FUNC_(name,NAME) NAME" >>confdefs.h
     20376 ;;
     20377   "upper case, no underscore, extra underscore")
     20378      $as_echo "#define COIN_LAPACK_FUNC(name,NAME) NAME" >>confdefs.h
     20379
     20380      $as_echo "#define COIN_LAPACK_FUNC_(name,NAME) NAME ## _" >>confdefs.h
     20381 ;;
     20382   "upper case, underscore, no extra underscore")
     20383      $as_echo "#define COIN_LAPACK_FUNC(name,NAME) NAME ## _" >>confdefs.h
     20384
     20385      $as_echo "#define COIN_LAPACK_FUNC_(name,NAME) NAME ## _" >>confdefs.h
     20386 ;;
     20387   "upper case, underscore, extra underscore")
     20388      $as_echo "#define COIN_LAPACK_FUNC(name,NAME) NAME ## _" >>confdefs.h
     20389
     20390      $as_echo "#define COIN_LAPACK_FUNC_(name,NAME) NAME ## __" >>confdefs.h
     20391 ;;
     20392   *)
     20393      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unsupported or unknown name-mangling scheme: ${dsyev_namemangling}" >&5
     20394$as_echo "$as_me: WARNING: Unsupported or unknown name-mangling scheme: ${dsyev_namemangling}" >&2;}
     20395      ;;
     20396  esac
     20397
     20398    if test -n "$lapack_pcfiles" ; then COUENNELIB_PCFILES="$lapack_pcfiles $COUENNELIB_PCFILES" ; fi
     20399       COUENNELIB_LFLAGS="$lapack_lflags $COUENNELIB_LFLAGS"
     20400       COUENNELIB_CFLAGS="$lapack_cflags $COUENNELIB_CFLAGS"
     20401
     20402  fi
     20403
     20404
    1938020405#############################################################################
    1938120406#                               System header                               #
     
    1985520880if test -z "${COIN_HAS_CPLEX_TRUE}" && test -z "${COIN_HAS_CPLEX_FALSE}"; then
    1985620881  as_fn_error $? "conditional \"COIN_HAS_CPLEX\" was never defined.
     20882Usually this means the macro was only invoked conditionally." "$LINENO" 5
     20883fi
     20884if test -z "${COIN_HAS_LAPACK_TRUE}" && test -z "${COIN_HAS_LAPACK_FALSE}"; then
     20885  as_fn_error $? "conditional \"COIN_HAS_LAPACK\" was never defined.
    1985720886Usually this means the macro was only invoked conditionally." "$LINENO" 5
    1985820887fi
  • branches/autotools-update/Couenne/configure.ac

    r1293 r1295  
    7777AC_LANG_POP(C)
    7878
     79# for dsyevx in sdpcuts
     80AC_COIN_CHK_LAPACK(CouenneLib)
     81
    7982#############################################################################
    8083#                               System header                               #
  • branches/autotools-update/Couenne/src/bound_tightening/twoImpliedBT/Makefile.in

    r1294 r1295  
    1515@SET_MAKE@
    1616
    17 # $Id: Makefile.am 1293 2020-01-29 15:10:26Z stefan $
     17# $Id: Makefile.am 1294 2020-01-29 15:17:32Z stefan $
    1818#
    1919# Copyright (C) 2006 International Business Machines and others.
  • branches/autotools-update/Couenne/src/config.h.in

    r1293 r1295  
    99/* Define to 1 if the Cplex package is available */
    1010#undef COIN_HAS_CPLEX
     11
     12/* Define to 1 if the LAPACK package is available */
     13#undef COIN_HAS_LAPACK
    1114
    1215/* Define to 1 if the Nauty package is available */
     
    3033/* Define to 1 if the SCIP package is available */
    3134#undef COIN_HAS_SCIP
     35
     36/* Define to a macro mangling the given C identifier (in lower and upper
     37   case). */
     38#undef COIN_LAPACK_FUNC
     39
     40/* As COIN_LAPACK_FUNC, but for C identifiers containing underscores. */
     41#undef COIN_LAPACK_FUNC_
    3242
    3343/* whether CouenneInterface is derived from Bonmins AmplInterface */
  • branches/autotools-update/Couenne/src/cut/sdpcuts/dsyevx_wrapper.cpp

    r944 r1295  
    1919
    2020extern "C" {
    21 
    2221  /* Lapack routine to compute orthonormal eigenvalues/eigenvectors (in Fortran) */
    23 
    24   void F77_FUNC(dsyev,DSYEV) (
     22  void COIN_LAPACK_FUNC(dsyevx,DSYEVX) (
    2523                                  char   *,
    2624                                  char   *,
     
    4543}
    4644
    47 
    4845int dsyevx_interface (int n, double *A, int &m,
    4946                      double * &w,
     
    5552                      int lastidx) {
    5653
     54#ifdef COIN_HAS_LAPACK
    5755#ifdef DEBUG
    5856
     
    9694  // Ipopt::IpLapackDsyev (true, n, A, lda, w, info);
    9795
    98   F77_FUNC
    99     (dsyev,DSYEV)
     96  COIN_LAPACK_FUNC
     97    (dsyevx,DSYEVX)
    10098    (&jobz, &range, &uplo, &n,
    10199     A, &lda,
     
    121119
    122120  return m;
     121
     122#else
     123  printf("Couenne build without Lapack. Cannot compute SDPCuts\n");
     124  return 0;
     125#endif
     126
    123127}
Note: See TracChangeset for help on using the changeset viewer.