Changeset 18935

Show
Ignore:
Timestamp:
05/31/06 19:44:01 (3 years ago)
Author:
patrick
Message:

Added VJ_BUILD_LIB_FILE_LIST() macro for generating the list of absolute
paths to shared libraries used for linking. This is needed for the changes
introduced in the last revision to work.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/macros/vrj-helpers.m4

    r18824 r18935  
    871871 
    872872dnl --------------------------------------------------------------------------- 
     873dnl Builds a list of the absolute path to each shared library that is linked 
     874dnl against when creating a shared library. 
     875dnl 
     876dnl Usage: 
     877dnl     VJ_BUILD_LIB_FILE_LIST(dynamic-lib-list, file-name-var) 
     878dnl --------------------------------------------------------------------------- 
     879AC_DEFUN([VJ_BUILD_LIB_FILE_LIST], 
     880[ 
     881   dirs='' 
     882   libs='' 
     883 
     884   dnl Extract the directories and library names from $1. We will use this to 
     885   dnl build up the full path to each library against which linking will be 
     886   dnl performed. 
     887   for d in $1 ; do 
     888      case $d in 
     889         -L*) 
     890            dir=`echo $d | sed -e 's#-L\(.*\)#\1#'` 
     891            if test -d "$dir" ; then 
     892               dirs="$dirs $dir" 
     893            fi 
     894            ;; 
     895         -l*) 
     896            lib=`echo $d | sed -e 's/-l\(.*\)/\1/'` 
     897            libs="$libs lib$lib.$DYNAMICLIB_EXT" 
     898            ;; 
     899      esac 
     900   done 
     901 
     902   $2='' 
     903 
     904   dnl Get the absolute path to each library in $libs. If we cannot find the 
     905   dnl absolute path for a library, then that library file will not be added 
     906   dnl to the variable named by $2. Should that occur, however, something is 
     907   dnl probably wrong with the above code for extracting the libraries and 
     908   dnl directories from $1. 
     909   for l in $libs ; do 
     910      for d in $dirs ; do 
     911         if test -e "$d/$l" ; then 
     912            $2="$[$2] $d/$l" 
     913            break 
     914         fi 
     915      done 
     916   done 
     917]) 
     918 
     919dnl --------------------------------------------------------------------------- 
    873920dnl Usage: 
    874921dnl     VJ_VERSION_GROK(version-file)