Changeset 1451


Ignore:
Timestamp:
Nov 29, 2009 11:27:02 AM (11 years ago)
Author:
stefan
Message:

fix PKG_CHECK_MODULE_EXISTS; put more paths into PKG_CONFIG_PATH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/BSPsplit/coin.m4

    r1448 r1451  
    35093509
    35103510AC_COIN_PKG_CHECK_MODULE_EXISTS([$1],[$2],
    3511   [ m4_toupper($1)[]_CFLAGS=`$PKG_CONFIG --cflags "m4_tolower($2)" 2>/dev/null`
    3512     m4_toupper($1)[]_LIBS=`$PKG_CONFIG --libs "m4_tolower($2)" 2>/dev/null`
    3513     m4_toupper($1)[]_DATA=`$PKG_CONFIG --variable=datadir "m4_tolower($2)" 2>/dev/null`
     3511  [ m4_toupper($1)[]_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>/dev/null`
     3512    m4_toupper($1)[]_LIBS=`$PKG_CONFIG --libs "$2" 2>/dev/null`
     3513    m4_toupper($1)[]_DATA=`$PKG_CONFIG --variable=datadir "$2" 2>/dev/null`
    35143514    $3
    35153515  ],
     
    39743974    coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
    39753975
     3976    # let's assume that when installing into $prefix, then the user may have installed some other coin projects there before, so it's worth to have a look into there
     3977    if test -d "$prefix"; then
     3978      PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$prefix/lib/ThirdParty/pkgconfig:$prefix/lib/Data/pkgconfig:$PKG_CONFIG_PATH"
     3979    fi
     3980
    39763981    AC_ARG_WITH([coin-instdir],
    39773982      AC_HELP_STRING([--with-coin-instdir],
     
    39803985         AC_MSG_ERROR([argument for --with-coin-instdir not a directory])
    39813986       fi
    3982        PKG_CONFIG_PATH="$withval/lib/pkgconfig:$withval/lib/ThirdParty/pkgconfig:$withval/lib/Data/pkgconfig:$PKG_CONFIG_PATH",
     3987       PKG_CONFIG_PATH="$withval/lib/pkgconfig:$withval/lib/ThirdParty/pkgconfig:$withval/lib/Data/pkgconfig:$PKG_CONFIG_PATH"
    39833988      ],[])
    39843989
    3985     if test -e ${prefix}/coin_subdirs.txt ; then
    3986       for i in `cat ${prefix}/coin_subdirs.txt` ; do
    3987         PKG_CONFIG_PATH="${prefix}/$i:$PKG_CONFIG_PATH"
     3990    # in a classic setup, we want to find uninstalled projects
     3991    # their (relative) location is written to coin_subdirs.txt by the configure in the project base directory
     3992    # unfortunately, if the user set prefix, then we do not know where the project base directory is located
     3993    # 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)
     3994    if test -e ../coin_subdirs.txt ; then
     3995      for i in `cat ../coin_subdirs.txt` ; do
     3996        PKG_CONFIG_PATH="../$i:$PKG_CONFIG_PATH"
    39883997      done
    39893998    fi
    3990 
     3999   
     4000    if test -e ../../coin_subdirs.txt ; then
     4001      for i in `cat ../../coin_subdirs.txt` ; do
     4002        PKG_CONFIG_PATH="../../$i:$PKG_CONFIG_PATH"
     4003      done
     4004    fi
     4005   
    39914006    # let pkg-config do it's magic
    39924007    # need to export variable to be sure that the following pkg-config gets these values
Note: See TracChangeset for help on using the changeset viewer.