]> git.sesse.net Git - vlc/commitdiff
Suppress support for position dependant code (except on mingw32).
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 4 Jun 2006 17:07:19 +0000 (17:07 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 4 Jun 2006 17:07:19 +0000 (17:07 +0000)
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
bootstrap
configure.ac
mozilla/Makefile.am
src/Makefile.am

index 10159624a82c8c5b13d291ec1c4a453819578990..36d69cbdee771b8c2666dd6035fb679bf7c2fbf7 100644 (file)
@@ -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
index 84806c4c688a348358df4372e4d7038a79e2215e..bb92ee09983c54d30426f4b6335e1e2e0362bbe1 100755 (executable)
--- 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
index 2d29dbb8e0d008aab52f83f8ff19f244461432b7..63edaea3590e068b5bb48831e079f64c5b18bbd0 100644 (file)
@@ -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
 
index 62d4fe6a1824163fcdb7886b608735b0a0414919..0b28ea146ed86c0fba25a50afa3def16740aba89 100644 (file)
@@ -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
 
index 8bfaa552ed4ceb7498aa14e68ae0a1c001aac70e..691ebbc088e9679611680a6cdebc27bc91738d47 100644 (file)
@@ -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