diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 204859556..c8e316416 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -58,7 +58,7 @@ fi | |||
58 | # Use Linux interface name unless the OS has a different preference | 58 | # Use Linux interface name unless the OS has a different preference |
59 | DEFAULT_INTERFACE="\"eth0\"" | 59 | DEFAULT_INTERFACE="\"eth0\"" |
60 | 60 | ||
61 | funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo" | 61 | funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo getaddrinfo_a" |
62 | 62 | ||
63 | # Srcdir in a form that native compiler understands (i.e. DOS path on W32) | 63 | # Srcdir in a form that native compiler understands (i.e. DOS path on W32) |
64 | native_srcdir=$srcdir | 64 | native_srcdir=$srcdir |
@@ -213,10 +213,19 @@ else | |||
213 | AC_MSG_WARN([warning: 'iptables' not found.]) | 213 | AC_MSG_WARN([warning: 'iptables' not found.]) |
214 | fi | 214 | fi |
215 | 215 | ||
216 | |||
217 | AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) | 216 | AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) |
218 | AC_MSG_WARN([warning: 'ifconfig' not found.]) | 217 | AC_MSG_WARN([warning: 'ifconfig' not found.]) |
219 | 218 | ||
219 | # miniupnpc / upnpc binary is a soft runtime requirement | ||
220 | AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false) | ||
221 | |||
222 | if test x"$VAR_UPNPC_BINARY" != x"false" | ||
223 | then | ||
224 | AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary]) | ||
225 | else | ||
226 | AC_MSG_WARN([warning: 'upnpc' binary not found.]) | ||
227 | fi | ||
228 | |||
220 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, | 229 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, |
221 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, | 230 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, |
222 | [Define if struct tm has the tm_gmtoff member.])], | 231 | [Define if struct tm has the tm_gmtoff member.])], |
@@ -230,6 +239,10 @@ AC_CHECK_DECLS([_stati64]) | |||
230 | # will be more selective! | 239 | # will be more selective! |
231 | SAVE_LIBS=$LIBS | 240 | SAVE_LIBS=$LIBS |
232 | 241 | ||
242 | have_addrinfo_a=0 | ||
243 | AC_CHECK_LIB(anl, getaddrinfo_a, [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A,1,[getaddrinfo_a supported])]) | ||
244 | AM_CONDITIONAL(HAVE_GETADDRINFO_A, [test "$have_addrinfo_a" = 1]) | ||
245 | |||
233 | # tests only run on Windows | 246 | # tests only run on Windows |
234 | if test "x$build_target" = "xmingw" | 247 | if test "x$build_target" = "xmingw" |
235 | then | 248 | then |
@@ -409,7 +422,32 @@ fi | |||
409 | 422 | ||
410 | # check for jansson library | 423 | # check for jansson library |
411 | jansson=0 | 424 | jansson=0 |
412 | AC_CHECK_HEADER([jansson.h],jansson=1) | 425 | AC_MSG_CHECKING(for libjansson) |
426 | AC_ARG_WITH(jansson, | ||
427 | [ --with-jansson=PFX base of libjansson installation], | ||
428 | [AC_MSG_RESULT([$with_jansson]) | ||
429 | case $with_jansson in | ||
430 | no) | ||
431 | ;; | ||
432 | yes) | ||
433 | AC_CHECK_HEADERS(jansson.h, | ||
434 | AC_CHECK_LIB([jansson], [json_loads], | ||
435 | jansson=1)) | ||
436 | ;; | ||
437 | *) | ||
438 | LDFLAGS="-L$with_jansson/lib $LDFLAGS" | ||
439 | CPPFLAGS="-I$with_jansson/include $CPPFLAGS" | ||
440 | AC_CHECK_HEADERS(jansson.h, | ||
441 | AC_CHECK_LIB([jansson], [json_loads], | ||
442 | EXT_LIB_PATH="-L$with_jansson/lib $EXT_LIB_PATH" | ||
443 | jansson=1)) | ||
444 | ;; | ||
445 | esac | ||
446 | ], | ||
447 | [AC_MSG_RESULT([--with-jansson not specified]) | ||
448 | AC_CHECK_HEADERS(jansson.h, | ||
449 | AC_CHECK_LIB([jansson], [json_loads], | ||
450 | jansson=1))]) | ||
413 | AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) | 451 | AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) |
414 | if test "x$jansson" = x1 | 452 | if test "x$jansson" = x1 |
415 | then | 453 | then |
@@ -418,6 +456,7 @@ else | |||
418 | AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library]) | 456 | AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library]) |
419 | fi | 457 | fi |
420 | 458 | ||
459 | |||
421 | # check for libpulse(audio) library | 460 | # check for libpulse(audio) library |
422 | pulse=0 | 461 | pulse=0 |
423 | AC_CHECK_LIB(pulse,pa_stream_peek, | 462 | AC_CHECK_LIB(pulse,pa_stream_peek, |
@@ -1511,7 +1550,7 @@ AC_LINK_IFELSE( | |||
1511 | ],[ | 1550 | ],[ |
1512 | AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available]) | 1551 | AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available]) |
1513 | ],[ | 1552 | ],[ |
1514 | AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available]) | 1553 | AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],0,[Define this if getaddrinfo() is available]) |
1515 | ]) | 1554 | ]) |
1516 | 1555 | ||
1517 | else | 1556 | else |
@@ -1781,6 +1820,10 @@ then | |||
1781 | AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.]) | 1820 | AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.]) |
1782 | fi | 1821 | fi |
1783 | 1822 | ||
1823 | # | ||
1824 | # FIXME: `some modules' -> be more specific which exact modules. | ||
1825 | # | ||
1826 | |||
1784 | # warn user if iptables is not found | 1827 | # warn user if iptables is not found |
1785 | if test "$VAR_IPTABLES_BINARY" = "false" | 1828 | if test "$VAR_IPTABLES_BINARY" = "false" |
1786 | then | 1829 | then |
@@ -1793,6 +1836,12 @@ then | |||
1793 | AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.]) | 1836 | AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.]) |
1794 | fi | 1837 | fi |
1795 | 1838 | ||
1839 | # warn user if upnpc binary is not found | ||
1840 | if test "$VAR_UPNPC_BINARY" = "false" | ||
1841 | then | ||
1842 | AC_MSG_NOTICE([WARNING: upnpc binary not found. some modules may not have full functionality.]) | ||
1843 | fi | ||
1844 | |||
1796 | #gnutls | 1845 | #gnutls |
1797 | if test x$gnutls != xtrue | 1846 | if test x$gnutls != xtrue |
1798 | then | 1847 | then |