Changeset 9998b1b4ef14dd879b662d1da728f0ca44954764
- Timestamp:
- 01/31/08 18:37:17
(7 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1201801037 +0000
- git-parent:
[79873cd826344ae2ff8e36c852e4a3d3e3705aa3]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1201801037 +0000
- Message:
Use autoreconf instead of playing the how is automake called game.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6323d0d |
r9998b1b |
|
| 18 | 18 | ### Get a sane environment, just in case |
|---|
| 19 | 19 | ### |
|---|
| 20 | | LANG=C |
|---|
| 21 | | export LANG |
|---|
| 22 | 20 | CYGWIN=binmode |
|---|
| 23 | 21 | export CYGWIN |
|---|
| … | … | |
| 61 | 59 | # Check for autoconf |
|---|
| 62 | 60 | rm -f m4/autoconf260.m4 |
|---|
| 63 | | case "$(autoconf --version|head -n 1)" in |
|---|
| 64 | | *2.5[012345678]*) |
|---|
| 65 | | echo "$0: you need autoconf version 2.59 or later (2.60 recommanded)." |
|---|
| 66 | | exit 1 |
|---|
| 67 | | ;; |
|---|
| 68 | | |
|---|
| | 61 | case "$(autoreconf --version|head -n 1)" in |
|---|
| 69 | 62 | *2.59*) |
|---|
| 70 | 63 | echo "Enabling provisional autoconf 2.59 work-around. Update autoconf ASAP." |
|---|
| … | … | |
| 75 | 68 | esac |
|---|
| 76 | 69 | |
|---|
| 77 | | # Check for automake |
|---|
| 78 | | amvers="no" |
|---|
| 79 | | for v in "-1.10" "110" "-1.9" "19"; do |
|---|
| 80 | | if automake${v} --version >/dev/null 2>&1; then |
|---|
| 81 | | amsuff="${v}" |
|---|
| 82 | | amvers="`echo ${v} | sed -e 's/^-//'`" |
|---|
| 83 | | break |
|---|
| 84 | | fi |
|---|
| 85 | | done |
|---|
| 86 | | |
|---|
| 87 | | if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then |
|---|
| 88 | | amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`" |
|---|
| 89 | | amsuff="" |
|---|
| 90 | | fi |
|---|
| 91 | | |
|---|
| 92 | | case "${amvers}" in |
|---|
| 93 | | no|1.[012345678]|1.[0123456].*|1[0123456]|1.[0123456]-*) |
|---|
| 94 | | set +x |
|---|
| 95 | | echo "$0: you need automake version 1.9 or later" |
|---|
| 96 | | exit 1 |
|---|
| 97 | | ;; |
|---|
| 98 | | esac |
|---|
| 99 | | |
|---|
| 100 | | # Check for libtool |
|---|
| 101 | | libtoolize="no" |
|---|
| 102 | | if test -x extras/contrib/bin/libtoolize; then |
|---|
| 103 | | libtoolize="extras/contrib/bin/libtoolize" |
|---|
| 104 | | elif glibtoolize --version >/dev/null 2>&1; then |
|---|
| 105 | | libtoolize="glibtoolize" |
|---|
| 106 | | elif libtoolize --version >/dev/null 2>&1; then |
|---|
| 107 | | libtoolize="libtoolize" |
|---|
| 108 | | fi |
|---|
| 109 | | |
|---|
| 110 | | if test "$libtoolize" = "no"; then |
|---|
| 111 | | set +x |
|---|
| 112 | | echo "$0: you need libtool" |
|---|
| 113 | | exit 1 |
|---|
| 114 | | fi |
|---|
| 115 | | |
|---|
| 116 | | # Check for gettext |
|---|
| 117 | | if gettextize --version >/dev/null 2>&1; then |
|---|
| 118 | | # Autopoint is available from 0.11.3, but we need 0.11.5 |
|---|
| 119 | | if expr `gettextize --version |cut -d' ' -f2- | sed -e '1s/[^0-9]*//' -e q` \ |
|---|
| 120 | | '>=' 0.11.5 >/dev/null 2>&1; then |
|---|
| 121 | | # We have gettext, and a recent version! Everything is cool. |
|---|
| 122 | | autopoint=autopoint |
|---|
| 123 | | GETTEXT=yes |
|---|
| 124 | | else |
|---|
| 125 | | # User's gettext is too old. try to continue anyway. |
|---|
| 126 | | autopoint=: |
|---|
| 127 | | GETTEXT=old |
|---|
| 128 | | fi;else |
|---|
| 129 | | set +x |
|---|
| 130 | | echo "$0: you need gettextize (package gettext-devel or gettext)" |
|---|
| 131 | | exit 1 |
|---|
| 132 | | fi |
|---|
| 133 | | |
|---|
| 134 | 70 | # Check for pkg-config |
|---|
| 135 | 71 | if pkg-config --version >/dev/null 2>&1; then |
|---|
| … | … | |
| 139 | 75 | PKGCONFIG=no |
|---|
| 140 | 76 | fi |
|---|
| 141 | | |
|---|
| 142 | | aclocal=aclocal${amsuff} |
|---|
| 143 | | automake=automake${amsuff} |
|---|
| 144 | | autoconf=autoconf |
|---|
| 145 | | autoheader=autoheader |
|---|
| 146 | 77 | |
|---|
| 147 | 78 | ## |
|---|
| … | … | |
| 161 | 92 | dnl User does not have pkg-config, so assume package was not found |
|---|
| 162 | 93 | AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])]) |
|---|
| 163 | | |
|---|
| 164 | | EOF |
|---|
| 165 | | fi |
|---|
| 166 | | |
|---|
| 167 | | if [ "${GETTEXT}" != "yes" ]; then cat >> m4/private.m4 << EOF |
|---|
| 168 | | dnl User does not have gettext, so this is a no-op |
|---|
| 169 | | AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) |
|---|
| 170 | 94 | |
|---|
| 171 | 95 | EOF |
|---|
| … | … | |
| 200 | 124 | set -x |
|---|
| 201 | 125 | |
|---|
| 202 | | # remove autotools cruft |
|---|
| 203 | | rm -f aclocal.m4 configure config.log config.h config.h.in |
|---|
| 204 | | rm -Rf autom4te*.cache |
|---|
| 205 | | # remove old autotools extra cruft |
|---|
| 206 | | rm -f config.guess config.sub missing mkinstalldirs depcomp install-sh |
|---|
| 207 | | # remove new autotools extra cruft |
|---|
| 208 | | rm -Rf autotools |
|---|
| 209 | | mkdir autotools |
|---|
| 210 | | # remove libtool cruft |
|---|
| 211 | | rm -f ltmain.sh libtool ltconfig |
|---|
| 212 | | # remove gettext cruft |
|---|
| 213 | | rm -f ABOUT-NLS |
|---|
| 214 | | rm -Rf intl |
|---|
| 215 | | # remove vlc cruft |
|---|
| 216 | | rm -f stamp-builtin stamp-h* mozilla/stamp-pic |
|---|
| | 126 | # Automake complains if these are not present |
|---|
| | 127 | echo > vlc-config.in |
|---|
| | 128 | mkdir -p intl |
|---|
| 217 | 129 | |
|---|
| 218 | | # Automake complains if these are not present |
|---|
| 219 | | rm -f vlc-config.in && printf "" > vlc-config.in |
|---|
| 220 | | if [ "$GETTEXT" != "yes" ]; then |
|---|
| 221 | | test -d intl || mkdir intl |
|---|
| 222 | | printf "" > intl/Makefile.am |
|---|
| 223 | | printf "" > ABOUT-NLS |
|---|
| 224 | | fi |
|---|
| 225 | | |
|---|
| 226 | | # Libtoolize directory |
|---|
| 227 | | ${libtoolize} --copy --force |
|---|
| 228 | | if test -f "ltmain.sh"; then |
|---|
| 229 | | echo "$0: working around a minor libtool issue" |
|---|
| 230 | | mv ltmain.sh autotools/ |
|---|
| 231 | | fi |
|---|
| 232 | | |
|---|
| 233 | | # Do the rest |
|---|
| 234 | | echo $PATH |
|---|
| 235 | | which autopoint |
|---|
| 236 | | autopoint --version |
|---|
| 237 | | |
|---|
| 238 | | ${autopoint} -f |
|---|
| | 130 | autoreconf --install --force ${ACLOCAL_ARGS} |
|---|
| 239 | 131 | rm -f po/Makevars.template |
|---|
| 240 | | ${aclocal} ${ACLOCAL_ARGS} |
|---|
| 241 | | ${autoconf} |
|---|
| 242 | | ${autoheader} |
|---|
| 243 | | ${automake} --add-missing --copy -Wall |
|---|
| | 132 | echo > ABOUT-NLS |
|---|
| 244 | 133 | |
|---|
| 245 | 134 | ## |
|---|
| … | … | |
| 248 | 137 | rm -f vlc-config.in vlc-config |
|---|
| 249 | 138 | rm -f src/misc/modules_builtin.h |
|---|
| | 139 | rm -f stamp-builtin stamp-h* mozilla/stamp-pic |
|---|
| 250 | 140 | |
|---|
| 251 | 141 | # Shut up |
|---|
| … | … | |
| 255 | 145 | ## Tell the user about gettext, pkg-config and sed |
|---|
| 256 | 146 | ## |
|---|
| 257 | | if [ "${GETTEXT}" = "old" ]; then |
|---|
| 258 | | cat << EOF |
|---|
| 259 | | |
|---|
| 260 | | ========================================================== |
|---|
| 261 | | NOTE: you have an old version of gettext installed on your |
|---|
| 262 | | system. The vlc build will work, but if your system does not |
|---|
| 263 | | have libintl you will not have internationalization support. |
|---|
| 264 | | We suggest upgrading to gettext 0.11.5 or later. |
|---|
| 265 | | EOF |
|---|
| 266 | | fi |
|---|
| 267 | | |
|---|
| 268 | 147 | if [ "$PKGCONFIG" = "no" ]; then |
|---|
| 269 | 148 | cat << EOF |
|---|