From 5b369300e5f7093ac99f2f626533e7f9bc9b66fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 4 Jun 2006 17:07:19 +0000 Subject: [PATCH] Suppress support for position dependant code (except on mingw32). This simplifies the build system quite a lot, and reduce compilation times when PIC is actually needed. If you really mind the extra overhead of PIC, use: ./configure --enable-libtool --enable-static --disable-shared --- Makefile.am | 2 +- bootstrap | 46 +++++---------------------------------------- configure.ac | 30 ++--------------------------- mozilla/Makefile.am | 2 +- src/Makefile.am | 13 ++----------- 5 files changed, 11 insertions(+), 82 deletions(-) diff --git a/Makefile.am b/Makefile.am index 10159624a8..36d69cbdee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,7 @@ NULL = # which have makefiles with distribution information. # - intl should come before modules and . because all the code uses gettext # - modules should come before . because vlc needs the builtins -# - . should come before mozilla/bindings because the plugin needs libvlc_pic.a +# - . should come before mozilla/bindings because the plugin needs libvlc.a # - po should come before . because VLC.app needs the pofiles # - loader should come before modules because some plugins need it SUBDIRS = intl loader src modules po . mozilla bindings activex share m4 doc diff --git a/bootstrap b/bootstrap index 84806c4c68..bb92ee0998 100755 --- a/bootstrap +++ b/bootstrap @@ -192,7 +192,7 @@ do extra_ltlibs="" for mod in $mods do - extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a lib${mod}_pic.a" + extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a" extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la lib${mod}_builtin.la" done rm -f "${makf}" && cat > "${makf}" << EOF @@ -240,7 +240,6 @@ else @set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\ if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\ if test "\$(builtin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}.a;; esac; done; fi; \\ - if test "\$(pic)" = "pic"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_pic.a;; esac; done; fi; \\ \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\ test -z "\$\$fail" endif @@ -305,17 +304,6 @@ else ;; \ esac; \ done -if BUILD_PIC - @z=\$\$(\$(VLC_CONFIG) --list builtin); \ - for mod in \$(mods); do \ - case "\$\$z " \ - in *\ \$\${mod}\ *) \ - echo \$(INSTALL_DATA) "lib\$\${mod}_pic.a" "\$(DESTDIR)\$(libdir)/vlc/" ; \ - \$(INSTALL_DATA) "lib\$\${mod}_pic.a" "\$(DESTDIR)\$(libdir)/vlc/" || exit \$\$?; \ - ;; \ - esac; \ - done -endif endif uninstall-local: @@ -345,17 +333,6 @@ else ;; \ esac; \ done -if BUILD_PIC - @z=\$\$(\$(VLC_CONFIG) --list builtin); \ - for mod in \$(mods); do \ - case "\$\$z " \ - in *\ \$\${mod}\ *) \ - echo rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}_pic.a" ; \ - rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}_pic.a" || true; \ - ;; \ - esac; \ - done -endif endif EOF @@ -409,17 +386,6 @@ lib${mod}_plugin_la_LDFLAGS = \`\$(VLC_CONFIG) --libs plugin ${mod}\` \\ -rpath '\$(libvlcdir)' -module -shrext \$(LIBEXT) lib${mod}_plugin_la_LIBADD = \$(LTLIBVLC) -lib${mod}_pic_a_SOURCES = \$(SOURCES_${mod}) -EOF - if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF -nodist_lib${mod}_pic_a_SOURCES = \$(nodist_SOURCES_${mod}) -EOF - fi - cat >> "${makf}" << EOF -lib${mod}_pic_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\` -lib${mod}_pic_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\` -lib${mod}_pic_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\` - lib${mod}_a_SOURCES = \$(SOURCES_${mod}) lib${mod}_builtin_la_SOURCES = \$(SOURCES_${mod}) EOF @@ -429,9 +395,9 @@ nodist_lib${mod}_builtin_la_SOURCES = \$(nodist_SOURCES_${mod}) EOF fi cat >> "${makf}" << EOF -lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` -lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` -lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` +lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin \$(pic) ${mod}\` +lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin \$(pic) ${mod}\` +lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin \$(pic) ${mod}\` lib${mod}_builtin_la_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` lib${mod}_builtin_la_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` lib${mod}_builtin_la_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` @@ -478,9 +444,7 @@ rm -f ltmain.sh libtool ltconfig # remove gettext cruft rm -f ABOUT-NLS rm -Rf intl -# remove old vlc cruft -rm -f m4/oldgettext.m4 stamp-pic configure.ac.in Modules.am -# remove new vlc cruft +# remove vlc cruft rm -f stamp-builtin stamp-h* mozilla/stamp-pic # Automake complains if these are not present diff --git a/configure.ac b/configure.ac index 2d29dbb8e0..63edaea359 100644 --- a/configure.ac +++ b/configure.ac @@ -1441,7 +1441,6 @@ test "${enable_release}" != "yes" && enable_release="no" dnl dnl Is the shared libvlc forced ? dnl -build_pic=no AC_ARG_ENABLE(shared-libvlc, [ --enable-shared-libvlc Win32 libvlc.dll build (default disabled)]) AS_IF([test "${enable_libtool}" != "no" && test "${enable_shared_libvlc}"], [ @@ -5224,7 +5223,6 @@ then if test "${enable_mozilla}" != "false" then - build_pic=yes AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path}:/usr/lib/mozilla:/usr/lib64/mozilla:/usr/lib/xulrunner:/usr/lib64/xulrunner) if test "${XPIDL}" = "no"; then AC_MSG_ERROR([Please install the Mozilla development tools, xpidl was not found.]) @@ -5240,10 +5238,6 @@ AC_ARG_ENABLE(mediacontrol-python-bindings, [ --enable-mediacontrol-python-bindings Enable Python bindings for MediaControl (default disabled)]) dnl TODO: look for python dev headers AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_mediacontrol_python_bindings}" = "yes"]) -if test "${enable_mediacontrol_python_bindings}" = "yes" -then - build_pic=yes -fi dnl dnl Java bindings @@ -5251,22 +5245,6 @@ dnl AC_ARG_ENABLE(java-bindings, [ --enable-java-bindings Enable Java bindings (default disabled)]) AM_CONDITIONAL(BUILD_JAVA, [test "${enable_java_bindings}" = "yes"]) -if test "${enable_java_bindings}" = "yes" -then - build_pic=yes -fi - -dnl -dnl Enable pic libraries -dnl -AC_ARG_ENABLE(pic, - [ --enable-pic Enable pic libraries (default disabled)]) -AM_CONDITIONAL(BUILD_PIC, [test "${enable_pic}" = "yes"]) -if test "${enable_pic}" = "yes" -then - build_pic=yes -fi - dnl dnl test plugins @@ -5400,14 +5378,10 @@ AS_IF([test "${enable_shared_libvlc}" != "no" || test "${enable_libtool}" != "no FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"], FILE_LIBVLC_DLL="" ) -pic=no -AS_IF([test "${build_pic}" = "yes"], [pic=pic]) -AS_IF([test "${SYS}" = "mingw32"], [pic=no]) -AS_IF([test "${pic}" = "no"], [pic=]) +pic=pic +AS_IF([test "${SYS}" = "mingw32"], [pic=]) AC_SUBST(pic) -AM_CONDITIONAL(BUILD_PIC, [test "${build_pic}" = "yes" && test "x${pic}" = "xpic"]) - dnl Import conditional variables generated by bootstrap VLC_CONDITIONALS diff --git a/mozilla/Makefile.am b/mozilla/Makefile.am index 62d4fe6a18..0b28ea146e 100644 --- a/mozilla/Makefile.am +++ b/mozilla/Makefile.am @@ -25,7 +25,7 @@ if BUILD_SHARED LIBRARIES_libvlc_pic = -Wl,-rpath '$(libdir)' -L$(top_builddir)/src -lvlc LIBRARIES_libvlc_nopic = $(LIBRARIES_libvlc_pic) else -LIBRARIES_libvlc_pic = $(top_builddir)/src/libvlc_pic.a +LIBRARIES_libvlc_pic = $(top_builddir)/src/libvlc.a LIBRARIES_libvlc_nopic = $(top_builddir)/src/libvlc.a endif diff --git a/src/Makefile.am b/src/Makefile.am index 8bfaa552ed..691ebbc088 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -131,14 +131,13 @@ if USE_LIBTOOL while read cmd; do echo $$cmd; eval "($$cmd)" || exit $$? ; done endif if BUILD_SHARED - @if test "$(pic)" = "pic"; then ext="_pic.a"; else ext=".a"; fi ; \ - for c in `$(VLC_CONFIG) --libs builtin`; do \ + @for c in `$(VLC_CONFIG) --libs builtin`; do \ case $$c in \ ../modules/*.a) echo $$c ;; \ esac ; \ done | \ sed -e 's/^\(.*\)\/\([^\/]*\)\.a$$/cd \1 \&\& $(MAKE) \2/g' | \ - while read cmd; do echo $$cmd$$ext; eval "($$cmd$$ext)" || exit $$? ; done + while read cmd; do echo $$cmd.a; eval "($$cmd.a)" || exit $$? ; done endif touch $@ @@ -151,11 +150,6 @@ libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc` libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc` libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc` -libvlc_pic_a_SOURCES = $(SOURCES_libvlc) -libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic` -libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic` -libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic` - libvlc_la_SOURCES = $(SOURCES_libvlc) libvlc_la_LIBADD = $(INCLUDED_LIBINTL) libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags vlc` @@ -190,9 +184,6 @@ if USE_LIBTOOL lib_LTLIBRARIES = libvlc.la else lib_LIBRARIES = libvlc.a -if BUILD_PIC -lib_LIBRARIES += libvlc_pic.a -endif endif if HAVE_WIN32 -- 2.39.2