bootstrap 14.5 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
##
7 8
##  Authors: Sam Hocevar <sam@zoy.org>
##           Rémi Denis-Courmont <rem # videolan # org>
9

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

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

25
set -e
26
set -x
27

28
##
29
## Check for various tools
30
##
31 32
AUTOMAKESUCKS=no
INSTALLSUCKS=no
33

34
ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
35

36 37
# Check for contrib directory
if test -d extras/contrib/bin; then
38
  export PATH="`pwd`/extras/contrib/bin:$PATH"
39 40 41
  if test -d extras/contrib/share/aclocal; then
    ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/share/aclocal"
  fi
42 43 44 45 46 47 48
  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
49
elif test ".`uname -s`" = ".Darwin"; then
50 51 52 53 54 55 56 57 58 59 60
  set +x
  echo ""
  echo "ERR: Contribs haven't been built"
  echo "ERR: Please run:"
  echo "ERR: "
  echo "ERR:    'cd extras/contrib && ./bootstrap && make && cd ../..'"
  echo "ERR: "
  echo "ERR: Make sure fink has been disabled too."
  echo ""
  set -x
  exit 1
61 62
fi

63 64
# Check for autoconf
rm -f m4/autoconf260.m4
65
case "$(autoconf --version|head -n 1)" in
66 67 68 69 70 71 72 73 74 75 76
  *2.5[012345678]*)
    echo "Hey, your autoconf is quite old. Update it." >&2
    exit 1
    ;;

  *2.59*)
    echo "Enabling provisional autoconf 2.59 work-around. Update autoconf ASAP."
    cp -f extras/m4/autoconf260.m4 m4/
    ;;
esac

77
# Check for automake
78
amvers="no"
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
79
for v in "-1.10" "110" "-1.9" "19"; do
80 81
  if automake${v} --version >/dev/null 2>&1; then
    amsuff="${v}"
82
    amvers="`echo ${v} | sed -e 's/^-//'`"
83
    break
84
  fi
85
done
86

87 88 89
if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then
  amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
  amsuff=""
90 91
fi

92
case "${amvers}" in
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
93
  no|1.[012345678]|1.[0123456].*|1[0123456]|1.[0123456]-*)
94
    set +x
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
95
    echo "$0: you need automake version 1.9 or later"
96 97 98 99
    exit 1
    ;;
esac

100 101 102 103 104 105 106 107 108 109 110
# 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"
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
  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
127 128 129
  set +x
  echo "you need gettextize (package gettext-devel or gettext)"
  exit 1
130 131 132 133 134 135 136 137 138 139
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

140 141
aclocal=aclocal${amsuff}
automake=automake${amsuff}
142 143 144
autoconf=autoconf
autoheader=autoheader

145 146 147 148
##
## Generate the modules makefile, by parsing modules/**/Modules.am
##

149
set +x
150
echo "generating modules/**/Makefile.am and m4/private.m4"
151

Sam Hocevar's avatar
Sam Hocevar committed
152
# Prepare m4/private.m4
Sam Hocevar's avatar
Sam Hocevar committed
153
rm -f m4/private.m4 && cat > m4/private.m4 << EOF
154
dnl  Private VLC macros - generated by bootstrap
155 156

EOF
157 158

