| This patch adds a flag to remove the dynamic module loading support given that |
| it is not used. |
| |
| --- a/configure.in 2014-08-18 08:46:41.844674749 -0700 |
| +++ b/configure.in 2014-08-18 10:05:40.917158196 -0700 |
| @@ -113,6 +113,13 @@ |
| |
| AC_MSG_RESULT([$build_result]) |
| |
| +AC_MSG_CHECKING([whether building with dynamic module loading support]) |
| +AC_ARG_ENABLE(dynamic-modules, |
| +[ --disable-dynamic-modules Disable support for dynamic module loading], |
| +[if test "$enableval" = yes; then dynamic_modules=yes; else dynamic_modules=no; fi], |
| +dynamic_modules=yes) |
| +AC_MSG_RESULT([$dynamic_modules]) |
| + |
| AC_MSG_CHECKING([whether debugging is enabled]) |
| AC_ARG_ENABLE(debug, |
| [ --enable-debug Compile in debug information |
| @@ -278,7 +285,12 @@ |
| AC_SUBST(DAV_LS) |
| AC_SUBST(LIBDAV) |
| |
| -AC_CHECK_LIB(dl, dlopen) |
| +if test "$dynamic_modules" = yes; then |
| + AC_CHECK_LIB(dl, dlopen) |
| + AC_DEFINE(USE_DYNAMIC_MODULES, 1, [Define to 1 if dynamic module loading is enabled]) |
| +fi |
| +AM_CONDITIONAL(USE_DYNAMIC_MODULES, test x$dynamic_modules = xyes) |
| + |
| AC_CHECK_LIB(pthread, pthread_create) |
| if test -z "`echo "$LIBS"|grep pthread`"; then |
| LIBS="$LIBS -pthread" |
| --- a/src/Makefile.am 2014-08-18 08:46:41.844674749 -0700 |
| +++ b/src/Makefile.am 2014-08-18 09:27:35.677419056 -0700 |
| @@ -21,7 +21,6 @@ |
| oper.c \ |
| fdops.c \ |
| virtual.c \ |
| - modload.c \ |
| remote.c \ |
| archive.c \ |
| archutil.c \ |
| @@ -38,6 +37,10 @@ |
| realfile.c \ |
| bzread.c |
| |
| +if USE_DYNAMIC_MODULES |
| +libavfscore_la_SOURCES += modload.c |
| +endif |
| + |
| if USE_LIBLZMA |
| libavfscore_la_SOURCES += xzread.c |
| endif |
| --- a/src/parse.c 2014-08-18 08:46:41.844674749 -0700 |
| +++ b/src/parse.c 2014-08-18 10:04:26.036638175 -0700 |
| @@ -9,6 +9,7 @@ |
| Path parser module |
| */ |
| |
| +#include "config.h" |
| #include "internal.h" |
| #include "version.h" |
| #include "local.h" |
| @@ -227,7 +228,9 @@ |
| if(res == 0) { |
| av_init_avfsstat(); |
| av_init_static_modules(); |
| +#ifdef USE_DYNAMIC_MODULES |
| av_init_dynamic_modules(); |
| +#endif |
| av_init_logstat(); |
| init_stats(); |
| av_init_cache(); |