--- pbs_python-4.6.0/setup.py.in.orig	2015-04-01 13:51:18.158956461 +0200
+++ pbs_python-4.6.0/setup.py.in	2015-04-01 13:52:02.249359723 +0200
@@ -37,7 +37,7 @@
 if LooseVersion(VERSION) >= LooseVersion('5.0'):
 
     inc=os.environ.get('PBS_PYTHON_INCLUDEDIR','/usr/include/torque')
-    os.environ['CC']='g++'
+    os.environ['CC']= os.environ.get('CXX', 'g++')
     os.environ['CFLAGS']=' '.join(os.environ.get('CFLAGS','').split(' ')+['-I%s'%inc]) 
     
     if not os.path.exists(os.path.join(inc,'log.h')):
@@ -55,7 +55,7 @@
 elif LooseVersion(VERSION) >= LooseVersion('4.2'):
 
     inc=os.environ.get('PBS_PYTHON_INCLUDEDIR','/usr/include/torque')
-    os.environ['CC']='g++'
+    os.environ['CC']= os.environ.get('CXX', 'g++')
     os.environ['CFLAGS']=' '.join(os.environ.get('CFLAGS','').split(' ')+['-I%s'%inc]) 
     
     if not os.path.exists(os.path.join(inc,'log.h')):
