Commit 50b8a062 authored by Sam Hocevar's avatar Sam Hocevar

* ./Makefile, ./mozilla/Makefile: make uninstall removes vlc-specific dirs.

  * ./src/misc/modules.c: the directory browsing should be more portable now,
    we use stat(2) instead of file->d_type.
parent 2ce0ff5d
......@@ -182,6 +182,7 @@ endif
rm -f $(DESTDIR)$(datadir)/vlc/*.psf
rm -f $(DESTDIR)$(datadir)/vlc/*.png
rm -f $(DESTDIR)$(datadir)/vlc/*.xpm
-rmdir $(DESTDIR)$(datadir)/vlc
plugins-install:
mkdir -p $(DESTDIR)$(libdir)/vlc
......@@ -191,6 +192,7 @@ endif
plugins-uninstall:
rm -f $(DESTDIR)$(libdir)/vlc/*.so
-rmdir $(DESTDIR)$(libdir)/vlc
builtins-install:
mkdir -p $(DESTDIR)$(libdir)/vlc
......@@ -200,6 +202,7 @@ endif
builtins-uninstall:
rm -f $(DESTDIR)$(libdir)/vlc/*.a
-rmdir $(DESTDIR)$(libdir)/vlc
libvlc-install:
mkdir -p $(DESTDIR)$(bindir)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -836,6 +836,18 @@ then
esac
fi
dnl
dnl Video4Linux plugin
dnl
AC_ARG_ENABLE(v4l,
[ --enable-v4l Video4Linux input support (default disabled)])
if test "x${enable_v4l}" = "xyes"
then
AC_CHECK_HEADERS(libv4l/v4l.h, [
PLUGINS="${PLUGINS} access/v4l/v4l"
],[])
fi
dnl
dnl VCD module
dnl
......@@ -1051,12 +1063,6 @@ then
[ AC_MSG_ERROR([cannot find zlib header...]) ])
fi
dnl special case for BeOS
if test "x${SYS}" = "xbeos"
then
PLUGINS="${PLUGINS} gui/beos/beos"
fi
dnl
dnl a52 AC3 decoder plugin
dnl
......@@ -1447,6 +1453,12 @@ dnl
AC_ARG_WITH(,[Interface plugins:])
dnl special case for BeOS
if test "x${SYS}" = "xbeos"
then
PLUGINS="${PLUGINS} gui/beos/beos"
fi
dnl
dnl Gtk+ module
dnl
......
......@@ -193,3 +193,7 @@ the Boston strangler is to the woman home alone.
-- #videolan
%
<Meuuh> fils de p_aout
-- #videolan
%
/* include/defs.h.in. Generated automatically from configure.in by autoheader. */
/* include/defs.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define if using alloca.c. */
#undef C_ALLOCA
......@@ -238,6 +238,9 @@
/* Define if you have the <libdv/dv.h> header file. */
#undef HAVE_LIBDV_DV_H
/* Define if you have the <libv4l/v4l.h> header file. */
#undef HAVE_LIBV4L_V4L_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
......
......@@ -28,6 +28,8 @@ install:
uninstall:
rm -f $(DESTDIR)$(libdir)/mozilla/plugins/$(PLUGIN_OBJ)
-rmdir $(DESTDIR)$(libdir)/mozilla/plugins
-rmdir $(DESTDIR)$(libdir)/mozilla
FORCE:
......
......@@ -2,7 +2,7 @@
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.79 2002/08/05 11:48:56 sam Exp $
* $Id: modules.c,v 1.80 2002/08/06 00:26:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
......@@ -36,6 +36,11 @@
#include <vlc/vlc.h>
#include <dirent.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#if defined(HAVE_DLFCN_H) /* Linux, BSD, Hurd */
# include <dlfcn.h> /* dlopen(), dlsym(), dlclose() */
......@@ -282,7 +287,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
module_t *p_module;
int i_shortcuts = 0;
char *psz_shortcuts = NULL, psz_var = NULL;
char *psz_shortcuts = NULL, *psz_var = NULL;
msg_Dbg( p_this, "looking for %s module", psz_capability );
......@@ -642,46 +647,53 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir )
{
#define PLUGIN_EXT ".so"
DIR * dir;
int i_dirlen = strlen( psz_dir );
char * psz_file;
int i_dirlen;
DIR * dir;
char * psz_file;
struct dirent * file;
if( (dir = opendir( psz_dir )) )
dir = opendir( psz_dir );
if( !dir )
{
/* Parse the directory and try to load all files it contains. */
while( (file = readdir( dir )) )
return;
}
i_dirlen = strlen( psz_dir );
/* Parse the directory and try to load all files it contains. */
while( (file = readdir( dir )) )
{
struct stat statbuf;
int i_len = strlen( file->d_name );
/* Skip ".", ".." and anything starting with "." */
if( !*file->d_name || *file->d_name == '.' )
{
int i_len = strlen( file->d_name );
continue;
}
/* Skip ".", ".." and anything starting with "." */
if( !*file->d_name || *file->d_name == '.' )
{
continue;
}
psz_file = malloc( i_dirlen + 1 /* / */ + i_len + 1 /* \0 */ );
sprintf( psz_file, "%s/%s", psz_dir, file->d_name );
if( file->d_type == DT_DIR )
{
psz_file = malloc( i_dirlen + 1 /* / */ + i_len + 1 /* \0 */ );
sprintf( psz_file, "%s/%s", psz_dir, file->d_name );
AllocatePluginDir( p_this, psz_file );
free( psz_file );
}
else if( i_len > strlen( PLUGIN_EXT )
/* We only load files ending with ".so" */
&& !strncmp( file->d_name + i_len - strlen( PLUGIN_EXT ),
PLUGIN_EXT, strlen( PLUGIN_EXT ) ) )
{
psz_file = malloc( i_dirlen + 1 /* / */ + i_len + 1 /* \0 */ );
sprintf( psz_file, "%s/%s", psz_dir, file->d_name );
AllocatePluginFile( p_this, psz_file );
free( psz_file );
}
if( !stat( psz_file, &statbuf ) && statbuf.st_mode & S_IFDIR )
{
AllocatePluginDir( p_this, psz_file );
}
else if( i_len > strlen( PLUGIN_EXT )
/* We only load files ending with ".so" */
&& !strncmp( file->d_name + i_len - strlen( PLUGIN_EXT ),
PLUGIN_EXT, strlen( PLUGIN_EXT ) ) )
{
AllocatePluginFile( p_this, psz_file );
}
/* Close the directory if successfully opened */
closedir( dir );
free( psz_file );
}
/* Close the directory */
closedir( dir );
}
/*****************************************************************************
......
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