AC_CANONICAL_BUILD
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE([1.9 check-news dist-bzip2 no-dist-gzip -Wall])
+AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
dnl Too many people are not aware of maintainer mode:
LDFLAGS_save="${LDFLAGS_save} -Wl,-headerpad_max_install_names"; LDFLAGS="${LDFLAGS_save}"
VLC_ADD_LDFLAGS([mp4], [-Wl,-framework,IOKit,-framework,CoreFoundation])
VLC_ADD_LDFLAGS([mkv mp4], [-Wl,-framework,IOKit,-framework,CoreFoundation])
- VLC_ADD_CFLAGS([libvlc vlc],[-x objective-c])
VLC_ADD_LDFLAGS([vlc],[-Wl,-undefined,dynamic_lookup])
VLC_ADD_LDFLAGS([libvlc_control],[-Wl,dynamic_lookup])
VLC_ADD_LDFLAGS([ffmpeg i420_rgb_mmx],[-Wl,-read_only_relocs,suppress])
dnl Check for system libs needed
need_libc=false
-AC_CHECK_FUNCS(gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy)
-
dnl Check for usual libc functions
-AC_CHECK_FUNCS(strdup strndup strnlen atof)
+AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv])
AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
+AH_BOTTOM([#include <vlc_fixups.h>])
+
AS_IF([test "${SYS}" = "linux"], [
AC_CHECK_FUNCS(tee)
])
if ${have_nanosleep}; then
AC_DEFINE(HAVE_NANOSLEEP, 1, [Define if nanosleep is available.])
fi
+fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
dnl Check for misc headers
-AC_MSG_CHECKING(for pthread_cond_t in pthread.h)
-AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
- AC_MSG_RESULT(yes)
- AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
- Define if <pthread.h> defines pthread_cond_t.)],[
- AC_MSG_RESULT(no)])
-
-AC_MSG_CHECKING(for pthread_once in pthread.h)
-AC_EGREP_HEADER(pthread_once,pthread.h,[
- AC_MSG_RESULT(yes)
- AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
- Define if <pthread.h> defines pthread_once.)],[
- AC_MSG_RESULT(no)])
-fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
-
AC_MSG_CHECKING(for strncasecmp in strings.h)
AC_EGREP_HEADER(strncasecmp,strings.h,[
AC_MSG_RESULT(yes)
fi
CFLAGS="${CFLAGS_save}"
-RDC_PROG_CC_WFLAGS([all extra no-unused-parameter sign-compare undef pointer-arith bad-function-cast cast-align write-strings missing-prototypes volatile-register-var])
+RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast cast-align write-strings missing-prototypes volatile-register-var])
RDC_PROG_CC_FLAGS_IFELSE([-pipe])
dnl This helps detect broken plugins with undefined symbols
dnl Better fail loudly at build-time than silenty at run-time.
dnl Unfortunately, this sucks on FreeBSD (won't even link with -lc)
-dnl RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
-dnl VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
-dnl ])
+if test `uname -s` != FreeBSD; then
+ RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
+ VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
+ ])
+fi
dnl Check for various optimization flags
AC_CACHE_CHECK([if \$CC accepts -Os],
AC_ARG_ENABLE(dirac,
[ --enable-dirac experimental dirac codec (default disabled)])
if test "${enable_dirac}" = "yes"; then
- PKG_CHECK_MODULES(DIRAC,[dirac >= 0.8.0], [
+ PKG_CHECK_MODULES(DIRAC,[dirac >= 0.9.0], [
VLC_ADD_PLUGINS([dirac])
VLC_ADD_CFLAGS([dirac],[$DIRAC_CFLAGS])
VLC_ADD_LIBS([dirac],[$DIRAC_LIBS -lstdc++]) ],[
AC_SUBST(VERSION_MINOR)
AC_SUBST(VERSION_REVISION)
AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure])
-AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -s`", [host which ran configure])
+if test "${SYS}" = "cygwin"
+then
+ AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure])
+else
+ AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -s`", [host which ran configure])
+fi
AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure])
AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler])