Newer
Older
test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no"); then
VLC_ADD_CPPFLAGS([skins2],[`${FREETYPE_CONFIG} --cflags`])
VLC_ADD_LDFLAGS([skins2],[`${FREETYPE_CONFIG} --libs`])
else
skins2_missing_lib="yes"
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([Could not find freetype (required for skins2)])
fi
fi
if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"); then
VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
VLC_ADD_LDFLAGS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -I${x_includes} -DX11_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
VLC_ADD_LDFLAGS([skins2],[-L${x_libraries} -lXext -lX11])
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
dnl dnl
dnl dnl Gtk+ module
dnl dnl
dnl AC_ARG_ENABLE(gtk,
dnl [ --enable-gtk Gtk+ support (default enabled)])
dnl if test "${enable_gtk}" != "no"
dnl then
dnl GTK_PATH="${PATH}"
dnl AC_ARG_WITH(gtk-config-path,
dnl [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
dnl [ if test "${with_gtk_config_path}" != "no"
dnl then
dnl GTK_PATH="${with_gtk_config_path}:${PATH}"
dnl fi ])
dnl # look for gtk-config
dnl AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
dnl GTK_CONFIG=${GTK12_CONFIG}
dnl if test "${GTK_CONFIG}" = "no"
dnl then
dnl AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
dnl fi
dnl if test "${GTK_CONFIG}" != "no"
dnl then
dnl if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
dnl then
dnl AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
dnl fi
dnl if test "${SYS}" != "mingw32"; then
dnl VLC_ADD_CFLAGS([gtk],[`${GTK_CONFIG} --cflags gtk gthread`])
dnl VLC_ADD_LDFLAGS([gtk],[`${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`])
dnl VLC_ADD_CFLAGS([gtk],[`${GTK_CONFIG} --cflags gtk`])
dnl VLC_ADD_LDFLAGS([gtk],[`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`])
dnl fi
dnl # now look for the gtk.h header
dnl CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
dnl ac_cv_gtk_headers=yes
dnl AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
dnl ac_cv_gtk_headers=no
dnl echo "Cannot find gtk development headers."
dnl ])
dnl if test "${ac_cv_gtk_headers}" = "yes"
dnl then
dnl if test "${SYS}" != "mingw32"; then
dnl NEED_GTK_MAIN=yes
dnl fi
dnl ALIASES="${ALIASES} gvlc"
dnl fi
dnl CPPFLAGS="${CPPFLAGS_save}"
dnl fi
dnl fi
dnl
dnl
dnl Gtk+2 module ! Disabled for now as it is unusable and confuses users
dnl
dnl AC_ARG_ENABLE(gtk2,
dnl [ --enable-gtk2 Gtk2 support (default disabled)])
dnl if test "${enable_gtk2}" = "yes"
dnl then
dnl PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
dnl VLC_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
dnl VLC_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
dnl VLC_ADD_PLUGINS([gtk2])
dnl if test "${SYS}" != "mingw32"; then
dnl NEED_GTK2_MAIN=yes
dnl fi
dnl fi

Jean-Paul Saman
committed
dnl
dnl PDA Gtk+2 module
dnl

Jean-Paul Saman
committed
AC_ARG_ENABLE(pda,

Jean-Paul Saman
committed
[ --enable-pda PDA interface needs Gtk2 support (default disabled)])

Jean-Paul Saman
committed
then
PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
VLC_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
VLC_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
VLC_ADD_CFLAGS([pda],[${GTK2_CFLAGS} ${CFLAGS_pda}])
VLC_ADD_LDFLAGS([pda],[${GTK2_LIBS} ${LDFLAGS_pda}])
VLC_ADD_PLUGINS([pda])

Jean-Paul Saman
committed
if test "${SYS}" != "mingw32"; then
NEED_GTK2_MAIN=yes
fi
fi

Jean-Paul Saman
committed
dnl dnl
dnl dnl Gnome module
dnl dnl
dnl AC_ARG_ENABLE(gnome,
dnl [ --enable-gnome Gnome interface support (default disabled)],
dnl [if test "${enable_gnome}" = "yes"; then
dnl # look for gnome-config
dnl AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
dnl if test -x ${GNOME_CONFIG}
dnl then
dnl VLC_ADD_CFLAGS([gnome],[`${GNOME_CONFIG} --cflags gtk gnomeui`])
dnl VLC_ADD_LDFLAGS([gnome],[`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`])
dnl fi
dnl # now look for the gnome.h header
dnl CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
dnl AC_CHECK_HEADERS(gnome.h, [
dnl NEED_GTK_MAIN=yes
dnl NEED_GNOME_MAIN=yes
dnl ALIASES="${ALIASES} gnome-vlc"
dnl dnl We need this because of some moronic gnomesupport.h flavours
dnl AC_MSG_CHECKING(for strndup in gnome.h)
dnl AC_EGREP_HEADER(strndup,gnome.h,[
dnl AC_MSG_RESULT(yes)
dnl AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
dnl Define if <gnome.h> defines strndup.)],[
dnl AC_MSG_RESULT(no)])
dnl ],[
dnl AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
dnl developement tools or remove the --enable-gnome option])
dnl ])
dnl CPPFLAGS="${CPPFLAGS_save}"
dnl fi])
dnl
dnl Gnome2 module ! Disabled for know as it is unuseable and confuses users
dnl
dnl AC_ARG_ENABLE(gnome2,
dnl [ --enable-gnome2 Gnome2 support (default disabled)])
dnl if test "${enable_gnome2}" = "yes"
dnl then
dnl PKG_CHECK_MODULES(GNOME2, [libgnomeui-2.0])
dnl VLC_ADD_CFLAGS([gnome2],[${GNOME2_CFLAGS}])
dnl VLC_ADD_LDFLAGS([gnome2],[${GNOME2_LIBS}])
dnl VLC_ADD_PLUGINS([gnome2])
dnl if test "${SYS}" != "mingw32"; then
dnl NEED_GNOME2_MAIN=yes
dnl fi
dnl fi
dnl wxWidgets module
AC_ARG_ENABLE(wxwidgets,
[ --enable-wxwidgets wxWidgets support (default enabled)])
if test "${enable_wxwindows}"
AC_MSG_WARN(--{en|dis}able-wxwindows is deprecated. Use --{en|dis}able-wxwidgets instead.)
fi
if test "${enable_wxwindows}" = "no"
then
enable_wxwidgets="no"
fi
if test "${enable_wxwidgets}" != "no"
then
WXWIDGETS_PATH="${PATH}"
AC_ARG_WITH(wx-config-path,
[ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
WXWIDGETS_PATH="${with_wx_config_path}:${PATH}"
WXWIDGETS_NAME="wx-config"
Samuel Hocevar
committed
AC_ARG_WITH(wx-config,
[ --with-wx-config=NAME wx-config name (default is wx-config)],
[ if test "${with_wx_config}" != "no"
then
WXWIDGETS_NAME="${with_wx_config}"
Samuel Hocevar
committed
fi ])
AC_PATH_PROG(WX_CONFIG, ${WXWIDGETS_NAME}, no, ${WXWIDGETS_PATH})
if test "${WX_CONFIG}" != "no" -a "${CXX}" != ""
if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
AC_MSG_ERROR([Your development package for wxWidgets is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
# Turn this error:
# playlist.cpp:1351: error: ISO C++ forbids cast to non-reference type
# into a warning. However better would be to fix playlist.cpp
AC_CACHE_CHECK([if \$CXX accepts -fpermissive],
[ac_cv_cxx_fpermissive],
[CXXFLAGS="${CXXFLAGS_save} -fpermissive"
AC_TRY_COMPILE([],,ac_cv_cxx_fpermissive=yes,
ac_cv_cxx_fpermissive=no)])
if test "${ac_cv_cxx_fpermissive}" = "yes"; then
VLC_ADD_CXXFLAGS([wxwidgets],-fpermissive)
VLC_ADD_LDFLAGS([wxwidgets],[`${WX_CONFIG} --libs`])
VLC_ADD_CXXFLAGS([wxwidgets],[`${WX_CONFIG} --cxxflags`])
damienf
committed
if ${WX_CONFIG} --unicode
then
# wxwidgets should provide the following flags but does not
# the following is required to compile for win32
VLC_ADD_CXXFLAGS([wxwidgets],[-D_UNICODE -DUNICODE])
fi
if test "$have_libcdio" = "yes"
then
VLC_ADD_LDFLAGS([wxwidgets],[$LIBCDIO_LIBS])
VLC_ADD_CXXFLAGS([wxwidgets],[$LIBCDIO_CFLAGS])
else
AC_MSG_WARN([Probe disc disabled because ok libcdio library not found])
fi
if test "$have_libvcdinfo" = "yes"
then
VLC_ADD_LDFLAGS([wxwidgets],[$VCDINFO_LIBS])
VLC_ADD_CXXFLAGS([wxwidgets],[$VCDINFO_CFLAGS])
else
AC_MSG_WARN([VCD information on Probe disc disabled because ok libvcdinfo not found])
fi
CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_wxwidgets}"
echo "Cannot find wxWidgets development headers."
VLC_ADD_PLUGINS([wxwidgets])
dnl
dnl WinCE GUI module
dnl
if test "${SYS}" = "mingwce"; then
VLC_ADD_LDFLAGS([wince],[-lcommctrl -lcommdlg -laygshell])
VLC_ADD_LDFLAGS([wince],[\\\${top_builddir}modules/gui/wince/wince_rc.o])
elif test "${SYS}" = "mingw32"; then
VLC_ADD_CXXFLAGS([wince],[])
VLC_ADD_LDFLAGS([wince],[-lcomctl32 -lcomdlg32 -lgdi32 -lole32])
VLC_ADD_LDFLAGS([wince],[\\\${top_builddir}modules/gui/wince/wince_rc.o])
fi

Jean-Paul Saman
committed
dnl
dnl Simple test for skins2 dependency
dnl
if test "${enable_skins2}" != "no"
then
if test "${WX_CONFIG}" = "no"
then
AC_MSG_ERROR([The skins2 module depends on the wxWidgets development package. Without it you won't be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the wxWidgets development package or alternatively you can also configure with: --disable-wxwidgets --disable-skins2.])

Jean-Paul Saman
committed
fi
fi
dnl dnl
dnl dnl Qt module
dnl dnl
dnl AC_ARG_ENABLE(qt,
dnl [ --enable-qt Qt interface support (default disabled)],
dnl [if test "${enable_qt}" = "yes"; then
dnl ALIASES="${ALIASES} qvlc"
dnl LDFLAGS="${LDFLAGS_save} ${LDFLAGS_qt}"
dnl AC_CHECK_LIB(qt-mt,main,[
dnl ],[
dnl AC_CHECK_LIB(qt,main,[
dnl ])
dnl ])
dnl LDFLAGS="${LDFLAGS_save}"
dnl VLC_ADD_CXXFLAGS([qt],[-I/usr/include/qt3 -I/usr/include/qt -I${QTDIR}/include])
dnl if test -x ${QTDIR}/bin/moc
dnl then
dnl MOC=${QTDIR}/bin/moc
dnl else
dnl MOC=moc
dnl fi
dnl fi])
dnl
dnl dnl
dnl dnl KDE module
dnl dnl
dnl AC_ARG_ENABLE(kde,
dnl [ --enable-kde KDE interface support (default disabled)],
dnl [if test "${enable_kde}" = "yes"; then
dnl ALIASES="${ALIASES} kvlc"
dnl VLC_ADD_LDFLAGS([kde],[-L${KDEDIR}/lib])
dnl dnl Check for -lkfile (only in KDE 2) or -lkdeui -lkio (KDE 3)
dnl LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
dnl AC_CHECK_LIB(kfile,main,[
dnl ])
dnl LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
dnl AC_CHECK_LIB(kdeui,main,[
dnl ])
dnl LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
dnl AC_CHECK_LIB(kio,main,[
dnl ])
dnl LDFLAGS="${LDFLAGS_save}"
dnl VLC_ADD_CXXFLAGS([kde],[-I/usr/include/kde -I/usr/include/qt3 -I/usr/include/qt])
dnl VLC_ADD_CXXFLAGS([kde],[-I${KDEDIR}/include -I${QTDIR}/include])
dnl if test -x ${QTDIR}/bin/moc
dnl then
dnl MOC=${QTDIR}/bin/moc
dnl else
dnl MOC=moc
dnl fi
dnl fi])

Jean-Paul Saman
committed
dnl Opie QT embedded module

Jean-Paul Saman
committed
AC_ARG_ENABLE(opie,
[ --enable-opie Qt embedded interface support (default disabled)],

Jean-Paul Saman
committed
AC_ARG_WITH(qte,
[ --with-qte=PATH Qt Embedded headers and libraries])

Jean-Paul Saman
committed
then
VLC_ADD_LDFLAGS([qte],[-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
VLC_ADD_CXXFLAGS([qte],[-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])

Jean-Paul Saman
committed
else
VLC_ADD_LDFLAGS([qte],[-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`])
VLC_ADD_CXXFLAGS([qte],[-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`])
CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}"
AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
] )
CPPFLAGS="${CPPFLAGS_save}"

Jean-Paul Saman
committed

Jean-Paul Saman
committed
NEED_QTE_MAIN=yes
VLC_ADD_LDFLAGS([opie],[-lqpe ${LDFLAGS_qte}])
VLC_ADD_CXXFLAGS([opie],[${CXXFLAGS_qte}])

Jean-Paul Saman
committed
MOC=${with_qte}/bin/moc

Jean-Paul Saman
committed
MOC=${QTDIR}/bin/moc
dnl
dnl MacOS X module
dnl
AC_ARG_ENABLE(macosx,
[ --enable-macosx MacOS X support (default enabled on MacOS X)],
VLC_ADD_BUILTINS([macosx])
VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
VLC_ADD_BUILTINS([macosx])
VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
)])
dnl
dnl QNX RTOS module
dnl
AC_ARG_ENABLE(qnx,
[ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
VLC_ADD_PLUGINS([qnx])
VLC_ADD_LDFLAGS([qnx],[-lasound -lph])
])
fi
dnl
dnl ncurses module
dnl
AC_ARG_ENABLE(ncurses,
[ --enable-ncurses ncurses interface support (default disabled)],
VLC_ADD_PLUGINS([ncurses])
VLC_ADD_LDFLAGS([ncurses],[-lncurses])
dnl
dnl XOSD plugin
dnl
AC_ARG_ENABLE(xosd,
[ --enable-xosd xosd interface support (default disabled)])
AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
AC_CHECK_LIB(xosd,xosd_set_offset,
AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if <xosd.h> is 1.0.x),
AC_CHECK_LIB(xosd,xosd_set_horizontal_offset,
AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if <xosd.h> is 2.0.x),
AC_TRY_COMPILE([#include <xosd.h>],
[void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if <xosd.h> is pre-1.0.0))))
VLC_ADD_PLUGINS([xosd])
VLC_ADD_LDFLAGS([xosd],[-lxosd])
dnl
dnl Visualisation plugin
dnl
AC_ARG_ENABLE(visual,
[ --enable-visual visualisation plugin (default enabled)])
if test "${enable_visual}" != "no"
then
dnl
dnl OpenGL visualisation plugin
dnl
AC_ARG_ENABLE(galaktos,
[ --enable-galaktos OpenGL visualisation plugin (default disabled)])
if test "${enable_galaktos}" = "yes"
then
AC_CHECK_HEADERS(GL/gl.h, [
VLC_ADD_PLUGINS([galaktos])
if test "${SYS}" != "mingw32"; then
VLC_ADD_LDFLAGS([galaktos],[-L${x_libraries} -lGL -lGLU])
else
VLC_ADD_LDFLAGS([galaktos],[-lopengl32])
fi
])
fi
dnl
dnl goom visualization plugin
dnl
AC_ARG_ENABLE(goom,
[ --enable-goom goom visualisation plugin (default disabled)])
if test "${enable_goom}" = "yes"
then
AC_ARG_WITH(goom-tree,
[ --with-goom-tree=PATH goom tree for static linking (required)])
dnl
dnl test for --with-goom-tree
dnl
if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}"; then
AC_MSG_CHECKING(for libgoom2.a in ${with_goom_tree})
real_goom_tree="`cd ${with_goom_tree} 2>/dev/null && pwd`"
if test -z "${real_goom_tree}"; then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_goom_tree}])
fi
if test -f "${real_goom_tree}/src/.libs/libgoom2.a"; then
AC_MSG_RESULT(${real_goom_tree}/src/.libs/libgoom2.a)
VLC_ADD_BUILTINS([goom])
VLC_ADD_LDFLAGS([goom],[-L${real_goom_tree}/src/.libs -lgoom2])
VLC_ADD_CPPFLAGS([goom],[-I${real_goom_tree}/src -DUSE_GOOM_TREE])
else
dnl The given libgoom2 wasn't built, try to look for the old goom
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree})
if test -f "${real_goom_tree}/libgoom.a"; then
AC_MSG_RESULT(${real_goom_tree}/libgoom.a)
VLC_ADD_BUILTINS([goom])
VLC_ADD_LDFLAGS([goom],[-L${real_goom_tree} -lgoom])
VLC_ADD_CPPFLAGS([goom],[-I${real_goom_tree} -DUSE_GOOM_TREE -DOLD_GOOM])
else
dnl The given libgoom wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_goom_tree}/src/.libs/libgoom2.a, make sure you compiled goom in ${with_goom_tree}])
fi
fi
else
AC_CHECK_HEADERS(goom/goom.h, [
AC_CHECK_LIB(goom2, goom_init, [
VLC_ADD_PLUGINS([goom])
VLC_ADD_LDFLAGS([goom],[-lgoom2])
],[
AC_MSG_ERROR([Could not find goom on your system: you may get it from http://www.ios-software.com/.])
])
])
fi
fi
dnl
dnl SLP access plugin
dnl
AC_ARG_ENABLE(slp,
[ --enable-slp SLP service discovery support (default disabled)])
if test "${enable_slp}" = "yes"
AC_ARG_WITH(slp,
[ --with-slp=PATH libslp headers and libraries])
AC_CHECK_HEADERS(slp.h, have_slp="true", have_slp="false")
VLC_ADD_PLUGINS([slp])
VLC_ADD_LDFLAGS([slp],[-lslp])
VLC_ADD_LDFLAGS([stream_out_standard],[-lslp])
fi
else
AC_MSG_CHECKING(for slp headers in ${with_slp})
if test -f ${with_slp}/slp.h
then
dnl Use ${with_slp}/libslp/slp.h
AC_MSG_RESULT(yes)
VLC_ADD_PLUGINS([slp])
VLC_ADD_LDFLAGS([slp],[-L${with_slp} -lslp])
VLC_ADD_LDFLAGS([stream_out_standard],[-L${with_slp} -lslp])
VLC_ADD_CPPFLAGS([slp],[-I${with_slp}])
else
dnl No libslp could be found, sorry
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${with_slp}/slp.h])
fi
fi
fi
dnl
dnl DAAP access plugin and services discovery
dnl
AC_ARG_ENABLE(daap,
[ --enable-daap DAAP shares services discovery support (default enabled)])
if test "$enable_daap" != "no"
then
PKG_CHECK_MODULES(DAAP, opendaap >= 0.3.0,
[ VLC_ADD_PLUGINS([daap])
VLC_ADD_LDFLAGS([daap],[$DAAP_LIBS])
VLC_ADD_CFLAGS([daap],[$DAAP_CFLAGS])]:,
[AC_MSG_WARN(DAAP library not found)])
fi
dnl
dnl Bonjour services discovery
dnl
AC_ARG_ENABLE(bonjour,
[ --enable-bonjour Bonjour services discovery (default enabled)])
if test "${enable_bonjour}" != "no"
then
PKG_CHECK_MODULES(BONJOUR, avahi-client >= 0.3,
[AC_DEFINE(HAVE_AVAHI_CLIENT, [], [Define if you have the avahi-client library])
VLC_ADD_LDFLAGS([bonjour access_output_http],[$BONJOUR_LIBS])
VLC_ADD_CFLAGS([bonjour access_output_http],[$BONJOUR_CFLAGS])
VLC_ADD_PLUGINS([bonjour]) ],
[AC_MSG_WARN(avahi-client library not found)])
fi
dnl
dnl Lirc plugin
dnl
AC_ARG_ENABLE(lirc,
[ --enable-lirc lirc support (default disabled)])
then
AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
then
VLC_ADD_PLUGINS([lirc])
VLC_ADD_LDFLAGS([lirc],[-llirc_client])
fi
fi
dnl
dnl corba (ORBit) plugin
dnl
dnl Default: do not enable corba
enablecorba=false
AC_ARG_ENABLE(corba,
[ --enable-corba corba interface support (default disabled)])
if test "${enable_corba}" = "yes"; then
PKG_CHECK_MODULES(CORBA,
ORBit-2.0 >= 2.8.0 \
glib-2.0 >= $GLIB_VERSION \
gobject-2.0 >= $GLIB_VERSION \
gthread-2.0 >= $GLIB_VERSION,
[
enablecorba=true
VLC_ADD_LDFLAGS([corba],[$CORBA_LIBS])
VLC_ADD_CFLAGS([corba],[$CORBA_CFLAGS])
VLC_ADD_PLUGINS([corba snapshot]) ],
[ enablecorba=false
AC_MSG_WARN(corba library not found) ])
fi
AM_CONDITIONAL(ENABLE_CORBA, test "$enablecorba" = "true")
dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
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)])
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
Samuel Hocevar
committed
then
if ${CC-cc} -c 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"
ac_cv_c_bigendian="no"
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"
dnl
dnl DLL loader copied from MPlayer copied from somewhere else (WINE ?)
dnl
loader=false
AC_ARG_ENABLE(loader,
[ --enable-loader build DLL loader for ELF i386 platforms (default disabled)])
AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
AS_IF([test "${enable_loader}" = "yes"],
[ VLC_ADD_PLUGINS([dmo quicktime])
VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/loader])
VLC_ADD_LDFLAGS([dmo],[../../../loader/libloader.a])
VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/loader])
VLC_ADD_LDFLAGS([quicktime],[../../loader/libloader.a])
gbazin
committed
VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/loader -DLOADER])
VLC_ADD_LDFLAGS([realaudio],[../../loader/libloader.a])
dnl
dnl Microsoft ActiveX support
dnl
AC_ARG_ENABLE(activex,
[ --enable-activex build a vlc-based ActiveX control (default enabled on Win32)])
if test "${enable_activex}" != "no"
then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
AC_CHECK_HEADERS(ole2.h olectl.h,
[ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi])
AC_CHECK_HEADERS(objsafe.h,
VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER])
)
activex=:
],
[ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
)
fi
fi
AC_ARG_VAR(MIDL, [Microsoft IDL compiler (Win32 platform only)])
AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
AM_CONDITIONAL(BUILD_ACTIVEX,${activex})
dnl
dnl Mozilla plugin
dnl
Samuel Hocevar
committed
mozilla=false
AC_ARG_ENABLE(mozilla,
[ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
AC_ARG_WITH(mozilla-sdk-path,
[ --with-mozilla-sdk-path=PATH path to mozilla sdk])
if test "${enable_mozilla}" = "yes" -a "${with_mozilla_sdk_path}" = ""
then
AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
if test "${MOZILLA_CONFIG}" = "no"
then
AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
else
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
[VLC_ADD_LDFLAGS([mozilla],[-L${x_libraries} -lXt -lX11 -lSM -lICE])],
[[-L${x_libraries} -lX11 -lSM -lICE]
Samuel Hocevar
committed
])
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
Samuel Hocevar
committed
fi
Samuel Hocevar
committed
mozilla=:
Samuel Hocevar
committed
dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
VLC_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
VLC_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`])
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}"
AC_CHECK_HEADERS(mozilla-config.h)
CPPFLAGS="${CPPFLAGS_save}"
fi
dnl special case for mingw32
elif test "${enable_mozilla}" = "yes"
then
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
if test "${SYS}" = "mingw32"; then
AC_CHECK_TOOL(CYGPATH, cygpath, "")
mozilla_sdk_xpcom="/xpcom"
fi
real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
AC_CHECK_HEADERS(mozilla-config.h, [
mozilla=:
VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include])
VLC_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -L${real_mozilla_sdk}/lib -lnspr4 -lplds4 -lplc4 -lxpcomglue])
if test "${SYS}" = "mingw32"; then
VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
fi
XPIDL_INCL="-I${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl"
XPIDL="${real_mozilla_sdk}${mozilla_sdk_xpcom}/bin/xpidl"
if test -n "${CYGPATH}"; then
real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`"
XPIDL_INCL="${XPIDL_INCL} -I\"${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl\""
fi ])
CPPFLAGS="${CPPFLAGS_save}"
fi
dnl Not necessarily in ${PATH}
if test -z "${XPIDL}" -o ! -x "${XPIDL}"; then
XPIDL="/usr/lib/mozilla/xpidl"
fi

