Changeset 1631


Ignore:
Timestamp:
Jul 22, 2010 5:56:39 AM (9 years ago)
Author:
stefan
Message:

use COIN_PKG_CONFIG_PATH only for path of .pc files of installed packages; add extra variable COIN_PKG_CONFIG_PATH_UNINSTALLED with search path for uninstalled packages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r1623 r1631  
    34793479AC_SUBST(PKG_CONFIG)
    34803480
    3481 # assemble search path for pkg-config
     3481# assemble pkg-config search path for installed projects
    34823482COIN_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
    34833483
     
    34983498  ],[])
    34993499
     3500AC_SUBST(COIN_PKG_CONFIG_PATH)
     3501
     3502# assemble additional pkg-config search paths for uninstalled projects
    35003503if test x$coin_projectdir = xyes ; then
    35013504  # if we are in a project setup, then in a classic setup, we want to find uninstalled projects
     
    35033506  # unfortunately, if the user set prefix, then we do not know where the project base directory is located
    35043507  # but it is likely to be either .. (if we are a usual coin project) or ../.. (if we are a unusual coin project like ThirdParty or Data)
     3508  COIN_PKG_CONFIG_PATH_UNINSTALLED=
    35053509  if test -e ../coin_subdirs.txt ; then
    35063510    for i in `cat ../coin_subdirs.txt` ; do
    35073511      if test -d ../$i ; then
    3508         COIN_PKG_CONFIG_PATH="`cd ../$i; pwd`:${COIN_PKG_CONFIG_PATH}"
     3512        COIN_PKG_CONFIG_PATH_UNINSTALLED="`cd ../$i; pwd`:${COIN_PKG_CONFIG_PATH_UNINSTALLED}"
    35093513      fi
    35103514    done
     
    35143518    for i in `cat ../../coin_subdirs.txt` ; do
    35153519      if test -d ../../$i ; then
    3516         COIN_PKG_CONFIG_PATH="`cd ../../$i; pwd`:${COIN_PKG_CONFIG_PATH}"
     3520        COIN_PKG_CONFIG_PATH_UNINSTALLED="`cd ../../$i; pwd`:${COIN_PKG_CONFIG_PATH_UNINSTALLED}"
    35173521      fi
    35183522    done
    35193523  fi
    35203524
    3521 fi
    3522 
    3523 AC_SUBST(COIN_PKG_CONFIG_PATH)
     3525  AC_SUBST(COIN_PKG_CONFIG_PATH_UNINSTALLED)
     3526fi
     3527
    35243528])
    35253529
     
    36883692if test $m4_tolower(coin_has_$1) = notGiven; then
    36893693  #check for project by using pkg-config, if pkg-config is available
     3694  #we are only interested in installed packages here, so we do not search in $COIN_PKG_CONFIG_PATH_UNINSTALLED
    36903695  if test -n "$PKG_CONFIG" ; then
    36913696    ( PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" ; export PKG_CONFIG_PATH
     
    38153820    # need to export variable to be sure that the following pkg-config gets these values
    38163821    coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
    3817     PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH"
     3822    PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED"
    38183823    export PKG_CONFIG_PATH
    38193824   
     
    38303835    # reset PKG_CONFIG_PATH variable
    38313836    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
     3837    export PKG_CONFIG_PATH
    38323838  else
    38333839    #if 4th argument is given, try fallback - whereby we take the first word from $2 as basename for the .pc file
Note: See TracChangeset for help on using the changeset viewer.