#! /bin/sh
## bootstrap file for the VLC media player
-## $Id: bootstrap,v 1.76 2003/10/25 03:44:46 sam Exp $
+## $Id: bootstrap,v 1.82 2003/11/06 10:09:16 sam Exp $
##
## Authors: Sam Hocevar <sam@zoy.org>
GETTEXT=yes
else
# User's gettext is too old. try to continue anyway.
- echo > ABOUT-NLS
- mkdir -p intl
- echo > intl/Makefile.am
- cat >> m4/private.m4 << EOF
-dnl User's gettext is too old, so this is a no-op
-AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
-
-EOF
autopoint=:
GETTEXT=old
fi;else
# we don't have gettext. grmbl. try to continue anyway.
- echo > ABOUT-NLS
- mkdir -p intl
- echo > intl/Makefile.am
- cat >> m4/private.m4 << EOF
-dnl User does not have gettext, so this is a no-op
-AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
-
-EOF
autopoint=:
GETTEXT=no
fi
# We have pkg-config, everything is cool.
PKGCONFIG=yes
else
- # Not present, use a workaround.
- cat >> m4/private.m4 << EOF
-dnl User does not have pkg-config, so this is a no-op
-AC_DEFUN([PKG_CHECK_MODULES], [:])
-
-EOF
PKGCONFIG=no
fi
##
set +x
-printf "generating modules/**/Makefile.am and m4/private.m4"
+echo "generating modules/**/Makefile.am and m4/private.m4"
# Prepare m4/private.m4
rm -f m4/private.m4 && cat > m4/private.m4 << EOF
dnl Private VLC macros - generated by bootstrap
EOF
+
+if [ "${PKGCONFIG}" = "no" ]; then cat >> m4/private.m4 << EOF
+dnl User does not have pkg-config, so this is a no-op
+AC_DEFUN([PKG_CHECK_MODULES], [:], [], [], [])
+
+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
+
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
clean-local:
-rm -f *.a *.so *.dll *.sl *.dylib
-all-local:
+all: all-modules
+all-modules:
@set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
- if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target plugin); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in *\$\${mod}_plugin*) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\
- if test "\$(builtin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target builtin); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in *\$\${mod}.a*) echo lib\$\${mod}.a;; esac; done; fi; \\
- if test "\$(pic)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target pic); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in *\$\${mod}_pic.a*) echo lib\$\${mod}_pic.a;; esac; done; fi; \\
+ if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target plugin); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in */lib\$\${mod}_plugin*) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\
+ if test "\$(builtin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target builtin); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in */lib\$\${mod}.a*) echo lib\$\${mod}.a;; esac; done; fi; \\
+ if test "\$(pic)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target builtin pic); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in */lib\$\${mod}_pic.a*) 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"
EOF
cat m4/private.m4-tmp4 >> m4/private.m4 && rm -f m4/private.m4-tmp4
-echo "done."
+echo " done."
###
### classic bootstrap stuff
# remove autotools cruft
rm -f aclocal.m4 configure config.log config.h config.h.in
+rm -Rf autom4te.cache
# remove old autotools extra cruft
rm -f config.guess config.sub missing mkinstalldirs compile depcomp install-sh
# remove new autotools extra cruft
# remove new vlc cruft
rm -f stamp-builtin stamp-h* mozilla/stamp-pic
-# Automake complains if this is not present
+# Automake complains if these are not present
rm -f vlc-config.in && printf "" > vlc-config.in
+if [ "$GETTEXT" != "yes" ]; then
+ test -d intl || mkdir intl
+ printf "" > intl/Makefile.am
+ printf "" > ABOUT-NLS
+fi
# Do the rest
${autopoint} -f