bootstrap 14.6 KB
Newer Older
1
2
#! /bin/sh

3
##  bootstrap file for the VLC media player
4
##
5
## Copyright (C) 2005-2006 the VideoLAN team
6
##
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
7
8
9
10
##  Authors: Sam Hocevar <sam@zoy.org>
##           Rémi Denis-Courmont <rem # videolan # org>
##
## Muahaha! no annoying dollar I dee dollar that causes rebuild at commit
11

Sam Hocevar's avatar
Sam Hocevar committed
12
13
14
15
if test "$#" != "0"; then
  echo "Usage: $0"
  echo "  Calls automake, autoconf, autoheader, autopoint and other auto* to generate"
  echo "  m4 macros and prepare Makefiles."
16
17
18
  exit 1
fi

19
###
20
###  Get a sane environment, just in case
21
###
22
23
LANG=C
export LANG
24
25
CYGWIN=binmode
export CYGWIN
26

27
set -e
28
set -x
29

30
##
31
## Check for various tools
32
##
33
34
AUTOMAKESUCKS=no
INSTALLSUCKS=no
35

36
37
ACLOCAL_ARGS="-I m4"

38
39
40
# Check for contrib directory
if test -d extras/contrib/bin; then
  export PATH=./extras/contrib/bin:$PATH
41
42
43
  if test -d extras/contrib/share/aclocal; then
    ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/share/aclocal"
  fi
44
45
46
47
48
49
50
  if test ".`uname -s`" = ".Darwin"; then
    export LD_LIBRARY_PATH=./extras/contrib/lib:$LD_LIBRARY_PATH
    export DYLD_LIBRARY_PATH=./extras/contrib/lib:$DYLD_LIBRARY_PATH
  elif test ".`uname -s`" = ".BeOS"; then
    export LIBRARY_PATH=./extras/contrib/lib:$LIBRARY_PATH
    export BELIBRARIES=./extras/contrib/lib:$BELIBRARIES
  fi
51
52
fi

53
# Check for automake
54
amvers="no"
55
for v in "-1.9" "19" "-1.8" "18" "-1.7" "17"; do
56
57
58
59
  if automake${v} --version >/dev/null 2>&1; then
    amsuff="${v}"
    amvers="${v}"
    break
60
  fi
61
done
62

63
64
65
if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then
  amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
  amsuff=""
66
67
fi

68
case "${amvers}" in
69
  no|1.[0123456]|1.[0123456].*|1[0123456])
70
    set +x
71
    echo "$0: you need automake version 1.7 or later"
72
73
74
75
    exit 1
    ;;
esac

76
77
78
79
80
81
82
83
84
85
86
# Check for libtool
libtoolize="no"
if glibtoolize --version >/dev/null 2>&1; then
  libtoolize="glibtoolize"
elif libtoolize --version >/dev/null 2>&1; then
  libtoolize="libtoolize"
fi

if test "$libtoolize" = "no"; then
  set +x
  echo "$0: you need libtool"
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
  exit 1
fi

# Check for gettext
if gettextize --version >/dev/null 2>&1; then
# Autopoint is available from 0.11.3, but we need 0.11.5
if expr `gettextize --version | sed -e '1s/[^0-9]*//' -e q` \
        '>=' 0.11.5 >/dev/null 2>&1; then
  # We have gettext, and a recent version! Everything is cool.
  autopoint=autopoint
  GETTEXT=yes
else
  # User's gettext is too old. try to continue anyway.
  autopoint=:
  GETTEXT=old
fi;else
103
104
105
  set +x
  echo "you need gettextize (package gettext-devel or gettext)"
  exit 1
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
fi

# Check for pkg-config
if pkg-config --version >/dev/null 2>&1; then
  # We have pkg-config, everything is cool.
  PKGCONFIG=yes
else
  PKGCONFIG=no
fi

aclocal=aclocal${amvers}
automake=automake${amvers}
autoconf=autoconf
autoheader=autoheader

121
122
123
124
##
## Generate the modules makefile, by parsing modules/**/Modules.am
##

125
set +x
126
echo "generating modules/**/Makefile.am and m4/private.m4"
127

Sam Hocevar's avatar
Sam Hocevar committed
128
# Prepare m4/private.m4
Sam Hocevar's avatar
Sam Hocevar committed
129
rm -f m4/private.m4 && cat > m4/private.m4 << EOF
130
dnl  Private VLC macros - generated by bootstrap
131
132

