x*mingw32*)
SYS=mingw32
AC_CHECK_TOOL(WINDRES, windres, :)
- LIB_MPEG_TS="${LIB_MPEG_TS} -lws2_32"
+ LIB_IPV4="${LIB_IPV4} -lws2_32"
LIB_RC="${LIB_RC} -lws2_32"
;;
x*nto*)
;;
xbeos)
SYS=beos
- LIB="${LIB} -lbe -lbind"
+ LIB_IPV4="${LIB_IPV4} -lbind"
LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
PLDFLAGS="${PLDFLAGS} -nostart"
;;
;;
esac
-dnl
-dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
-dnl
-dnl We give the user the opportunity to specify
-dnl --with-words=big or --with-words=little ; otherwise, try to guess
-dnl
-AC_ARG_WITH(words,
- [ --with-words=endianness Set endianness (big or little)])
- case "x$withval" in
- xbig)
- ac_cv_c_bigendian=yes
- ;;
- xlittle)
- ac_cv_c_bigendian=no
- ;;
- *)
- dnl Try to guess endianness by matching patterns on a compiled
- dnl binary, by looking for an ASCII or EBCDIC string
- AC_CACHE_CHECK([whether the byte order is big-endian],
- [ac_cv_c_bigendian],
- [ac_cv_c_bigendian=unknown
- [cat >conftest.c <<EOF
- short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
- short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
- void _a(void) { char*s = (char*)am; s = (char *)ai; }
- short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
- short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
- void _e(void) { char*s = (char*)em; s = (char*)ei; }
- int main(void) { _a(); _e(); return 0; }
-EOF
- ]
- if test -f conftest.c
- then
- if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
- && test -f conftest.o
- then
- if test `grep -l BIGenDianSyS conftest.o`
- then
- ac_cv_c_bigendian=yes
- fi
- if test `grep -l LiTTleEnDian conftest.o`
- then
- ac_cv_c_bigendian=no
- fi
- fi
- fi
- ])
- if test $ac_cv_c_bigendian = xunknown
- then
- AC_MSG_ERROR([Could not guess endianness, please use --with-words])
- fi
- ;;
- esac
-dnl Now we know what to use for endianness, just put it in the header
-if test $ac_cv_c_bigendian = yes
-then
- AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
-fi
-
dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty)
AC_CHECK_FUNC(connect,,[
- AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")
+ AC_CHECK_LIB(socket,connect,
+ LIB_IPV4="${LIB_IPV4} -lsocket"
+ LIB_VLC="${LIB_VLC} -lsocket"
+)])
+AC_CHECK_FUNC(gethostbyname,,[
+ AC_CHECK_LIB(nsl,gethostbyname,LIB_IPV4="${LIB_IPV4} -lnsl")
])
AC_CHECK_FUNC(gethostbyname,,[
- AC_CHECK_LIB(nsl,gethostbyname,LIB="${LIB} -lnsl")
+ AC_CHECK_LIB(bind,gethostbyname,LIB_IPV4="${LIB_IPV4} -lbind")
])
AC_CHECK_FUNC(nanosleep,,[
- AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[
- AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")
+ AC_CHECK_LIB(rt,nanosleep,LIB_VLC="${LIB_VLC} -lrt",[
+ AC_CHECK_LIB(posix4,nanosleep,LIB_VLC="${LIB_VLC} -lposix4")
])
])
AC_CHECK_FUNCS(usleep)
AC_CHECK_FUNC(inet_aton,,[
- AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")
+ AC_CHECK_LIB(resolv,inet_aton,LIB_VLC="${LIB_IPV4} -lresolv")
+])
+AC_CHECK_FUNC(textdomain,,[
+ AC_CHECK_LIB(intl,textdomain,LIB_VLC="${LIB_VLC} -lintl")
])
AC_CHECK_FUNCS(vasprintf)
AC_CHECK_FUNCS(swab)
AC_CHECK_FUNCS([memalign valloc])
AC_CHECK_FUNCS(sigrelse)
+AC_CHECK_FUNCS(getpwuid)
dnl Check for getopt
NEED_GETOPT=0
AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
[ # FreeBSD has a gnugetopt library for this:
AC_CHECK_LIB([gnugetopt],[getopt_long],
- [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB="${LIB} -lgnugetopt"],
+ [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB_VLC="${LIB_VLC} -lgnugetopt"],
[NEED_GETOPT=1])])
AC_TYPE_SIGNAL
-AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
+AC_CHECK_LIB(dl,dlopen,LIB_VLC="${LIB_VLC} -ldl")
AC_CHECK_LIB(m,cos,
LIB_IMDCT="${LIB_IMDCT} -lm"
LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm")
fi
dnl Check for Darwin plugin linking flags
-AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error],
+AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
[ac_cv_ld_darwin],
- [CFLAGS="${save_CFLAGS} -bundle -undefined error"
+ [CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
if test x"$ac_cv_ld_darwin" != x"no"; then
- PLDFLAGS="${PLDFLAGS} -bundle -undefined error"
+ PLDFLAGS="${PLDFLAGS} -bundle -undefined error -lcc_dynamic"
fi
dnl Check for standard plugin linking flags
dnl
dnl default modules
dnl
-BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
-PLUGINS="${PLUGINS} lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
+BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
+PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
dnl
dnl Accelerated modules
if test x"$ac_cv_ld_altivec" != x"no"; then
LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
- LIB="${LIB} -framework vecLib"
+ LIB_VLC="${LIB_VLC} -framework vecLib"
fi
fi # end if mingw32
fi
])
+AC_ARG_WITH(,[])
+AC_ARG_WITH(,[Optimization options:])
+
dnl
dnl Special arch tuning
dnl
AC_ARG_WITH(tuning,
-[ --with-tuning=[arch] Enable special tuning for an architecture
+[ --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
fi
fi
-dnl
-dnl Enable release-specific flags
-dnl
-AC_ARG_ENABLE(release,
-[ --enable-release Activate extra optimizations (default disabled)],
-[ if test x$enableval = xyes; then RELEASE=1; fi ],
-[ VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
- LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; ])
-
dnl
dnl x86 accelerations
dnl
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
fi
+dnl
+dnl Enable/disable optimizations
+dnl
+AC_ARG_ENABLE(optimizations,
+[ --disable-optimizations disable compiler optimizations (default enabled)],
+[ if test x$enableval = xno; then OPTIMS=0; fi ],
+[ OPTIMS=1 ])
+
dnl
dnl AltiVec acceleration
dnl
AC_ARG_ENABLE(altivec,
-[ --disable-altivec Disable altivec optimizations (default enabled on PPC)],
+[ --disable-altivec disable altivec optimizations (default enabled on PPC)],
[ if test x$enableval = xyes; then ARCH="${ARCH} altivec";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
[ if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
dnl
DEBUG=0
AC_ARG_ENABLE(debug,
-[ --enable-debug Enable debug mode (default disabled)],
+[ --enable-debug debug mode (default disabled)],
[ if test x$enableval = xyes; then DEBUG=1; fi ])
dnl
-dnl Profiling
-dnl
-GPROF=0
-AC_ARG_ENABLE(gprof,
-[ --enable-gprof Enable gprof profiling (default disabled)],
-[ if test x$enableval = xyes; then GPROF=1; fi ])
-
-CPROF=0
-AC_ARG_ENABLE(cprof,
-[ --enable-cprof Enable cprof profiling (default disabled)],
-[ if test x$enableval = xyes;
- then
- LIB="${LIB} -lcprof"
- CPROF=1
- fi
-])
-
-dnl
-dnl Enable/disable optimizations
-dnl
-AC_ARG_ENABLE(optimizations,
-[ --disable-optimizations Disable compiler optimizations (default enabled)],
-[ if test x$enableval = xno; then OPTIMS=0; fi ],
-[ OPTIMS=1 ])
-
-dnl
-dnl GNU portable threads
+dnl Enable release-specific flags
dnl
-AC_ARG_ENABLE(pth,
- [ --enable-pth Enable GNU Pth support (default disabled)],
- [ if test x$enableval = xyes; then
- AC_CHECK_LIB(pth,pth_init)
- AC_EGREP_HEADER(pth_init,pth.h,[
- AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
- Define if <pth.h> defines pth_init)
- THREAD_LIB="-lpth"
- fi])
-])
+AC_ARG_ENABLE(release,
+[ --enable-release activate extra optimizations (default disabled)],
+[ if test x$enableval = xyes; then RELEASE=1; fi ],
+[ VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
+ LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; ])
dnl
-dnl State Threads
+dnl Input plugins
dnl
-AC_ARG_ENABLE(st,
- [ --enable-st Enable State Threads (default disabled)],
- [ if test x$enableval = xyes; then
- AC_CHECK_LIB(st,st_init)
- AC_EGREP_HEADER(st_init,st.h,[
- AC_DEFINE(ST_INIT_IN_ST_H, 1,
- Define if <st.h> defines st_init)
- THREAD_LIB="-lst"
- fi])
-])
-LIB="${LIB} ${THREAD_LIB}"
+AC_ARG_WITH(,[Input plugins:])
dnl
dnl DVD module: check for installed libdvdcss or local libdvdcss
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] use libdvdcss, either 'yes', 'no', '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
;;
xno)
# don't use libdvdcss at all, build a DVD module that can dlopen() it
- BUILTINS="${BUILTINS} dvd"
+ PLUGINS="${PLUGINS} dvd"
DUMMY_LIBDVDCSS=1
SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
else
# XXX: no check for libdl is done, don't try this at home !
- BUILTINS="${BUILTINS} dvd"
+ PLUGINS="${PLUGINS} dvd"
DUMMY_LIBDVDCSS=1
SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
if test x${DUMMY_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
if test x${STATIC_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
AC_ARG_WITH(dvdread,
- [ --with-dvdread[=name] way to use libdvdread,
- same options as --with-dvdcss (default no)],
+ [ --with-dvdread[=name] use libdvdread, same options as dvdcss (default 'no')],
[ case "x${withval}" in
xlocal-static|xyes)
if test x${STATIC_LIBDVDREAD} = x1
if test x$enable_vcd != xno
then
AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
- BUILTINS="${BUILTINS} vcd"
+ PLUGINS="${PLUGINS} vcd"
])
-fi
-
-if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
-then
- BUILTINS="${BUILTINS} vcd"
-fi
-if test x$enable_vcd != xno -a "${SYS}" = "darwin"
-then
- BUILTINS="${BUILTINS} vcd"
- LIB_VCD="${LIB_VCD} -framework IOKit"
-fi
-
-dnl
-dnl dummy plugin
-dnl
-AC_ARG_ENABLE(dummy,
- [ --disable-dummy dummy module (default enabled)])
-
-if test x$enable_dummy != xno
-then
- PLUGINS="${PLUGINS} dummy"
-fi
-
-dnl
-dnl log plugin
-dnl
-AC_ARG_ENABLE(logger,
- [ --disable-logger file logger module (default enabled)])
+ if test "x${SYS}" = "xbsdi"
+ then
+ PLUGINS="${PLUGINS} vcd"
+ fi
-if test x$enable_logger != xno
-then
- PLUGINS="${PLUGINS} logger"
+ if test "x${SYS}" = "xdarwin"
+ then
+ PLUGINS="${PLUGINS} vcd"
+ LIB_VCD="${LIB_VCD} -framework IOKit -framework CoreFoundation"
+ fi
fi
dnl
-dnl null plugin
+dnl Satellite input module
dnl
-AC_ARG_ENABLE(null,
- [ --disable-null Null module (default enabled)])
-
-if test x$enable_null != xno
-then
- PLUGINS="${PLUGINS} null"
-fi
+AC_ARG_ENABLE(satellite,
+ [ --enable-satellite Satellite card support (default disabled)],
+ [ if test x$enable_satellite = xyes
+ then
+ BUILTINS="${BUILTINS} satellite"
+ AC_DEFINE(HAVE_SATELLITE, 1, define if compiling with satellite card support)
+ fi])
dnl
dnl ipv6 plugin
dnl
-AC_EGREP_HEADER(in6_addr,netinet/in.h,[
- PLUGINS="${PLUGINS} ipv6"])
+AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"])
dnl
-dnl rc plugin
+dnl Codec plugins
dnl
-AC_ARG_ENABLE(rc,
- [ --disable-rc Remote Control module (default enabled)])
-if test x$enable_rc != xno
-then
- PLUGINS="${PLUGINS} rc"
-fi
+AC_ARG_WITH(,[Codec plugins:])
dnl
dnl mad plugin
dnl
-AC_ARG_WITH(mad,
- [ --with-mad[=PATH] libmad module (default disabled)],
- [ if test "x$with_val" != "xno"; then
- if test -n $with_val; then
+AC_ARG_ENABLE(mad,
+ [ --enable-mad libmad module (default disabled)])
+if test x$enable_mad = xyes
+then
+ PLUGINS="${PLUGINS} mad"
+ LIB_MAD="${LIB_MAD} -lmad"
+ AC_ARG_WITH(mad,
+ [ --with-mad=PATH path to libmad],
+ [ if test "x$with_val" != "xno" -a "x$with_val" != "x"
+ then
CFLAGS_MAD="${CFLAGS_MAD} -I$with_val/include"
- LIB_MAD="${LIB_MAD} -L$with_val/lib -lmad"
- else
- LIB_MAD="${LIB_MAD} -lmad"
- fi
- save_CFLAGS=$CFLAGS
- save_LDFLAGS=$LDFLAGS
- CFLAGS="$CFLAGS $CFLAGS_MAD"
- LDFLAGS="$LDFLAGS $LIB_MAD"
- AC_CHECK_HEADERS(mad.h, ,
- [ echo "Cannot find development headers for libmad..."
- exit 1
- ])
- AC_CHECK_LIB(mad, mad_bit_init, ,
- [ echo "Cannot find libmad library..."
- exit 1
- ])
- CFLAGS=$save_CFLAGS
- LDFLAGS=$save_LDFLAGS
- PLUGINS="${PLUGINS} mad"
- fi ])
+ LIB_MAD="${LIB_MAD} -L$with_val/lib"
+ fi ])
+ save_CFLAGS=$CFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CFLAGS="$CFLAGS $CFLAGS_MAD"
+ LDFLAGS="$LDFLAGS $LIB_MAD"
+ AC_CHECK_HEADERS(mad.h, ,
+ [ echo "Cannot find development headers for libmad..."
+ exit 1
+ ])
+ AC_CHECK_LIB(mad, mad_bit_init, ,
+ [ echo "Cannot find libmad library..."
+ exit 1
+ ])
+ CFLAGS=$save_CFLAGS
+ LDFLAGS=$save_LDFLAGS
+fi
dnl special case for BeOS
if test x$SYS = xbeos
dnl default case
else
-dnl
-dnl OSS /dev/dsp module
-dnl (enabled by default except on win32)
-dnl
-AC_ARG_ENABLE(dsp,
- [ --disable-dsp Linux /dev/dsp support (default enabled)])
-
-if test x$enable_dsp != xno &&
- (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
-then
- AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
- PLUGINS="${PLUGINS} dsp"
- AC_CHECK_LIB(ossaudio,main,LIB_DSP="${LIB_DSP} -lossaudio")
- ])
-fi
-
-dnl
-dnl Esound module
-dnl
-AC_ARG_ENABLE(esd,
- [ --enable-esd Esound library support (default disabled)],
- [if test x$enable_esd = xyes
- then
- AC_PATH_PROG(ESD_CONFIG, esd-config, no)
- if test x${ESD_CONFIG} != xno
- then
- PLUGINS="${PLUGINS} esd"
- CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
- LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
- fi
- fi])
-
-dnl
-dnl aRts module
-dnl
-AC_ARG_ENABLE(arts,
- [ --enable-arts aRts sound server (default disabled)],
- [if test x$enable_arts = xyes
- then
- AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
- if test x${ARTS_CONFIG} != xno
- then
- PLUGINS="${PLUGINS} arts"
- CFLAGS_ARTS="${CFLAGS_ARTS} `${ARTS_CONFIG} --cflags`"
- LIB_ARTS="${LIB_ARTS} `${ARTS_CONFIG} --libs `"
- fi
- fi])
-
-dnl
-dnl MacOS X module
-dnl
-AC_ARG_ENABLE(macosx,
- [ --enable-macosx MacOS X support (default enabled on MacOS X)],
- [if test x$enable_macosx = xyes
- then
- BUILTINS="${BUILTINS} macosx"
- LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
- CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
- LIB="${LIB} -ObjC"
- fi],
- [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
- BUILTINS="${BUILTINS} macosx"
- LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
- CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
- LIB="${LIB} -ObjC"
- )])
-
-dnl
-dnl QNX RTOS module
-dnl
-AC_ARG_ENABLE(qnx,
- [ --disable-qnx QNX RTOS support (default enabled on QNX RTOS)])
- if test x$enable_qnx != xno
- then
- AC_CHECK_HEADERS(Ph.h, [
- PLUGINS="${PLUGINS} qnx"
- LIB_QNX="${LIB_QNX} -lasound -lph"
- ])
- fi
-
dnl
dnl a52 AC3 decoder plugin
dnl
fi
dnl
-dnl Linux framebuffer module
+dnl Video plugins
dnl
-AC_ARG_ENABLE(fb,
- [ --enable-fb Linux framebuffer support (default disabled)],
- [ if test x$enable_fb = xyes
- then
- PLUGINS="${PLUGINS} fb"
- fi ])
-dnl
-dnl Linux MGA module
-dnl
-AC_ARG_ENABLE(mga,
- [ --enable-mga Linux kernel Matrox support (default disabled)],
- [ if test x$enable_mga = xyes
- then
- PLUGINS="${PLUGINS} mga xmga"
- fi ])
+AC_ARG_WITH(,[Video plugins:])
dnl
-dnl GGI module
+dnl X11 module
+dnl (enabled by default except on win32)
dnl
-AC_ARG_WITH(ggi,
- [ --with-ggi[=name] GGI support (default disabled)],
- [ if test "x$withval" != "xno"
- then
- PLUGINS="${PLUGINS} ggi"
- if test "x$withval" != "xyes"
- then
- LIB_GGI="${LIB_GGI} -l$withval"
- else
- LIB_GGI="${LIB_GGI} -lggi"
- fi
- fi ])
+AC_ARG_ENABLE(x11,
+ [ --disable-x11 X11 support (default enabled)])
+if test x$enable_x11 != xno &&
+ (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
+ if test x$x_includes = xNONE; then
+ x_includes=/usr/X11R6/include
+ fi
+ if test x$x_libraries = xNONE; then
+ x_libraries=/usr/X11R6/lib
+ fi
+ saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$x_includes"
+ AC_CHECK_HEADERS(X11/Xlib.h, [
+ PLUGINS="${PLUGINS} x11"
+ LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
+ CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
+ ])
+ CPPFLAGS=$saved_CPPFLAGS
+fi
+
+dnl
+dnl XVideo module
+dnl (enabled by default except on win32)
+dnl
+AC_ARG_ENABLE(xvideo,
+ [ --disable-xvideo XVideo support (default enabled)])
+if test x$enable_xvideo != xno &&
+ (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
+ if test x$x_includes = xNONE; then
+ x_includes=/usr/X11R6/include
+ fi
+ if test x$x_libraries = xNONE; then
+ x_libraries=/usr/X11R6/lib
+ fi
+ saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$x_includes"
+ AC_CHECK_HEADERS(X11/extensions/Xv.h, [
+ saved_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
+ AC_CHECK_LIB(Xv_pic,XvSetPortAttribute,
+ # We have Xv_pic, that's good, we can build an xvideo.so plugin !
+ PLUGINS="${PLUGINS} xvideo"
+ LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv_pic"
+ CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes",
+ # We don't have Xv_pic, let's make xvideo.a as builtin
+ BUILTINS="${BUILTINS} xvideo"
+ LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
+ CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes")
+ CFLAGS=$saved_CFLAGS
+ ]
+ CPPFLAGS=$saved_CPPFLAGS)
+fi
dnl
dnl SDL module
then
SDL_PATH=$PATH
AC_ARG_WITH(sdl-config-path,
- [ --with-sdl-config-path=path sdl-config path (default search in \$PATH)],
+ [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
[ if test "x$withval" != "xno"
then
SDL_PATH=$withval:$PATH
dnl Windows DirectX module
dnl
AC_ARG_ENABLE(directx,
- [ --disable-directx Win32 DirectX support (default enabled on Win32)])
+ [ --enable-directx Win32 DirectX support (default enabled on Win32)])
if test "x$enableval" != "xno"
then
if test x$SYS = xmingw32
then
- AC_ARG_WITH(directx-path,
- [ --with-directx-path=path Win32 DirectX headers and libraries])
- if test "x$with_directx_path" = "x"
+ AC_ARG_WITH(directx,
+ [ --with-directx=PATH Win32 DirectX headers and libraries])
+ if test "x$with_directx" = "x"
then
AC_CHECK_HEADERS(ddraw.h,
[ PLUGINS="${PLUGINS} directx"
fi
dnl
-dnl win32 waveOut plugin
+dnl Linux framebuffer module
dnl
-AC_ARG_ENABLE(waveout,
- [ --disable-waveout Win32 waveOut module (default enabled on Win32)])
-if test "x$enableval" != "xno" -a x$SYS = xmingw32
- then
- PLUGINS="${PLUGINS} waveout"
- LIB_WAVEOUT="-lwinmm"
-fi
+AC_ARG_ENABLE(fb,
+ [ --enable-fb Linux framebuffer support (default enabled on Linux)])
+ if test x$enable_fb != xno
+ then
+ AC_CHECK_HEADERS(linux/fb.h, [
+ PLUGINS="${PLUGINS} fb"
+ ])
+ fi
dnl
-dnl Windows MFC interface module
+dnl Linux MGA module
dnl
-AC_ARG_ENABLE(win32,
- [ --enable-win32 Win32 interface support (default disabled)],
- [ if test "x$enableval" != "xno"
+AC_ARG_ENABLE(mga,
+ [ --enable-mga Linux kernel Matrox support (default disabled)],
+ [ if test x$enable_mga = xyes
then
- PLUGINS="${PLUGINS} win32"
+ PLUGINS="${PLUGINS} mga xmga"
fi ])
+dnl
+dnl GGI module
+dnl
+AC_ARG_ENABLE(ggi,
+ [ --enable-ggi GGI support (default disabled)])
+if test x$enable_ggi = xyes
+then
+ PLUGINS="${PLUGINS} ggi"
+ LIB_GGI="${LIB_GGI} -lggi"
+ AC_ARG_WITH(ggi,
+ [ --with-ggi=PATH path to libggi],
+ [ if test "x$with_val" != "xno" -a "x$with_val" != "x"
+ then
+ CFLAGS_GGI="${CFLAGS_GGI} -I$with_val/include"
+ LIB_GGI="${LIB_GGI} -L$with_val/lib"
+ fi ])
+fi
+
dnl
dnl Glide module
dnl
-AC_ARG_WITH(glide,
- [ --with-glide[=name] Glide (3dfx) support (default disabled)],
- [ if test "x$withval" != "xno"
- then
- PLUGINS="${PLUGINS} glide"
- if test "x$withval" != "xyes"
+AC_ARG_ENABLE(glide,
+ [ --enable-glide Glide (3dfx) support (default disabled)])
+if test x$enable_glide = xyes
+then
+ PLUGINS="${PLUGINS} glide"
+ LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
+ CFLAGS_GLIDE="${CFLAGS_GLIDE} -I/usr/include/glide"
+ AC_ARG_WITH(glide,
+ [ --with-glide=PATH path to libglide],
+ [ if test "x$with_val" != "xno" -a "x$with_val" != "x"
then
- LIB_GLIDE="${LIB_GLIDE} -l$withval -lm"
- else
- LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
- fi
- CFLAGS_GLIDE="${CFLAGS_GLIDE} -I/usr/include/glide"
- fi ])
+ CFLAGS_GLIDE="${CFLAGS_GLIDE} -I$with_val/include"
+ LIB_GLIDE="${LIB_GLIDE} -L$with_val/lib"
+ fi ])
+fi
dnl
-dnl ncurses module
+dnl AA plugin
dnl
-AC_ARG_ENABLE(ncurses,
- [ --enable-ncurses ncurses interface support (default disabled)],
- [if test x$enable_ncurses = xyes; then
- PLUGINS="${PLUGINS} ncurses"
- LIB_NCURSES="${LIB_NCURSES} -lncurses"
+AC_ARG_ENABLE(aa,
+ [ --enable-aa aalib output (default disabled)])
+if test x$enable_aa = xyes
+then
+ AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
+ if test x$have_aa = xtrue
+ then
+ PLUGINS="${PLUGINS} aa"
+ LIB_AA="${LIB_AA} -laa"
+ fi
+fi
+
+dnl
+dnl Audio plugins
+dnl
+
+AC_ARG_WITH(,[Audio plugins:])
+
+dnl
+dnl OSS /dev/dsp module (enabled by default except on win32)
+dnl
+AC_ARG_ENABLE(dsp,
+ [ --enable-dsp Linux /dev/dsp support (enabled on Linux)])
+
+if test x$enable_dsp != xno &&
+ (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
+then
+ AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
+ PLUGINS="${PLUGINS} dsp"
+ AC_CHECK_LIB(ossaudio,main,LIB_DSP="${LIB_DSP} -lossaudio")
+ ])
+fi
+
+dnl
+dnl Esound module
+dnl
+AC_ARG_ENABLE(esd,
+ [ --enable-esd Esound library support (default disabled)],
+ [if test x$enable_esd = xyes
+ then
+ AC_PATH_PROG(ESD_CONFIG, esd-config, no)
+ if test x${ESD_CONFIG} != xno
+ then
+ PLUGINS="${PLUGINS} esd"
+ CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
+ LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
+ fi
fi])
dnl
-dnl Qt module
+dnl aRts module
dnl
-AC_ARG_ENABLE(qt,
- [ --enable-qt Qt interface support (default disabled)],
- [if test x$enable_qt = xyes; then
- PLUGINS="${PLUGINS} qt"
- ALIASES="${ALIASES} qvlc"
- LIB_QT="${LIB_QT} -lqt -L${QTDIR}/lib"
- CFLAGS_QT="${CFLAGS_QT} -I/usr/include/qt -I${QTDIR}/include"
- if test -x ${QTDIR}/bin/moc
+AC_ARG_ENABLE(arts,
+ [ --enable-arts aRts sound server (default disabled)],
+ [if test x$enable_arts = xyes
+ then
+ AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
+ if test x${ARTS_CONFIG} != xno
then
- MOC=${QTDIR}/bin/moc
- else
- MOC=moc
+ PLUGINS="${PLUGINS} arts"
+ CFLAGS_ARTS="${CFLAGS_ARTS} `${ARTS_CONFIG} --cflags`"
+ LIB_ARTS="${LIB_ARTS} `${ARTS_CONFIG} --libs `"
fi
fi])
-dnl
-dnl KDE module
dnl
-AC_ARG_ENABLE(kde,
- [ --enable-kde KDE interface support (default disabled)],
- [if test x$enable_kde = xyes; then
- PLUGINS="${PLUGINS} kde"
- ALIASES="${ALIASES} kvlc"
- LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
- CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
- CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
- if test -x ${QTDIR}/bin/moc
+dnl ALSA module
+dnl
+AC_ARG_ENABLE(alsa,
+ [ --enable-alsa ALSA sound support for Linux (default disabled)],
+ [if test x$enable_alsa = xyes
+ then
+ AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
+ if test x$have_alsa = xtrue
then
- MOC=${QTDIR}/bin/moc
- else
- MOC=moc
+ PLUGINS="${PLUGINS} alsa"
+ LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
fi
fi])
dnl
-dnl Gnome module
+dnl win32 waveOut plugin
+dnl
+AC_ARG_ENABLE(waveout,
+ [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
+if test "x$enableval" != "xno" -a x$SYS = xmingw32
+ then
+ PLUGINS="${PLUGINS} waveout"
+ LIB_WAVEOUT="-lwinmm"
+fi
+
+dnl
+dnl Interface plugins
dnl
-AC_ARG_ENABLE(gnome,
- [ --enable-gnome Gnome interface support (default disabled)],
- [if test x$enable_gnome = xyes; then
- # look for gnome-config
- AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
- if test -x ${GNOME_CONFIG}
- then
- CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
- LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
- fi
- # now look for the gnome.h header
- saved_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
- AC_CHECK_HEADERS(gnome.h, [
- PLUGINS="${PLUGINS} gnome"
- ALIASES="${ALIASES} gnome-vlc"
- ],[
- AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
-developement librairie or remove the --enable-gnome option])
- ])
-
- CPPFLAGS=$saved_CPPFLAGS
- fi])
+
+AC_ARG_WITH(,[Interface plugins:])
dnl
dnl Gtk+ module
then
GTK_PATH=$PATH
AC_ARG_WITH(gtk-config-path,
- [ --with-gtk-config-path=path gtk-config path (default search in \$PATH)],
+ [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
[ if test "x$withval" != "xno"
then
GTK_PATH=$withval:$PATH
fi
dnl
-dnl X11 module
-dnl (enabled by default except on win32)
+dnl Gnome module
dnl
-AC_ARG_ENABLE(x11,
- [ --disable-x11 X11 support (default enabled)])
-if test x$enable_x11 != xno &&
- (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
- if test x$x_includes = xNONE; then
- x_includes=/usr/X11R6/include
- fi
- if test x$x_libraries = xNONE; then
- x_libraries=/usr/X11R6/lib
- fi
- saved_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$x_includes"
- AC_CHECK_HEADERS(X11/Xlib.h, [
- PLUGINS="${PLUGINS} x11"
- LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
- CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
- ])
- CPPFLAGS=$saved_CPPFLAGS
-fi
+AC_ARG_ENABLE(gnome,
+ [ --enable-gnome Gnome interface support (default disabled)],
+ [if test x$enable_gnome = xyes; then
+ # look for gnome-config
+ AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
+ if test -x ${GNOME_CONFIG}
+ then
+ CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
+ LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
+ fi
+ # now look for the gnome.h header
+ saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
+ AC_CHECK_HEADERS(gnome.h, [
+ PLUGINS="${PLUGINS} gnome"
+ ALIASES="${ALIASES} gnome-vlc"
+ ],[
+ AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
+developement librairie or remove the --enable-gnome option])
+ ])
+
+ CPPFLAGS=$saved_CPPFLAGS
+ fi])
dnl
-dnl XVideo module
-dnl (enabled by default except on win32)
+dnl Qt module
dnl
-AC_ARG_ENABLE(xvideo,
- [ --disable-xvideo XVideo support (default enabled)])
-if test x$enable_xvideo != xno &&
- (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
- if test x$x_includes = xNONE; then
- x_includes=/usr/X11R6/include
- fi
- if test x$x_libraries = xNONE; then
- x_libraries=/usr/X11R6/lib
- fi
- saved_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$x_includes"
- AC_CHECK_HEADERS(X11/extensions/Xv.h, [
- saved_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
- AC_CHECK_LIB(Xv_pic,XvSetPortAttribute,
- # We have Xv_pic, that's good, we can build an xvideo.so plugin !
- PLUGINS="${PLUGINS} xvideo"
- LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv_pic"
- CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes",
- # We don't have Xv_pic, let's make xvideo.a as builtin
- BUILTINS="${BUILTINS} xvideo"
- LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
- CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes")
- CFLAGS=$saved_CFLAGS
- ]
- CPPFLAGS=$saved_CPPFLAGS)
-fi
+AC_ARG_ENABLE(qt,
+ [ --enable-qt Qt interface support (default disabled)],
+ [if test x$enable_qt = xyes; then
+ PLUGINS="${PLUGINS} qt"
+ ALIASES="${ALIASES} qvlc"
+ LIB_QT="${LIB_QT} -lqt -L${QTDIR}/lib"
+ CFLAGS_QT="${CFLAGS_QT} -I/usr/include/qt -I${QTDIR}/include"
+ if test -x ${QTDIR}/bin/moc
+ then
+ MOC=${QTDIR}/bin/moc
+ else
+ MOC=moc
+ fi
+ fi])
+
+dnl
+dnl KDE module
+dnl
+AC_ARG_ENABLE(kde,
+ [ --enable-kde KDE interface support (default disabled)],
+ [if test x$enable_kde = xyes; then
+ PLUGINS="${PLUGINS} kde"
+ ALIASES="${ALIASES} kvlc"
+ LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
+ CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
+ CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
+ if test -x ${QTDIR}/bin/moc
+ then
+ MOC=${QTDIR}/bin/moc
+ else
+ MOC=moc
+ fi
+ fi])
+
+dnl
+dnl MacOS X module
+dnl
+AC_ARG_ENABLE(macosx,
+ [ --enable-macosx MacOS X support (default enabled on MacOS X)],
+ [if test x$enable_macosx = xyes
+ then
+ BUILTINS="${BUILTINS} macosx"
+ LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
+ CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
+ LIB_COMMON="${LIB_COMMON} -ObjC"
+ fi],
+ [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
+ BUILTINS="${BUILTINS} macosx"
+ LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
+ CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
+ LIB_COMMON="${LIB_COMMON} -ObjC"
+ )])
+
+dnl
+dnl QNX RTOS module
+dnl
+AC_ARG_ENABLE(qnx,
+ [ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
+ if test x$enable_qnx != xno
+ then
+ AC_CHECK_HEADERS(Ph.h, [
+ PLUGINS="${PLUGINS} qnx"
+ LIB_QNX="${LIB_QNX} -lasound -lph"
+ ])
+ fi
+
+dnl
+dnl Windows MFC interface module
+dnl
+AC_ARG_ENABLE(win32,
+ [ --enable-win32 Win32 interface support (default disabled)],
+ [ if test "x$enableval" != "xno"
+ then
+ PLUGINS="${PLUGINS} win32"
+ fi ])
+
+dnl
+dnl ncurses module
+dnl
+AC_ARG_ENABLE(ncurses,
+ [ --enable-ncurses ncurses interface support (default disabled)],
+ [if test x$enable_ncurses = xyes; then
+ PLUGINS="${PLUGINS} ncurses"
+ LIB_NCURSES="${LIB_NCURSES} -lncurses"
+ fi])
dnl
dnl Lirc plugin
fi
fi
-dnl
-dnl ALSA module
-dnl
-AC_ARG_ENABLE(alsa,
- [ --enable-alsa Alsa sound drivers support (Only for linux)
- (default disabled)],
- [if test x$enable_alsa = xyes
- then
- AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
- if test x$have_alsa = xtrue
- then
- PLUGINS="${PLUGINS} alsa"
- LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
- fi
- fi])
-
dnl end of non-BeOS stuff
fi
+AC_ARG_WITH(,[Misc options:])
+
dnl
-dnl Plug-ins - this must be AT THE END
+dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
dnl
-AC_ARG_ENABLE(plugins,
- [ --disable-plugins Make all plug-ins built-in (default plug-ins enabled)],
- [if test x$enable_plugins = xno
- then
- BUILTINS="${BUILTINS} ${PLUGINS}"
- PLUGINS=
- fi])
+dnl We give the user the opportunity to specify
+dnl --with-words=big or --with-words=little ; otherwise, try to guess
+dnl
+AC_ARG_WITH(words,
+ [ --with-words=endianness set endianness (big or little)])
+ case "x$withval" in
+ xbig)
+ ac_cv_c_bigendian=yes
+ ;;
+ xlittle)
+ ac_cv_c_bigendian=no
+ ;;
+ *)
+ dnl Try to guess endianness by matching patterns on a compiled
+ dnl binary, by looking for an ASCII or EBCDIC string
+ AC_CACHE_CHECK([whether the byte order is big-endian],
+ [ac_cv_c_bigendian],
+ [ac_cv_c_bigendian=unknown
+ [cat >conftest.c <<EOF
+ short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
+ short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
+ void _a(void) { char*s = (char*)am; s = (char *)ai; }
+ short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
+ short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
+ void _e(void) { char*s = (char*)em; s = (char*)ei; }
+ int main(void) { _a(); _e(); return 0; }
+EOF
+ ]
+ if test -f conftest.c
+ then
+ if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
+ && test -f conftest.o
+ then
+ if test "`strings conftest.o | grep BIGenDianSyS`"
+ then
+ ac_cv_c_bigendian=yes
+ fi
+ if test "`strings conftest.o | grep LiTTleEnDian`"
+ then
+ ac_cv_c_bigendian=no
+ fi
+ fi
+ fi
+ ])
+ if test x$ac_cv_c_bigendian = xunknown
+ then
+ AC_MSG_ERROR([Could not guess endianness, please use --with-words])
+ fi
+ ;;
+ esac
+dnl Now we know what to use for endianness, just put it in the header
+if test $ac_cv_c_bigendian = yes
+then
+ AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
+fi
dnl
dnl DLLs - used for Win32 package build
dnl
DLL_PATH=.
AC_ARG_WITH(dll-path,
- [ --with-dll-path=path Path to Win32 DLLs (default search in \$PWD)],
+ [ --with-dll-path=PATH path to Win32 DLLs (default search in \$PWD)],
[ if test "x$withval" != "xno"
then
DLL_PATH=$withval
fi ])
+dnl
+dnl Profiling
+dnl
+GPROF=0
+AC_ARG_ENABLE(gprof,
+[ --enable-gprof gprof profiling (default disabled)],
+[ if test x$enableval = xyes; then GPROF=1; fi ])
+
+CPROF=0
+AC_ARG_ENABLE(cprof,
+[ --enable-cprof cprof profiling (default disabled)],
+[ if test x$enableval = xyes;
+ then
+ LIB_COMMON="${LIB_COMMON} -lcprof"
+ CPROF=1
+ fi
+])
+
+dnl
+dnl GNU portable threads
+dnl
+AC_ARG_ENABLE(pth,
+ [ --enable-pth GNU Pth support (default disabled)],
+ [ if test x$enableval = xyes; then
+ AC_CHECK_LIB(pth,pth_init)
+ AC_EGREP_HEADER(pth_init,pth.h,[
+ AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
+ Define if <pth.h> defines pth_init)
+ THREAD_LIB="-lpth"
+ fi])
+])
+
+dnl
+dnl State Threads
+dnl
+AC_ARG_ENABLE(st,
+ [ --enable-st State Threads (default disabled)],
+ [ if test x$enableval = xyes; then
+ AC_CHECK_LIB(st,st_init)
+ AC_EGREP_HEADER(st_init,st.h,[
+ AC_DEFINE(ST_INIT_IN_ST_H, 1,
+ Define if <st.h> defines st_init)
+ THREAD_LIB="-lst"
+ fi])
+])
+
+LIB_COMMON="${LIB_COMMON} ${THREAD_LIB}"
+
+dnl
+dnl Plug-ins - this must be AT THE END
+dnl
+AC_ARG_ENABLE(plugins,
+ [ --disable-plugins make all plug-ins built-in (default plug-ins enabled)],
+ [if test x$enable_plugins = xno
+ then
+ BUILTINS="${BUILTINS} ${PLUGINS}"
+ PLUGINS=
+ fi])
+
+dnl Automagically disable plug-ins if there is no system support for .so files
+if test x$ac_cv_header_dlfcn_h = xno -a x$ac_cv_header_image_h = xno
+then
+ echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
+ echo "as built-in"
+ BUILTINS="${BUILTINS} ${PLUGINS}"
+ PLUGINS=
+fi
+
dnl
dnl Stuff used by the program
dnl
AC_SUBST(PLDFLAGS)
AC_SUBST(SOFLAGS)
-AC_SUBST(LIB)
+AC_SUBST(LIB_COMMON)
+AC_SUBST(LIB_VLC)
+
+AC_SUBST(LIB_A52)
+AC_SUBST(LIB_AA)
AC_SUBST(LIB_ALSA)
AC_SUBST(LIB_ARTS)
AC_SUBST(LIB_BEOS)
AC_SUBST(LIB_IMDCT)
AC_SUBST(LIB_IMDCT3DN)
AC_SUBST(LIB_IMDCTSSE)
+AC_SUBST(LIB_IPV4)
+AC_SUBST(LIB_IPV6)
AC_SUBST(LIB_KDE)
-AC_SUBST(LIB_A52)
AC_SUBST(LIB_LIBDVDCSS)
AC_SUBST(LIB_LIBDVDREAD)
AC_SUBST(LIB_LIRC)
AC_SUBST(LIB_X11)
AC_SUBST(LIB_XVIDEO)
+AC_SUBST(CFLAGS_COMMON)
AC_SUBST(CFLAGS_VLC)
+
AC_SUBST(CFLAGS_ARTS)
AC_SUBST(CFLAGS_DVD)
AC_SUBST(CFLAGS_DVDREAD)
"
if test x${HAVE_VLC} = x1
then
- echo "To build vlc and its plugins, type \`make vlc plugins'."
+ echo "To build vlc and its plugins, type \`make'."
fi
-if test x${HAVE_LIBDVDCSS} = x1
+if test x${NEED_LIBDVDCSS} = x1
then
echo "To build libdvdcss only, type \`make libdvdcss'."
fi