Commit 9f7cd623 authored by Cheng Sun's avatar Cheng Sun Committed by Jean-Baptiste Kempf

Updated autotools stuff

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent a4c5031a
......@@ -23,7 +23,7 @@ AC_SUBST(COPYRIGHT_YEARS)
COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
AC_SUBST(COPYRIGHT_MESSAGE)
AC_CONFIG_SRCDIR(npapi/vlcplugin.cpp)
AC_CONFIG_SRCDIR(npapi/vlcshell.cpp)
AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_MACRO_DIR(m4)
AC_CANONICAL_BUILD
......@@ -180,13 +180,22 @@ test "$found" = 0 && AC_MSG_RESULT([no])
CPPFLAGS="${CPPFLAGS} ${MOZILLA_CFLAGS}"
AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk], [Build the GTK+ interface [default=yes]]),, [with_gtk=yes])
AM_CONDITIONAL(USE_GTK, [ test "x$with_gtk" = "xyes" ])
AC_CHECK_HEADERS(npapi.h)
AC_CHECK_HEADERS(npruntime.h, [
dnl if found
AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin"],[
PKG_CHECK_MODULES(XPM, [xpm xt],, [
AC_MSG_ERROR([Please install the libXpm and libXt development files.])
])
AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ], [
AM_COND_IF(USE_GTK,
[
PKG_CHECK_MODULES(GTK, [gtk+-2.0],, [
AC_MSG_ERROR([GTK+ >=2 not found. Re-run configure with --without-gtk.])
])
], [
PKG_CHECK_MODULES(XPM, [xpm xt],, [
AC_MSG_ERROR([Please install the libXpm and libXt development files, or re-run configure with --with-gtk])
])
])
])],[
dnl if not found
AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
......@@ -213,15 +222,14 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
const char *NPP_GetMIMEDescription(void);
])],[
AC_MSG_RESULT(yes)
AC_DEFINE(NPP_GET_MIME_CONST, [const], [Wether NPP_GetMIMEDescription returns const])
AC_DEFINE(NPP_GET_MIME_CONST, [const], [Whether NPP_GetMIMEDescription returns const])
],[
AC_MSG_RESULT(no)
AC_DEFINE(NPP_GET_MIME_CONST, [], [Wether NPP_GetMIMEDescription returns const])
AC_DEFINE(NPP_GET_MIME_CONST, [], [Whether NPP_GetMIMEDescription returns const])
])
AC_LANG_POP(C++)
AM_COND_IF([HAVE_WIN32], [
ACTIVEX_CPPFLAGS="${CPPFLAGS} -DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_"
ACTIVEX_CXXFLAGS="${CXXFLAGS} -fno-exceptions"
......
......@@ -12,8 +12,9 @@ AM_CPPFLAGS = $(LIBVLC_CFLAGS)
libvlcplugin_la_SOURCES = \
vlcshell.cpp \
vlcshell.h \
vlcplugin.cpp \
vlcplugin.h \
vlcplugin_base.cpp \
vlcplugin_base.h \
control/npolibvlc.cpp \
control/npolibvlc.h \
control/nporuntime.cpp \
......@@ -41,16 +42,28 @@ if !HAVE_WIN32
# Unix (x11) platforms
#
AM_CPPFLAGS += -DXP_UNIX $(X_CFLAGS) \
$(XPM_CFLAGS) \
-DDATA_PATH=\"$(pkgdatadir)\"
libvlcplugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) \
$(XT_LIBS) -lX11 -lSM -lICE -lXpm \
$(XPM_LIBS) $(MOZILLA_LIBS)
npvlc_LTLIBRARIES = libvlcplugin.la
SOURCES_support = support/npunix.cpp
AM_CPPFLAGS += -DXP_UNIX -DDATA_PATH=\"$(pkgdatadir)\"
libvlcplugin_la_LIBADD += $(MOZILLA_LIBS)
if USE_GTK
AM_CPPFLAGS += $(GTK_CFLAGS) -DUSE_GTK
libvlcplugin_la_LIBADD += $(GTK_LIBS)
SOURCES_support = \
support/npunix.cpp \
vlcplugin_gtk.cpp \
vlcplugin_gtk.h
else # !USE_GTK
AM_CPPFLAGS += $(X_CFLAGS) $(XPM_CFLAGS)
libvlcplugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) \
$(XT_LIBS) -lX11 -lSM -lICE -lXpm \
$(XPM_LIBS)
SOURCES_support = \
support/npunix.cpp \
vlcplugin_xlib.cpp \
vlcplugin_xlib.h
endif # !USE_GTK
else # Win32
......@@ -61,7 +74,10 @@ lib_LTLIBRARIES = npvlc.la
AM_CPPFLAGS += -DXP_WIN -DXP_WIN32 \
-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX
SOURCES_support = support/npwin.cpp \
SOURCES_support = \
support/npwin.cpp \
vlcplugin_win.cpp \
vlcplugin_win.h \
../common/win32_fullscreen.cpp \
../common/win32_fullscreen.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment