Commit a2447211 authored by Christophe Massiot's avatar Christophe Massiot
Browse files

Fixed nanosleep detection on some platforms.

parent 7f59683c
This diff is collapsed.
...@@ -144,13 +144,18 @@ AC_CHECK_FUNC(gethostbyname,,[ ...@@ -144,13 +144,18 @@ AC_CHECK_FUNC(gethostbyname,,[
AC_CHECK_FUNC(gethostbyname,,[ AC_CHECK_FUNC(gethostbyname,,[
AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind") AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")
]) ])
AC_CHECK_FUNCS(nanosleep,,[ have_nanosleep=0
AC_CHECK_FUNC(nanosleep,have_nanosleep=1,[
AC_CHECK_LIB(rt,nanosleep, AC_CHECK_LIB(rt,nanosleep,
[vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"], [vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"; have_nanosleep=1],
[AC_CHECK_LIB(posix4,nanosleep, [AC_CHECK_LIB(posix4,nanosleep,
[vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"])] [vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"; have_nanosleep=1])]
) )
]) ])
if test x$have_nanosleep = x1; then
AC_DEFINE(HAVE_NANOSLEEP, 1,
Define if nanosleep is available.)
fi
AC_CHECK_FUNC(inet_aton,,[ AC_CHECK_FUNC(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv") AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv")
]) ])
......
...@@ -106,9 +106,6 @@ ...@@ -106,9 +106,6 @@
/* Define if you have the munmap function. */ /* Define if you have the munmap function. */
#undef HAVE_MUNMAP #undef HAVE_MUNMAP
/* Define if you have the nanosleep function. */
#undef HAVE_NANOSLEEP
/* Define if you have the posix_memalign function. */ /* Define if you have the posix_memalign function. */
#undef HAVE_POSIX_MEMALIGN #undef HAVE_POSIX_MEMALIGN
...@@ -353,6 +350,9 @@ ...@@ -353,6 +350,9 @@
/* Define if the GNU gettext() function is already present or preinstalled. */ /* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT #undef HAVE_GETTEXT
/* Define if nanosleep is available. */
#undef HAVE_NANOSLEEP
/* long getopt support */ /* long getopt support */
#undef HAVE_GETOPT_LONG #undef HAVE_GETOPT_LONG
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment