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 ...@@ -182,6 +182,7 @@ endif
rm -f $(DESTDIR)$(datadir)/vlc/*.psf rm -f $(DESTDIR)$(datadir)/vlc/*.psf
rm -f $(DESTDIR)$(datadir)/vlc/*.png rm -f $(DESTDIR)$(datadir)/vlc/*.png
rm -f $(DESTDIR)$(datadir)/vlc/*.xpm rm -f $(DESTDIR)$(datadir)/vlc/*.xpm
-rmdir $(DESTDIR)$(datadir)/vlc
plugins-install: plugins-install:
mkdir -p $(DESTDIR)$(libdir)/vlc mkdir -p $(DESTDIR)$(libdir)/vlc
...@@ -191,6 +192,7 @@ endif ...@@ -191,6 +192,7 @@ endif
plugins-uninstall: plugins-uninstall:
rm -f $(DESTDIR)$(libdir)/vlc/*.so rm -f $(DESTDIR)$(libdir)/vlc/*.so
-rmdir $(DESTDIR)$(libdir)/vlc
builtins-install: builtins-install:
mkdir -p $(DESTDIR)$(libdir)/vlc mkdir -p $(DESTDIR)$(libdir)/vlc
...@@ -200,6 +202,7 @@ endif ...@@ -200,6 +202,7 @@ endif
builtins-uninstall: builtins-uninstall:
rm -f $(DESTDIR)$(libdir)/vlc/*.a rm -f $(DESTDIR)$(libdir)/vlc/*.a
-rmdir $(DESTDIR)$(libdir)/vlc
libvlc-install: libvlc-install:
mkdir -p $(DESTDIR)$(bindir) 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 ...@@ -836,6 +836,18 @@ then
esac esac
fi 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
dnl VCD module dnl VCD module
dnl dnl
...@@ -1051,12 +1063,6 @@ then ...@@ -1051,12 +1063,6 @@ then
[ AC_MSG_ERROR([cannot find zlib header...]) ]) [ AC_MSG_ERROR([cannot find zlib header...]) ])
fi fi
dnl special case for BeOS
if test "x${SYS}" = "xbeos"
then
PLUGINS="${PLUGINS} gui/beos/beos"
fi
dnl dnl
dnl a52 AC3 decoder plugin dnl a52 AC3 decoder plugin
dnl dnl
...@@ -1447,6 +1453,12 @@ dnl ...@@ -1447,6 +1453,12 @@ dnl
AC_ARG_WITH(,[Interface plugins:]) AC_ARG_WITH(,[Interface plugins:])
dnl special case for BeOS
if test "x${SYS}" = "xbeos"
then
PLUGINS="${PLUGINS} gui/beos/beos"
fi
dnl dnl
dnl Gtk+ module dnl Gtk+ module
dnl dnl
......
...@@ -193,3 +193,7 @@ the Boston strangler is to the woman home alone. ...@@ -193,3 +193,7 @@ the Boston strangler is to the woman home alone.
-- #videolan -- #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. */ /* Define if using alloca.c. */
#undef C_ALLOCA #undef C_ALLOCA
...@@ -238,6 +238,9 @@ ...@@ -238,6 +238,9 @@
/* Define if you have the <libdv/dv.h> header file. */ /* Define if you have the <libdv/dv.h> header file. */
#undef HAVE_LIBDV_DV_H #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. */ /* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H #undef HAVE_LIMITS_H
......
...@@ -28,6 +28,8 @@ install: ...@@ -28,6 +28,8 @@ install:
uninstall: uninstall:
rm -f $(DESTDIR)$(libdir)/mozilla/plugins/$(PLUGIN_OBJ) rm -f $(DESTDIR)$(libdir)/mozilla/plugins/$(PLUGIN_OBJ)
-rmdir $(DESTDIR)$(libdir)/mozilla/plugins
-rmdir $(DESTDIR)$(libdir)/mozilla
FORCE: FORCE:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules.c : Builtin and plugin modules management functions * modules.c : Builtin and plugin modules management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com> * Ethan C. Baldridge <BaldridgeE@cadmus.com>
...@@ -36,6 +36,11 @@ ...@@ -36,6 +36,11 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <dirent.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 */ #if defined(HAVE_DLFCN_H) /* Linux, BSD, Hurd */
# include <dlfcn.h> /* dlopen(), dlsym(), dlclose() */ # include <dlfcn.h> /* dlopen(), dlsym(), dlclose() */
...@@ -282,7 +287,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability, ...@@ -282,7 +287,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
module_t *p_module; module_t *p_module;
int i_shortcuts = 0; 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 ); msg_Dbg( p_this, "looking for %s module", psz_capability );
...@@ -642,46 +647,53 @@ static void AllocateAllPlugins( vlc_object_t *p_this ) ...@@ -642,46 +647,53 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir ) static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir )
{ {
#define PLUGIN_EXT ".so" #define PLUGIN_EXT ".so"
DIR * dir; int i_dirlen;
int i_dirlen = strlen( psz_dir ); DIR * dir;
char * psz_file; char * psz_file;
struct dirent * 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. */ return;
while( (file = readdir( dir )) ) }
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 "." */ psz_file = malloc( i_dirlen + 1 /* / */ + i_len + 1 /* \0 */ );
if( !*file->d_name || *file->d_name == '.' ) sprintf( psz_file, "%s/%s", psz_dir, file->d_name );
{
continue;
}
if( file->d_type == DT_DIR ) if( !stat( psz_file, &statbuf ) && statbuf.st_mode & S_IFDIR )
{ {
psz_file = malloc( i_dirlen + 1 /* / */ + i_len + 1 /* \0 */ ); AllocatePluginDir( p_this, psz_file );
sprintf( psz_file, "%s/%s", psz_dir, file->d_name ); }
AllocatePluginDir( p_this, psz_file ); else if( i_len > strlen( PLUGIN_EXT )
free( psz_file ); /* We only load files ending with ".so" */
} && !strncmp( file->d_name + i_len - strlen( PLUGIN_EXT ),
else if( i_len > strlen( PLUGIN_EXT ) PLUGIN_EXT, strlen( PLUGIN_EXT ) ) )
/* We only load files ending with ".so" */ {
&& !strncmp( file->d_name + i_len - strlen( PLUGIN_EXT ), AllocatePluginFile( p_this, psz_file );
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 );
}
} }
/* Close the directory if successfully opened */ free( psz_file );
closedir( dir );
} }
/* 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