summaryrefslogtreecommitdiff
path: root/devel/imake/files/patch-xmkmf.cpp
blob: 75e496452af7f4d2160acdeedc610c1e5e2d3841 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- xmkmf.cpp.orig	2012-03-08 06:47:32.000000000 +0100
+++ xmkmf.cpp	2013-06-28 11:55:04.174394058 +0200
@@ -8,7 +8,7 @@
 topdir=
 curdir=.
 do_all=
-imake_defines=
+imake_defines="${IMAKECPPFLAGS}"
 
 while [ $# -gt 0 ]
 do
@@ -64,3 +64,12 @@
     imake $imake_defines $args
     ;;
 esac
+
+if [ -f "Makefile" ];then
+    if [ -n "$CC" ];then
+        sed -i "" -e "s| CC = cc| CC = $CC|" Makefile
+    fi
+    if [ -n "$CXX" ];then
+        sed -i "" -e "s| CXX = c++| CXX = $CXX|" Makefile
+    fi
+fi