]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
general.m4sh: relative path to the same directory is `.'.
authorGary V. Vaughan <gary@gnu.org>
Mon, 14 Nov 2011 10:15:39 +0000 (17:15 +0700)
committerGary V. Vaughan <gary@gnu.org>
Mon, 14 Nov 2011 10:15:39 +0000 (17:15 +0700)
* general.m4sh (func_relative_path): We sometimes want to use
the result of this function directly, rather than purely as a
prefix, so we need to return `.' when both directories end up at
the same location.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
libltdl/config/general.m4sh

index f1ee6e5cf29deac02ddca296b6f2956fd74b2e7b..b6e3d419333e0829cf403900a58038c5ad4e6c69 100644 (file)
@@ -271,12 +271,13 @@ func_relative_path ()
     func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
   fi
 
-  # Normalisation. If bindir is libdir, return empty string,
-  # else relative path.
+  # Normalisation. If bindir is libdir, return `.' else relative path.
   if test ! -z "$func_relative_path_result"; then
     func_stripname './' '' "$func_relative_path_result"
     func_relative_path_result=$func_stripname_result
   fi
+
+  test -n "$func_relative_path_result" || func_relative_path_result=.
 }
 
 # The name of this program: