Newer
Older
AX_ADD_CPPFLAGS([skins2],[${INCICONV}])
AX_ADD_LDFLAGS([skins2],[${LIBICONV} -lpng])
else
skins2_missing_lib="yes"
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([Could not find iconv (required for skins2)])
fi
dnl libxml2
XML2_PATH="${PATH}"
AC_ARG_WITH(xml2-config-path,
[ --with-xml2-config-path=PATH xml2-config path (default search in \$PATH)],
[ if test "${with_xml2_config_path}" != "no"; then
XML2_PATH="${with_xml2_config_path}:${PATH}"
fi ])
AC_PATH_PROG(XML2_CONFIG, xml2-config, no, ${XML2_PATH})
if test "${XML2_CONFIG}" != "no"; then
AX_ADD_CPPFLAGS([skins2],[`${XML2_CONFIG} --cflags`])
AX_ADD_LDFLAGS([skins2],[`${XML2_CONFIG} --libs`])
dnl skins2 depends on the xmlTextReader extension
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_skins2}"
AC_CHECK_LIB(xml2,xmlTextReaderConstName,[],[
skins2_missing_lib="yes"
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version; maybe you are missing libpng.])
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension (required for skins2)])
fi])
LDFLAGS="${LDFLAGS_save}"
else
skins2_missing_lib="yes"
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([Could not find libxml2 (required for skins2)])
fi
fi
if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"); then
AX_ADD_PLUGINS([skins2])
ALIASES="${ALIASES} svlc"
AX_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
AX_ADD_LDFLAGS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
else if test "${skins2_missing_lib}" = "no"; then
AX_ADD_PLUGINS([skins2])
ALIASES="${ALIASES} svlc"
AX_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -I${x_includes} -DX11_SKINS])
AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
AX_ADD_LDFLAGS([skins2],[-L${x_libraries} -lXext -lX11])
GTK_PATH="${PATH}"
AC_ARG_WITH(gtk-config-path,
[ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
GTK_PATH="${with_gtk_config_path}:${PATH}"
AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
then
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.])
fi
AX_ADD_CFLAGS([gtk],[`${GTK_CONFIG} --cflags gtk gthread`])
AX_ADD_LDFLAGS([gtk],[`${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`])
AX_ADD_CFLAGS([gtk],[`${GTK_CONFIG} --cflags gtk`])
AX_ADD_LDFLAGS([gtk],[`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
ac_cv_gtk_headers=yes
AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
ac_cv_gtk_headers=no
echo "Cannot find gtk development headers."
])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
fi
fi
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 AX_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
dnl AX_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
dnl AX_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,
[ --enable-pda PDA interface needs Gtk2 support (default disabled)])
if test "x${enable_pda}" = "xyes"
then
PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
AX_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
AX_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
AX_ADD_CFLAGS([pda],[${GTK2_CFLAGS} ${CFLAGS_pda}])
AX_ADD_LDFLAGS([pda],[${GTK2_LIBS} ${LDFLAGS_pda}])
AX_ADD_PLUGINS([pda])
if test "${SYS}" != "mingw32"; then
NEED_GTK2_MAIN=yes
fi
fi

Jean-Paul Saman
committed
AC_ARG_ENABLE(gnome,
[ --enable-gnome Gnome interface support (default disabled)],
# look for gnome-config
AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
if test -x ${GNOME_CONFIG}
then
AX_ADD_CFLAGS([gnome],[`${GNOME_CONFIG} --cflags gtk gnomeui`])
AX_ADD_LDFLAGS([gnome],[`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
Samuel Hocevar
committed
NEED_GTK_MAIN=yes
Samuel Hocevar
committed
NEED_GNOME_MAIN=yes
dnl We need this because of some moronic gnomesupport.h flavours
AC_MSG_CHECKING(for strndup in gnome.h)
AC_EGREP_HEADER(strndup,gnome.h,[
AC_MSG_RESULT(yes)
AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
Define if <gnome.h> defines strndup.)],[
AC_MSG_RESULT(no)])
],[
AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
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 AX_ADD_CFLAGS([gnome2],[${GNOME2_CFLAGS}])
dnl AX_ADD_LDFLAGS([gnome2],[${GNOME2_LIBS}])
dnl AX_ADD_PLUGINS([gnome2])
dnl if test "${SYS}" != "mingw32"; then
dnl NEED_GNOME2_MAIN=yes
dnl fi
dnl fi
dnl
dnl wxWindows module
dnl
AC_ARG_ENABLE(wxwindows,
[ --enable-wxwindows wxWindows support (default enabled)])
then
WXWINDOWS_PATH="${PATH}"
AC_ARG_WITH(wx-config-path,
[ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
then
WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
fi ])
# look for wx-config
AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
then
if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
then
AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwindows.])
fi
AX_ADD_CXXFLAGS([wxwindows],[`${WX_CONFIG} --cxxflags`])
AX_ADD_LDFLAGS([wxwindows],[`${WX_CONFIG} --libs`])
ac_cv_wx_headers=no
echo "Cannot find wxWindows development headers."
])
AC_ARG_ENABLE(qt,
[ --enable-qt Qt interface support (default disabled)],
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_qt}"
AC_CHECK_LIB(qt-mt,main,[
],[
AC_CHECK_LIB(qt,main,[
])
])
LDFLAGS="${LDFLAGS_save}"
AX_ADD_CXXFLAGS([qt],[-I/usr/include/qt3 -I/usr/include/qt -I${QTDIR}/include])
if test -x ${QTDIR}/bin/moc
then
MOC=${QTDIR}/bin/moc
else
MOC=moc
fi
fi])
Samuel Hocevar
committed
dnl
dnl KDE module
dnl
AC_ARG_ENABLE(kde,
[ --enable-kde KDE interface support (default disabled)],
dnl Check for -lkfile (only in KDE 2) or -lkdeui -lkio (KDE 3)
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
AC_CHECK_LIB(kfile,main,[
])
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
AC_CHECK_LIB(kdeui,main,[
])
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
AC_CHECK_LIB(kio,main,[
])
LDFLAGS="${LDFLAGS_save}"
AX_ADD_CXXFLAGS([kde],[-I/usr/include/kde -I/usr/include/qt3 -I/usr/include/qt])
AX_ADD_CXXFLAGS([kde],[-I${KDEDIR}/include -I${QTDIR}/include])
if test -x ${QTDIR}/bin/moc
then
MOC=${QTDIR}/bin/moc
else
MOC=moc
fi
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
AX_ADD_LDFLAGS([qte],[-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
AX_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
AX_ADD_LDFLAGS([qte],[-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`])
AX_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
AX_ADD_LDFLAGS([opie],[-lqpe ${LDFLAGS_qte}])
AX_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)],
AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
AX_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)])
AX_ADD_PLUGINS([qnx])
AX_ADD_LDFLAGS([qnx],[-lasound -lph])
])
fi
dnl
dnl ncurses module
dnl
AC_ARG_ENABLE(ncurses,
[ --enable-ncurses ncurses interface support (default disabled)],
AX_ADD_PLUGINS([ncurses])
AX_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))))
AX_ADD_PLUGINS([xosd])
AX_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
AX_ADD_PLUGINS([visual])
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
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
AC_MSG_CHECKING(for libgoom.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}/libgoom.a"; then
AC_MSG_RESULT(${real_goom_tree}/libgoom.a)
AX_ADD_BUILTINS([goom])
AX_ADD_LDFLAGS([goom],[-L${real_goom_tree} -lgoom])
AX_ADD_CPPFLAGS([goom],[-I${real_goom_tree}])
else
dnl The given libgoom wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_goom_tree}/libgoom.a, make sure you compiled goom in ${with_goom_tree}])
fi
else
dnl The --with-goom-tree isn't specified wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([You have to specify a tree with --with-goom-tree])
fi
fi
dnl
dnl SLP access plugin
dnl
AC_ARG_ENABLE(slp,
[ --enable-slp SLP service discovery support (default enabled)])
AC_ARG_WITH(slp,
[ --with-slp=PATH libslp headers and libraries])
AC_CHECK_HEADERS(slp.h, have_slp="true", have_slp="false")
AX_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)
AX_ADD_PLUGINS([slp])
AX_ADD_LDFLAGS([slp],[-L${with_slp} -lslp])
AX_ADD_LDFLAGS([stream_out_standard],[-L${with_slp} -lslp])
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 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
AX_ADD_PLUGINS([lirc])
AX_ADD_LDFLAGS([lirc],[-llirc_client])
fi
fi
dnl
dnl Joystick plugin
dnl
AC_ARG_ENABLE(joystick,
[ --enable-joystick joystick control (default disabled)])
if test "${enable_joystick}" = "yes"
then
AC_CHECK_HEADER( linux/joystick.h,
[AX_ADD_PLUGINS([joystick])]
)
fi
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
dnl
dnl corba (ORBit) plugin
dnl
AC_ARG_ENABLE(corba,
[ --enable-corba corba interface support (default disabled)])
if test "${enable_corba}" = "yes"; then
ORBIT_PATH="${PATH}"
AC_ARG_WITH(orbit-config-path,
[ --with-orbit-config-path=PATH orbit-config path (default search in \$PATH)])
if test "${with_orbit_config_path}" != "no"; then
ORBIT_PATH="${with_orbit_config_path}:${PATH}"
fi
# look for orbit2-config
AC_PATH_PROG(ORBIT_CONFIG, orbit2-config, no, ${ORBIT_PATH})
if test "${ORBIT_CONFIG}" != "no"; then
AX_ADD_CFLAGS(corba,[`${ORBIT_CONFIG} --cflags server`])
AX_ADD_LDFLAGS(corba,[`${ORBIT_CONFIG} --libs server | sed 's,-rdynamic,,'`])
# now look for the orbit.h header
CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_corba}"
ac_cv_corba_headers=yes
AC_CHECK_HEADERS(orbit/orbit.h, , [
ac_cv_corba_headers=no
AC_MSG_ERROR([Could not find corba development headers])
])
if test "${ac_cv_corba_headers}" = "yes"; then
AX_ADD_PLUGINS(corba)
fi
CPPFLAGS="${CPPFLAGS_save}"
fi
fi
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 Mozilla plugin
dnl
Samuel Hocevar
committed
mozilla=false
AC_ARG_ENABLE(mozilla,
[ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
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}"
Samuel Hocevar
committed
AC_CHECK_LIB(Xt,XtStrings,[
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
AX_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
AX_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
AC_CHECK_TOOL(CYGPATH, cygpath, "")
AC_ARG_WITH(mozilla-sdk-path,
[ --with-mozilla-sdk-path=PATH path to win32 mozilla sdk], [
real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
CPPFLAGS="${CPPFLAGS_save} ${real_mozilla_sdk}"
AC_CHECK_HEADERS(mozilla-config.h, [
AX_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -I${real_mozilla_sdk} -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])
AX_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 -lnspr4 -lplds4 -lplc4 -lembedstring -lxpcomglue -Wl,--kill-at])
XPIDL_INCL="-I${real_mozilla_sdk}/xpcom/idl"
if test -n "${CYGPATH}"; then
XPIDL="${real_mozilla_sdk}/xpcom/bin/xpidl"
real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`"
XPIDL_INCL="${XPIDL_INCL} -I\"${real_mozilla_sdk}/xpcom/idl\""
fi ])
])
fi
dnl Not necessarily in ${PATH}
if test -z "${XPIDL}" -o ! -x "${XPIDL}"; then
XPIDL="/usr/lib/mozilla/xpidl"
fi
Samuel Hocevar
committed
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
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
AX_ADD_CXXFLAGS([test2],[])
AX_ADD_OBJCFLAGS([test3],[])
dnl this one is needed until automake knows what to do
Samuel Hocevar
committed
AX_ADD_PLUGINS([${TESTS}])
#AX_ADD_BUILTINS([${TESTS}])
fi
Samuel Hocevar
committed
dnl
dnl gtk_main plugin
dnl
Samuel Hocevar
committed
then

Jean-Paul Saman
committed
AX_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk}])
AX_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk}])
Samuel Hocevar
committed
fi
Samuel Hocevar
committed
then
AX_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_gnome}])
AX_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_gnome}])
Samuel Hocevar
committed
fi
then
AX_ADD_PLUGINS([gtk2_main])
AX_ADD_CFLAGS([gtk2],[-DNEED_GTK2_MAIN])

