AC_CANONICAL_SYSTEM
PACKAGE="vlc"
-VERSION="0.3.1"
+VERSION="0.4.0"
CODENAME=Ourumov
dnl Save CFLAGS and LDFLAGS
vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
+ ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
;;
x*nto*)
AC_HEADER_TIME
dnl Mac OS X and other OSes don't have declaration for nanosleep
-dnl This only works with autoconf 2.52
-AC_CHECK_DECLS(nanosleep)
+AC_EGREP_HEADER(nanosleep,time.h,[
+ AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
+ Define if <time.h> defines nanosleep.)
+])
dnl Make sure we have timespecs
-dnl This only works with autoconf 2.52
-AC_CHECK_TYPES(struct timespec)
+AC_EGREP_HEADER(timespec,sys/time.h,[
+ AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
+ Define if <sys/time.h> defines struct timespec.)
+])
dnl Check for threads library
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
dnl
dnl ipv6 plugin - not for QNX yet
dnl
-if test x$SYS != xnto
+if test x$SYS != xnto && test "x$SYS" != "xmingw32"
then
AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"])
fi
+if test "x$SYS" = "xmingw32"
+then
+ AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
+ AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
+ PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
+fi
dnl
dnl AVI demux plugin
LDFLAGS="$LDFLAGS $mad_LDFLAGS"
AC_CHECK_HEADERS(mad.h, ,
[ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
- AC_CHECK_LIB(mad, mad_bit_init,
+ AC_CHECK_LIB(mad, mad_bit_init, [
PLUGINS="${PLUGINS} mad"
- mad_LDFLAGS="${mad_LDFLAGS} -lmad",
+ mad_LDFLAGS="${mad_LDFLAGS} -lmad" ],
[ AC_MSG_ERROR([Cannot find libmad library...]) ])
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
[ --enable-ffmpeg ffmpeg codec (default disabled)])
if test "x$enable_ffmpeg" = "xyes"
then
+ AC_ARG_WITH(ffmpeg,
+ [ --with-ffmpeg=PATH path to ffmpeg installation],[],[])
+ if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"
+ then
+ ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I$with_ffmpeg/include/libffmpeg"
+ ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L$with_ffmpeg/lib"
+ fi
+
AC_ARG_WITH(ffmpeg-tree,
[ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
- if test "x$with_ffmpeg_tree" = x
+ if test "x$with_ffmpeg_tree" != "x"
then
- AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a])
- else
AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
if test "x$real_ffmpeg_tree" = x
dnl Use a custom libffmpeg
AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
BUILTINS="${BUILTINS} ffmpeg"
- ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
+ ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
else
dnl The given libavcodec wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
fi
+ else
+ save_CFLAGS=$CFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CFLAGS="$CFLAGS $ffmpeg_CFLAGS"
+ LDFLAGS="$LDFLAGS $ffmpeg_LDFLAGS -lm"
+ AC_CHECK_LIB(avcodec, avcodec_init, [
+ BUILTINS="${BUILTINS} ffmpeg"
+ ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" ],
+ [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
+ CFLAGS=$save_CFLAGS
+ LDFLAGS=$save_LDFLAGS
fi
fi
AC_SUBST(imdct3dn_LDFLAGS)
AC_SUBST(imdctsse_LDFLAGS)
AC_SUBST(ipv4_LDFLAGS)
+AC_SUBST(ipv6_LDFLAGS)
AC_SUBST(kde_LDFLAGS)
AC_SUBST(lirc_LDFLAGS)
AC_SUBST(macosx_LDFLAGS)
AC_SUBST(x11_LDFLAGS)
AC_SUBST(xvideo_LDFLAGS)
-AC_OUTPUT([Makefile.opts po/Makefile.in])
+AC_OUTPUT([Makefile.config Makefile.opts po/Makefile.in])
echo "
vlc configuration