Commit 2b0b7888 authored by Sam Hocevar's avatar Sam Hocevar

* ./bootstrap: we use the proper linker for plugin compilation.

  * ./modules/misc/testsuite/*: moved the null module into three test modules
    that are only built when --enable-testsuite is activated. This directory
    can be a good place for compilation tests or performance benchmarks.
parent 80b15699
#! /bin/sh
## bootstrap file for vlc, the VideoLAN Client
## $Id: bootstrap,v 1.17 2002/10/03 08:44:11 sam Exp $
## $Id: bootstrap,v 1.18 2002/10/04 13:13:54 sam Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
......@@ -73,13 +73,16 @@ include ${dir}/Modules.am
EOF
sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | while read mod
do
LINKER="LINK"
if echo "$ALL_FLAGS" | grep '^CPPFLAGS_'${mod}'=$' >/dev/null 2>&1; then
echo "AC_SUBST(CPPFLAGS_${mod})" >> configure.ac; fi
if echo "$ALL_FLAGS" | grep '^CFLAGS_'${mod}'=$' >/dev/null 2>&1; then
echo "AC_SUBST(CFLAGS_${mod})" >> configure.ac; fi
if echo "$ALL_FLAGS" | grep '^CXXFLAGS_'${mod}'=$' >/dev/null 2>&1; then
LINKER="CXXLINK"
echo "AC_SUBST(CXXFLAGS_${mod})" >> configure.ac; fi
if echo "$ALL_FLAGS" | grep '^OBJCFLAGS_'${mod}'=$' >/dev/null 2>&1; then
LINKER="OBJCLINK"
echo "AC_SUBST(OBJCFLAGS_${mod})" >> configure.ac; fi
if echo "$ALL_FLAGS" | grep '^LDFLAGS_'${mod}'=$' >/dev/null 2>&1; then
echo "AC_SUBST(LDFLAGS_${mod})" >> configure.ac; fi
......@@ -150,7 +153,7 @@ lib${mod}dir = \$(libdir)/vlc/${topdir}
MOSTLYCLEANFILES += \$(D_${mod}_p)
${PRIVATE}noinst_LIBRARIES += \$(L_${mod}_p)
${PRIVATE}${dir}/lib${mod}_plugin\$(LIBEXT): \$(${sym}_lib${mod}_plugin_a_OBJECTS)
${PRIVATE} \$(CC) \$^ -o \$@ -shared \$(LDFLAGS) \$(LDFLAGS_plugins) \$(LDFLAGS_${mod})
${PRIVATE} \$(${LINKER}) \$^ -o \$@ -shared \$(LDFLAGS_plugins) \$(LDFLAGS_${mod})
EOF
......
......@@ -507,8 +507,7 @@ esac
dnl
dnl default modules
dnl
PLUGINS="${PLUGINS} dummy null"
PLUGINS="${PLUGINS} rc logger access_file memcpy"
PLUGINS="${PLUGINS} dummy rc logger access_file memcpy"
PLUGINS="${PLUGINS} es audio mpeg_system ps ts"
PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
#PLUGINS="${PLUGINS} a52old imdct downmix"
......@@ -2091,13 +2090,30 @@ then
fi
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
dnl
dnl test plugins
dnl
AC_ARG_ENABLE(testsuite,
[ --enable-testsuite build test modules (default disabled)])
if test "x${enable_testsuite}" = "xyes"
then
TESTS="test1 test2 test3"
dnl we define those so that bootstrap sets the right linker
CXXFLAGS_test2="${CXXFLAGS_test2}"
OBJCFLAGS_test3="${OBJCFLAGS_test3}"
dnl this one is needed until automake knows what to do
LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
PLUGINS="${PLUGINS} ${TESTS}"
BUILTINS="${BUILTINS} ${TESTS}"
fi
dnl
dnl gtk_main plugin
dnl
if test "x${NEED_GTK_MAIN}" != "xno"
then
PLUGINS="${PLUGINS} gtk_main"
CFLAGS_gtk = "${CFLAGS_gtk} -DNEED_GTK_MAIN"
CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
fi
......@@ -2123,8 +2139,9 @@ AC_ARG_ENABLE(plugins,
plugin_support=false
fi])
dnl Automagically disable plugins if there is no system support for .so files
dnl don't forget vlc-win32 still can load .so as plugins
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
if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
then
echo "*** Your system doesn't have plugin support. All plugins will be built"
......
......@@ -49,6 +49,7 @@ EXTRA_DIST = \
misc/logger/Modules.am \
misc/memcpy/Modules.am \
misc/network/Modules.am \
misc/testsuite/Modules.am \
video_chroma/Modules.am \
video_filter/Modules.am \
video_filter/deinterlace/Modules.am \
......
SOURCES_null = modules/misc/null.c
SOURCES_gtk_main = modules/misc/gtk_main.c
SOURCES_gnome_main = modules/misc/gtk_main.c
......@@ -2,7 +2,7 @@
* gtk_main.c : Gtk+ wrapper for gtk_main
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: gtk_main.c,v 1.7 2002/10/03 13:21:55 sam Exp $
* $Id: gtk_main.c,v 1.8 2002/10/04 13:13:54 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -139,10 +139,7 @@ static void Close( vlc_object_t *p_this )
vlc_mutex_unlock( &p_this->p_libvlc->global_lock );
}
static gint foo(gpointer foo)
{
return TRUE;
}
static gint foo( gpointer bar ) { return TRUE; }
/*****************************************************************************
* GtkMain: Gtk+ thread
......@@ -174,7 +171,8 @@ static void GtkMain( vlc_object_t *p_this )
vlc_thread_ready( p_this );
/* If we don't add this simple timeout, gtk_main remains stuck ... */
/* If we don't add this simple timeout, gtk_main remains stuck if
* we try to close the window without having sent any gtk event. */
gtk_timeout_add( INTF_IDLE_SLEEP / 1000, foo, p_this );
/* Enter Gtk mode */
......
......@@ -2,7 +2,7 @@
* ipv6.c: IPv6 network abstraction layer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: ipv6.c,v 1.2 2002/08/08 00:35:11 sam Exp $
* $Id: ipv6.c,v 1.3 2002/10/04 13:13:54 sam Exp $
*
* Authors: Alexis Guillard <alexis.guillard@bt.com>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -146,7 +146,7 @@ static int BuildAddr( struct sockaddr_in6 * p_socket,
p_socket->sin6_scope_id = 0;
#endif
#if 0
msg_Warn( p_this, " = #%i\n", p_socket->sin6_scope_id );
msg_Warn( p_this, " = #%i", p_socket->sin6_scope_id );
#endif
}
psz_address[strlen(psz_address) - 1] = '\0' ;
......
SOURCES_test1 = modules/misc/testsuite/test1.c
SOURCES_test2 = modules/misc/testsuite/test2.cpp
SOURCES_test3 = modules/misc/testsuite/test3.m
/*****************************************************************************
* null.c : NULL module for vlc
* test1.c : Empty C module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: null.c,v 1.1 2002/08/20 18:08:51 sam Exp $
* $Id: test1.c,v 1.1 2002/10/04 13:13:54 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -30,6 +30,6 @@
* Module descriptor.
*****************************************************************************/
vlc_module_begin();
set_description( _("the module that does nothing") );
set_description( _("C module that does nothing") );
vlc_module_end();
/*****************************************************************************
* test2.cpp : Empty C++ module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: test2.cpp,v 1.1 2002/10/04 13:13:54 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <vlc/vlc.h>
#include <string>
/*****************************************************************************
* Module descriptor.
*****************************************************************************/
vlc_module_begin();
/* Minimal C++ usage */
string description = "C++ module that does nothing";
set_description( _( description.c_str() ) );
vlc_module_end();
/*****************************************************************************
* test3.m : Empty Objective C module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: test3.m,v 1.1 2002/10/04 13:13:54 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <vlc/vlc.h>
#include <objc/Object.h>
/*****************************************************************************
* The description class
*****************************************************************************/
@class Desc;
@interface Desc : Object
+ (char*) ription;
@end
@implementation Desc
+ (char*) ription
{
return "Objective C module that does nothing";
}
@end
/*****************************************************************************
* Module descriptor.
*****************************************************************************/
vlc_module_begin();
set_description( _([Desc ription]) );
vlc_module_end();
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