Changeset 1393


Ignore:
Timestamp:
Aug 1, 2009 12:48:02 PM (10 years ago)
Author:
stefan
Message:

think again about in COIN_HAS_PROJECT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/BSPsplit/coin.m4

    r1392 r1393  
    2525[AC_ARG_VAR([COIN_SKIP_PROJECTS],[Set to the subdirectories of projects that should be skipped in the configuration])
    2626
    27 #replace backslashes by underscore
    28 #m4_define([escape], m4_bpatsubsts([$1],[/],[_]))
    29 
    30 # AC_COIN_HAS_PROJECT also checks whether $2 is available in $1, if not it sets coin_has... to notGiven
     27# AC_COIN_HAS_PROJECT also checks whether $3 is available in $2/$1, if not it sets coin_has... to notGiven
    3128AC_COIN_HAS_PROJECT($1,$2,$3)
    32 m4_ifvaln([$2], [projfulldir=$2/$1], [projfulldir=$1])
    33 AC_MSG_CHECKING(whether directory $projfulldir should be recursed into)
     29AC_MSG_CHECKING(whether project $1 need to be configured)
    3430if test "$m4_tolower(coin_has_$1)" != skipping &&
    3531   test "$m4_tolower(coin_has_$1)" != notGiven &&
    3632   test "$m4_tolower(coin_has_$))" != installed; then
    3733
     34  m4_ifvaln([$2], [projfulldir=$2/$1], [projfulldir=$1])
    3835  if test -r $srcdir/$projfulldir/configure; then
    3936    coin_subdirs="$coin_subdirs $projfulldir"
     
    24362433                     AC_MSG_ERROR([argument for --with-coin-instdir not a directory])
    24372434                   fi
    2438                    if test -r $withval/share/doc/coin/$1/README; then
     2435                   m4_ifvaln([$2],
     2436                     [if test -r $withval/share/doc/coin/$2/$1/README;],
     2437                     [if test -r $withval/share/doc/coin/$1/README;])
     2438                   then
    24392439                     m4_tolower(coin_has_$1)=installed
    24402440                     m4_toupper($1INSTDIR)=`cd $withval; pwd`
     
    24442444
    24452445    # check if project can be found in $2/$1
     2446    # this is for the classic setup when this macro is called from AC_COIN_MAIN_SUBDIR
    24462447    m4_ifvaln([$2], [fulldir=$2/$1], [fulldir=$1])
    24472448    if test "$m4_tolower(coin_has_$1)" = notGiven; then
     
    24552456      fi
    24562457    fi
     2458
     2459    # check if project can be found in ../$2/$1
     2460    # this is for the classic setup when this macro is called from the project main directory
     2461    m4_ifvaln([$2], [fulldir=../$2/$1], [fulldir=../$1])
     2462    if test "$m4_tolower(coin_has_$1)" = notGiven; then
     2463      if test -d $srcdir/$fulldir; then
     2464        m4_ifvaln([$3],
     2465          [if test -r $srcdir/$fulldir/$3; then
     2466            m4_tolower(coin_has_$1)=$fulldir
     2467          fi],
     2468          [ m4_tolower(coin_has_$1)=$fulldir ]
     2469        )
     2470      fi
     2471    fi
    24572472  fi
    24582473fi
     
    24642479
    24652480  if test $m4_tolower(coin_has_$1) = installed; then
    2466     m4_toupper($1DOCDIR)=$m4_toupper($1INSTDIR)/share/doc/coin/$1
    2467     m4_toupper($1DATADIR)=$m4_toupper($1INSTDIR)/share/coin/$1
     2481    m4_ifvaln([$2],
     2482      [m4_toupper($1DOCDIR)=$m4_toupper($1INSTDIR)/share/doc/coin/$2/$1
     2483       m4_toupper($1DATADIR)=$m4_toupper($1INSTDIR)/share/coin/$2/$1],
     2484      [m4_toupper($1DOCDIR)=$m4_toupper($1INSTDIR)/share/doc/coin/$1
     2485       m4_toupper($1DATADIR)=$m4_toupper($1INSTDIR)/share/coin/$1])
    24682486  else
    24692487    if test "$m4_toupper($1OBJDIR)" = This_Variable_Is_Not_Set; then
     
    24712489      m4_toupper($1SRCDIR)=`cd $srcdir/$m4_tolower(coin_has_$1); pwd`
    24722490      m4_toupper($1OBJDIR)=`pwd`/$m4_tolower(coin_has_$1)
    2473       m4_toupper($1DOCDIR)=$abs_lib_dir/../share/doc/coin/$1
     2491      m4_ifvaln([$2],
     2492        [m4_toupper($1DOCDIR)=$abs_lib_dir/../share/doc/coin/$2/$1],
     2493        [m4_toupper($1DOCDIR)=$abs_lib_dir/../share/doc/coin/$1])
    24742494      m4_toupper($1DATADIR)=$m4_toupper($1OBJDIR)
    24752495    else
    24762496      # This is just a guess:
    2477       m4_toupper($1DOCDIR)=$m4_toupper($1OBJDIR)/../share/doc/coin/$1
    2478       m4_toupper($1DATADIR)=$m4_toupper($1OBJDIR)/../share/coin/$1
     2497      m4_ifvaln([$2],
     2498        [m4_toupper($1DOCDIR)=$m4_toupper($1OBJDIR)/../share/doc/coin/$2/$1
     2499         m4_toupper($1DATADIR)=$m4_toupper($1OBJDIR)/../share/coin/$2/$1],
     2500        [m4_toupper($1DOCDIR)=$m4_toupper($1OBJDIR)/../share/doc/coin/$1
     2501         m4_toupper($1DATADIR)=$m4_toupper($1OBJDIR)/../share/coin/$1])
    24792502    fi
    24802503  fi
     
    24902513if test $m4_tolower(coin_has_$1) = installed; then
    24912514  AC_MSG_RESULT([installed in $m4_toupper($1INSTDIR)])
    2492   AC_COIN_CHECK_FILE([$m4_toupper($1INSTDIR)/share/doc/coin/$1/README],
    2493                      [],[AC_MSG_ERROR([$m4_toupper($1INSTDIR)/share/doc/coin/$1/README should be available if $1 is installed])])
     2515  m4_ifvaln([$2],
     2516    [AC_COIN_CHECK_FILE([$m4_toupper($1INSTDIR)/share/doc/coin/$2/$1/README],[],[AC_MSG_ERROR([$m4_toupper($1INSTDIR)/share/doc/coin/$2/$1/README should be available if $1 is installed])])],
     2517    [AC_COIN_CHECK_FILE([$m4_toupper($1INSTDIR)/share/doc/coin/$1/README],[],[AC_MSG_ERROR([$m4_toupper($1INSTDIR)/share/doc/coin/$1/README should be available if $1 is installed])])]
     2518  )
    24942519else
    24952520  AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
Note: See TracChangeset for help on using the changeset viewer.