Rémi Denis-Courmont
committed
AS_IF([test "${MOZILLA_CONFIG}"], [
if test -z "${XPIDL_INCL}"; then
XPIDL_INCL="`${MOZILLA_CONFIG} --cflags plugin xpcom java` \
`${MOZILLA_CONFIG} --idlflags plugin xpcom java` "
fi
])
Samuel Hocevar
committed
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
if test "${mozilla}" != "false"
then
build_pic=yes
fi
dnl
dnl Python bindings
dnl
AC_ARG_ENABLE(python-bindings,
[ --enable-python-bindings Enable Python bindings (default disabled)])
dnl TODO: look for python dev headers
AM_CONDITIONAL( BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"] )
if test "${enable_python_bindings}" = "yes"
then
build_pic=yes
fi
dnl
dnl test plugins
dnl
AC_ARG_ENABLE(testsuite,
[ --enable-testsuite build test modules (default disabled)])
Samuel Hocevar
committed
TESTS="test1 test2 test3 test4"
dnl we define those so that bootstrap sets the right linker
VLC_ADD_CXXFLAGS([test2],[])
VLC_ADD_OBJCFLAGS([test3],[])
dnl this one is needed until automake knows what to do
Samuel Hocevar
committed
VLC_ADD_PLUGINS([${TESTS}])
#VLC_ADD_BUILTINS([${TESTS}])
fi
Samuel Hocevar
committed
dnl
dnl gtk_main plugin
dnl
Samuel Hocevar
committed
then
VLC_ADD_PLUGINS([gtk_main])
VLC_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk}])
VLC_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk}])
Samuel Hocevar
committed
fi
Samuel Hocevar
committed
then
VLC_ADD_PLUGINS([gnome_main])
VLC_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_gnome}])
VLC_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_gnome}])
Samuel Hocevar
committed
fi
then
VLC_ADD_PLUGINS([gtk2_main])
VLC_ADD_CFLAGS([gtk2],[-DNEED_GTK2_MAIN])
VLC_ADD_CFLAGS([pda],[-DNEED_GTK2_MAIN])
VLC_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2} ${CFLAGS_pda}])
VLC_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2} ${LDFLAGS_pda}])
fi
then
VLC_ADD_PLUGINS([gnome2_main])
VLC_ADD_CFLAGS([gnome2_main],[${CFLAGS_gtk2} ${CFLAGS_gnome2}])
VLC_ADD_LDFLAGS([gnome2_main],[${LDFLAGS_gtk2} ${LDFLAGS_gnome2}])
fi

