aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac57
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
59DEFAULT_INTERFACE="\"eth0\"" 59DEFAULT_INTERFACE="\"eth0\""
60 60
61funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo" 61funcstocheck="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)
64native_srcdir=$srcdir 64native_srcdir=$srcdir
@@ -213,10 +213,19 @@ else
213AC_MSG_WARN([warning: 'iptables' not found.]) 213AC_MSG_WARN([warning: 'iptables' not found.])
214fi 214fi
215 215
216
217AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) 216AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false)
218AC_MSG_WARN([warning: 'ifconfig' not found.]) 217AC_MSG_WARN([warning: 'ifconfig' not found.])
219 218
219# miniupnpc / upnpc binary is a soft runtime requirement
220AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false)
221
222if test x"$VAR_UPNPC_BINARY" != x"false"
223then
224AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary])
225else
226AC_MSG_WARN([warning: 'upnpc' binary not found.])
227fi
228
220AC_CHECK_MEMBER(struct tm.tm_gmtoff, 229AC_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!
231SAVE_LIBS=$LIBS 240SAVE_LIBS=$LIBS
232 241
242have_addrinfo_a=0
243AC_CHECK_LIB(anl, getaddrinfo_a, [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A,1,[getaddrinfo_a supported])])
244AM_CONDITIONAL(HAVE_GETADDRINFO_A, [test "$have_addrinfo_a" = 1])
245
233# tests only run on Windows 246# tests only run on Windows
234if test "x$build_target" = "xmingw" 247if test "x$build_target" = "xmingw"
235then 248then
@@ -409,7 +422,32 @@ fi
409 422
410# check for jansson library 423# check for jansson library
411jansson=0 424jansson=0
412AC_CHECK_HEADER([jansson.h],jansson=1) 425AC_MSG_CHECKING(for libjansson)
426AC_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))])
413AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) 451AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1])
414if test "x$jansson" = x1 452if test "x$jansson" = x1
415then 453then
@@ -418,6 +456,7 @@ else
418 AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library]) 456 AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library])
419fi 457fi
420 458
459
421# check for libpulse(audio) library 460# check for libpulse(audio) library
422pulse=0 461pulse=0
423AC_CHECK_LIB(pulse,pa_stream_peek, 462AC_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
1517else 1556else
@@ -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.])
1782fi 1821fi
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
1785if test "$VAR_IPTABLES_BINARY" = "false" 1828if test "$VAR_IPTABLES_BINARY" = "false"
1786then 1829then
@@ -1793,6 +1836,12 @@ then
1793AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.]) 1836AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.])
1794fi 1837fi
1795 1838
1839# warn user if upnpc binary is not found
1840if test "$VAR_UPNPC_BINARY" = "false"
1841then
1842AC_MSG_NOTICE([WARNING: upnpc binary not found. some modules may not have full functionality.])
1843fi
1844
1796#gnutls 1845#gnutls
1797if test x$gnutls != xtrue 1846if test x$gnutls != xtrue
1798then 1847then