Changeset 1544


Ignore:
Timestamp:
Jul 25, 2010 3:57:44 PM (9 years ago)
Author:
stefan
Message:

COIN_HAS_MODULE_FALLBACK is now always called by COIN_HAS_MODULE and checks dependencies, thus simplify configure.ac; rerun autotools

Location:
trunk/Osi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Osi/configure

    r1541 r1544  
    2080820808    export PKG_CONFIG_PATH
    2080920809  else
    20810     #if 4th argument is given, try fallback - whereby we take the first word from coinutils = trunk as basename for the .pc file
    20811     echo "$as_me:$LINENO: result: skipped check via pkg-config" >&5
    20812 echo "${ECHO_T}skipped check via pkg-config" >&6
     20810    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
     20811echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
     20812
     20813echo "$as_me:$LINENO: checking for COIN-OR module CoinUtils (fallback)" >&5
     20814echo $ECHO_N "checking for COIN-OR module CoinUtils (fallback)... $ECHO_C" >&6
     20815
     20816coin_has_coinutils=notGiven
     20817COINUTILS_LIBS=
     20818COINUTILS_CFLAGS=
     20819COINUTILS_DATA=
     20820
     20821
     20822# initial list of dependencies is "coinutils = trunk", but we need to filter out version number specifications (= x, <= x, >= x)
     20823projtoprocess="coinutils "
     20824projprocessed=""
     20825
     20826while test $coin_has_coinutils = notGiven ; do
     20827  # setup list of projects that need to be processed in the next round
     20828  nextprojtoprocess=""
     20829
     20830  for proj in $projtoprocess ; do
     20831    # if $proj has been processed already, skip this round
     20832    if test "x$projprocessed" != x ; then
     20833      for projdone in $projprocessed ; do
     20834        if test $projdone = $proj ; then
     20835          continue 2
     20836        fi
     20837      done
     20838    fi
     20839
     20840    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
     20841    pcfile=""
     20842    save_IFS="$IFS"
     20843    IFS=":"
     20844    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
     20845      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
     20846      if test -r "$dir/$proj-uninstalled.pc" ; then
     20847        pcfile="$dir/$proj-uninstalled.pc"
     20848        pcfiledir="$dir"
     20849        break
     20850      fi
     20851    done
     20852    IFS="$save_IFS"
     20853
     20854    if test "x$pcfile" != x ; then
     20855      # read CFLAGS from $pcfile and add CYGPATH_W cludge into include flags
     20856      projcflags=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' "$pcfile"`
     20857      COINUTILS_CFLAGS="$projcflags $COINUTILS_CFLAGS"
     20858
     20859      # read LIBS from $pcfile and replace -L${libdir} by absolute path to build directory in linker flags
     20860      # we assume that the build directory is $pcfiledir/src if this directory exists, otherwise we assume that it is $pcfiledir
     20861      projlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' "$pcfile"`
     20862      if test "x$projlibs" != x ; then
     20863        if test -d "${pcfiledir}/src" ; then
     20864          projlibs="-L`cd "${pcfiledir}/src"; pwd` $projlibs"
     20865        else
     20866          projlibs="-L`cd "$pcfiledir"; pwd` $projlibs"
     20867        fi
     20868      else
     20869        projlibs=`sed -n -e 's/Libs://p' "$pcfile"`
     20870      fi
     20871      COINUTILS_LIBS="$projlibs $COINUTILS_LIBS"
     20872
     20873      # read DATA from $pcfile, if this is the first .pc file we are processing (so assume that its the main one)
     20874      if test "x$projprocessed" = x ; then
     20875        COINUTILS_DATA=`sed -n -e 's/datadir=//gp' "$pcfile"`
     20876      fi
     20877
     20878      # read dependencies from $pcfile, filter it, and add to list of projects that need to be processed next
     20879      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\?>\?=[  ]*[^    ]\+//g'`
     20880      nextprojtoprocess="$nextprojtoprocess $projrequires"
     20881
     20882      # remember that we have processed $proj
     20883      projprocessed="$projprocessed $proj"
     20884
     20885    else
     20886      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
     20887echo "${ECHO_T}no, dependency $proj not available" >&6
     20888      break 2
     20889    fi
     20890
     20891  done
     20892
     20893  projtoprocess="$nextprojtoprocess"
     20894
     20895  if test "x$projtoprocess" = x ; then
     20896    coin_has_coinutils=yes
     20897    echo "$as_me:$LINENO: result: yes, dependencies are$projprocessed" >&5
     20898echo "${ECHO_T}yes, dependencies are$projprocessed" >&6
     20899
     20900    REQUIREDPACKAGES="coinutils = trunk $REQUIREDPACKAGES"
     20901
     20902cat >>confdefs.h <<\_ACEOF
     20903#define COIN_HAS_COINUTILS 1
     20904_ACEOF
     20905
     20906
     20907    if test 1 = 0 ; then  #change this test to enable a bit of debugging output
     20908    if test -n "$COINUTILS_CFLAGS" ; then
     20909      { echo "$as_me:$LINENO: CoinUtils CFLAGS are $COINUTILS_CFLAGS" >&5
     20910echo "$as_me: CoinUtils CFLAGS are $COINUTILS_CFLAGS" >&6;}
     20911    fi
     20912    if test -n "$COINUTILS_LIBS" ; then
     20913      { echo "$as_me:$LINENO: CoinUtils LIBS   are $COINUTILS_LIBS" >&5
     20914echo "$as_me: CoinUtils LIBS   are $COINUTILS_LIBS" >&6;}
     20915    fi
     20916    if test -n "$COINUTILS_DATA" ; then
     20917      { echo "$as_me:$LINENO: CoinUtils DATA   is  $COINUTILS_DATA" >&5
     20918echo "$as_me: CoinUtils DATA   is  $COINUTILS_DATA" >&6;}
     20919    fi
     20920    fi
     20921  fi
     20922done
     20923
     20924
     20925
     20926if test $coin_has_coinutils != notGiven &&
     20927                test $coin_has_coinutils != skipping; then
     20928  COIN_HAS_COINUTILS_TRUE=
     20929  COIN_HAS_COINUTILS_FALSE='#'
     20930else
     20931  COIN_HAS_COINUTILS_TRUE='#'
     20932  COIN_HAS_COINUTILS_FALSE=
     20933fi
     20934
     20935
    2081320936
    2081420937  fi
     
    2085520978
    2085620979
    20857 
    20858 if test $coin_has_coinutils != yes ; then
    20859   #if we have to use the fallback routines, then obviously it will not find CoinUtils dependencies
    20860   #thus, we check whether ThirdParty/Blas and ThirdParty/Lapack have been setup and
    20861   #assume that if present then they are dependencies of CoinUtils
    20862 
    20863 if test x$coin_has_blas != "xyes" ; then
    20864 
    20865 echo "$as_me:$LINENO: checking for COIN-OR module Blas (fallback)" >&5
    20866 echo $ECHO_N "checking for COIN-OR module Blas (fallback)... $ECHO_C" >&6
    20867 
    20868 coin_has_blas=notGiven
    20869 
    20870 # check if user wants to skip module in any case
    20871 if test x"$COIN_SKIP_PROJECTS" != x; then
    20872   for dir in $COIN_SKIP_PROJECTS; do
    20873     if test $dir = "Blas"; then
    20874       coin_has_blas=skipping
    20875     fi
    20876   done
    20877 fi
    20878 
    20879 BLAS_LIBS=
    20880 BLAS_CFLAGS=
    20881 BLAS_DATA=
    20882 
    20883 
    20884 if test $coin_has_blas != "skipping" ; then
    20885   # if the project is available and configured, then a project-uninstalled.pc file should have been created
    20886   if test -r ../ThirdParty/Blas/coinblas-uninstalled.pc ; then
    20887     # read CFLAGS and LIBS from coinblas-uninstalled.pc file
    20888     # add CYGPATH_W cludge into include flags
    20889     # replace -L${libdir} by absolute path to build directory in linker flags
    20890     # we assume that the build directory is ../ThirdParty/Blas/src if this directory exists, otherwise we assume that it is ../ThirdParty/Blas
    20891     BLAS_CFLAGS=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' ../ThirdParty/Blas/coinblas-uninstalled.pc`
    20892     projectlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' ../ThirdParty/Blas/coinblas-uninstalled.pc`
    20893     if test "x$projectlibs" != x ; then
    20894       if test -d ../ThirdParty/Blas/src ; then
    20895         BLAS_LIBS="-L`cd ../ThirdParty/Blas/src; pwd` $projectlibs"
    20896       else
    20897         BLAS_LIBS="-L`cd ../ThirdParty/Blas; pwd` $projectlibs"
    20898       fi
    20899     else
    20900       BLAS_LIBS=`sed -n -e 's/Libs://p' ../ThirdParty/Blas/coinblas-uninstalled.pc`
    20901     fi
    20902     BLAS_DATA=`sed -n -e 's/datadir=//gp' ../ThirdParty/Blas/coinblas-uninstalled.pc`
    20903 
    20904 
    20905 
    20906 
    20907 
    20908     coin_has_blas=yes
    20909     echo "$as_me:$LINENO: result: ../ThirdParty/Blas" >&5
    20910 echo "${ECHO_T}../ThirdParty/Blas" >&6
    20911   else
    20912     echo "$as_me:$LINENO: result: $coin_has_blas" >&5
    20913 echo "${ECHO_T}$coin_has_blas" >&6
    20914   fi
    20915 else
    20916   echo "$as_me:$LINENO: result: skipping" >&5
    20917 echo "${ECHO_T}skipping" >&6
    20918 fi
    20919 
    20920 #if user did not disable setting of makefile conditional, do it
    20921 
    20922 fi
    20923 
    20924 
    20925 if test x$coin_has_lapack != "xyes" ; then
    20926 
    20927 echo "$as_me:$LINENO: checking for COIN-OR module Lapack (fallback)" >&5
    20928 echo $ECHO_N "checking for COIN-OR module Lapack (fallback)... $ECHO_C" >&6
    20929 
    20930 coin_has_lapack=notGiven
    20931 
    20932 # check if user wants to skip module in any case
    20933 if test x"$COIN_SKIP_PROJECTS" != x; then
    20934   for dir in $COIN_SKIP_PROJECTS; do
    20935     if test $dir = "Lapack"; then
    20936       coin_has_lapack=skipping
    20937     fi
    20938   done
    20939 fi
    20940 
    20941 LAPACK_LIBS=
    20942 LAPACK_CFLAGS=
    20943 LAPACK_DATA=
    20944 
    20945 
    20946 if test $coin_has_lapack != "skipping" ; then
    20947   # if the project is available and configured, then a project-uninstalled.pc file should have been created
    20948   if test -r ../ThirdParty/Lapack/coinlapack-uninstalled.pc ; then
    20949     # read CFLAGS and LIBS from coinlapack-uninstalled.pc file
    20950     # add CYGPATH_W cludge into include flags
    20951     # replace -L${libdir} by absolute path to build directory in linker flags
    20952     # we assume that the build directory is ../ThirdParty/Lapack/src if this directory exists, otherwise we assume that it is ../ThirdParty/Lapack
    20953     LAPACK_CFLAGS=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' ../ThirdParty/Lapack/coinlapack-uninstalled.pc`
    20954     projectlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' ../ThirdParty/Lapack/coinlapack-uninstalled.pc`
    20955     if test "x$projectlibs" != x ; then
    20956       if test -d ../ThirdParty/Lapack/src ; then
    20957         LAPACK_LIBS="-L`cd ../ThirdParty/Lapack/src; pwd` $projectlibs"
    20958       else
    20959         LAPACK_LIBS="-L`cd ../ThirdParty/Lapack; pwd` $projectlibs"
    20960       fi
    20961     else
    20962       LAPACK_LIBS=`sed -n -e 's/Libs://p' ../ThirdParty/Lapack/coinlapack-uninstalled.pc`
    20963     fi
    20964     LAPACK_DATA=`sed -n -e 's/datadir=//gp' ../ThirdParty/Lapack/coinlapack-uninstalled.pc`
    20965 
    20966 
    20967 
    20968 
    20969 
    20970     coin_has_lapack=yes
    20971     echo "$as_me:$LINENO: result: ../ThirdParty/Lapack" >&5
    20972 echo "${ECHO_T}../ThirdParty/Lapack" >&6
    20973   else
    20974     echo "$as_me:$LINENO: result: $coin_has_lapack" >&5
    20975 echo "${ECHO_T}$coin_has_lapack" >&6
    20976   fi
    20977 else
    20978   echo "$as_me:$LINENO: result: skipping" >&5
    20979 echo "${ECHO_T}skipping" >&6
    20980 fi
    20981 
    20982 #if user did not disable setting of makefile conditional, do it
    20983 
    20984 fi
    20985 
    20986 fi
    20987 
    20988 if test x$coin_has_coinutils != "xyes" ; then
    20989 
    20990 echo "$as_me:$LINENO: checking for COIN-OR module CoinUtils (fallback)" >&5
    20991 echo $ECHO_N "checking for COIN-OR module CoinUtils (fallback)... $ECHO_C" >&6
    20992 
    20993 coin_has_coinutils=notGiven
    20994 
    20995 # check if user wants to skip module in any case
    20996 if test x"$COIN_SKIP_PROJECTS" != x; then
    20997   for dir in $COIN_SKIP_PROJECTS; do
    20998     if test $dir = "CoinUtils"; then
    20999       coin_has_coinutils=skipping
    21000     fi
    21001   done
    21002 fi
    21003 
    21004 COINUTILS_LIBS=
    21005 COINUTILS_CFLAGS=
    21006 COINUTILS_DATA=
    21007 
    21008 
    21009 if test $coin_has_coinutils != "skipping" ; then
    21010   # if the project is available and configured, then a project-uninstalled.pc file should have been created
    21011   if test -r ../CoinUtils/coinutils-uninstalled.pc ; then
    21012     # read CFLAGS and LIBS from coinutils-uninstalled.pc file
    21013     # add CYGPATH_W cludge into include flags
    21014     # replace -L${libdir} by absolute path to build directory in linker flags
    21015     # we assume that the build directory is ../CoinUtils/src if this directory exists, otherwise we assume that it is ../CoinUtils
    21016     COINUTILS_CFLAGS=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' ../CoinUtils/coinutils-uninstalled.pc`
    21017     projectlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' ../CoinUtils/coinutils-uninstalled.pc`
    21018     if test "x$projectlibs" != x ; then
    21019       if test -d ../CoinUtils/src ; then
    21020         COINUTILS_LIBS="-L`cd ../CoinUtils/src; pwd` $projectlibs"
    21021       else
    21022         COINUTILS_LIBS="-L`cd ../CoinUtils; pwd` $projectlibs"
    21023       fi
    21024     else
    21025       COINUTILS_LIBS=`sed -n -e 's/Libs://p' ../CoinUtils/coinutils-uninstalled.pc`
    21026     fi
    21027     COINUTILS_DATA=`sed -n -e 's/datadir=//gp' ../CoinUtils/coinutils-uninstalled.pc`
    21028 
    21029     REQUIREDPACKAGES="coinutils $REQUIREDPACKAGES"
    21030 
    21031 
    21032 
    21033 cat >>confdefs.h <<\_ACEOF
    21034 #define COIN_HAS_COINUTILS 1
    21035 _ACEOF
    21036 
    21037 
    21038 
    21039     coin_has_coinutils=yes
    21040     echo "$as_me:$LINENO: result: ../CoinUtils" >&5
    21041 echo "${ECHO_T}../CoinUtils" >&6
    21042   else
    21043     echo "$as_me:$LINENO: result: $coin_has_coinutils" >&5
    21044 echo "${ECHO_T}$coin_has_coinutils" >&6
    21045   fi
    21046 else
    21047   echo "$as_me:$LINENO: result: skipping" >&5
    21048 echo "${ECHO_T}skipping" >&6
    21049 fi
    21050 
    21051 #if user did not disable setting of makefile conditional, do it
    21052 
    21053 
    21054 if test $coin_has_coinutils != notGiven &&
    21055                 test $coin_has_coinutils != skipping; then
    21056   COIN_HAS_COINUTILS_TRUE=
    21057   COIN_HAS_COINUTILS_FALSE='#'
    21058 else
    21059   COIN_HAS_COINUTILS_TRUE='#'
    21060   COIN_HAS_COINUTILS_FALSE=
    21061 fi
    21062 
    21063 
    21064 fi
    21065 
    21066 if test $coin_has_coinutils != yes ; then
    21067   { { echo "$as_me:$LINENO: error: Required package CoinUtils not available." >&5
    21068 echo "$as_me: error: Required package CoinUtils not available." >&2;}
    21069    { (exit 1); exit 1; }; }
    21070 fi
    21071 #so if we had to do find Blas and Lapack separately, then add their linker flags to the CoinUtils flags
    21072 #actually the libs may already be included in libCoinUtils, but we may still need the fortran library flags
    21073 COINUTILS_LIBS="$COINUTILS_LIBS $BLAS_LIBS $LAPACK_LIBS"
    2107420980
    2107520981
     
    2117821084    export PKG_CONFIG_PATH
    2117921085  else
    21180     #if 4th argument is given, try fallback - whereby we take the first word from coindatasample as basename for the .pc file
    21181 
    21182 if test x$coin_has_sample != "xyes" ; then
    21183 
    21184 
     21086    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
     21087echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
     21088
     21089echo "$as_me:$LINENO: checking for COIN-OR module Sample (fallback)" >&5
     21090echo $ECHO_N "checking for COIN-OR module Sample (fallback)... $ECHO_C" >&6
    2118521091
    2118621092coin_has_sample=notGiven
    21187 
    21188 # check if user wants to skip module in any case
    21189 if test x"$COIN_SKIP_PROJECTS" != x; then
    21190   for dir in $COIN_SKIP_PROJECTS; do
    21191     if test $dir = "Sample"; then
    21192       coin_has_sample=skipping
    21193     fi
    21194   done
    21195 fi
    21196 
    2119721093SAMPLE_LIBS=
    2119821094SAMPLE_CFLAGS=
     
    2120021096
    2120121097
    21202 if test $coin_has_sample != "skipping" ; then
    21203   # if the project is available and configured, then a project-uninstalled.pc file should have been created
    21204   if test -r ../Data/Sample/coindatasample-uninstalled.pc ; then
    21205     # read CFLAGS and LIBS from m4_bpatsubst(coindatasample, [ .*], [])-uninstalled.pc file
    21206     # add CYGPATH_W cludge into include flags
    21207     # replace -L${libdir} by absolute path to build directory in linker flags
    21208     # we assume that the build directory is ../Data/Sample/src if this directory exists, otherwise we assume that it is ../Data/Sample
    21209     SAMPLE_CFLAGS=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' ../Data/Sample/coindatasample-uninstalled.pc`
    21210     projectlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' ../Data/Sample/coindatasample-uninstalled.pc`
    21211     if test "x$projectlibs" != x ; then
    21212       if test -d ../Data/Sample/src ; then
    21213         SAMPLE_LIBS="-L`cd ../Data/Sample/src; pwd` $projectlibs"
     21098# initial list of dependencies is "coindatasample", but we need to filter out version number specifications (= x, <= x, >= x)
     21099projtoprocess="coindatasample"
     21100projprocessed=""
     21101
     21102while test $coin_has_sample = notGiven ; do
     21103  # setup list of projects that need to be processed in the next round
     21104  nextprojtoprocess=""
     21105
     21106  for proj in $projtoprocess ; do
     21107    # if $proj has been processed already, skip this round
     21108    if test "x$projprocessed" != x ; then
     21109      for projdone in $projprocessed ; do
     21110        if test $projdone = $proj ; then
     21111          continue 2
     21112        fi
     21113      done
     21114    fi
     21115
     21116    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
     21117    pcfile=""
     21118    save_IFS="$IFS"
     21119    IFS=":"
     21120    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
     21121      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
     21122      if test -r "$dir/$proj-uninstalled.pc" ; then
     21123        pcfile="$dir/$proj-uninstalled.pc"
     21124        pcfiledir="$dir"
     21125        break
     21126      fi
     21127    done
     21128    IFS="$save_IFS"
     21129
     21130    if test "x$pcfile" != x ; then
     21131      # read CFLAGS from $pcfile and add CYGPATH_W cludge into include flags
     21132      projcflags=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' "$pcfile"`
     21133      SAMPLE_CFLAGS="$projcflags $SAMPLE_CFLAGS"
     21134
     21135      # read LIBS from $pcfile and replace -L${libdir} by absolute path to build directory in linker flags
     21136      # we assume that the build directory is $pcfiledir/src if this directory exists, otherwise we assume that it is $pcfiledir
     21137      projlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' "$pcfile"`
     21138      if test "x$projlibs" != x ; then
     21139        if test -d "${pcfiledir}/src" ; then
     21140          projlibs="-L`cd "${pcfiledir}/src"; pwd` $projlibs"
     21141        else
     21142          projlibs="-L`cd "$pcfiledir"; pwd` $projlibs"
     21143        fi
    2121421144      else
    21215         SAMPLE_LIBS="-L`cd ../Data/Sample; pwd` $projectlibs"
     21145        projlibs=`sed -n -e 's/Libs://p' "$pcfile"`
    2121621146      fi
     21147      SAMPLE_LIBS="$projlibs $SAMPLE_LIBS"
     21148
     21149      # read DATA from $pcfile, if this is the first .pc file we are processing (so assume that its the main one)
     21150      if test "x$projprocessed" = x ; then
     21151        SAMPLE_DATA=`sed -n -e 's/datadir=//gp' "$pcfile"`
     21152      fi
     21153
     21154      # read dependencies from $pcfile, filter it, and add to list of projects that need to be processed next
     21155      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\?>\?=[  ]*[^    ]\+//g'`
     21156      nextprojtoprocess="$nextprojtoprocess $projrequires"
     21157
     21158      # remember that we have processed $proj
     21159      projprocessed="$projprocessed $proj"
     21160
    2121721161    else
    21218       SAMPLE_LIBS=`sed -n -e 's/Libs://p' ../Data/Sample/coindatasample-uninstalled.pc`
     21162      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
     21163echo "${ECHO_T}no, dependency $proj not available" >&6
     21164      break 2
    2121921165    fi
    21220     SAMPLE_DATA=`sed -n -e 's/datadir=//gp' ../Data/Sample/coindatasample-uninstalled.pc`
    21221 
     21166
     21167  done
     21168
     21169  projtoprocess="$nextprojtoprocess"
     21170
     21171  if test "x$projtoprocess" = x ; then
     21172    coin_has_sample=yes
     21173    echo "$as_me:$LINENO: result: yes, dependencies are$projprocessed" >&5
     21174echo "${ECHO_T}yes, dependencies are$projprocessed" >&6
    2122221175
    2122321176
     
    2122821181
    2122921182
    21230 
    21231     coin_has_sample=yes
    21232     echo "$as_me:$LINENO: result: ../Data/Sample" >&5
    21233 echo "${ECHO_T}../Data/Sample" >&6
    21234   else
    21235     echo "$as_me:$LINENO: result: $coin_has_sample" >&5
    21236 echo "${ECHO_T}$coin_has_sample" >&6
    21237   fi
    21238 else
    21239   echo "$as_me:$LINENO: result: skipping" >&5
    21240 echo "${ECHO_T}skipping" >&6
    21241 fi
    21242 
    21243 #if user did not disable setting of makefile conditional, do it
     21183    if test 1 = 0 ; then  #change this test to enable a bit of debugging output
     21184    if test -n "$SAMPLE_CFLAGS" ; then
     21185      { echo "$as_me:$LINENO: Sample CFLAGS are $SAMPLE_CFLAGS" >&5
     21186echo "$as_me: Sample CFLAGS are $SAMPLE_CFLAGS" >&6;}
     21187    fi
     21188    if test -n "$SAMPLE_LIBS" ; then
     21189      { echo "$as_me:$LINENO: Sample LIBS   are $SAMPLE_LIBS" >&5
     21190echo "$as_me: Sample LIBS   are $SAMPLE_LIBS" >&6;}
     21191    fi
     21192    if test -n "$SAMPLE_DATA" ; then
     21193      { echo "$as_me:$LINENO: Sample DATA   is  $SAMPLE_DATA" >&5
     21194echo "$as_me: Sample DATA   is  $SAMPLE_DATA" >&6;}
     21195    fi
     21196    fi
     21197  fi
     21198done
     21199
    2124421200
    2124521201
     
    2125321209fi
    2125421210
    21255 
    21256 fi
    2125721211
    2125821212
     
    2140621360    export PKG_CONFIG_PATH
    2140721361  else
    21408     #if 4th argument is given, try fallback - whereby we take the first word from coindatanetlib as basename for the .pc file
    21409 
    21410 if test x$coin_has_netlib != "xyes" ; then
    21411 
    21412 
     21362    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
     21363echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
     21364
     21365echo "$as_me:$LINENO: checking for COIN-OR module Netlib (fallback)" >&5
     21366echo $ECHO_N "checking for COIN-OR module Netlib (fallback)... $ECHO_C" >&6
    2141321367
    2141421368coin_has_netlib=notGiven
    21415 
    21416 # check if user wants to skip module in any case
    21417 if test x"$COIN_SKIP_PROJECTS" != x; then
    21418   for dir in $COIN_SKIP_PROJECTS; do
    21419     if test $dir = "Netlib"; then
    21420       coin_has_netlib=skipping
    21421     fi
    21422   done
    21423 fi
    21424 
    2142521369NETLIB_LIBS=
    2142621370NETLIB_CFLAGS=
     
    2142821372
    2142921373
    21430 if test $coin_has_netlib != "skipping" ; then
    21431   # if the project is available and configured, then a project-uninstalled.pc file should have been created
    21432   if test -r ../Data/Netlib/coindatanetlib-uninstalled.pc ; then
    21433     # read CFLAGS and LIBS from m4_bpatsubst(coindatanetlib, [ .*], [])-uninstalled.pc file
    21434     # add CYGPATH_W cludge into include flags
    21435     # replace -L${libdir} by absolute path to build directory in linker flags
    21436     # we assume that the build directory is ../Data/Netlib/src if this directory exists, otherwise we assume that it is ../Data/Netlib
    21437     NETLIB_CFLAGS=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' ../Data/Netlib/coindatanetlib-uninstalled.pc`
    21438     projectlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' ../Data/Netlib/coindatanetlib-uninstalled.pc`
    21439     if test "x$projectlibs" != x ; then
    21440       if test -d ../Data/Netlib/src ; then
    21441         NETLIB_LIBS="-L`cd ../Data/Netlib/src; pwd` $projectlibs"
     21374# initial list of dependencies is "coindatanetlib", but we need to filter out version number specifications (= x, <= x, >= x)
     21375projtoprocess="coindatanetlib"
     21376projprocessed=""
     21377
     21378while test $coin_has_netlib = notGiven ; do
     21379  # setup list of projects that need to be processed in the next round
     21380  nextprojtoprocess=""
     21381
     21382  for proj in $projtoprocess ; do
     21383    # if $proj has been processed already, skip this round
     21384    if test "x$projprocessed" != x ; then
     21385      for projdone in $projprocessed ; do
     21386        if test $projdone = $proj ; then
     21387          continue 2
     21388        fi
     21389      done
     21390    fi
     21391
     21392    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
     21393    pcfile=""
     21394    save_IFS="$IFS"
     21395    IFS=":"
     21396    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
     21397      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
     21398      if test -r "$dir/$proj-uninstalled.pc" ; then
     21399        pcfile="$dir/$proj-uninstalled.pc"
     21400        pcfiledir="$dir"
     21401        break
     21402      fi
     21403    done
     21404    IFS="$save_IFS"
     21405
     21406    if test "x$pcfile" != x ; then
     21407      # read CFLAGS from $pcfile and add CYGPATH_W cludge into include flags
     21408      projcflags=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' "$pcfile"`
     21409      NETLIB_CFLAGS="$projcflags $NETLIB_CFLAGS"
     21410
     21411      # read LIBS from $pcfile and replace -L${libdir} by absolute path to build directory in linker flags
     21412      # we assume that the build directory is $pcfiledir/src if this directory exists, otherwise we assume that it is $pcfiledir
     21413      projlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' "$pcfile"`
     21414      if test "x$projlibs" != x ; then
     21415        if test -d "${pcfiledir}/src" ; then
     21416          projlibs="-L`cd "${pcfiledir}/src"; pwd` $projlibs"
     21417        else
     21418          projlibs="-L`cd "$pcfiledir"; pwd` $projlibs"
     21419        fi
    2144221420      else
    21443         NETLIB_LIBS="-L`cd ../Data/Netlib; pwd` $projectlibs"
     21421        projlibs=`sed -n -e 's/Libs://p' "$pcfile"`
    2144421422      fi
     21423      NETLIB_LIBS="$projlibs $NETLIB_LIBS"
     21424
     21425      # read DATA from $pcfile, if this is the first .pc file we are processing (so assume that its the main one)
     21426      if test "x$projprocessed" = x ; then
     21427        NETLIB_DATA=`sed -n -e 's/datadir=//gp' "$pcfile"`
     21428      fi
     21429
     21430      # read dependencies from $pcfile, filter it, and add to list of projects that need to be processed next
     21431      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\?>\?=[  ]*[^    ]\+//g'`
     21432      nextprojtoprocess="$nextprojtoprocess $projrequires"
     21433
     21434      # remember that we have processed $proj
     21435      projprocessed="$projprocessed $proj"
     21436
    2144521437    else
    21446       NETLIB_LIBS=`sed -n -e 's/Libs://p' ../Data/Netlib/coindatanetlib-uninstalled.pc`
     21438      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
     21439echo "${ECHO_T}no, dependency $proj not available" >&6
     21440      break 2
    2144721441    fi
    21448     NETLIB_DATA=`sed -n -e 's/datadir=//gp' ../Data/Netlib/coindatanetlib-uninstalled.pc`
    21449 
     21442
     21443  done
     21444
     21445  projtoprocess="$nextprojtoprocess"
     21446
     21447  if test "x$projtoprocess" = x ; then
     21448    coin_has_netlib=yes
     21449    echo "$as_me:$LINENO: result: yes, dependencies are$projprocessed" >&5
     21450echo "${ECHO_T}yes, dependencies are$projprocessed" >&6
    2145021451
    2145121452
     
    2145621457
    2145721458
    21458 
    21459     coin_has_netlib=yes
    21460     echo "$as_me:$LINENO: result: ../Data/Netlib" >&5
    21461 echo "${ECHO_T}../Data/Netlib" >&6
    21462   else
    21463     echo "$as_me:$LINENO: result: $coin_has_netlib" >&5
    21464 echo "${ECHO_T}$coin_has_netlib" >&6
    21465   fi
    21466 else
    21467   echo "$as_me:$LINENO: result: skipping" >&5
    21468 echo "${ECHO_T}skipping" >&6
    21469 fi
    21470 
    21471 #if user did not disable setting of makefile conditional, do it
     21459    if test 1 = 0 ; then  #change this test to enable a bit of debugging output
     21460    if test -n "$NETLIB_CFLAGS" ; then
     21461      { echo "$as_me:$LINENO: Netlib CFLAGS are $NETLIB_CFLAGS" >&5
     21462echo "$as_me: Netlib CFLAGS are $NETLIB_CFLAGS" >&6;}
     21463    fi
     21464    if test -n "$NETLIB_LIBS" ; then
     21465      { echo "$as_me:$LINENO: Netlib LIBS   are $NETLIB_LIBS" >&5
     21466echo "$as_me: Netlib LIBS   are $NETLIB_LIBS" >&6;}
     21467    fi
     21468    if test -n "$NETLIB_DATA" ; then
     21469      { echo "$as_me:$LINENO: Netlib DATA   is  $NETLIB_DATA" >&5
     21470echo "$as_me: Netlib DATA   is  $NETLIB_DATA" >&6;}
     21471    fi
     21472    fi
     21473  fi
     21474done
     21475
    2147221476
    2147321477
     
    2148121485fi
    2148221486
    21483 
    21484 fi
    2148521487
    2148621488
     
    2163421636    export PKG_CONFIG_PATH
    2163521637  else
    21636     #if 4th argument is given, try fallback - whereby we take the first word from coinglpk >= 4.39 as basename for the .pc file
    21637 
    21638 if test x$coin_has_glpk != "xyes" ; then
    21639 
    21640 
     21638    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
     21639echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
     21640
     21641echo "$as_me:$LINENO: checking for COIN-OR module Glpk (fallback)" >&5
     21642echo $ECHO_N "checking for COIN-OR module Glpk (fallback)... $ECHO_C" >&6
    2164121643
    2164221644coin_has_glpk=notGiven
    21643 
    21644 # check if user wants to skip module in any case
    21645 if test x"$COIN_SKIP_PROJECTS" != x; then
    21646   for dir in $COIN_SKIP_PROJECTS; do
    21647     if test $dir = "Glpk"; then
    21648       coin_has_glpk=skipping
    21649     fi
    21650   done
    21651 fi
    21652 
    2165321645GLPK_LIBS=
    2165421646GLPK_CFLAGS=
     
    2165621648
    2165721649
    21658 if test $coin_has_glpk != "skipping" ; then
    21659   # if the project is available and configured, then a project-uninstalled.pc file should have been created
    21660   if test -r ../ThirdParty/Glpk/coinglpk-uninstalled.pc ; then
    21661     # read CFLAGS and LIBS from m4_bpatsubst(coinglpk >= 4.39, [ .*], [])-uninstalled.pc file
    21662     # add CYGPATH_W cludge into include flags
    21663     # replace -L${libdir} by absolute path to build directory in linker flags
    21664     # we assume that the build directory is ../ThirdParty/Glpk/src if this directory exists, otherwise we assume that it is ../ThirdParty/Glpk
    21665     GLPK_CFLAGS=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' ../ThirdParty/Glpk/coinglpk-uninstalled.pc`
    21666     projectlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' ../ThirdParty/Glpk/coinglpk-uninstalled.pc`
    21667     if test "x$projectlibs" != x ; then
    21668       if test -d ../ThirdParty/Glpk/src ; then
    21669         GLPK_LIBS="-L`cd ../ThirdParty/Glpk/src; pwd` $projectlibs"
     21650# initial list of dependencies is "coinglpk >= 4.39", but we need to filter out version number specifications (= x, <= x, >= x)
     21651projtoprocess="coinglpk "
     21652projprocessed=""
     21653
     21654while test $coin_has_glpk = notGiven ; do
     21655  # setup list of projects that need to be processed in the next round
     21656  nextprojtoprocess=""
     21657
     21658  for proj in $projtoprocess ; do
     21659    # if $proj has been processed already, skip this round
     21660    if test "x$projprocessed" != x ; then
     21661      for projdone in $projprocessed ; do
     21662        if test $projdone = $proj ; then
     21663          continue 2
     21664        fi
     21665      done
     21666    fi
     21667
     21668    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
     21669    pcfile=""
     21670    save_IFS="$IFS"
     21671    IFS=":"
     21672    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
     21673      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
     21674      if test -r "$dir/$proj-uninstalled.pc" ; then
     21675        pcfile="$dir/$proj-uninstalled.pc"
     21676        pcfiledir="$dir"
     21677        break
     21678      fi
     21679    done
     21680    IFS="$save_IFS"
     21681
     21682    if test "x$pcfile" != x ; then
     21683      # read CFLAGS from $pcfile and add CYGPATH_W cludge into include flags
     21684      projcflags=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' "$pcfile"`
     21685      GLPK_CFLAGS="$projcflags $GLPK_CFLAGS"
     21686
     21687      # read LIBS from $pcfile and replace -L${libdir} by absolute path to build directory in linker flags
     21688      # we assume that the build directory is $pcfiledir/src if this directory exists, otherwise we assume that it is $pcfiledir
     21689      projlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' "$pcfile"`
     21690      if test "x$projlibs" != x ; then
     21691        if test -d "${pcfiledir}/src" ; then
     21692          projlibs="-L`cd "${pcfiledir}/src"; pwd` $projlibs"
     21693        else
     21694          projlibs="-L`cd "$pcfiledir"; pwd` $projlibs"
     21695        fi
    2167021696      else
    21671         GLPK_LIBS="-L`cd ../ThirdParty/Glpk; pwd` $projectlibs"
     21697        projlibs=`sed -n -e 's/Libs://p' "$pcfile"`
    2167221698      fi
     21699      GLPK_LIBS="$projlibs $GLPK_LIBS"
     21700
     21701      # read DATA from $pcfile, if this is the first .pc file we are processing (so assume that its the main one)
     21702      if test "x$projprocessed" = x ; then
     21703        GLPK_DATA=`sed -n -e 's/datadir=//gp' "$pcfile"`
     21704      fi
     21705
     21706      # read dependencies from $pcfile, filter it, and add to list of projects that need to be processed next
     21707      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\?>\?=[  ]*[^    ]\+//g'`
     21708      nextprojtoprocess="$nextprojtoprocess $projrequires"
     21709
     21710      # remember that we have processed $proj
     21711      projprocessed="$projprocessed $proj"
     21712
    2167321713    else
    21674       GLPK_LIBS=`sed -n -e 's/Libs://p' ../ThirdParty/Glpk/coinglpk-uninstalled.pc`
     21714      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
     21715echo "${ECHO_T}no, dependency $proj not available" >&6
     21716      break 2
    2167521717    fi
    21676     GLPK_DATA=`sed -n -e 's/datadir=//gp' ../ThirdParty/Glpk/coinglpk-uninstalled.pc`
    21677 
     21718
     21719  done
     21720
     21721  projtoprocess="$nextprojtoprocess"
     21722
     21723  if test "x$projtoprocess" = x ; then
     21724    coin_has_glpk=yes
     21725    echo "$as_me:$LINENO: result: yes, dependencies are$projprocessed" >&5
     21726echo "${ECHO_T}yes, dependencies are$projprocessed" >&6
    2167821727
    2167921728
     
    2168421733
    2168521734
    21686 
    21687     coin_has_glpk=yes
    21688     echo "$as_me:$LINENO: result: ../ThirdParty/Glpk" >&5
    21689 echo "${ECHO_T}../ThirdParty/Glpk" >&6
    21690   else
    21691     echo "$as_me:$LINENO: result: $coin_has_glpk" >&5
    21692 echo "${ECHO_T}$coin_has_glpk" >&6
    21693   fi
    21694 else
    21695   echo "$as_me:$LINENO: result: skipping" >&5
    21696 echo "${ECHO_T}skipping" >&6
    21697 fi
    21698 
    21699 #if user did not disable setting of makefile conditional, do it
     21735    if test 1 = 0 ; then  #change this test to enable a bit of debugging output
     21736    if test -n "$GLPK_CFLAGS" ; then
     21737      { echo "$as_me:$LINENO: Glpk CFLAGS are $GLPK_CFLAGS" >&5
     21738echo "$as_me: Glpk CFLAGS are $GLPK_CFLAGS" >&6;}
     21739    fi
     21740    if test -n "$GLPK_LIBS" ; then
     21741      { echo "$as_me:$LINENO: Glpk LIBS   are $GLPK_LIBS" >&5
     21742echo "$as_me: Glpk LIBS   are $GLPK_LIBS" >&6;}
     21743    fi
     21744    if test -n "$GLPK_DATA" ; then
     21745      { echo "$as_me:$LINENO: Glpk DATA   is  $GLPK_DATA" >&5
     21746echo "$as_me: Glpk DATA   is  $GLPK_DATA" >&6;}
     21747    fi
     21748    fi
     21749  fi
     21750done
     21751
    2170021752
    2170121753
     
    2170921761fi
    2171021762
    21711 
    21712 fi
    2171321763
    2171421764
  • trunk/Osi/configure.ac

    r1529 r1544  
    5555
    5656AC_COIN_HAS_MODULE(CoinUtils, [coinutils = trunk])
    57 if test $coin_has_coinutils != yes ; then
    58   #if we have to use the fallback routines, then obviously it will not find CoinUtils dependencies
    59   #thus, we check whether ThirdParty/Blas and ThirdParty/Lapack have been setup and
    60   #assume that if present then they are dependencies of CoinUtils
    61   AC_COIN_HAS_MODULE_FALLBACK(Blas,   [coinblas],   [../ThirdParty/Blas],   [required=0 dodefine=0 doconditional=0])
    62   AC_COIN_HAS_MODULE_FALLBACK(Lapack, [coinlapack], [../ThirdParty/Lapack], [required=0 dodefine=0 doconditional=0])
    63 fi
    64 AC_COIN_HAS_MODULE_FALLBACK(CoinUtils, [coinutils], [../CoinUtils])
    65 if test $coin_has_coinutils != yes ; then
    66   AC_MSG_ERROR([Required package CoinUtils not available.])
    67 fi
    68 #so if we had to do find Blas and Lapack separately, then add their linker flags to the CoinUtils flags
    69 #actually the libs may already be included in libCoinUtils, but we may still need the fortran library flags
    70 COINUTILS_LIBS="$COINUTILS_LIBS $BLAS_LIBS $LAPACK_LIBS"
    71 
    72 AC_COIN_HAS_MODULE(Sample, [coindatasample],   [required=0], [../Data/Sample])
    73 AC_COIN_HAS_MODULE(Netlib, [coindatanetlib],   [required=0], [../Data/Netlib])
    74 AC_COIN_HAS_MODULE(Glpk,   [coinglpk >= 4.39], [required=0], [../ThirdParty/Glpk])
     57AC_COIN_HAS_MODULE(Sample,    [coindatasample],   [required=0])
     58AC_COIN_HAS_MODULE(Netlib,    [coindatanetlib],   [required=0])
     59AC_COIN_HAS_MODULE(Glpk,      [coinglpk >= 4.39], [required=0])
    7560
    7661#############################################################################
Note: See TracChangeset for help on using the changeset viewer.