You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ji...@apache.org on 2002/03/07 20:10:31 UTC

cvs commit: apr/build apr_common.m4

jim         02/03/07 11:10:31

  Modified:    build    apr_common.m4
  Log:
  This is an ugly patch, but fixes a bug when subdir's are actually
  symlinks to the real locations. For example, let's assume we have
  something like this:
  
     $ pwd
     /disk2/jim/src/CVS
     $ ls
     apr         apr-util    httpd-2.0
  
  and httpd-2.0/srclib/apr is actually a symlink to ../../apr. Under
  Solaris, 'sh' (and maybe others) have this behavior:
  
     $ cd httpd-2.0
     $ pwd
     /disk2/jim/src/CVS/httpd-2.0
     $ cd srclib/apr
     $ pwd
     /disk2/jim/src/CVS/apr
  
  Thus, when APR_SUBDIR_CONFIG makes the cache-file pathname relative,
  we point someplace else. Ensuring that cache-file is absolute fixes
  this problem and means there's little restriction on the layouts of
  your httpd-2.0 tree.
  
  Revision  Changes    Path
  1.24      +7 -4      apr/build/apr_common.m4
  
  Index: apr_common.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_common.m4,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- apr_common.m4	28 Feb 2002 02:54:01 -0000	1.23
  +++ apr_common.m4	7 Mar 2002 19:10:31 -0000	1.24
  @@ -68,11 +68,14 @@
         ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
   changequote([, ])dnl
   
  -  # Make the cache file name correct relative to the subdirectory.
  +  # Make the cache file pathname absolute for the subdirs
  +  # required to correctly handle subdirs that might actually
  +  # be symlinks
     case "$cache_file" in
  -  /*) ac_sub_cache_file=$cache_file ;;
  -  *) # Relative path.
  -    ac_sub_cache_file="$ac_dots$cache_file" ;;
  +  /*) # already absolute
  +    ac_sub_cache_file=$cache_file ;;
  +  *)  # Was relative path.
  +    ac_sub_cache_file="$ac_popdir/$cache_file" ;;
     esac
   
     # The eval makes quoting arguments work.