mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Merge commit 'flameeyes/libtool-2.2'
This commit is contained in:
		
						commit
						2ee9276d97
					
				
					 3 changed files with 5 additions and 81 deletions
				
			
		| 
						 | 
					@ -18,7 +18,7 @@
 | 
				
			||||||
ACLOCAL_AMFLAGS = -I m4
 | 
					ACLOCAL_AMFLAGS = -I m4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXTRA_DIST = bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
 | 
					EXTRA_DIST = bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
 | 
				
			||||||
SUBDIRS=src doxygen man po
 | 
					SUBDIRS=src doxygen man po libltdl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAINTAINERCLEANFILES =
 | 
					MAINTAINERCLEANFILES =
 | 
				
			||||||
noinst_DATA =
 | 
					noinst_DATA =
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										27
									
								
								configure.ac
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								configure.ac
									
										
									
									
									
								
							| 
						 | 
					@ -209,29 +209,9 @@ AS_IF([test "$pulseaudio_cv__Bool" = "yes"], [
 | 
				
			||||||
  ])
 | 
					  ])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### libtool stuff ####
 | 
					#### libtool stuff ####
 | 
				
			||||||
 | 
					LT_CONFIG_LTDL_DIR([libltdl])
 | 
				
			||||||
AC_LTDL_ENABLE_INSTALL
 | 
					LT_INIT([dlopen win32-dll])
 | 
				
			||||||
AC_LIBLTDL_INSTALLABLE
 | 
					LTDL_INIT([convenience recursive])
 | 
				
			||||||
AC_LIBTOOL_DLOPEN
 | 
					 | 
				
			||||||
AC_LIBTOOL_WIN32_DLL
 | 
					 | 
				
			||||||
AC_PROG_LIBTOOL
 | 
					 | 
				
			||||||
AC_SUBST(LTDLINCL)
 | 
					 | 
				
			||||||
AC_SUBST(LIBLTDL)
 | 
					 | 
				
			||||||
AC_CONFIG_SUBDIRS(libltdl)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
old_LIBS=$LIBS
 | 
					 | 
				
			||||||
LIBS="$LIBS $LIBLTDL"
 | 
					 | 
				
			||||||
AC_CHECK_FUNCS([lt_dlmutex_register])
 | 
					 | 
				
			||||||
LIBS=$old_LIBS
 | 
					 | 
				
			||||||
