])
AC_CHECK_FUNCS(vasprintf)
AC_CHECK_FUNCS(swab)
-AC_CHECK_FUNCS(memalign)
+AC_CHECK_FUNCS([memalign valloc])
AC_CHECK_FUNCS(sigrelse)
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
dnl Check for ntohl, etc.
-CFLAGS="${save_CFLAGS} -Wall -Werror"
-AC_MSG_CHECKING([for ntohl in sys/param.h])
-AC_TRY_COMPILE([#include <sys/param.h>
-void foo() { int meuh; ntohl(meuh); }],,
- AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
- AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
+AC_CACHE_CHECK([for ntohl in sys/param.h],
+ [ac_cv_c_ntohl_sys_param_h],
+ [CFLAGS="${save_CFLAGS} -Wall -Werror"
+ AC_TRY_COMPILE([#include <sys/param.h>],
+ [void foo() { int meuh; ntohl(meuh); }],
+ ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
+if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
+ AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
+fi
dnl Check for inline function size limit
-CFLAGS="${save_CFLAGS} -finline-limit-20000"
-AC_MSG_CHECKING([if \$CC accepts -finline-limit])
-AC_TRY_COMPILE([],,
- save_CFLAGS="${save_CFLAGS} -finline-limit-20000"; AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+AC_CACHE_CHECK([if \$CC accepts -finline-limit],
+ [ac_cv_c_inline_limit],
+ [CFLAGS="${save_CFLAGS} -finline-limit-30000"
+ AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
+if test x"$ac_cv_c_inline_limit" != x"no"; then
+ save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
+fi
dnl Check for Darwin plugin linking flags
-CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
-AC_MSG_CHECKING([if \$CC accepts -bundle -undefined suppress])
-AC_TRY_COMPILE([],,
- PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error],
+ [ac_cv_ld_darwin],
+ [CFLAGS="${save_CFLAGS} -bundle -undefined error"
+ AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
+if test x"$ac_cv_ld_darwin" != x"no"; then
+ PLCFLAGS="${PLCFLAGS} -bundle -undefined error"
+fi
dnl Check for standard plugin linking flags
-CFLAGS="${save_CFLAGS} -shared"
-AC_MSG_CHECKING([if \$CC accepts -shared])
-AC_TRY_COMPILE([],,
- PLCFLAGS="${PLCFLAGS} -shared"; AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
-
-dnl Check for standard soname setting
-if test x"${SOFLAGS}" = x; then
- try_SOFLAGS="-Wl,-soname -Wl,"
- LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
- AC_MSG_CHECKING([if linker accepts ${try_SOFLAGS}foo.so.0])
- AC_TRY_LINK([],,
- SOFLAGS="${try_SOFLAGS}"; AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+AC_CACHE_CHECK([if \$CC accepts -shared],
+ [ac_cv_ld_plugins],
+ [CFLAGS="${save_CFLAGS} -shared"
+ AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
+if test x"$ac_cv_ld_plugins" != x"no"; then
+ PLCFLAGS="${PLCFLAGS} -shared"
fi
-
-dnl Check for SunOS soname setting
+
+dnl Check for soname setting
if test x"${SOFLAGS}" = x; then
- try_SOFLAGS="-Wl,-h -Wl,"
- LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
- AC_MSG_CHECKING([if linker accepts ${try_SOFLAGS}foo.so.0])
- AC_TRY_LINK([],,
- SOFLAGS="${try_SOFLAGS}"; AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ AC_CACHE_CHECK([for soname setting],
+ [ac_cv_ld_soname],
+ [
+ # Standard
+ try_SOFLAGS="-Wl,-soname -Wl,"
+ LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
+ AC_TRY_LINK([],,ac_cv_ld_soname="${try_SOFLAGS}", [
+ # SunOS
+ try_SOFLAGS="-Wl,-h -Wl,"
+ LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
+ AC_TRY_LINK([],,ac_cv_ld_soname="${try_SOFLAGS}",
+ ac_cv_ld_soname=none)
+ ])])
+ if test x"$ac_cv_ld_soname" != x"none"; then
+ SOFLAGS=$ac_cv_ld_soname
+ else
+ echo "
+------------
+Your system doesn't seem to have support for dynamic linking. You may
+have problems using libdvdcss.
+------------
+"
+ fi
fi
dnl End of the bizarre compilation tests
LDFLAGS="${save_LDFLAGS}"
dnl Check for boolean_t
-AC_MSG_CHECKING([for boolean_t in sys/types.h])
-AC_TRY_COMPILE([#include <sys/types.h>
-void quux() { boolean_t foo; }],,
- AC_DEFINE(BOOLEAN_T_IN_SYS_TYPES_H, 1, Define if <sys/types.h> defines boolean_t.)
- AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-AC_MSG_CHECKING([for boolean_t in pthread.h])
-AC_TRY_COMPILE([#include <pthread.h>
-void quux() { boolean_t foo; }],,
- AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if <pthread.h> defines boolean_t.)
- AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-AC_MSG_CHECKING([for boolean_t in cthreads.h])
-AC_TRY_COMPILE([#include <cthreads.h>
-void quux() { boolean_t foo; }],,
- AC_DEFINE(BOOLEAN_T_IN_CTHREADS_H, 1, Define if <cthreads.h> defines boolean_t.)
- AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
+AC_CACHE_CHECK([for boolean_t in sys/types.h],
+ [ac_cv_c_boolean_t_sys_types_h],
+ [AC_TRY_COMPILE([#include <sys/types.h>], [void quux() { boolean_t foo; }],
+ ac_cv_c_boolean_t_sys_types_h=yes, ac_cv_c_boolean_t_sys_types_h=no)])
+if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
+ AC_DEFINE(BOOLEAN_T_IN_SYS_TYPES_H, 1, Define if <sys/types.h> defines boolean_t.)
+fi
+
+AC_CACHE_CHECK([for boolean_t in pthread.h],
+ [ac_cv_c_boolean_t_pthread_h],
+ [AC_TRY_COMPILE([#include <pthread.h>], [void quux() { boolean_t foo; }],
+ ac_cv_c_boolean_t_pthread_h=yes, ac_cv_c_boolean_t_pthread_h=no)])
+if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
+ AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if <pthread.h> defines boolean_t.)
+fi
+
+AC_CACHE_CHECK([for boolean_t in cthreads.h],
+ [ac_cv_c_boolean_t_cthreads_h],
+ [AC_TRY_COMPILE([#include <cthreads.h>], [void quux() { boolean_t foo; }],
+ ac_cv_c_boolean_t_cthreads_h=yes, ac_cv_c_boolean_t_cthreads_h=no)])
+if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
+ AC_DEFINE(BOOLEAN_T_IN_CTHREADS_H, 1, Define if <cthreads.h> defines boolean_t.)
+fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
[ac_cv_mmx_inline],
- [AC_TRY_COMPILE([void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}],,
+ [AC_TRY_COMPILE(,[void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}],
ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
if test x"$ac_cv_mmx_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
[ac_cv_mmxext_inline],
- [AC_TRY_COMPILE([void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}],,
+ [AC_TRY_COMPILE(,[void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}],
ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
if test x"$ac_cv_mmxext_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
[ac_cv_3dnow_inline],
- [AC_TRY_COMPILE([void quux(){void *p;asm("pfadd %%mm1,%%mm2"::"r"(p));}],,
+ [AC_TRY_COMPILE(,[void quux(){void *p;asm("pfadd %%mm1,%%mm2"::"r"(p));}],
ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
if test x"$ac_cv_3dnow_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
[ac_cv_sse_inline],
- [AC_TRY_COMPILE([void quux(){void *p;asm("xorps %%xmm1,%%xmm2"::"r"(p));}],,
+ [AC_TRY_COMPILE(,[void quux(){void *p;asm("xorps %%xmm1,%%xmm2"::"r"(p));}],
ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
if test x"$ac_cv_sse_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
AC_CACHE_CHECK([if \$CC groks Altivec inline assembly],
[ac_cv_altivec_inline],
- [AC_TRY_COMPILE([void quux(){asm("mtspr 256,%0"::"r"(-1));}],,
- ac_cv_altivec_inline=yes, ac_cv_altivec_inline=no)])
+ [AC_TRY_COMPILE(,[void quux(){asm("mtspr 256,%0"::"r"(-1));}],
+ ac_cv_altivec_inline=yes,
+ [save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -Wa,-m7400"
+ AC_TRY_COMPILE(,[void quux(){asm("mtspr 256,%0"::"r"(-1));}],
+ [ac_cv_altivec_inline=yes; CFLAGS_ALTIVEC="-Wa,-m7400"],
+ ac_cv_altivec_inline=no)
+ CFLAGS=$save_CFLAGS
+ ])])
if test x"$ac_cv_altivec_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
+AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
+ [ac_cv_c_altivec],
+ [save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -faltivec"
+ # Darwin test
+ AC_TRY_COMPILE(,[void quux(){vec_mtvscr((vector unsigned int)(0));}],
+ ac_cv_c_altivec=-faltivec, [
+ # Linux/PPC test
+ CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
+ AC_TRY_COMPILE(,[void quux(){vec_mtvscr((vector unsigned int)(0));}],
+ [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
+ ])
+ CFLAGS=$save_CFLAGS
+ ])
+if test x"$ac_cv_c_altivec" != x"no"; then
+ AC_DEFINE(HAVE_C_ALTIVEC, 1, Define if your compiler groks C altivec extensions.)
+ CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_c_altivec"
+fi
+
+AC_CACHE_CHECK([if linker needs -framework vecLib],
+ [ac_cv_ld_altivec],
+ [save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -framework vecLib"
+ AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
+ LDFLAGS=$save_LDFLAGS
+ ])
+if test x"$ac_cv_ld_altivec" != x"no"; then
+ LIB_ALTIVEC="-framework vecLib"
+fi
+
dnl
dnl libdvdcss: check for DVD ioctls
dnl
dnl
dnl Check the operating system
dnl
-case ${_os} in
+case ${target_os} in
bsdi*)
SYS=bsdi
;;
esac
dnl
-dnl PentiumPro acceleration
+dnl Special arch tuning
dnl
-AC_ARG_ENABLE(ppro,
- [ --disable-ppro Disable PentiumPro optimizations (default enabled for x86)],
-[ if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi ],
-[ if test x$ARCH = xi686; then ARCH="${ARCH} ppro"; fi ])
+AC_ARG_WITH(tuning,
+[ --with-tuning=[arch] Enable special tuning for an architecture
+ (default i686 on IA-32 and 750 on PPC)])
+if test "x$withval" != "x"; then
+ TUNING=$withval
+else
+ if test x$ARCH = xi686; then TUNING="pentiumpro"
+ else
+ if test x$ARCH = ppc; then TUNING="750"; fi
+ fi
+fi
dnl
dnl MMX acceleration
[ --enable-debug Enable debug mode (default disabled)],
[ if test x$enableval = xyes; then DEBUG=1; fi ])
-dnl
-dnl Enable/disable statistics
-dnl
-STATS=0
-AC_ARG_ENABLE(stats,
-[ --enable-stats Enable printing of statistics (default disabled)],
-[ if test x$enableval = xyes; then STATS=1; fi ])
-
dnl
dnl Trace mode
dnl
STATIC_LIBDVDCSS=0
DUMMY_LIBDVDCSS=0
AC_ARG_WITH(dvdcss,
- [ --with-dvdcss[=name] way to use libdvdcss, either 'yes' or 'no', or 'local-static', 'local-shared', or a path to another libdvdcss such as '/usr/local' (default 'local-static')],
+ [ --with-dvdcss[=name] way to use libdvdcss, either 'yes' or 'no',
+ or 'local-static', 'local-shared', or a path to
+ another libdvdcss such as '/usr/local'
+ (default 'local-static')],
[ case "x${withval}" in
xlocal-static|xyes)
# local libdvdcss, statically linked
dnl Darwin module
dnl
AC_ARG_ENABLE(darwin,
- [ --enable-darwin Darwin sound support (default disabled)],
+ [ --enable-darwin Darwin sound support (default enabled on MacOS X)],
[if test x$enable_darwin = xyes; then
PLUGINS="${PLUGINS} darwin"
LIB_DARWIN="-framework CoreAudio"
dnl MacOS X module
dnl
AC_ARG_ENABLE(macosx,
- [ --enable-macosx Mac OS X interface support (default enabled in Mac OS X)],
+ [ --enable-macosx MacOS X support (default enabled on MacOS X)],
[if test x$enable_macosx = xyes
then
BUILTINS="${BUILTINS} macosx"
dnl QNX RTOS module
dnl
AC_ARG_ENABLE(qnx,
- [ --disable-qnx QNX RTOS support (default enabled in QNX RTOS)])
+ [ --disable-qnx QNX RTOS support (default enabled on QNX RTOS)])
if test x$enable_qnx != xno
then
AC_CHECK_HEADERS(Ph.h, [
dnl ALSA module
dnl
AC_ARG_ENABLE(alsa,
- [ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)],
+ [ --enable-alsa Alsa sound drivers support (Only for linux)
+ (default disabled)],
[if test x$enable_alsa = xyes
then
AC_CHECK_HEADER(sys/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
AC_SUBST(DEFINE)
AC_SUBST(INCLUDE)
AC_SUBST(DEBUG)
-AC_SUBST(STATS)
AC_SUBST(ASM)
AC_SUBST(TRACE)
AC_SUBST(CPROF)
AC_SUBST(GPROF)
AC_SUBST(OPTIMS)
+AC_SUBST(TUNING)
AC_SUBST(NEED_GETOPT)
AC_SUBST(MOC)
AC_SUBST(WINDRES)
AC_SUBST(LIB)
AC_SUBST(LIB_ALSA)
+AC_SUBST(LIB_ALTIVEC)
AC_SUBST(LIB_BEOS)
AC_SUBST(LIB_DARWIN)
AC_SUBST(LIB_DVD)
AC_SUBST(LIB_YUV)
AC_SUBST(CFLAGS_VLC)
+AC_SUBST(CFLAGS_ALTIVEC)
AC_SUBST(CFLAGS_DVD)
AC_SUBST(CFLAGS_LIBDVDCSS)
AC_SUBST(CFLAGS_GTK)
--------------------
system : ${SYS}
architecture : ${ARCH}
-optimizations : ${OPTIMS}"
+optimizations : ${OPTIMS}
+tuning: : ${TUNING}"
if test x${HAVE_VLC} = x1
then
-----------------
vlc version : ${VLC_VERSION}
debug mode : ${DEBUG}
-statistics : ${STATS}
trace mode : ${TRACE}
cprof/gprof support : ${CPROF}/${GPROF}
need builtin getopt : ${NEED_GETOPT}