EOF
gbazin's avatar
   
gbazin committed
133
134

if [ "${PKGCONFIG}" = "no" ]; then cat >> m4/private.m4 << EOF
135
136
dnl  User does not have pkg-config, so assume package was not found
AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])])
gbazin's avatar
   
gbazin committed
137
138
139
140
141
142
143
144
145
146
147

EOF
fi

if [ "${GETTEXT}" != "yes" ]; then cat >> m4/private.m4 << EOF
dnl  User does not have gettext, so this is a no-op
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])

EOF
fi

Sam Hocevar's avatar
Sam Hocevar committed
148
149
150
rm -f m4/private.m4-tmp1 && cat > m4/private.m4-tmp1 << EOF
dnl  The required AM_CONDITIONAL calls
dnl  XXX: too many conditionals make the build very slow, disabled them
Sam Hocevar's avatar
Sam Hocevar committed
151
AC_DEFUN([VLC_CONDITIONALS], [
Sam Hocevar's avatar
Sam Hocevar committed
152
153
154
EOF
rm -f m4/private.m4-tmp2 && cat > m4/private.m4-tmp2 << EOF
dnl  The required AC_SUBST calls
Sam Hocevar's avatar
Sam Hocevar committed
155
AC_DEFUN([VLC_SUBSTS], [
Sam Hocevar's avatar
Sam Hocevar committed
156
157
158
159
EOF
rm -f m4/private.m4-tmp3 && cat > m4/private.m4-tmp3 << EOF
dnl  The required AC_OUTPUT calls
dnl  XXX: this feature is only supported starting from automake-1.7
Sam Hocevar's avatar
Sam Hocevar committed
160
AC_DEFUN([VLC_MAKEFILES], [AC_OUTPUT([
Sam Hocevar's avatar
Sam Hocevar committed
161
162
163
EOF
rm -f m4/private.m4-tmp4 && cat > m4/private.m4-tmp4 << EOF
dnl  Helper macro for vlc-config generation
Sam Hocevar's avatar
Sam Hocevar committed
164
AC_DEFUN([VLC_CONFIG_HELPER], [
Sam Hocevar's avatar
Sam Hocevar committed
165
166
  cat >> vlc-config.in << BLAH
EOF
167
168
169

modules=""

Sam Hocevar's avatar
Sam Hocevar committed
170
171
172
rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF
# Autogenerated by bootstrap - DO NOT EDIT
EXTRA_DIST = LIST
Sam Hocevar's avatar
Sam Hocevar committed
173
SUBDIRS = `sed -ne 's,modules/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`
Sam Hocevar's avatar
Sam Hocevar committed
174
EOF
175

Sam Hocevar's avatar
Sam Hocevar committed
176
for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
Sam Hocevar's avatar
Sam Hocevar committed
177
178
do
  printf "."
179
180
  modf="modules/${dir}/Modules.am"
  makf="modules/${dir}/Makefile.am"
Sam Hocevar's avatar
Sam Hocevar committed
181
  basedir="`echo "${dir}" | cut -f1 -d/`"
Sam Hocevar's avatar
Sam Hocevar committed
182
  # automake will not recurse for make dist if we don't define SUBDIRS = .
Sam Hocevar's avatar
Sam Hocevar committed
183
  subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`"
184
185
  mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | xargs`"
  extra_libs=""
186
  extra_ltlibs=""
187
188
  for mod in $mods
  do
189
    extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a"
190
    extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la lib${mod}_builtin.la"
191
192
  done
  rm -f "${makf}" && cat > "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
193

194
# ${makf} automatically generated from ${modf} by bootstrap
195
196
197
198
# DO NOT EDIT - edit Modules.am or \$(top_srcdir)/bootstrap instead

basedir = ${basedir}
mods = ${mods}
Sam Hocevar's avatar
Sam Hocevar committed
199
200

NULL =
201
libvlc_LTLIBRARIES =
202
noinst_LTLIBRARIES =
Sam Hocevar's avatar
Sam Hocevar committed
203
204
EXTRA_DIST = Modules.am
BUILT_SOURCES =
205
clean_modules =
Sam Hocevar's avatar
Sam Hocevar committed
206
SUBDIRS = ${subdirs}
207
SUFFIXES = _plugin\$(LIBEXT) _plugin.a
208
209

libvlcdir = \$(libdir)/vlc/\$(basedir)
210
211

EXTRA_LIBRARIES = ${extra_libs}
212
213
EXTRA_LTLIBRARIES = ${extra_ltlibs}

Sam Hocevar's avatar
Sam Hocevar committed
214
include Modules.am
Sam Hocevar's avatar
Sam Hocevar committed
215

216
217
LTLIBVLC = \$(top_builddir)/src/libvlc.la

218
if BUILD_SHARED
219
LIBVLC = -L\$(top_builddir)/src -lvlc
220
221
222
LIBADD = \$(LIBVLC)
endif

Sam Hocevar's avatar
Sam Hocevar committed
223
all: all-modules
224

zorglub's avatar
zorglub committed
225
226
227
nice:
	\$(top_builddir)/compile

228
# Find out which modules were enabled and tell make to build them
Sam Hocevar's avatar
Sam Hocevar committed
229
all-modules:
230
231
232
if USE_LIBTOOL
	@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.la;; esac; done; fi; \\
233
	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; \\
234
235
236
	\`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
	test -z "\$\$fail"
else
Sam Hocevar's avatar
Sam Hocevar committed
237
	@set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
238
239
	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; \\
Sam Hocevar's avatar
Sam Hocevar committed
240
241
	\`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
	test -z "\$\$fail"
242
endif
Sam Hocevar's avatar
Sam Hocevar committed
243

244
245
# Build a plugin with the adequate linker and linker's flags
_plugin.a_plugin\$(LIBEXT):
246
	@mod="\$*" ; mod=\$\${mod#lib} ; \
247
	ldfl="\`\$(VLC_CONFIG) --libs plugin \$\$mod\` \$(LIBADD) -u \$(SYMPREF)\$(VLC_ENTRY)" ; \
248
249
250
251
252
253
254
	case \`\$(VLC_CONFIG) --linkage \$\$mod\` in \\
	  c++)  ld="\$(CXXLINK)" ;; \
	  objc) ld="\$(OBJCLINK)" ;; \
	  c|*)  ld="\$(LINK)" ;; \
	esac ; \
	echo \$\$ld \$< \$\$ldfl ; \
	\$\$ld \$< \$\$ldfl
255
#ifneq (,\$(findstring cygwin,\$(host)))
256
#	mv -f "\$@.exe" "\$@"
257
#endif
258
	@if test -f "\$@.exe"; then mv -f "\$@.exe" "\$@"; fi
259

260
if MAINTAINER_MODE
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
261
\$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/bootstrap
262
	cd \$(top_srcdir) && \$(SHELL) ./bootstrap
263
endif
264

265
mostlyclean-local:
266
267
268
if USE_LIBTOOL
	-rm -f *.la
else
269
	-rm -f *.a *\$(LIBEXT)
270
endif
271

272
273
clean-local: \$(clean_modules)

274
275
276
### automake creates libvlcdir after running install-*-local
### so we have to create it ourselves first
install-exec-local: all-modules
277
278
279
280
if USE_LIBTOOL
	@if test -z "\$(libvlc_LTLIBRARIES)"; then \
	  z=\$\$(\$(VLC_CONFIG) --list plugin); \
	  m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
281
	  test -z "\$\$m" || \
282
  	    \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" install-libvlcLTLIBRARIES || exit \$\$? ; \
283
284
	fi
else
285
	mkdir -p -- "\$(DESTDIR)\$(libvlcdir)"
286
287
288
289
	@z=\$\$(\$(VLC_CONFIG) --list plugin); \
	for mod in \$(mods); do \
	  case "\$\$z " \
	    in *\ \$\${mod}\ *) \
290
291
	      echo \$(INSTALL_PROGRAM) "lib\$\${mod}_plugin\$(LIBEXT)" "\$(DESTDIR)\$(libvlcdir)/" ; \
	      \$(INSTALL_PROGRAM) "lib\$\${mod}_plugin\$(LIBEXT)" "\$(DESTDIR)\$(libvlcdir)/" || exit \$\$?; \
292
293
294
295
296
297
298
	      ;; \
	  esac; \
	done
	@z=\$\$(\$(VLC_CONFIG) --list builtin); \
	for mod in \$(mods); do \
	  case "\$\$z " \
	    in *\ \$\${mod}\ *) \
299
300
	      echo \$(INSTALL_DATA) "lib\$\${mod}.a" "\$(DESTDIR)\$(libdir)/vlc/" ; \
	      \$(INSTALL_DATA) "lib\$\${mod}.a" "\$(DESTDIR)\$(libdir)/vlc/" || exit \$\$?; \
301
302
303
	      ;; \
	  esac; \
	done
304
endif
305
306

uninstall-local:
307
308
309
310
if USE_LIBTOOL
	@if test -z "\$(libvlc_LTLIBRARIES)"; then \
	  z=\$\$(\$(VLC_CONFIG) --list plugin); \
	  m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
311
	  test -z "\$\$m" || \
312
	    \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" uninstall-libvlcLTLIBRARIES || exit \$\$?; \
313
314
	fi
else
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
	@z=\$\$(\$(VLC_CONFIG) --list plugin); \
	for mod in \$(mods); do \
	  case "\$\$z " \
	    in *\ \$\${mod}\ *) \
	      echo rm -f "\$(DESTDIR)\$(libvlcdir)/lib\$\${mod}_plugin\$(LIBEXT)" ; \
	      rm -f "\$(DESTDIR)\$(libvlcdir)/lib\$\${mod}_plugin\$(LIBEXT)" || true; \
	      ;; \
	  esac; \
	done
	@z=\$\$(\$(VLC_CONFIG) --list builtin); \
	for mod in \$(mods); do \
	  case "\$\$z " \
	    in *\ \$\${mod}\ *) \
	      echo rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}.a" ; \
	      rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}.a" || true; \
	      ;; \
	  esac; \
	done
333
endif
334

335
EOF
336
  for mod in $mods
337
  do
338
    if grep '^nodist_SOURCES_'${mod}'' < "${modf}" >/dev/null 2>&1; then
339
340
        NODIST=''; else
        NODIST='#'; fi
Sam Hocevar's avatar
Sam Hocevar committed
341
342
    cat >> m4/private.m4-tmp4 << EOF
    ${mod}) list="\\\${list} ${dir}/lib${mod}" ;;
343
EOF
Sam Hocevar's avatar
Sam Hocevar committed
344
345
# Generation of modules/**/Makefile.am
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
346
347
348
# - L_ is for LIBRARIES_, D_ for DATA_, B_ for BUILT_SOURCES_, F_ for LDFLAGS_,
#   S_ for SOURCES_, _p is for _plugin, _b is for _builtin. This is to reduce
#   the resulting file size.
Sam Hocevar's avatar
Sam Hocevar committed
349
350
# - *_CFLAGS, *_CXXFLAGS etc. because per-object CPPFLAGS does not seem to
#   work properly with any automake version I tested.
351
    cat >> "${makf}" << EOF
352
# The ${mod} plugin
Sam Hocevar's avatar
Sam Hocevar committed
353

354
EOF
355
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
356
clean_modules += clean-${mod}
357
clean-${mod}:
Sam Hocevar's avatar
Sam Hocevar committed
358
	-test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod})
359
360
361

EOF
    fi
362
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
363
BUILT_SOURCES += \$(B${mod})
Sam Hocevar's avatar
Sam Hocevar committed
364
365
EOF
    fi
366
    cat >> "${makf}" << EOF
367
lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
368
lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
Sam Hocevar's avatar
Sam Hocevar committed
369
EOF
370
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
371
nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
372
nodist_lib${mod}_plugin_la_SOURCES = \$(nodist_SOURCES_${mod})
Sam Hocevar's avatar
Sam Hocevar committed
373
374
EOF
    fi
375
    cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
376
377
378
lib${mod}_plugin_a_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
lib${mod}_plugin_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
lib${mod}_plugin_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`
379
380
381
382
lib${mod}_plugin_la_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
lib${mod}_plugin_la_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
lib${mod}_plugin_la_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`
lib${mod}_plugin_la_LDFLAGS = \`\$(VLC_CONFIG) --libs plugin ${mod}\` \\
383
384
	-rpath '\$(libvlcdir)' -avoid-version -module -shrext \$(LIBEXT) \\
	-export-symbol-regex ^\$(VLC_ENTRY)\$\$
385
lib${mod}_plugin_la_LIBADD = \$(LTLIBVLC)
Sam Hocevar's avatar
Sam Hocevar committed
386

387
lib${mod}_a_SOURCES = \$(SOURCES_${mod})
388
lib${mod}_builtin_la_SOURCES = \$(SOURCES_${mod})
Sam Hocevar's avatar
Sam Hocevar committed
389
EOF
390
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
391
nodist_lib${mod}_a_SOURCES = \$(nodist_SOURCES_${mod})
392
nodist_lib${mod}_builtin_la_SOURCES = \$(nodist_SOURCES_${mod})
Sam Hocevar's avatar
Sam Hocevar committed
393
394
EOF
    fi
395
    cat >> "${makf}" << EOF
396
397
398
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}\`
399
400
401
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}\`
Sam Hocevar's avatar
Sam Hocevar committed
402

403
404
405
406
EOF
  done
done

Sam Hocevar's avatar
Sam Hocevar committed
407
408
409
410
411
412
413
414
415
416
417
418
419
420
cat >> m4/private.m4-tmp1 << EOF
])
EOF
cat m4/private.m4-tmp1 >> m4/private.m4 && rm -f m4/private.m4-tmp1
cat >> m4/private.m4-tmp2 << EOF
])
EOF
cat m4/private.m4-tmp2 >> m4/private.m4 && rm -f m4/private.m4-tmp2
cat >> m4/private.m4-tmp3 << EOF
])])
EOF
cat m4/private.m4-tmp3 >> m4/private.m4 && rm -f m4/private.m4-tmp3
cat >> m4/private.m4-tmp4 << EOF
BLAH
421
422
])
EOF
Sam Hocevar's avatar
Sam Hocevar committed
423
cat m4/private.m4-tmp4 >> m4/private.m4 && rm -f m4/private.m4-tmp4
424

425
echo " done."
426

427
###
428
###  classic bootstrap stuff
429
###
430
set -x
431
432

# remove autotools cruft
433
rm -f aclocal.m4 configure config.log config.h config.h.in
434
rm -Rf autom4te*.cache
435
436
437
# remove old autotools extra cruft
rm -f config.guess config.sub missing mkinstalldirs compile depcomp install-sh
# remove new autotools extra cruft
Sam Hocevar's avatar
Sam Hocevar committed
438
439
rm -Rf autotools
mkdir autotools
440
441
442
# remove libtool cruft
rm -f ltmain.sh libtool ltconfig
# remove gettext cruft
443
rm -f ABOUT-NLS
444
rm -Rf intl
445
# remove vlc cruft
Sam Hocevar's avatar
Sam Hocevar committed
446
rm -f stamp-builtin stamp-h* mozilla/stamp-pic
447

448
# Automake complains if these are not present
Sam Hocevar's avatar
Sam Hocevar committed
449
rm -f vlc-config.in && printf "" > vlc-config.in
450
451
452
453
454
if [ "$GETTEXT" != "yes" ]; then
  test -d intl || mkdir intl
  printf "" > intl/Makefile.am
  printf "" > ABOUT-NLS
fi
Sam Hocevar's avatar
Sam Hocevar committed
455

456
457
458
459
460
461
462
# Libtoolize directory
${libtoolize} --copy --force
if test -f "ltmain.sh"; then
  echo "$0: working around a minor libtool issue"
  mv ltmain.sh autotools/
fi

463
# Do the rest
Sam Hocevar's avatar
Sam Hocevar committed
464
${autopoint} -f
465
${aclocal} ${ACLOCAL_ARGS}
Sam Hocevar's avatar
Sam Hocevar committed
466
467
${autoconf}
${autoheader}
468
${automake} --add-missing --copy -Wall
469
470

##
Sam Hocevar's avatar
Sam Hocevar committed
471
##  files which need to be regenerated
472
##
Sam Hocevar's avatar
Sam Hocevar committed
473
rm -f vlc-config.in vlc-config
474
rm -f src/misc/modules_builtin.h
475
rm -f mozilla/vlcintf.h
476

477
# Shut up
478
set +x
479

480
##
481
##  Tell the user about gettext, pkg-config and sed
482
##
483
if [ "${GETTEXT}" = "old" ]; then
484
  cat << EOF
485
486
487

==========================================================
NOTE: you have an old version of gettext installed on your
488
489
system. The vlc build will work, but if your system does not
have libintl you will not have internationalization support.
490
We suggest upgrading to gettext 0.11.5 or later.
491
EOF
492
fi
493

494
if [ "$PKGCONFIG" = "no" ]; then
495
  cat << EOF
496
497
498
499
500
501

==============================================================
NOTE: you do not have the "pkg-config" utility on your system;
detection of the Gtk-2.0 and GNOME 2.0 libraries will not be
reliable.
EOF
502
fi
503