Jean-Paul Saman
committed
dnl
dnl qte_main plugin
dnl

Jean-Paul Saman
committed
then
VLC_ADD_PLUGINS([qte_main])
VLC_ADD_CXXFLAGS([opie qte qt_video],[-DNEED_QTE_MAIN])
VLC_ADD_CXXFLAGS([qte_main],[${CXXFLAGS_qte} ${CXXFLAGS_qt_video}])
VLC_ADD_LDFLAGS([qte_main],[${LDFLAGS_qte} ${LDFLAGS_qt_video}])

Jean-Paul Saman
committed
fi
Samuel Hocevar
committed
dnl Plugin and builtin checks
Samuel Hocevar
committed
builtin_support=false
plugin_support=:
dnl Support for plugins - this must be AT THE END
Samuel Hocevar
committed
[ --disable-plugins make all plugins built-in (default plugins enabled)],
Samuel Hocevar
committed
plugin_support=false
dnl Automagically disable plugins if there is no system support for
dnl dynamically loadable files (.so, .dll, .dylib).
dnl don't forget vlc-win32 still can load .dll as plugins
Samuel Hocevar
committed
echo "*** Your system doesn't have plugin support. All plugins will be built"
echo "statically."
plugin_support=false
fi
dnl Export automake variables
if ${plugin_support}
then
AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, Define if we have support for dynamic plugins)
Samuel Hocevar
committed
for plugin in `echo ${PLUGINS}`
do
Samuel Hocevar
committed
done
else
Samuel Hocevar
committed
AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
[if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
then
builtin_support=:
for builtin in `echo ${BUILTINS}`
do
Samuel Hocevar
committed
done
fi]
AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
dnl
dnl Pic and shared libvlc stuff
dnl
AM_CONDITIONAL(BUILD_SHARED, [test "${shared_libvlc}" != "no"])
AM_CONDITIONAL(BUILD_PIC, [test "${build_pic}" = "yes" -o "${shared_libvlc}" != "no"] )
AS_IF([test "${shared_libvlc}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
])
pic=no
AS_IF([test "${shared_libvlc}" != "no" -o "${build_pic}" = "yes"], [pic=pic])
AS_IF([test "${SYS}" = "mingw32"], [pic=no])
AS_IF([test "${pic}" = "no"], [pic=])
AC_SUBST(pic)
AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2005 the VideoLAN team", [Copyright string])
AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,"${VERSION_MAJOR}", [version major number])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,"${VERSION_MINOR}", [version minor number])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_REVISION,"${VERSION_REVISION}", [version minor number])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_EXTRA,"${VERSION_EXTRA}", [version minor number])

Rémi Denis-Courmont
committed
AC_SUBST(VERSION_MAJOR)
AC_SUBST(VERSION_MINOR)
AC_SUBST(VERSION_REVISION)
Christophe Massiot
committed
AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure])
AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure])
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])
dnl Old definitions for version-dependant plugins
dnl VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-+/___/'`"
dnl AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
Christophe Massiot
committed
dnl New definitions with value matching 0.8.4 release
module_symbol="0_8_4"
AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions])
AC_DEFINE_UNQUOTED(MODULE_SYMBOL, $module_symbol, [Symbol suffix for module functions])
DATA_PATH="${ac_tool_prefix}/share/vlc"
PLUGIN_PATH="${ac_tool_prefix}/lib/vlc"
VLC_CONFIG="top_builddir=\"\$(top_builddir)\" \$(top_builddir)/vlc-config"
AC_SUBST(VLC_CONFIG)
CPPFLAGS_save="${CPPFLAGS_save} -I\$(top_srcdir)/include"
Samuel Hocevar
committed
dnl