Jean-Paul Saman
committed
AX_ADD_CFLAGS([pda],[-DNEED_GTK2_MAIN])
AX_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2} ${CFLAGS_pda}])
AX_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2} ${LDFLAGS_pda}])
fi
then
AX_ADD_PLUGINS([gnome2_main])
AX_ADD_CFLAGS([gnome2_main],[${CFLAGS_gtk2} ${CFLAGS_gnome2}])
AX_ADD_LDFLAGS([gnome2_main],[${LDFLAGS_gtk2} ${LDFLAGS_gnome2}])
fi

Jean-Paul Saman
committed
dnl
dnl qte_main plugin
dnl

Jean-Paul Saman
committed
then

Jean-Paul Saman
committed
AX_ADD_CXXFLAGS([opie qte qt_video],[-DNEED_QTE_MAIN])
AX_ADD_CXXFLAGS([qte_main],[${CXXFLAGS_qte} ${CXXFLAGS_qt_video}])
AX_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
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 Import conditional variables generated by bootstrap
AX_VLC_CONDITIONALS
AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string])
AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
Samuel Hocevar
committed
AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
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
Samuel Hocevar
committed
dnl
dnl
dnl Create the vlc-config script
dnl
Samuel Hocevar
committed
for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
Samuel Hocevar
committed
dnl
AC_SUBST(SYS)
AC_SUBST(ARCH)
AC_SUBST(ALIASES)
Samuel Hocevar
committed
AC_SUBST(XPIDL)
Samuel Hocevar
committed
AC_SUBST(LIBEXT)
AC_SUBST(INCLUDES)
dnl Import substitutions generated by bootstrap
AX_VLC_SUBSTS
dnl Create vlc-config.in
AX_OUTPUT_VLC_CONFIG_IN
Samuel Hocevar
committed
AC_CONFIG_FILES([
Makefile
autotools/Makefile
Samuel Hocevar
committed
debian/Makefile
doc/Makefile
intl/Makefile
Samuel Hocevar
committed
ipkg/Makefile
lib/Makefile
modules/Makefile
mozilla/Makefile
po/Makefile.in
Samuel Hocevar
committed
share/Makefile
src/Makefile
])
AC_CONFIG_FILES([
modules/access/dvb/Makefile
modules/access/dvd/Makefile
modules/access/dvdplay/Makefile
modules/access/dvdread/Makefile
modules/access/mms/Makefile
modules/access/pvr/Makefile
modules/access/satellite/Makefile
modules/access/v4l/Makefile
modules/access/cdda/Makefile
modules/access_output/Makefile
modules/audio_filter/Makefile
modules/audio_filter/channel_mixer/Makefile
modules/audio_filter/converter/Makefile
modules/audio_filter/resampler/Makefile
modules/audio_mixer/Makefile
modules/audio_output/Makefile
modules/codec/Makefile
modules/codec/cmml/Makefile
modules/codec/ffmpeg/Makefile
modules/codec/ffmpeg/postprocessing/Makefile
modules/codec/spudec/Makefile
modules/control/Makefile
modules/control/corba/Makefile
modules/demux/Makefile
modules/demux/asf/Makefile
modules/demux/avi/Makefile
modules/demux/mp4/Makefile
modules/demux/mpeg/Makefile
modules/demux/util/Makefile
modules/gui/Makefile
modules/gui/beos/Makefile

Jean-Paul Saman
committed
modules/gui/pda/Makefile
modules/gui/gtk/Makefile
modules/gui/gtk2/Makefile
modules/gui/kde/Makefile
modules/gui/macosx/Makefile
modules/gui/ncurses/Makefile
modules/gui/qnx/Makefile
modules/gui/qt/Makefile
modules/gui/skins/Makefile
modules/gui/skins2/Makefile
modules/gui/wxwindows/Makefile
modules/misc/Makefile
modules/misc/dummy/Makefile
modules/misc/memcpy/Makefile
modules/misc/network/Makefile
modules/misc/testsuite/Makefile
modules/mux/Makefile
modules/mux/mpeg/Makefile
modules/packetizer/Makefile
modules/stream_out/Makefile
modules/stream_out/transrate/Makefile
modules/video_chroma/Makefile
modules/video_filter/Makefile
modules/video_output/Makefile
modules/video_output/directx/Makefile
modules/video_output/qte/Makefile
modules/video_output/x11/Makefile
modules/visualization/Makefile
modules/visualization/visual/Makefile
])
AC_CONFIG_FILES([vlc-config], [chmod 0755 vlc-config])
dnl Generate makefiles
AC_OUTPUT
Samuel Hocevar
committed
printf "
Samuel Hocevar
committed
build flavour : "
test "${enable_debug}" = "yes" && printf "debug "
test "${enable_cprof}" = "yes" && printf "cprof "
test "${enable_gprof}" = "yes" && printf "gprof "
test "${enable_optimizations}" = "yes" && printf "optim "
test "${enable_release}" = "yes" && printf "release " || printf "devel "
Samuel Hocevar
committed
echo "
Samuel Hocevar
committed
To build vlc and its plugins, type \`make'.