Patch for library suffix (Please apply)

Maurizio Monge monge at sns.it
Mon May 10 09:26:09 BST 2004


On my platform (amd64) I use the configure option --enable-libsuffix=64.
But installing kdelibs, the plugins will go in the "lib64/" subdirs,
while the plugin loader will ignore the suffix and look for plugins in
the "lib/" subdir.
This is a small patch to honor the --enable-libsuffix flags in the file
kstandarddirs.cpp, and make things work in system (like mine) that have
lib64 directories.

Thanx
Maurizio
Please CC to monge(at)sns(dot)it any 
reply since i am not subscribed to the ml.


Index: admin/acinclude.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/acinclude.m4.in,v
retrieving revision 2.451
diff -u -r2.451 acinclude.m4.in
--- admin/acinclude.m4.in       8 May 2004 15:52:02 -0000       2.451
+++ admin/acinclude.m4.in       10 May 2004 08:13:19 -0000
@@ -3112,12 +3112,14 @@
     if test -z "$kdelibsuff"; then
         AC_MSG_RESULT([not using lib directory suffix])
         AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
+        AC_DEFINE(KDELIBSUFF_NQ, [""], Unquoted suffix for lib directories)
     else
         if test "$libdir" = '${exec_prefix}/lib'; then
             libdir="$libdir${kdelibsuff}"
             AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 
platforms
         fi
         AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib 
directories)
+        AC_DEFINE_UNQUOTED(KDELIBSUFF_NQ, ["${kdelibsuff}"], Unquoted suffix 
for lib directories)
         AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
     fi
 ])
Index: kdecore/kstandarddirs.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kstandarddirs.cpp,v
retrieving revision 1.173
diff -u -r1.173 kstandarddirs.cpp
--- kdecore/kstandarddirs.cpp   21 Apr 2004 21:06:23 -0000      1.173
+++ kdecore/kstandarddirs.cpp   10 May 2004 08:13:19 -0000
@@ -926,11 +926,11 @@
     if (!strcmp(type, "exe"))
        return "bin/";
     if (!strcmp(type, "lib"))
-       return "lib/";
+       return "lib" KDELIBSUFF_NQ "/";
     if (!strcmp(type, "module"))
-       return "lib/kde3/";
+       return "lib" KDELIBSUFF_NQ "/kde3/";
     if (!strcmp(type, "qtplugins"))
-        return "lib/kde3/plugins";
+        return "lib" KDELIBSUFF_NQ "/kde3/plugins";
     if (!strcmp(type, "xdgdata-apps"))
         return "applications/";
     if (!strcmp(type, "xdgdata-dirs"))




More information about the kde-core-devel mailing list