summaryrefslogtreecommitdiff
path: root/net-misc/portfwd/files/portfwd-0.29-build-system.patch
blob: e69c33cb5ef2b9eefc07e997c4cc937a14c663b1 (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
70
71
72
73
74
75
76
77
--- a/configure.in
+++ b/configure.in
@@ -8,6 +8,7 @@ dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_YACC
+AM_PROG_AR
 AM_PROG_LEX
 AC_PROG_RANLIB

@@ -45,6 +46,7 @@ dnl )
 dnl Checks for MSG_PROXY symbol
 AC_TRY_RUN(
 [
+#include <stdlib.h>
 #include <sys/socket.h>
 int main()
 {
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,3 @@
 SUBDIRS = getopt src tools doc
 
-docdir = $(prefix)/doc/portfwd
 doc_DATA = COPYING README CREDITS TODO
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -3,5 +3,4 @@
 man_MANS = portfwd.8 portfwd.cfg.5
 noinst_DATA = INSTALL.configure
 
-docdir = $(prefix)/doc/portfwd
 doc_DATA = FAQ conf.txt
--- a/getopt/Makefile.am
+++ b/getopt/Makefile.am
@@ -3,9 +3,9 @@ noinst_LIBRARIES = libgetopt.a
 libgetopt_a_SOURCES = getopt.c getopt1.c
 
 getopt.o: getopt.c
-	$(CC) -o $@ -c $<
+	$(CC) @CFLAGS@ -o $@ -c $<
 	cp $@ ../src
 getopt1.o: getopt1.c
-	$(CC) -o $@ -c $<
+	$(CC) @CFLAGS@ -o $@ -c $<
 	cp $@ ../src
 
--- a/getopt/getopt.c
+++ b/getopt/getopt.c
@@ -91,6 +91,8 @@
 # endif
 #endif
 
+#include <string.h>
+
 /* This version of `getopt' appears to the caller like standard Unix `getopt'
    but it behaves differently for the user, since it allows the user
    to intersperse the options with the other arguments.
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,4 @@
-CFLAGS   = -Wall -ggdb -O3 -DPORTFWD_CONF=\"$(sysconfdir)/portfwd.cfg\"
-CXXFLAGS = $(CFLAGS)
-INCLUDES = -I$(top_srcdir)/src
+AM_CPPFLAGS = -DPORTFWD_CONF=\"$(sysconfdir)/portfwd.cfg\" -I$(top_srcdir)/src
 
 sbin_PROGRAMS = portfwd
 portfwd_SOURCES = addr.cc from_addr.cc host_map.cc portfwd.cc \
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,5 +1,4 @@
-CXXFLAGS = -Wall -g -O3
-INCLUDES = -I$(top_srcdir)/src
+AM_CPPFLAGS = -DPORTFWD_CONF=\"$(sysconfdir)/portfwd.cfg\" -I$(top_srcdir)/src
 
 noinst_PROGRAMS = t_vector udp_rcv udp_snd