if [ "${PKGCONFIG}" = "no" ]; then cat >> m4/private.m4 << EOF
159 160
dnl  User does not have pkg-config, so assume package was not found
AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])])
161 162 163 164 165 166 167 168 169 170 171

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
172 173 174
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
175
AC_DEFUN([VLC_CONDITIONALS], [
Sam Hocevar's avatar
Sam Hocevar committed
176 177 178
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
179
AC_DEFUN([VLC_SUBSTS], [
Sam Hocevar's avatar
Sam Hocevar committed
180 181 182 183
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
184
AC_DEFUN([VLC_MAKEFILES], [AC_OUTPUT([
Sam Hocevar's avatar
Sam Hocevar committed
185 186 187
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
188
AC_DEFUN([VLC_CONFIG_HELPER], [
Sam Hocevar's avatar
Sam Hocevar committed
189 190
  cat >> vlc-config.in << BLAH
EOF
191 192 193

modules=""

Sam Hocevar's avatar
Sam Hocevar committed
194 195 196
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
197
SUBDIRS = `sed -ne 's,modules/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`
Sam Hocevar's avatar
Sam Hocevar committed
198
EOF
199

Sam Hocevar's avatar
Sam Hocevar committed
200
for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
Sam Hocevar's avatar
Sam Hocevar committed
201 202
do
  printf "."
203 204
  modf="modules/${dir}/Modules.am"
  makf="modules/${dir}/Makefile.am"
Sam Hocevar's avatar
Sam Hocevar committed
205
  basedir="`echo "${dir}" | cut -f1 -d/`"
Sam Hocevar's avatar
Sam Hocevar committed
206
  # automake will not recurse for make dist if we don't define SUBDIRS = .
Sam Hocevar's avatar
Sam Hocevar committed
207
  subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`"
208 209
  mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | xargs`"
  extra_libs=""
210
  extra_ltlibs=""
211 212
  for mod in $mods
  do
213
    extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a"
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
214
    extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la"
215 216
  done
  rm -f "${makf}" && cat > "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
217

218
# ${makf} automatically generated from ${modf} by bootstrap
219 220 221 222
# DO NOT EDIT - edit Modules.am or \$(top_srcdir)/bootstrap instead

basedir = ${basedir}
mods = ${mods}
Sam Hocevar's avatar
Sam Hocevar committed
223 224

NULL =
225
libvlc_LTLIBRARIES =
226
noinst_LTLIBRARIES =
Sam Hocevar's avatar
Sam Hocevar committed
227 228
EXTRA_DIST = Modules.am
BUILT_SOURCES =
229
clean_modules =
Sam Hocevar's avatar
Sam Hocevar committed
230
SUBDIRS = ${subdirs}
231
SUFFIXES = _plugin\$(LIBEXT) _plugin.a
232 233

libvlcdir = \$(libdir)/vlc/\$(basedir)
234 235

EXTRA_LIBRARIES = ${extra_libs}
236 237
EXTRA_LTLIBRARIES = ${extra_ltlibs}

Sam Hocevar's avatar
Sam Hocevar committed
238
include Modules.am
Sam Hocevar's avatar
Sam Hocevar committed
239

240 241
LTLIBVLC = \$(top_builddir)/src/libvlc.la

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
242
if HAVE_WIN32
243
LIBVLC = -L\$(top_builddir)/src -lvlc
244 245 246
LIBADD = \$(LIBVLC)
endif

Sam Hocevar's avatar
Sam Hocevar committed
247
all: all-modules
248

249 250 251
nice:
	\$(top_builddir)/compile

252
# Find out which modules were enabled and tell make to build them
Sam Hocevar's avatar
Sam Hocevar committed
253
all-modules:
254 255
if USE_LIBTOOL
	@set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
256
	z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin.la;; esac; done; \\
257 258 259
	\`; 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
260
	@set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
261 262
	z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; \\
	z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}.a;; esac; done; \\
Sam Hocevar's avatar
Sam Hocevar committed
263 264
	\`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
	test -z "\$\$fail"
265
endif
Sam Hocevar's avatar
Sam Hocevar committed
266

267 268
# Build a plugin with the adequate linker and linker's flags
_plugin.a_plugin\$(LIBEXT):
269
	@mod="\$*" ; mod=\$\${mod#lib} ; \
270
	ldfl="\`\$(VLC_CONFIG) --libs plugin \$\$mod\` \$(LIBADD) -u \$(SYMPREF)\$(VLC_ENTRY)" ; \
271 272 273 274 275 276 277
	case \`\$(VLC_CONFIG) --linkage \$\$mod\` in \\
	  c++)  ld="\$(CXXLINK)" ;; \
	  objc) ld="\$(OBJCLINK)" ;; \
	  c|*)  ld="\$(LINK)" ;; \
	esac ; \
	echo \$\$ld \$< \$\$ldfl ; \
	\$\$ld \$< \$\$ldfl
278
#ifneq (,\$(findstring cygwin,\$(host)))
279
#	mv -f "\$@.exe" "\$@"
280
#endif
281
	@if test -f "\$@.exe"; then mv -f "\$@.exe" "\$@"; fi
282

283
if MAINTAINER_MODE
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
284
\$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/bootstrap
285
	cd \$(top_srcdir) && \$(SHELL) ./bootstrap
286
endif
287

288
mostlyclean-local:
289 290 291
if USE_LIBTOOL
	-rm -f *.la
else
292
	-rm -f *.a *\$(LIBEXT)
293
endif
294

295 296
clean-local: \$(clean_modules)

297 298 299
### automake creates libvlcdir after running install-*-local
### so we have to create it ourselves first
install-exec-local: all-modules
300 301
if USE_LIBTOOL
	@if test -z "\$(libvlc_LTLIBRARIES)"; then \
302
	  z=\$\$(\$(VLC_CONFIG) --list plugin); \
303
	  m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
304
	  test -z "\$\$m" || \
305
  	    \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" install-libvlcLTLIBRARIES || exit \$\$? ; \
306 307
	fi
else
308
	mkdir -p -- "\$(DESTDIR)\$(libvlcdir)"
309 310 311 312
	@z=\$\$(\$(VLC_CONFIG) --list plugin); \
	for mod in \$(mods); do \
	  case "\$\$z " \
	    in *\ \$\${mod}\ *) \
313 314
	      echo \$(INSTALL_PROGRAM) "lib\$\${mod}_plugin\$(LIBEXT)" "\$(DESTDIR)\$(libvlcdir)/" ; \
	      \$(INSTALL_PROGRAM) "lib\$\${mod}_plugin\$(LIBEXT)" "\$(DESTDIR)\$(libvlcdir)/" || exit \$\$?; \
315 316 317
	      ;; \
	  esac; \
	done
318
endif
319 320

uninstall-local:
321 322
if USE_LIBTOOL
	@if test -z "\$(libvlc_LTLIBRARIES)"; then \
323
	  z=\$\$(\$(VLC_CONFIG) --list plugin); \
324
	  m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
325
	  test -z "\$\$m" || \
326
	    \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" uninstall-libvlcLTLIBRARIES || exit \$\$?; \
327 328
	fi
else
329 330 331 332 333 334 335 336 337
	@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
338
endif
339

340
EOF
341
  for mod in $mods
342
  do
343
    if grep '^nodist_SOURCES_'${mod}'' < "${modf}" >/dev/null 2>&1; then
344 345
        NODIST=''; else
        NODIST='#'; fi
Sam Hocevar's avatar
Sam Hocevar committed
346 347
    cat >> m4/private.m4-tmp4 << EOF
    ${mod}) list="\\\${list} ${dir}/lib${mod}" ;;
348
EOF
Sam Hocevar's avatar
Sam Hocevar committed
349 350
# Generation of modules/**/Makefile.am
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
351 352 353
# - 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
354 355
# - *_CFLAGS, *_CXXFLAGS etc. because per-object CPPFLAGS does not seem to
#   work properly with any automake version I tested.
356
    cat >> "${makf}" << EOF
357
# The ${mod} plugin
Sam Hocevar's avatar
Sam Hocevar committed
358

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

EOF
    fi
367
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
368
BUILT_SOURCES += \$(B${mod})
Sam Hocevar's avatar
Sam Hocevar committed
369 370
EOF
    fi
371
    cat >> "${makf}" << EOF
372
lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
373
lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
Sam Hocevar's avatar
Sam Hocevar committed
374
EOF
375
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
376
nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
377
nodist_lib${mod}_plugin_la_SOURCES = \$(nodist_SOURCES_${mod})
Sam Hocevar's avatar
Sam Hocevar committed
378 379
EOF
    fi
380
    cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
381 382 383
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}\`
384 385 386 387
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}\` \\
388
	-rpath '\$(libvlcdir)' -avoid-version -module -shrext \$(LIBEXT) \\
389
	-export-symbol-regex ^\$(VLC_ENTRY)\$\$ -no-undefined
390
lib${mod}_plugin_la_LIBADD = \$(LTLIBVLC)
Sam Hocevar's avatar
Sam Hocevar committed
391

392
lib${mod}_a_SOURCES = \$(SOURCES_${mod})
Sam Hocevar's avatar
Sam Hocevar committed
393
EOF
394
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
395
nodist_lib${mod}_a_SOURCES = \$(nodist_SOURCES_${mod})
Sam Hocevar's avatar
Sam Hocevar committed
396 397
EOF
    fi
398
    cat >> "${makf}" << EOF
399 400 401
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}\`
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 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479
# patch for DLL link for libtool on cygwin (remove when fixed)
if test ".`uname -s|sed -n '/^CYGWIN/p'`" != "."; then
patch -s -p0 << 'EOF'
--- autotools/ltmain.orig	2006-12-05 15:15:42.064607000 +0000
+++ autotools/ltmain.sh	2006-12-05 15:16:24.705777800 +0000
@@ -4360,7 +4360,7 @@
 
     prog)
       case $host in
-	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,;s,.dll.exe$,.dll,'` ;;
       esac
       if test -n "$vinfo"; then
 	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
EOF
fi

480
# Do the rest
Sam Hocevar's avatar
Sam Hocevar committed
481
${autopoint} -f
482
${aclocal} ${ACLOCAL_ARGS}
Sam Hocevar's avatar
Sam Hocevar committed
483 484
${autoconf}
${autoheader}
485
${automake} --add-missing --copy -Wall
486 487

##
Sam Hocevar's avatar
Sam Hocevar committed
488
##  files which need to be regenerated
489
##
Sam Hocevar's avatar
Sam Hocevar committed
490
rm -f vlc-config.in vlc-config
491
rm -f src/misc/modules_builtin.h
492

493
# Shut up
494
set +x
495

496
##
497
##  Tell the user about gettext, pkg-config and sed
498
##
499
if [ "${GETTEXT}" = "old" ]; then
500
  cat << EOF
501 502 503

==========================================================
NOTE: you have an old version of gettext installed on your
504 505
system. The vlc build will work, but if your system does not
have libintl you will not have internationalization support.
506
We suggest upgrading to gettext 0.11.5 or later.
507
EOF
508
fi
509

510
if [ "$PKGCONFIG" = "no" ]; then
511
  cat << EOF
512 513 514 515 516 517

==============================================================
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
518
fi
519