]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
stdbuf: fix automake variable name to work with cutting edge automake
authorJim Meyering <meyering@redhat.com>
Sun, 19 Jun 2011 09:41:24 +0000 (11:41 +0200)
committerJim Meyering <meyering@redhat.com>
Sun, 19 Jun 2011 19:57:43 +0000 (21:57 +0200)
* src/Makefile.am (pkglibexec_PROGRAMS): Rename from pkglib_PROGRAMS.
The latter is invalid.  Without this change, automake
v1.11-373-g9ca6326 and newer (on master) would fail with this:
`pkglibdir' is not a legitimate directory for `PROGRAMS'
This changes the default installation directory of libstdbuf.so from
$prefix/lib/coreutils/ to
$prefix/libexec/coreutils/
* src/stdbuf.c (set_LD_PRELOAD): Search in PKGLIBEXECDIR, not PKGLIBDIR,
since that's where we install libstdbuf.so.
Do not search in "", the system default search path.

src/Makefile.am
src/stdbuf.c

index 516e1e59ebcb7826eb05889ea3304f54e53f4da2..ef0e7a4d38d3d2811aa86d2ac56b32d0b304e53a 100644 (file)
@@ -138,7 +138,7 @@ bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
 
 noinst_PROGRAMS = setuidgid getlimits
 
-pkglib_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
+pkglibexec_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
 
 noinst_HEADERS =       \
   chown-core.h         \
index f51dc6a6cd13e6b1f1945e355b93fc9cc215fdfc..6fd803c95595fb07773c300a7ce88edc4585d351 100644 (file)
@@ -193,15 +193,14 @@ set_LD_PRELOAD (void)
   char *LD_PRELOAD;
 
   /* Note this would auto add the appropriate search path for "libstdbuf.so":
-     gcc stdbuf.c -Wl,-rpath,'$ORIGIN' -Wl,-rpath,$PKGLIBDIR
+     gcc stdbuf.c -Wl,-rpath,'$ORIGIN' -Wl,-rpath,$PKGLIBEXECDIR
      However we want the lookup done for the exec'd command not stdbuf.
 
-     Since we don't link against libstdbuf.so add it to LIBDIR rather than
-     LIBEXECDIR, as we'll search for it in the "sys default" case below.  */
+     Since we don't link against libstdbuf.so add it to PKGLIBEXECDIR
+     rather than to LIBDIR.  */
   char const *const search_path[] = {
     program_path,
-    PKGLIBDIR,
-    "",                         /* sys default */
+    PKGLIBEXECDIR,
     NULL
   };