Changeset 1657 for ThirdParty/Mumps


Ignore:
Timestamp:
Jul 25, 2010 3:57:27 PM (10 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:
ThirdParty/Mumps/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Mumps/trunk/configure

    r1637 r1657  
    2373723737
    2373823738if test "x$use_blas" = xBUILD ; then
    23739   if test -d ../ThirdParty/Blas ; then
    23740     blasdir=../ThirdParty/Blas
    23741   else
    23742     blasdir=../Blas
    23743   fi
    2374423739
    2374523740echo "$as_me:$LINENO: checking for COIN-OR module Blas" >&5
     
    2384723842    export PKG_CONFIG_PATH
    2384823843  else
    23849     #if 4th argument is given, try fallback - whereby we take the first word from coinblas as basename for the .pc file
    23850 
    23851 if test x$coin_has_blas != "xyes" ; then
    23852 
    23853 
     23844    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
     23845echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
     23846
     23847echo "$as_me:$LINENO: checking for COIN-OR module Blas (fallback)" >&5
     23848echo $ECHO_N "checking for COIN-OR module Blas (fallback)... $ECHO_C" >&6
    2385423849
    2385523850coin_has_blas=notGiven
    23856 
    23857 # check if user wants to skip module in any case
    23858 if test x"$COIN_SKIP_PROJECTS" != x; then
    23859   for dir in $COIN_SKIP_PROJECTS; do
    23860     if test $dir = "Blas"; then
    23861       coin_has_blas=skipping
    23862     fi
    23863   done
    23864 fi
    23865 
    2386623851BLAS_LIBS=
    2386723852BLAS_CFLAGS=
     
    2386923854
    2387023855
    23871 if test $coin_has_blas != "skipping" ; then
    23872   # if the project is available and configured, then a project-uninstalled.pc file should have been created
    23873   if test -r $blasdir/coinblas-uninstalled.pc ; then
    23874     # read CFLAGS and LIBS from m4_bpatsubst(coinblas, [ .*], [])-uninstalled.pc file
    23875     # add CYGPATH_W cludge into include flags
    23876     # replace -L${libdir} by absolute path to build directory in linker flags
    23877     # we assume that the build directory is $blasdir/src if this directory exists, otherwise we assume that it is $blasdir
    23878     BLAS_CFLAGS=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' $blasdir/coinblas-uninstalled.pc`
    23879     projectlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' $blasdir/coinblas-uninstalled.pc`
    23880     if test "x$projectlibs" != x ; then
    23881       if test -d $blasdir/src ; then
    23882         BLAS_LIBS="-L`cd $blasdir/src; pwd` $projectlibs"
     23856# initial list of dependencies is "coinblas", but we need to filter out version number specifications (= x, <= x, >= x)
     23857projtoprocess="coinblas"
     23858projprocessed=""
     23859
     23860while test $coin_has_blas = notGiven ; do
     23861  # setup list of projects that need to be processed in the next round
     23862  nextprojtoprocess=""
     23863
     23864  for proj in $projtoprocess ; do
     23865    # if $proj has been processed already, skip this round
     23866    if test "x$projprocessed" != x ; then
     23867      for projdone in $projprocessed ; do
     23868        if test $projdone = $proj ; then
     23869          continue 2
     23870        fi
     23871      done
     23872    fi
     23873
     23874    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
     23875    pcfile=""
     23876    save_IFS="$IFS"
     23877    IFS=":"
     23878    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
     23879      # 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
     23880      if test -r "$dir/$proj-uninstalled.pc" ; then
     23881        pcfile="$dir/$proj-uninstalled.pc"
     23882        pcfiledir="$dir"
     23883        break
     23884      fi
     23885    done
     23886    IFS="$save_IFS"
     23887
     23888    if test "x$pcfile" != x ; then
     23889      # read CFLAGS from $pcfile and add CYGPATH_W cludge into include flags
     23890      projcflags=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' "$pcfile"`
     23891      BLAS_CFLAGS="$projcflags $BLAS_CFLAGS"
     23892
     23893      # read LIBS from $pcfile and replace -L${libdir} by absolute path to build directory in linker flags
     23894      # we assume that the build directory is $pcfiledir/src if this directory exists, otherwise we assume that it is $pcfiledir
     23895      projlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' "$pcfile"`
     23896      if test "x$projlibs" != x ; then
     23897        if test -d "${pcfiledir}/src" ; then
     23898          projlibs="-L`cd "${pcfiledir}/src"; pwd` $projlibs"
     23899        else
     23900          projlibs="-L`cd "$pcfiledir"; pwd` $projlibs"
     23901        fi
    2388323902      else
    23884         BLAS_LIBS="-L`cd $blasdir; pwd` $projectlibs"
     23903        projlibs=`sed -n -e 's/Libs://p' "$pcfile"`
    2388523904      fi
     23905      BLAS_LIBS="$projlibs $BLAS_LIBS"
     23906
     23907      # read DATA from $pcfile, if this is the first .pc file we are processing (so assume that its the main one)
     23908      if test "x$projprocessed" = x ; then
     23909        BLAS_DATA=`sed -n -e 's/datadir=//gp' "$pcfile"`
     23910      fi
     23911
     23912      # read dependencies from $pcfile, filter it, and add to list of projects that need to be processed next
     23913      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\?>\?=[  ]*[^    ]\+//g'`
     23914      nextprojtoprocess="$nextprojtoprocess $projrequires"
     23915
     23916      # remember that we have processed $proj
     23917      projprocessed="$projprocessed $proj"
     23918
    2388623919    else
    23887       BLAS_LIBS=`sed -n -e 's/Libs://p' $blasdir/coinblas-uninstalled.pc`
     23920      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
     23921echo "${ECHO_T}no, dependency $proj not available" >&6
     23922      break 2
    2388823923    fi
    23889     BLAS_DATA=`sed -n -e 's/datadir=//gp' $blasdir/coinblas-uninstalled.pc`
     23924
     23925  done
     23926
     23927  projtoprocess="$nextprojtoprocess"
     23928
     23929  if test "x$projtoprocess" = x ; then
     23930    coin_has_blas=yes
     23931    echo "$as_me:$LINENO: result: yes, dependencies are$projprocessed" >&5
     23932echo "${ECHO_T}yes, dependencies are$projprocessed" >&6
    2389023933
    2389123934    REQUIREDPACKAGES="coinblas $REQUIREDPACKAGES"
    23892 
    23893 
    2389423935
    2389523936cat >>confdefs.h <<\_ACEOF
     
    2389823939
    2389923940
    23900 
    23901     coin_has_blas=yes
    23902     echo "$as_me:$LINENO: result: $blasdir" >&5
    23903 echo "${ECHO_T}$blasdir" >&6
    23904   else
    23905     echo "$as_me:$LINENO: result: $coin_has_blas" >&5
    23906 echo "${ECHO_T}$coin_has_blas" >&6
     23941    if test 1 = 0 ; then  #change this test to enable a bit of debugging output
     23942    if test -n "$BLAS_CFLAGS" ; then
     23943      { echo "$as_me:$LINENO: Blas CFLAGS are $BLAS_CFLAGS" >&5
     23944echo "$as_me: Blas CFLAGS are $BLAS_CFLAGS" >&6;}
     23945    fi
     23946    if test -n "$BLAS_LIBS" ; then
     23947      { echo "$as_me:$LINENO: Blas LIBS   are $BLAS_LIBS" >&5
     23948echo "$as_me: Blas LIBS   are $BLAS_LIBS" >&6;}
     23949    fi
     23950    if test -n "$BLAS_DATA" ; then
     23951      { echo "$as_me:$LINENO: Blas DATA   is  $BLAS_DATA" >&5
     23952echo "$as_me: Blas DATA   is  $BLAS_DATA" >&6;}
     23953    fi
     23954    fi
    2390723955  fi
    23908 else
    23909   echo "$as_me:$LINENO: result: skipping" >&5
    23910 echo "${ECHO_T}skipping" >&6
    23911 fi
    23912 
    23913 #if user did not disable setting of makefile conditional, do it
     23956done
     23957
    2391423958
    2391523959
     
    2392323967fi
    2392423968
    23925 
    23926 fi
    2392723969
    2392823970
     
    2411724159    export PKG_CONFIG_PATH
    2411824160  else
    24119     #if 4th argument is given, try fallback - whereby we take the first word from coinmetis >= 4.0 as basename for the .pc file
    24120 
    24121 if test x$coin_has_metis != "xyes" ; then
    24122 
    24123 
     24161    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
     24162echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
     24163
     24164echo "$as_me:$LINENO: checking for COIN-OR module Metis (fallback)" >&5
     24165echo $ECHO_N "checking for COIN-OR module Metis (fallback)... $ECHO_C" >&6
    2412424166
    2412524167coin_has_metis=notGiven
    24126 
    24127 # check if user wants to skip module in any case
    24128 if test x"$COIN_SKIP_PROJECTS" != x; then
    24129   for dir in $COIN_SKIP_PROJECTS; do
    24130     if test $dir = "Metis"; then
    24131       coin_has_metis=skipping
    24132     fi
    24133   done
    24134 fi
    24135 
    2413624168METIS_LIBS=
    2413724169METIS_CFLAGS=
     
    2413924171
    2414024172
    24141 if test $coin_has_metis != "skipping" ; then
    24142   # if the project is available and configured, then a project-uninstalled.pc file should have been created
    24143   if test -r ../Metis/coinmetis-uninstalled.pc ; then
    24144     # read CFLAGS and LIBS from m4_bpatsubst(coinmetis >= 4.0, [ .*], [])-uninstalled.pc file
    24145     # add CYGPATH_W cludge into include flags
    24146     # replace -L${libdir} by absolute path to build directory in linker flags
    24147     # we assume that the build directory is ../Metis/src if this directory exists, otherwise we assume that it is ../Metis
    24148     METIS_CFLAGS=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' ../Metis/coinmetis-uninstalled.pc`
    24149     projectlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' ../Metis/coinmetis-uninstalled.pc`
    24150     if test "x$projectlibs" != x ; then
    24151       if test -d ../Metis/src ; then
    24152         METIS_LIBS="-L`cd ../Metis/src; pwd` $projectlibs"
     24173# initial list of dependencies is "coinmetis >= 4.0", but we need to filter out version number specifications (= x, <= x, >= x)
     24174projtoprocess="coinmetis "
     24175projprocessed=""
     24176
     24177while test $coin_has_metis = notGiven ; do
     24178  # setup list of projects that need to be processed in the next round
     24179  nextprojtoprocess=""
     24180
     24181  for proj in $projtoprocess ; do
     24182    # if $proj has been processed already, skip this round
     24183    if test "x$projprocessed" != x ; then
     24184      for projdone in $projprocessed ; do
     24185        if test $projdone = $proj ; then
     24186          continue 2
     24187        fi
     24188      done
     24189    fi
     24190
     24191    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
     24192    pcfile=""
     24193    save_IFS="$IFS"
     24194    IFS=":"
     24195    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
     24196      # 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
     24197      if test -r "$dir/$proj-uninstalled.pc" ; then
     24198        pcfile="$dir/$proj-uninstalled.pc"
     24199        pcfiledir="$dir"
     24200        break
     24201      fi
     24202    done
     24203    IFS="$save_IFS"
     24204
     24205    if test "x$pcfile" != x ; then
     24206      # read CFLAGS from $pcfile and add CYGPATH_W cludge into include flags
     24207      projcflags=`sed -n -e 's/Cflags://' -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/gp' "$pcfile"`
     24208      METIS_CFLAGS="$projcflags $METIS_CFLAGS"
     24209
     24210      # read LIBS from $pcfile and replace -L${libdir} by absolute path to build directory in linker flags
     24211      # we assume that the build directory is $pcfiledir/src if this directory exists, otherwise we assume that it is $pcfiledir
     24212      projlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' "$pcfile"`
     24213      if test "x$projlibs" != x ; then
     24214        if test -d "${pcfiledir}/src" ; then
     24215          projlibs="-L`cd "${pcfiledir}/src"; pwd` $projlibs"
     24216        else
     24217          projlibs="-L`cd "$pcfiledir"; pwd` $projlibs"
     24218        fi
    2415324219      else
    24154         METIS_LIBS="-L`cd ../Metis; pwd` $projectlibs"
     24220        projlibs=`sed -n -e 's/Libs://p' "$pcfile"`
    2415524221      fi
     24222      METIS_LIBS="$projlibs $METIS_LIBS"
     24223
     24224      # read DATA from $pcfile, if this is the first .pc file we are processing (so assume that its the main one)
     24225      if test "x$projprocessed" = x ; then
     24226        METIS_DATA=`sed -n -e 's/datadir=//gp' "$pcfile"`
     24227      fi
     24228
     24229      # read dependencies from $pcfile, filter it, and add to list of projects that need to be processed next
     24230      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\?>\?=[  ]*[^    ]\+//g'`
     24231      nextprojtoprocess="$nextprojtoprocess $projrequires"
     24232
     24233      # remember that we have processed $proj
     24234      projprocessed="$projprocessed $proj"
     24235
    2415624236    else
    24157       METIS_LIBS=`sed -n -e 's/Libs://p' ../Metis/coinmetis-uninstalled.pc`
     24237      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
     24238echo "${ECHO_T}no, dependency $proj not available" >&6
     24239      break 2
    2415824240    fi
    24159     METIS_DATA=`sed -n -e 's/datadir=//gp' ../Metis/coinmetis-uninstalled.pc`
    24160 
    24161     REQUIREDPACKAGES="coinmetis $REQUIREDPACKAGES"
    24162 
    24163 
     24241
     24242  done
     24243
     24244  projtoprocess="$nextprojtoprocess"
     24245
     24246  if test "x$projtoprocess" = x ; then
     24247    coin_has_metis=yes
     24248    echo "$as_me:$LINENO: result: yes, dependencies are$projprocessed" >&5
     24249echo "${ECHO_T}yes, dependencies are$projprocessed" >&6
     24250
     24251    REQUIREDPACKAGES="coinmetis >= 4.0 $REQUIREDPACKAGES"
    2416424252
    2416524253cat >>confdefs.h <<\_ACEOF
     
    2416824256
    2416924257
    24170 
    24171     coin_has_metis=yes
    24172     echo "$as_me:$LINENO: result: ../Metis" >&5
    24173 echo "${ECHO_T}../Metis" >&6
    24174   else
    24175     echo "$as_me:$LINENO: result: $coin_has_metis" >&5
    24176 echo "${ECHO_T}$coin_has_metis" >&6
     24258    if test 1 = 0 ; then  #change this test to enable a bit of debugging output
     24259    if test -n "$METIS_CFLAGS" ; then
     24260      { echo "$as_me:$LINENO: Metis CFLAGS are $METIS_CFLAGS" >&5
     24261echo "$as_me: Metis CFLAGS are $METIS_CFLAGS" >&6;}
     24262    fi
     24263    if test -n "$METIS_LIBS" ; then
     24264      { echo "$as_me:$LINENO: Metis LIBS   are $METIS_LIBS" >&5
     24265echo "$as_me: Metis LIBS   are $METIS_LIBS" >&6;}
     24266    fi
     24267    if test -n "$METIS_DATA" ; then
     24268      { echo "$as_me:$LINENO: Metis DATA   is  $METIS_DATA" >&5
     24269echo "$as_me: Metis DATA   is  $METIS_DATA" >&6;}
     24270    fi
     24271    fi
    2417724272  fi
    24178 else
    24179   echo "$as_me:$LINENO: result: skipping" >&5
    24180 echo "${ECHO_T}skipping" >&6
    24181 fi
    24182 
    24183 #if user did not disable setting of makefile conditional, do it
     24273done
     24274
    2418424275
    2418524276
     
    2419324284fi
    2419424285
    24195 
    24196 fi
    2419724286
    2419824287
  • ThirdParty/Mumps/trunk/configure.ac

    r1589 r1657  
    9797
    9898AC_COIN_HAS_MODULE_BLAS
    99 AC_COIN_HAS_MODULE(Metis, [coinmetis >= 4.0], [], [../Metis])
     99AC_COIN_HAS_MODULE(Metis, [coinmetis >= 4.0])
    100100
    101101if test "$coin_has_metis" = yes; then
Note: See TracChangeset for help on using the changeset viewer.