summaryrefslogtreecommitdiff
path: root/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-autotools.patch
blob: 9035a5987c37c9f27f289e6507cc532e681b051c (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
68
69
--- a/configure.in
+++ b/configure.in
@@ -37,13 +37,9 @@
 AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode	Enables debug symbols and disables optimizations [default=no]],
 [ enable_maintainer_mode=yes ])
 
-if test "$enable_maintainer_mode" = "yes"; then
-	CFLAGS="-O0 -g3 --pipe -Wall"
-	LDFLAGS="-lncurses"
-else
-	CFLAGS="$CFLAGS -pipe -Wall"
-	LDFLAGS="-s -lncurses"
-fi
+CXXFLAGS+=" -Wall"
+
+PKG_CHECK_MODULES([NCURSES], [ncurses])
 
 AC_OUTPUT(Makefile)
 #AC_CONFIG_FILES([Makefile])
--- a/Makefile.in
+++ b/Makefile.in
@@ -6,24 +6,30 @@
 
 mandir= @mandir@
 
+CC = @CC@
 CXX = @CXX@
 
 CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
+
 LDFLAGS = @LDFLAGS@
 
+CPPFLAGS += @NCURSES_CFLAGS@
+LIBS = @NCURSES_LIBS@
+
 #LDLIBS = -levent
 
 ### Add to taste:
 
-# CFLAGS  = -g 
+# CXXFLAGS  = -g 
 # LDFLAGS = -g
 
-# CFLAGS += -DPROC_DIR=\"extra2/\"
+# CXXFLAGS += -DPROC_DIR=\"extra2/\"
 
-# CFLAGS += -DDEBUG
+# CXXFLAGS += -DDEBUG
 # LDLIBS += -ldmalloc
 
-# CFLAGS += -pg
+# CXXFLAGS += -pg
 # LDFLAGS = -pg
 
 ### End of configurable options.
@@ -44,10 +50,10 @@
 cygwin_procstat.cpp cygwin_rendercpupagestat.cpp \
 lib/routines.cpp lib/timeRoutines.cpp lib/prettyPrint.cpp \
 Makefile
-	$(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) procinfo.cpp -o $@ $(LIBS)
 
 #procinfo.o: procinfo.cpp procinfo.h
-#	$(XX) $(CFLAGS) procinfo.cpp -o procinfo.o
+#	$(CXX) $(CXXFLAGS) procinfo.cpp -o procinfo.o
 
 install: procinfo procinfo.8
 	-mkdir -p $(DESTDIR)/$(prefix)/bin