AC_CHECK_TYPES([struct lt_user_dlloader, lt_dladvise], , , [#include <ltdl.h>])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if test "x$enable_ltdl_install" = "xno" && test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then
 | 
					 | 
				
			||||||
    AC_MSG_ERROR([[
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        *** Cannot find the libltdl development files.
 | 
					 | 
				
			||||||
        *** Maybe you need to install the libltdl-dev package.
 | 
					 | 
				
			||||||
        ]])
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### Determine build environment ####
 | 
					#### Determine build environment ####
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1144,6 +1124,7 @@ AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "x1"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_CONFIG_FILES([
 | 
					AC_CONFIG_FILES([
 | 
				
			||||||
Makefile
 | 
					Makefile
 | 
				
			||||||
 | 
					libltdl/Makefile
 | 
				
			||||||
src/Makefile
 | 
					src/Makefile
 | 
				
			||||||
man/Makefile
 | 
					man/Makefile
 | 
				
			||||||
libpulse.pc
 | 
					libpulse.pc
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -53,30 +53,6 @@
 | 
				
			||||||
#undef PA_BIND_NOW
 | 
					#undef PA_BIND_NOW
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef HAVE_LT_DLMUTEX_REGISTER
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static pa_mutex *libtool_mutex = NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void libtool_lock(void) {
 | 
					 | 
				
			||||||
    pa_mutex_lock(libtool_mutex);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void libtool_unlock(void) {
 | 
					 | 
				
			||||||
    pa_mutex_unlock(libtool_mutex);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
PA_STATIC_TLS_DECLARE_NO_FREE(libtool_tls);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void libtool_set_error(const char *error) {
 | 
					 | 
				
			||||||
    PA_STATIC_TLS_SET(libtool_tls, (char*) error);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static const char *libtool_get_error(void) {
 | 
					 | 
				
			||||||
    return PA_STATIC_TLS_GET(libtool_tls);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef PA_BIND_NOW
 | 
					#ifdef PA_BIND_NOW
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					@ -91,11 +67,7 @@ static const char *libtool_get_error(void) {
 | 
				
			||||||
  to set $LT_BIND_NOW before starting the pulsaudio binary.
 | 
					  to set $LT_BIND_NOW before starting the pulsaudio binary.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef HAVE_LT_DLADVISE
 | 
					 | 
				
			||||||
static lt_module bind_now_open(lt_user_data d, const char *fname)
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
static lt_module bind_now_open(lt_user_data d, const char *fname, lt_dladvise advise)
 | 
					static lt_module bind_now_open(lt_user_data d, const char *fname, lt_dladvise advise)
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    lt_module m;
 | 
					    lt_module m;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -146,36 +118,13 @@ static lt_ptr bind_now_find_sym(lt_user_data d, lt_module m, const char *symbol)
 | 
				
			||||||
void pa_ltdl_init(void) {
 | 
					void pa_ltdl_init(void) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef PA_BIND_NOW
 | 
					#ifdef PA_BIND_NOW
 | 
				
			||||||
# ifdef HAVE_STRUCT_LT_USER_DLLOADER
 | 
					 | 
				
			||||||
    lt_dlloader *place;
 | 
					 | 
				
			||||||
    static const struct lt_user_dlloader loader = {
 | 
					 | 
				
			||||||
        .module_open = bind_now_open,
 | 
					 | 
				
			||||||
        .module_close = bind_now_close,
 | 
					 | 
				
			||||||
        .find_sym = bind_now_find_sym
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
# else
 | 
					 | 
				
			||||||
    static const lt_dlvtable *dlopen_loader;
 | 
					    static const lt_dlvtable *dlopen_loader;
 | 
				
			||||||
    static lt_dlvtable bindnow_loader;
 | 
					    static lt_dlvtable bindnow_loader;
 | 
				
			||||||
# endif
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_assert_se(lt_dlinit() == 0);
 | 
					    pa_assert_se(lt_dlinit() == 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef HAVE_LT_DLMUTEX_REGISTER
 | 
					 | 
				
			||||||
    pa_assert_se(libtool_mutex = pa_mutex_new(TRUE, FALSE));
 | 
					 | 
				
			||||||
    pa_assert_se(lt_dlmutex_register(libtool_lock, libtool_unlock, libtool_set_error, libtool_get_error) == 0);
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef PA_BIND_NOW
 | 
					#ifdef PA_BIND_NOW
 | 
				
			||||||
# ifdef HAVE_STRUCT_LT_USER_DLLOADER
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (!(place = lt_dlloader_find("dlopen")))
 | 
					 | 
				
			||||||
        place = lt_dlloader_next(NULL);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* Add our BIND_NOW loader as the default module loader. */
 | 
					 | 
				
			||||||
    if (lt_dlloader_add(place, &loader, "bind-now-loader") != 0)
 | 
					 | 
				
			||||||
        pa_log_warn(_("Failed to add bind-now-loader."));
 | 
					 | 
				
			||||||
# else
 | 
					 | 
				
			||||||
    /* Already initialised */
 | 
					    /* Already initialised */
 | 
				
			||||||
    if (dlopen_loader)
 | 
					    if (dlopen_loader)
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
| 
						 | 
					@ -195,15 +144,9 @@ void pa_ltdl_init(void) {
 | 
				
			||||||
    /* Add our BIND_NOW loader as the default module loader. */
 | 
					    /* Add our BIND_NOW loader as the default module loader. */
 | 
				
			||||||
    if (lt_dlloader_add(&bindnow_loader) != 0)
 | 
					    if (lt_dlloader_add(&bindnow_loader) != 0)
 | 
				
			||||||
        pa_log_warn(_("Failed to add bind-now-loader."));
 | 
					        pa_log_warn(_("Failed to add bind-now-loader."));
 | 
				
			||||||
# endif
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_ltdl_done(void) {
 | 
					void pa_ltdl_done(void) {
 | 
				
			||||||
    pa_assert_se(lt_dlexit() == 0);
 | 
					    pa_assert_se(lt_dlexit() == 0);
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef HAVE_LT_DLMUTEX_REGISTER
 | 
					 | 
				
			||||||
    pa_mutex_free(libtool_mutex);
 | 
					 | 
				
			||||||
    libtool_mutex = NULL;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue