]> git.sesse.net Git - vlc/blob - bootstrap
With libtool, compile builtins as lib*_builtin.la to avoid name collision
[vlc] / bootstrap
1 #! /bin/sh
2
3 ##  bootstrap file for the VLC media player
4 ##  $Id$
5 ##
6 ## Copyright (C) 2005-2006 the VideoLAN team
7 ##
8 ##  Initial author: Sam Hocevar <sam@zoy.org>
9
10 if test "$#" != "0"; then
11   echo "Usage: $0"
12   echo "  Calls automake, autoconf, autoheader, autopoint and other auto* to generate"
13   echo "  m4 macros and prepare Makefiles."
14   exit 1
15 fi
16
17 ###
18 ###  Get a sane environment, just in case
19 ###
20 LANG=C
21 export LANG
22 CYGWIN=binmode
23 export CYGWIN
24
25 set -e
26 set -x
27
28 ##
29 ## Check for various tools
30 ##
31 AUTOMAKESUCKS=no
32 INSTALLSUCKS=no
33
34 ACLOCAL_ARGS="-I m4"
35
36 # Check for contrib directory
37 if test -d extras/contrib/bin; then
38   export PATH=./extras/contrib/bin:$PATH
39   if test -d extras/contrib/share/aclocal; then
40     ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/share/aclocal"
41   fi
42   if test ".`uname -s`" = ".Darwin"; then
43     export LD_LIBRARY_PATH=./extras/contrib/lib:$LD_LIBRARY_PATH
44     export DYLD_LIBRARY_PATH=./extras/contrib/lib:$DYLD_LIBRARY_PATH
45   elif test ".`uname -s`" = ".BeOS"; then
46     export LIBRARY_PATH=./extras/contrib/lib:$LIBRARY_PATH
47     export BELIBRARIES=./extras/contrib/lib:$BELIBRARIES
48   fi
49 fi
50
51 # Check for automake
52 amvers="none"
53 if automake-1.9 --version >/dev/null 2>&1; then
54   amvers="-1.9"
55 elif automake-1.8 --version >/dev/null 2>&1; then
56   amvers="-1.8"
57 elif automake-1.7 --version >/dev/null 2>&1; then
58   amvers="-1.7"
59 elif automake-1.6 --version >/dev/null 2>&1; then
60   amvers="-1.6"
61   if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" "<=" "1.6.1" > /dev/null 2>&1; then
62     AUTOMAKESUCKS=yes
63   fi
64 elif automake-1.5 --version >/dev/null 2>&1; then
65   INSTALLSUCKS=yes
66   amvers="-1.5"
67 elif automake --version > /dev/null 2>&1; then
68   amvers=""
69   case "`automake --version | sed -e '1s/[^0-9]*//' -e q`" in
70     0|0.*|1|1.[01234]|1.[01234][-.]*)
71       amvers="none" ;;
72     1.5|1.5.*)
73       INSTALLSUCKS=yes ;;
74     1.6|1.6.0|1.6.1)
75       AUTOMAKESUCKS=yes ;;
76     1.9|1.9.2)
77       ;;
78   esac
79 fi
80
81 if test "${amvers}" = "none"; then
82   set +x
83   echo "$0: you need automake version 1.5 or later"
84   exit 1
85 fi
86
87 # Check for libtool
88 libtoolize="no"
89 if glibtoolize --version >/dev/null 2>&1; then
90   libtoolize="glibtoolize"
91 elif libtoolize --version >/dev/null 2>&1; then
92   libtoolize="libtoolize"
93 fi
94
95 if test "$libtoolize" = "no"; then
96   set +x
97   echo "$0: you need libtool"
98   exit 1
99 fi
100
101 # Check for gettext
102 if gettextize --version >/dev/null 2>&1; then
103 # Autopoint is available from 0.11.3, but we need 0.11.5
104 if expr `gettextize --version | sed -e '1s/[^0-9]*//' -e q` \
105         '>=' 0.11.5 >/dev/null 2>&1; then
106   # We have gettext, and a recent version! Everything is cool.
107   autopoint=autopoint
108   GETTEXT=yes
109 else
110   # User's gettext is too old. try to continue anyway.
111   autopoint=:
112   GETTEXT=old
113 fi;else
114   set +x
115   echo "you need gettextize (package gettext-devel or gettext)"
116   exit 1
117 fi
118
119 # Check for pkg-config
120 if pkg-config --version >/dev/null 2>&1; then
121   # We have pkg-config, everything is cool.
122   PKGCONFIG=yes
123 else
124   PKGCONFIG=no
125 fi
126
127 aclocal=aclocal${amvers}
128 automake=automake${amvers}
129 autoconf=autoconf
130 autoheader=autoheader
131
132 ##
133 ## Generate the modules makefile, by parsing modules/**/Modules.am
134 ##
135
136 set +x
137 echo "generating modules/**/Makefile.am and m4/private.m4"
138
139 # Prepare m4/private.m4
140 rm -f m4/private.m4 && cat > m4/private.m4 << EOF
141 dnl  Private VLC macros - generated by bootstrap
142
143 EOF
144
145 if [ "${PKGCONFIG}" = "no" ]; then cat >> m4/private.m4 << EOF
146 dnl  User does not have pkg-config, so assume package was not found
147 AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])])
148
149 EOF
150 fi
151
152 if [ "${GETTEXT}" != "yes" ]; then cat >> m4/private.m4 << EOF
153 dnl  User does not have gettext, so this is a no-op
154 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
155
156 EOF
157 fi
158
159 rm -f m4/private.m4-tmp1 && cat > m4/private.m4-tmp1 << EOF
160 dnl  The required AM_CONDITIONAL calls
161 dnl  XXX: too many conditionals make the build very slow, disabled them
162 AC_DEFUN([VLC_CONDITIONALS], [
163 EOF
164 rm -f m4/private.m4-tmp2 && cat > m4/private.m4-tmp2 << EOF
165 dnl  The required AC_SUBST calls
166 AC_DEFUN([VLC_SUBSTS], [
167 EOF
168 rm -f m4/private.m4-tmp3 && cat > m4/private.m4-tmp3 << EOF
169 dnl  The required AC_OUTPUT calls
170 dnl  XXX: this feature is only supported starting from automake-1.7
171 AC_DEFUN([VLC_MAKEFILES], [AC_OUTPUT([
172 EOF
173 rm -f m4/private.m4-tmp4 && cat > m4/private.m4-tmp4 << EOF
174 dnl  Helper macro for vlc-config generation
175 AC_DEFUN([VLC_CONFIG_HELPER], [
176   cat >> vlc-config.in << BLAH
177 EOF
178
179 modules=""
180
181 rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF
182 # Autogenerated by bootstrap - DO NOT EDIT
183 EXTRA_DIST = LIST
184 SUBDIRS = `sed -ne 's,modules/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`
185 EOF
186
187 for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
188 do
189   printf "."
190   modf="modules/${dir}/Modules.am"
191   makf="modules/${dir}/Makefile.am"
192   basedir="`echo "${dir}" | cut -f1 -d/`"
193   # automake will not recurse for make dist if we don't define SUBDIRS = .
194   subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`"
195   mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | xargs`"
196   extra_libs=""
197   extra_ltlibs=""
198   for mod in $mods
199   do
200     extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a lib${mod}_pic.a"
201     extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la lib${mod}_builtin.la"
202   done
203   rm -f "${makf}" && cat > "${makf}" << EOF
204
205 # ${makf} automatically generated from ${modf} by bootstrap
206 # DO NOT EDIT - edit Modules.am or \$(top_srcdir)/bootstrap instead
207
208 basedir = ${basedir}
209 mods = ${mods}
210
211 NULL =
212 libvlc_LTLIBRARIES =
213 noinst_LTLIBRARIES =
214 EXTRA_DIST = Modules.am
215 BUILT_SOURCES =
216 clean_modules =
217 SUBDIRS = ${subdirs}
218 SUFFIXES = _plugin\$(LIBEXT) _plugin.a
219
220 libvlcdir = \$(libdir)/vlc/\$(basedir)
221
222 EXTRA_LIBRARIES = ${extra_libs}
223 EXTRA_LTLIBRARIES = ${extra_ltlibs}
224
225 include Modules.am
226
227 LTLIBVLC = \$(top_builddir)/src/libvlc.la
228
229 if BUILD_SHARED
230 LIBVLC = \$(top_builddir)/src/libvlc\$(LIBEXT)
231 LIBADD = \$(LIBVLC)
232 endif
233
234 all: all-modules
235
236 # Find out which modules were enabled and tell make to build them
237 all-modules:
238 if USE_LIBTOOL
239         @set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
240         if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin.la;; esac; done; fi; \\
241         if test "\$(builtin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_builtin.la;; esac; done; fi; \\
242         \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
243         test -z "\$\$fail"
244 else
245         @set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
246         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; \\
247         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; \\
248         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; \\
249         \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
250         test -z "\$\$fail"
251 endif
252
253 # Build a plugin with the adequate linker and linker's flags
254 _plugin.a_plugin\$(LIBEXT):
255         @mod="\$*" ; mod=\$\${mod#lib} ; \
256         ldfl="\`\$(VLC_CONFIG) --libs plugin \$\$mod\` \$(LIBADD) -u \$(SYMPREF)\$(VLC_ENTRY)" ; \
257         case \`\$(VLC_CONFIG) --linkage \$\$mod\` in \\
258           c++)  ld="\$(CXXLINK)" ;; \
259           objc) ld="\$(OBJCLINK)" ;; \
260           c|*)  ld="\$(LINK)" ;; \
261         esac ; \
262         echo \$\$ld \$< \$\$ldfl ; \
263         \$\$ld \$< \$\$ldfl
264 #ifneq (,\$(findstring cygwin,\$(host)))
265 #       mv -f "\$@.exe" "\$@"
266 #endif
267         @if test -f "\$@.exe"; then mv -f "\$@.exe" "\$@"; fi
268
269 if MAINTAINER_MODE
270 \$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/bootstrap
271         cd \$(top_srcdir) && \$(SHELL) ./bootstrap
272 endif
273
274 mostlyclean-local:
275         -rm -f *.a *\$(LIBEXT)
276
277 clean-local: \$(clean_modules)
278 if USE_LIBTOOL
279         @if test -z "\$(libvlc_LTLIBRARIES)\$(noinst_LTLIBRARIES)"; then \
280           l=\$\$(\$(VLC_CONFIG) --list plugin); \
281           p=\`for mod in \$(mods); do case "\$\$l " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
282           l=\$\$(\$(VLC_CONFIG) --list builtin); \
283           s=\`for mod in \$(mods); do case "\$\$l " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_builtin.la" ;; esac; done\` ; \
284           test -z "\$\$p\$\$s" || \
285             \$(MAKE) \$(AM_MAKEFLAGS) \
286               libvlc_LTLIBRARIES="\$\$p" noinst_LTLIBRARIES="\$\$s" clean ; \
287         fi
288 endif
289
290 ### automake creates libvlcdir after running install-*-local
291 ### so we have to create it ourselves first
292 install-exec-local: all-modules
293 if USE_LIBTOOL
294         @if test -z "\$(libvlc_LTLIBRARIES)"; then \
295           z=\$\$(\$(VLC_CONFIG) --list plugin); \
296           m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
297           test -z "\$\$m" || \
298             \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" install ; \
299         fi
300 else
301         mkdir -p -- "\$(DESTDIR)\$(libvlcdir)"
302         @z=\$\$(\$(VLC_CONFIG) --list plugin); \
303         for mod in \$(mods); do \
304           case "\$\$z " \
305             in *\ \$\${mod}\ *) \
306               echo \$(INSTALL_PROGRAM) "lib\$\${mod}_plugin\$(LIBEXT)" "\$(DESTDIR)\$(libvlcdir)/" ; \
307               \$(INSTALL_PROGRAM) "lib\$\${mod}_plugin\$(LIBEXT)" "\$(DESTDIR)\$(libvlcdir)/" || exit \$\$?; \
308               ;; \
309           esac; \
310         done
311         @z=\$\$(\$(VLC_CONFIG) --list builtin); \
312         for mod in \$(mods); do \
313           case "\$\$z " \
314             in *\ \$\${mod}\ *) \
315               echo \$(INSTALL_DATA) "lib\$\${mod}.a" "\$(DESTDIR)\$(libdir)/vlc/" ; \
316               \$(INSTALL_DATA) "lib\$\${mod}.a" "\$(DESTDIR)\$(libdir)/vlc/" || exit \$\$?; \
317               ;; \
318           esac; \
319         done
320 if BUILD_MOZILLA
321         @z=\$\$(\$(VLC_CONFIG) --list builtin); \
322         for mod in \$(mods); do \
323           case "\$\$z " \
324             in *\ \$\${mod}\ *) \
325               echo \$(INSTALL_DATA) "lib\$\${mod}_pic.a" "\$(DESTDIR)\$(libdir)/vlc/" ; \
326               \$(INSTALL_DATA) "lib\$\${mod}_pic.a" "\$(DESTDIR)\$(libdir)/vlc/" || exit \$\$?; \
327               ;; \
328           esac; \
329         done
330 endif
331 endif
332
333 uninstall-local:
334 if USE_LIBTOOL
335         @if test -z "\$(libvlc_LTLIBRARIES)"; then \
336           z=\$\$(\$(VLC_CONFIG) --list plugin); \
337           m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
338           test -z "\$\$m" || \
339             \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" uninstall ; \
340         fi
341 else
342         @z=\$\$(\$(VLC_CONFIG) --list plugin); \
343         for mod in \$(mods); do \
344           case "\$\$z " \
345             in *\ \$\${mod}\ *) \
346               echo rm -f "\$(DESTDIR)\$(libvlcdir)/lib\$\${mod}_plugin\$(LIBEXT)" ; \
347               rm -f "\$(DESTDIR)\$(libvlcdir)/lib\$\${mod}_plugin\$(LIBEXT)" || true; \
348               ;; \
349           esac; \
350         done
351         @z=\$\$(\$(VLC_CONFIG) --list builtin); \
352         for mod in \$(mods); do \
353           case "\$\$z " \
354             in *\ \$\${mod}\ *) \
355               echo rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}.a" ; \
356               rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}.a" || true; \
357               ;; \
358           esac; \
359         done
360 if BUILD_MOZILLA
361         @z=\$\$(\$(VLC_CONFIG) --list builtin); \
362         for mod in \$(mods); do \
363           case "\$\$z " \
364             in *\ \$\${mod}\ *) \
365               echo rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}_pic.a" ; \
366               rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}_pic.a" || true; \
367               ;; \
368           esac; \
369         done
370 endif
371 endif
372
373 EOF
374   for mod in $mods
375   do
376     if grep '^nodist_SOURCES_'${mod}'' < "${modf}" >/dev/null 2>&1; then
377         NODIST=''; else
378         NODIST='#'; fi
379     cat >> m4/private.m4-tmp4 << EOF
380     ${mod}) list="\\\${list} ${dir}/lib${mod}" ;;
381 EOF
382 # Generation of modules/**/Makefile.am
383 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
384 # - L_ is for LIBRARIES_, D_ for DATA_, B_ for BUILT_SOURCES_, F_ for LDFLAGS_,
385 #   S_ for SOURCES_, _p is for _plugin, _b is for _builtin. This is to reduce
386 #   the resulting file size.
387 # - *_CFLAGS, *_CXXFLAGS etc. because per-object CPPFLAGS does not seem to
388 #   work properly with any automake version I tested.
389     cat >> "${makf}" << EOF
390 # The ${mod} plugin
391
392 EOF
393     if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
394 clean_modules += clean-${mod}
395 clean-${mod}:
396         -test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod})
397
398 EOF
399     fi
400     if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
401 BUILT_SOURCES += \$(B${mod})
402 EOF
403     fi
404     cat >> "${makf}" << EOF
405 lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
406 lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
407 EOF
408     if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
409 nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
410 nodist_lib${mod}_plugin_la_SOURCES = \$(nodist_SOURCES_${mod})
411 EOF
412     fi
413     cat >> "${makf}" << EOF
414 lib${mod}_plugin_a_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
415 lib${mod}_plugin_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
416 lib${mod}_plugin_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`
417 lib${mod}_plugin_la_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
418 lib${mod}_plugin_la_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
419 lib${mod}_plugin_la_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`
420 lib${mod}_plugin_la_LDFLAGS = \`\$(VLC_CONFIG) --libs plugin ${mod}\` \\
421         -rpath '\$(libvlcdir)' -module -shrext \$(LIBEXT)
422 lib${mod}_plugin_la_LIBADD = \$(LTLIBVLC)
423 lib${mod}_plugin_la_DEPENDENCIES = \$(LTLIBVLC)
424
425 lib${mod}_pic_a_SOURCES = \$(SOURCES_${mod})
426 EOF
427     if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
428 nodist_lib${mod}_pic_a_SOURCES = \$(nodist_SOURCES_${mod})
429 EOF
430     fi
431     cat >> "${makf}" << EOF
432 lib${mod}_pic_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\`
433 lib${mod}_pic_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\`
434 lib${mod}_pic_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\`
435
436 lib${mod}_a_SOURCES = \$(SOURCES_${mod})
437 lib${mod}_builtin_la_SOURCES = \$(SOURCES_${mod})
438 EOF
439     if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
440 nodist_lib${mod}_a_SOURCES = \$(nodist_SOURCES_${mod})
441 nodist_lib${mod}_builtin_la_SOURCES = \$(nodist_SOURCES_${mod})
442 EOF
443     fi
444     cat >> "${makf}" << EOF
445 lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\`
446 lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\`
447 lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\`
448 lib${mod}_builtin_la_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` -static
449 lib${mod}_builtin_la_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` -static
450 lib${mod}_builtin_la_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` -static
451 lib${mod}_builtin_la_LDFLAGS = \`\$(VLC_CONFIG) --libs ${mod}\` -static
452
453 EOF
454   done
455 done
456
457 cat >> m4/private.m4-tmp1 << EOF
458 ])
459 EOF
460 cat m4/private.m4-tmp1 >> m4/private.m4 && rm -f m4/private.m4-tmp1
461 cat >> m4/private.m4-tmp2 << EOF
462 ])
463 EOF
464 cat m4/private.m4-tmp2 >> m4/private.m4 && rm -f m4/private.m4-tmp2
465 cat >> m4/private.m4-tmp3 << EOF
466 ])])
467 EOF
468 cat m4/private.m4-tmp3 >> m4/private.m4 && rm -f m4/private.m4-tmp3
469 cat >> m4/private.m4-tmp4 << EOF
470 BLAH
471 ])
472 EOF
473 cat m4/private.m4-tmp4 >> m4/private.m4 && rm -f m4/private.m4-tmp4
474
475 echo " done."
476
477 ###
478 ###  classic bootstrap stuff
479 ###
480 set -x
481
482 # remove autotools cruft
483 rm -f aclocal.m4 configure config.log config.h config.h.in
484 rm -Rf autom4te*.cache
485 # remove old autotools extra cruft
486 rm -f config.guess config.sub missing mkinstalldirs compile depcomp install-sh
487 # remove new autotools extra cruft
488 rm -Rf autotools
489 mkdir autotools
490 # remove libtool cruft
491 rm -f ltmain.sh libtool ltconfig
492 # remove gettext cruft
493 rm -f ABOUT-NLS
494 rm -Rf intl
495 # remove old vlc cruft
496 rm -f m4/oldgettext.m4 stamp-pic configure.ac.in Modules.am
497 # remove new vlc cruft
498 rm -f stamp-builtin stamp-h* mozilla/stamp-pic
499
500 # Automake complains if these are not present
501 rm -f vlc-config.in && printf "" > vlc-config.in
502 if [ "$GETTEXT" != "yes" ]; then
503   test -d intl || mkdir intl
504   printf "" > intl/Makefile.am
505   printf "" > ABOUT-NLS
506 fi
507
508 # Libtoolize directory
509 ${libtoolize} --copy --force
510 if test -f "ltmain.sh"; then
511   echo "$0: working around a minor libtool issue"
512   mv ltmain.sh autotools/
513 fi
514
515 # Do the rest
516 ${autopoint} -f
517 ${aclocal} ${ACLOCAL_ARGS}
518 ${autoconf}
519 ${autoheader}
520 ${automake} --add-missing --copy
521
522 ##
523 ##  files which need to be regenerated
524 ##
525 rm -f vlc-config.in vlc-config
526 rm -f src/misc/modules_builtin.h
527 rm -f mozilla/vlcintf.h
528
529 # Shut up
530 set +x
531
532 ##
533 ##  Tell the user about gettext, pkg-config and sed
534 ##
535 if [ "${GETTEXT}" = "old" ]; then
536   cat << EOF
537
538 ==========================================================
539 NOTE: you have an old version of gettext installed on your
540 system. The vlc build will work, but if your system does not
541 have libintl you will not have internationalization support.
542 We suggest upgrading to gettext 0.11.5 or later.
543 EOF
544 fi
545
546 if [ "$PKGCONFIG" = "no" ]; then
547   cat << EOF
548
549 ==============================================================
550 NOTE: you do not have the "pkg-config" utility on your system;
551 detection of the Gtk-2.0 and GNOME 2.0 libraries will not be
552 reliable.
553 EOF
554 fi
555
556 if [ "$AUTOMAKESUCKS" = "yes" ]; then
557   cat << EOF
558
559 =============================================================
560 IMPORTANT NOTE: your version of automake has a bug which will
561 prevent proper plugin compilation. Either compile VLC with
562 the --disable-plugins flag, or use a version of automake newer
563 than 1.6.1 (1.6.2 is OK, and so are the 1.5 series).
564 EOF
565 fi
566
567 if [ "$INSTALLSUCKS" = "yes" ]; then
568   cat << EOF
569
570 =============================================================
571 IMPORTANT NOTE: your version of automake has a bug which will
572 prevent proper installation. Do not use "make install" with this
573 version of automake, or use a version of automake newer than 1.5
574 (such as 1.6 or 1.7).
575 EOF
576 fi
577