[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Exec-Prefixing and KStdDirs / dynlib loading (was: KDE on Solaris ;-))
From:       Hans Meine <hans_meine () gmx ! net>
Date:       2001-10-31 22:14:25
[Download RAW message or body]

Hi everybody!

Some (quite long) time ago, I claimed KDE was hard to run on
Solaris. In fact, there were several things which made it hard for me
at our university: A system with old software/libs installed and a
tricky FS path setup, too slow machines (awful long compile cycles
trying parameters) and finally: exec-prefixing.

If one sets up an exec prefix, KDE as is does not look in
(exec_prefix)/lib for dynamic modules. This lets it fail in loading
kded.la, the dcopserver and stuff and so I concluded there was a
problem..

OK, now one fix would be to put exec_prefix in KDEDIRS, however I
could also imaging something along this lines of compiling in the
EPREFIX and specifically looking there for resources of type "lib".

For my situation, KDEDIRS was the second best solution so I hacked
this up (simply appending the EPREFIX to the list of searched kde
prefixes). The advantage is that the binaries compiled into this
EPREFIX automatically also find stuff in there - there does not have
to be another check for the arch outside of that.

Index: configure.in.in
===================================================================
RCS file: /home/kde/kdelibs/kdecore/configure.in.in,v
retrieving revision 1.14.2.1
diff -u -3 -p -r1.14.2.1 configure.in.in
--- configure.in.in     2001/09/05 20:32:21     1.14.2.1
+++ configure.in.in     2001/10/31 22:35:07
@@ -1,3 +1,6 @@
+dnl Compile in the exec prefix to help kstddirs in finding dynamic libs
+AC_DEFINE_UNQUOTED(__KDE_EXECPREFIX, "$exec_prefix", [execprefix or NONE if not
set, for libloading])
+
 dnl --------
 dnl KSocketAddress/KExtendedSocket extra configuration
 dnl --------
Index: kstddirs.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/Attic/kstddirs.cpp,v
retrieving revision 1.124.4.1
diff -u -3 -p -r1.124.4.1 kstddirs.cpp
--- kstddirs.cpp        2001/09/21 18:10:47     1.124.4.1
+++ kstddirs.cpp        2001/10/31 22:35:08
@@ -838,6 +838,10 @@ void KStandardDirs::addKDEDefaults()
     }
     kdedirList.append(KDEDIR);

+    QString execPrefix(__KDE_EXECPREFIX);
+    if (execPrefix!="NONE")
+       kdedirList.append(execPrefix);
+
     QString localKdeDir = readEnvPath("KDEHOME");
     if (!localKdeDir.isEmpty())
     {

-- 
Ciao,  /  /
      /--/
     /  / ANS                          .,* Hamburg, Germany *,.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic