… | |
… | |
65 | |
65 | |
66 | AC_ARG_ENABLE(iftype, |
66 | AC_ARG_ENABLE(iftype, |
67 | [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [ |
67 | [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [ |
68 | Use kernel/net device interface TYPE/SUBTYPE. |
68 | Use kernel/net device interface TYPE/SUBTYPE. |
69 | Working combinations are: |
69 | Working combinations are: |
70 | "native/linux" "tincd/linux" "tincd/freebsd"; |
70 | "native/linux" |
|
|
71 | "tincd/linux" |
|
|
72 | "tincd/freebsd"; |
71 | Untested combinations are: |
73 | Untested combinations are: |
72 | "tincd/netbsd" "tincd/darwin" "tincd/solaris" |
74 | "tincd/netbsd" |
|
|
75 | "tincd/darwin" |
|
|
76 | "tincd/solaris" |
73 | "tincd/openbsd" "tincd/cygwin"; |
77 | "tincd/openbsd"; |
74 | Broken combinations are: |
78 | Broken combinations are: |
75 | "native/cygwin"; |
79 | "tincd/cygwin"; |
76 | The default is to autodetect. |
80 | The default is to autodetect. |
77 | ])], |
81 | ])], |
78 | [ |
82 | [ |
79 | IFTYPE=`echo $enableval | sed s%/.*%%` |
83 | IFTYPE=`echo $enableval | sed s%/.*%%` |
80 | IFSUBTYPE=`echo $enableval | sed s%.*/%%` |
84 | IFSUBTYPE=`echo $enableval | sed s%.*/%%` |
… | |
… | |
115 | IFTYPE=tincd |
119 | IFTYPE=tincd |
116 | IFSUBTYPE=netbsd |
120 | IFSUBTYPE=netbsd |
117 | AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) |
121 | AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) |
118 | ;; |
122 | ;; |
119 | *cygwin*) |
123 | *cygwin*) |
120 | IFTYPE=tincd |
124 | IFTYPE=native |
121 | IFSUBTYPE=cygwin |
125 | IFSUBTYPE=cygwin |
122 | AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin]) |
126 | AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin]) |
123 | ;; |
127 | ;; |
124 | *) |
128 | *) |
125 | AC_MSG_ERROR("Unknown operating system.") |
129 | AC_MSG_ERROR("Unknown operating system.") |
… | |
… | |
137 | AC_LANG(C++) |
141 | AC_LANG(C++) |
138 | AC_CHECK_HEADERS(ext/hash_map) |
142 | AC_CHECK_HEADERS(ext/hash_map) |
139 | |
143 | |
140 | dnl Checks for header files. |
144 | dnl Checks for header files. |
141 | AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ |
145 | AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ |
142 | sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h cygwin.h arpa/inet.h netinet/in.h]) |
146 | sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h arpa/inet.h \ |
|
|
147 | sys/poll.h sys/mman.h netinet/in.h]) |
143 | AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], |
148 | AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], |
144 | [ |
149 | [ |
145 | #include <sys/types.h> |
150 | #include <sys/types.h> |
146 | #include <sys/socket.h> |
151 | #include <sys/socket.h> |
147 | #ifdef HAVE_NETINET_IN_H |
152 | #ifdef HAVE_NETINET_IN_H |
… | |
… | |
194 | |
199 | |
195 | AC_LANG_PUSH(C) |
200 | AC_LANG_PUSH(C) |
196 | |
201 | |
197 | AC_HEADER_STDC |
202 | AC_HEADER_STDC |
198 | |
203 | |
|
|
204 | dnl argl, could somebody catapult darwin into the 21st century??? |
199 | AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall) |
205 | AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall poll) |
200 | |
206 | |
201 | AC_FUNC_ALLOCA |
207 | AC_FUNC_ALLOCA |
202 | |
208 | |
203 | dnl Support for SunOS |
209 | dnl Support for SunOS |
204 | |
210 | |
… | |
… | |
215 | |
221 | |
216 | AC_CACHE_SAVE |
222 | AC_CACHE_SAVE |
217 | |
223 | |
218 | dnl These are defined in files in m4/ |
224 | dnl These are defined in files in m4/ |
219 | tinc_TUNTAP |
225 | tinc_TUNTAP |
|
|
226 | |
220 | tinc_OPENSSL |
227 | tinc_OPENSSL |
|
|
228 | if test "x$openssl_include" != x; then |
|
|
229 | CXXFLAGS="$CXXFLAGS -I$openssl_include" |
|
|
230 | fi |
221 | dnl tinc_ZLIB |
231 | dnl tinc_ZLIB |
222 | |
232 | |
223 | AC_ARG_ENABLE(rohc, |
233 | AC_ARG_ENABLE(rohc, |
224 | [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])], |
234 | [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])], |
225 | [ |
235 | [ |