httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r729603 - /httpd/mod_mbox/trunk/SConstruct
Date Sat, 27 Dec 2008 06:01:31 GMT
Author: pquerna
Date: Fri Dec 26 22:01:31 2008
New Revision: 729603

URL: http://svn.apache.org/viewvc?rev=729603&view=rev
Log:
Set RPATH for apr/apr-util like libtool does.

Modified:
    httpd/mod_mbox/trunk/SConstruct

Modified: httpd/mod_mbox/trunk/SConstruct
URL: http://svn.apache.org/viewvc/httpd/mod_mbox/trunk/SConstruct?rev=729603&r1=729602&r2=729603&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/SConstruct (original)
+++ httpd/mod_mbox/trunk/SConstruct Fri Dec 26 22:01:31 2008
@@ -28,12 +28,15 @@
 
 env = Environment(options=opts)
 
-def apxs_query(path, key):
-    cmd = [path, "-q", key]
+def get_output(cmd):
     s = subprocess.Popen(cmd, stdout=subprocess.PIPE)
     out = s.communicate()[0]
     s.wait()
     return out.strip()
+    
+def apxs_query(path, key):
+    cmd = [path, "-q", key]
+    return get_output(cmd)
 
 apr_config = apxs_query(env["APXS"], 'APR_CONFIG')
 apu_config = apxs_query(env["APXS"], 'APU_CONFIG')
@@ -41,6 +44,14 @@
 env.Replace(CC = apxs_query(env["APXS"], 'CC'))
 env.Replace(CPP = apxs_query(env["APXS"], 'CPP'))
 
+# This is a hack to set the RPATH on some operating systems... make me more 
+# portable later....
+p1 = get_output([apr_config, '--bindir'])
+p1 = pjoin(p1[:p1.rfind('/')], 'libs')
+p2 = get_output([apr_config, '--bindir'])
+p2 = pjoin(p2[:p2.rfind('/')], 'libs')
+env.AppendUnique(RPATH = [p1, p2])
+
 env.ParseConfig(apr_config + ' --cflags --cppflags --includes --ldflags')
 env.ParseConfig(apu_config + ' --includes  --ldflags')
 



Mime
View raw message