Changeset 5b369300e5f7093ac99f2f626533e7f9bc9b66fb
- Timestamp:
- 06/04/06 19:07:19
(2 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1149440839 +0000
- git-parent:
[7cc72564f95e39aa619884fecb04558db63bd6c9]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1149440839 +0000
- Message:
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
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r55f33b6 |
r5b36930 |
|
| 10 | 10 | # - intl should come before modules and . because all the code uses gettext |
|---|
| 11 | 11 | # - modules should come before . because vlc needs the builtins |
|---|
| 12 | | # - . should come before mozilla/bindings because the plugin needs libvlc_pic.a |
|---|
| | 12 | # - . should come before mozilla/bindings because the plugin needs libvlc.a |
|---|
| 13 | 13 | # - po should come before . because VLC.app needs the pofiles |
|---|
| 14 | 14 | # - loader should come before modules because some plugins need it |
|---|
| r7cc7256 |
r5b36930 |
|
| 193 | 193 | for mod in $mods |
|---|
| 194 | 194 | do |
|---|
| 195 | | extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a lib${mod}_pic.a" |
|---|
| | 195 | extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a" |
|---|
| 196 | 196 | extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la lib${mod}_builtin.la" |
|---|
| 197 | 197 | done |
|---|
| … | … | |
| 241 | 241 | 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; \\ |
|---|
| 242 | 242 | 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; \\ |
|---|
| 243 | | 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; \\ |
|---|
| 244 | 243 | \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\ |
|---|
| 245 | 244 | test -z "\$\$fail" |
|---|
| … | … | |
| 306 | 305 | esac; \ |
|---|
| 307 | 306 | done |
|---|
| 308 | | if BUILD_PIC |
|---|
| 309 | | @z=\$\$(\$(VLC_CONFIG) --list builtin); \ |
|---|
| 310 | | for mod in \$(mods); do \ |
|---|
| 311 | | case "\$\$z " \ |
|---|
| 312 | | in *\ \$\${mod}\ *) \ |
|---|
| 313 | | echo \$(INSTALL_DATA) "lib\$\${mod}_pic.a" "\$(DESTDIR)\$(libdir)/vlc/" ; \ |
|---|
| 314 | | \$(INSTALL_DATA) "lib\$\${mod}_pic.a" "\$(DESTDIR)\$(libdir)/vlc/" || exit \$\$?; \ |
|---|
| 315 | | ;; \ |
|---|
| 316 | | esac; \ |
|---|
| 317 | | done |
|---|
| 318 | | endif |
|---|
| 319 | 307 | endif |
|---|
| 320 | 308 | |
|---|
| … | … | |
| 346 | 334 | esac; \ |
|---|
| 347 | 335 | done |
|---|
| 348 | | if BUILD_PIC |
|---|
| 349 | | @z=\$\$(\$(VLC_CONFIG) --list builtin); \ |
|---|
| 350 | | for mod in \$(mods); do \ |
|---|
| 351 | | case "\$\$z " \ |
|---|
| 352 | | in *\ \$\${mod}\ *) \ |
|---|
| 353 | | echo rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}_pic.a" ; \ |
|---|
| 354 | | rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}_pic.a" || true; \ |
|---|
| 355 | | ;; \ |
|---|
| 356 | | esac; \ |
|---|
| 357 | | done |
|---|
| 358 | | endif |
|---|
| 359 | 336 | endif |
|---|
| 360 | 337 | |
|---|
| … | … | |
| 410 | 387 | lib${mod}_plugin_la_LIBADD = \$(LTLIBVLC) |
|---|
| 411 | 388 | |
|---|
| 412 | | lib${mod}_pic_a_SOURCES = \$(SOURCES_${mod}) |
|---|
| 413 | | EOF |
|---|
| 414 | | if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF |
|---|
| 415 | | nodist_lib${mod}_pic_a_SOURCES = \$(nodist_SOURCES_${mod}) |
|---|
| 416 | | EOF |
|---|
| 417 | | fi |
|---|
| 418 | | cat >> "${makf}" << EOF |
|---|
| 419 | | lib${mod}_pic_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\` |
|---|
| 420 | | lib${mod}_pic_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\` |
|---|
| 421 | | lib${mod}_pic_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\` |
|---|
| 422 | | |
|---|
| 423 | 389 | lib${mod}_a_SOURCES = \$(SOURCES_${mod}) |
|---|
| 424 | 390 | lib${mod}_builtin_la_SOURCES = \$(SOURCES_${mod}) |
|---|
| … | … | |
| 430 | 396 | fi |
|---|
| 431 | 397 | cat >> "${makf}" << EOF |
|---|
| 432 | | lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` |
|---|
| 433 | | lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` |
|---|
| 434 | | lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` |
|---|
| | 398 | lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin \$(pic) ${mod}\` |
|---|
| | 399 | lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin \$(pic) ${mod}\` |
|---|
| | 400 | lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin \$(pic) ${mod}\` |
|---|
| 435 | 401 | lib${mod}_builtin_la_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` |
|---|
| 436 | 402 | lib${mod}_builtin_la_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` |
|---|
| … | … | |
| 479 | 445 | rm -f ABOUT-NLS |
|---|
| 480 | 446 | rm -Rf intl |
|---|
| 481 | | # remove old vlc cruft |
|---|
| 482 | | rm -f m4/oldgettext.m4 stamp-pic configure.ac.in Modules.am |
|---|
| 483 | | # remove new vlc cruft |
|---|
| | 447 | # remove vlc cruft |
|---|
| 484 | 448 | rm -f stamp-builtin stamp-h* mozilla/stamp-pic |
|---|
| 485 | 449 | |
|---|
| r7cc7256 |
r5b36930 |
|
| 1442 | 1442 | dnl Is the shared libvlc forced ? |
|---|
| 1443 | 1443 | dnl |
|---|
| 1444 | | build_pic=no |
|---|
| 1445 | 1444 | AC_ARG_ENABLE(shared-libvlc, |
|---|
| 1446 | 1445 | [ --enable-shared-libvlc Win32 libvlc.dll build (default disabled)]) |
|---|
| … | … | |
| 5225 | 5224 | if test "${enable_mozilla}" != "false" |
|---|
| 5226 | 5225 | then |
|---|
| 5227 | | build_pic=yes |
|---|
| 5228 | 5226 | AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path}:/usr/lib/mozilla:/usr/lib64/mozilla:/usr/lib/xulrunner:/usr/lib64/xulrunner) |
|---|
| 5229 | 5227 | if test "${XPIDL}" = "no"; then |
|---|
| … | … | |
| 5241 | 5239 | dnl TODO: look for python dev headers |
|---|
| 5242 | 5240 | AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_mediacontrol_python_bindings}" = "yes"]) |
|---|
| 5243 | | if test "${enable_mediacontrol_python_bindings}" = "yes" |
|---|
| 5244 | | then |
|---|
| 5245 | | build_pic=yes |
|---|
| 5246 | | fi |
|---|
| 5247 | 5241 | |
|---|
| 5248 | 5242 | dnl |
|---|
| … | … | |
| 5252 | 5246 | [ --enable-java-bindings Enable Java bindings (default disabled)]) |
|---|
| 5253 | 5247 | AM_CONDITIONAL(BUILD_JAVA, [test "${enable_java_bindings}" = "yes"]) |
|---|
| 5254 | | if test "${enable_java_bindings}" = "yes" |
|---|
| 5255 | | then |
|---|
| 5256 | | build_pic=yes |
|---|
| 5257 | | fi |
|---|
| 5258 | | |
|---|
| 5259 | | dnl |
|---|
| 5260 | | dnl Enable pic libraries |
|---|
| 5261 | | dnl |
|---|
| 5262 | | AC_ARG_ENABLE(pic, |
|---|
| 5263 | | [ --enable-pic Enable pic libraries (default disabled)]) |
|---|
| 5264 | | AM_CONDITIONAL(BUILD_PIC, [test "${enable_pic}" = "yes"]) |
|---|
| 5265 | | if test "${enable_pic}" = "yes" |
|---|
| 5266 | | then |
|---|
| 5267 | | build_pic=yes |
|---|
| 5268 | | fi |
|---|
| 5269 | | |
|---|
| 5270 | 5248 | |
|---|
| 5271 | 5249 | dnl |
|---|
| … | … | |
| 5401 | 5379 | FILE_LIBVLC_DLL="" ) |
|---|
| 5402 | 5380 | |
|---|
| 5403 | | pic=no |
|---|
| 5404 | | AS_IF([test "${build_pic}" = "yes"], [pic=pic]) |
|---|
| 5405 | | AS_IF([test "${SYS}" = "mingw32"], [pic=no]) |
|---|
| 5406 | | AS_IF([test "${pic}" = "no"], [pic=]) |
|---|
| | 5381 | pic=pic |
|---|
| | 5382 | AS_IF([test "${SYS}" = "mingw32"], [pic=]) |
|---|
| 5407 | 5383 | AC_SUBST(pic) |
|---|
| 5408 | | |
|---|
| 5409 | | AM_CONDITIONAL(BUILD_PIC, [test "${build_pic}" = "yes" && test "x${pic}" = "xpic"]) |
|---|
| 5410 | 5384 | |
|---|
| 5411 | 5385 | dnl Import conditional variables generated by bootstrap |
|---|
| r645e867 |
r5b36930 |
|
| 26 | 26 | LIBRARIES_libvlc_nopic = $(LIBRARIES_libvlc_pic) |
|---|
| 27 | 27 | else |
|---|
| 28 | | LIBRARIES_libvlc_pic = $(top_builddir)/src/libvlc_pic.a |
|---|
| | 28 | LIBRARIES_libvlc_pic = $(top_builddir)/src/libvlc.a |
|---|
| 29 | 29 | LIBRARIES_libvlc_nopic = $(top_builddir)/src/libvlc.a |
|---|
| 30 | 30 | endif |
|---|
| red0b72e |
r5b36930 |
|
| 132 | 132 | endif |
|---|
| 133 | 133 | if BUILD_SHARED |
|---|
| 134 | | @if test "$(pic)" = "pic"; then ext="_pic.a"; else ext=".a"; fi ; \ |
|---|
| 135 | | for c in `$(VLC_CONFIG) --libs builtin`; do \ |
|---|
| | 134 | @for c in `$(VLC_CONFIG) --libs builtin`; do \ |
|---|
| 136 | 135 | case $$c in \ |
|---|
| 137 | 136 | ../modules/*.a) echo $$c ;; \ |
|---|
| … | … | |
| 139 | 138 | done | \ |
|---|
| 140 | 139 | sed -e 's/^\(.*\)\/\([^\/]*\)\.a$$/cd \1 \&\& $(MAKE) \2/g' | \ |
|---|
| 141 | | while read cmd; do echo $$cmd$$ext; eval "($$cmd$$ext)" || exit $$? ; done |
|---|
| | 140 | while read cmd; do echo $$cmd.a; eval "($$cmd.a)" || exit $$? ; done |
|---|
| 142 | 141 | endif |
|---|
| 143 | 142 | touch $@ |
|---|
| … | … | |
| 151 | 150 | libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc` |
|---|
| 152 | 151 | libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc` |
|---|
| 153 | | |
|---|
| 154 | | libvlc_pic_a_SOURCES = $(SOURCES_libvlc) |
|---|
| 155 | | libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic` |
|---|
| 156 | | libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic` |
|---|
| 157 | | libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic` |
|---|
| 158 | 152 | |
|---|
| 159 | 153 | libvlc_la_SOURCES = $(SOURCES_libvlc) |
|---|
| … | … | |
| 191 | 185 | else |
|---|
| 192 | 186 | lib_LIBRARIES = libvlc.a |
|---|
| 193 | | if BUILD_PIC |
|---|
| 194 | | lib_LIBRARIES += libvlc_pic.a |
|---|
| 195 | | endif |
|---|
| 196 | 187 | endif |
|---|
| 197 | 188 | |
|---|