summaryrefslogtreecommitdiff
blob: 3b834a43952d6446139419058faafaac689c3f8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
diff -Npur spacenavd-0.5.orig/Makefile.in spacenavd-0.5/Makefile.in
--- spacenavd-0.5.orig/Makefile.in	2012-01-31 22:22:20.460368687 +0100
+++ spacenavd-0.5/Makefile.in	2012-01-31 22:23:18.170367675 +0100
@@ -6,8 +6,8 @@ ctl = spnavd_ctl
 
 CC = gcc
 INSTALL = install
-CFLAGS = -pedantic -Wall $(dbg) $(opt) -fno-strict-aliasing -I$(srcdir)/src
-LDFLAGS = $(xlib)
+CFLAGS = $(opt) -fno-strict-aliasing -I$(srcdir)/src
+LDFLAGS = $(ldopt) $(xlib)
 
 $(bin): $(obj)
 	$(CC) -o $@ $(obj) $(LDFLAGS)
diff -Npur spacenavd-0.5.orig/configure spacenavd-0.5/configure
--- spacenavd-0.5.orig/configure	2012-01-31 22:22:20.460368687 +0100
+++ spacenavd-0.5/configure	2012-01-31 22:22:49.257368187 +0100
@@ -28,6 +28,7 @@ test_kver() {
 
 PREFIX=/usr/local
 OPT=yes
+LDOPT=yes
 DBG=yes
 X11=yes
 HOTPLUG=yes
@@ -70,6 +71,11 @@ for arg; do
 	--disable-opt)
 		OPT=no;;
 
+	--enable-ldopt)
+		LDOPT=yes;;
+	--disable-ldopt)
+		LDOPT=no;;
+
 	--enable-debug)
 		DBG=yes;;
 	--disable-debug)
@@ -95,6 +101,8 @@ for arg; do
 		echo '  --disable-hotplug: disable hotplug, fallback to polling for the device'
 		echo '  --enable-opt: enable speed optimizations (default)'
 		echo '  --disable-opt: disable speed optimizations'
+		echo '  --enable-ldopt: enable link optimizations (default)'
+		echo '  --disable-ldopt: disable link optimizations'
 		echo '  --enable-debug: include debugging symbols (default)'
 		echo '  --disable-debug: do not include debugging symbols'
 		echo 'all invalid options are silently ignored'
@@ -105,6 +113,7 @@ done
 
 echo "  prefix: $PREFIX"
 echo "  optimize for speed: $OPT"
+echo "  optimize link: $LDOPT"
 echo "  include debugging symbols: $DBG"
 echo "  x11 communication method: $X11"
 echo "  use hotplug: $HOTPLUG"
@@ -128,7 +137,11 @@ if [ "$DBG" = 'yes' ]; then
 fi
 
 if [ "$OPT" = 'yes' ]; then
-	echo 'opt = -O3' >>Makefile
+	echo "opt = ${CFLAGS:--O3}" >>Makefile
+fi
+
+if [ "$LDOPT" = 'yes' ]; then
+	echo "ldopt = ${LDFLAGS}" >>Makefile
 fi
 
 if [ "$X11" = 'yes' ]; then