123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026 |
- #! /bin/sh
- scriptversion=2015-08-24.08;
- nl='
- '
- LC_ALL=C
- export LC_ALL
- (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
- local_gl_dir=gl
- PERL="${PERL-perl}"
- me=$0
- usage() {
- cat <<EOF
- Usage: $me [OPTION]...
- Bootstrap this package from the checked-out sources.
- Options:
- --gnulib-srcdir=DIRNAME specify the local directory where gnulib
- sources reside. Use this if you already
- have gnulib sources on your machine, and
- do not want to waste your bandwidth downloading
- them again. Defaults to \$GNULIB_SRCDIR
- --bootstrap-sync if this bootstrap script is not identical to
- the version in the local gnulib sources,
- update this script, and then restart it with
- /bin/sh or the shell \$CONFIG_SHELL
- --no-bootstrap-sync do not check whether bootstrap is out of sync
- --copy copy files instead of creating symbolic links
- --force attempt to bootstrap even if the sources seem
- not to have been checked out
- --no-git do not use git to update gnulib. Requires that
- --gnulib-srcdir point to a correct gnulib snapshot
- --skip-po do not download po files
- If the file $me.conf exists in the same directory as this script, its
- contents are read as shell variables to configure the bootstrap.
- For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
- are honored.
- Running without arguments will suffice in most cases.
- EOF
- }
- warnf_ ()
- {
- warnf_format_=$1
- shift
- nl='
- '
- case $* in
- *$nl*) me_=$(printf "$me"|tr "$nl|" '??')
- printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
- *) printf "$me: $warnf_format_" "$@" ;;
- esac >&2
- }
- warn_ ()
- {
-
- case $IFS in
- ' '*) warnf_ '%s\n' "$*";;
- *) (IFS=' '; warn_ "$@");;
- esac
- }
- die() { warn_ "$@"; exit 1; }
- gnulib_mk=gnulib.mk
- gnulib_modules=
- gnulib_files=
- : ${AUTOPOINT=autopoint}
- : ${AUTORECONF=autoreconf}
- bootstrap_post_import_hook() { :; }
- bootstrap_epilogue() { :; }
- po_download_command_format=\
- "rsync --delete --exclude '*.s1' -Lrtvz \
- 'translationproject.org::tp/latest/%s/' '%s'"
- po_download_command_format2=\
- "wget --mirror -nd -q -np -A.po -P '%s' \
- http://translationproject.org/latest/%s/"
- extract_package_name='
- /^AC_INIT(\[*/{
- s///
- /^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{
- s//\1/
- s/[],)].*//
- p
- q
- }
- s/[],)].*//
- s/^GNU //
- y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
- s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
- p
- }
- '
- package=$(sed -n "$extract_package_name" configure.ac) \
- || die 'cannot find package name in configure.ac'
- gnulib_name=lib$package
- build_aux=build-aux
- source_base=lib
- m4_base=m4
- doc_base=doc
- tests_base=tests
- gnulib_extra_files=''
- gnulib_tool_option_extras=
- EXTRA_LOCALE_CATEGORIES=
- XGETTEXT_OPTIONS='\\\
- --flag=_:1:pass-c-format\\\
- --flag=N_:1:pass-c-format\\\
- --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
- '
- COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
- MSGID_BUGS_ADDRESS=bug-$package@gnu.org
- excluded_files=
- checkout_only_file=README-hacking
- copy=false
- vc_ignore=auto
- bootstrap_sync=false
- use_git=true
- check_exists() {
- if test "$1" = "--verbose"; then
- ($2 --version </dev/null) >/dev/null 2>&1
- if test $? -ge 126; then
-
-
- ($2 --version </dev/null)
- fi
- else
- ($1 --version </dev/null) >/dev/null 2>&1
- fi
- test $? -lt 126
- }
- find_tool ()
- {
- find_tool_envvar=$1
- shift
- find_tool_names=$@
- eval "find_tool_res=\$$find_tool_envvar"
- if test x"$find_tool_res" = x; then
- for i; do
- if check_exists $i; then
- find_tool_res=$i
- break
- fi
- done
- fi
- if test x"$find_tool_res" = x; then
- warn_ "one of these is required: $find_tool_names;"
- die "alternatively set $find_tool_envvar to a compatible tool"
- fi
- eval "$find_tool_envvar=\$find_tool_res"
- eval "export $find_tool_envvar"
- }
- symlink_to_dir()
- {
- src=$1/$2
- dst=${3-$2}
- test -f "$src" && {
-
-
- dst_dir=$(dirname "$dst")
- if ! test -d "$dst_dir"; then
- mkdir -p "$dst_dir"
-
-
-
- parent=$(dirname "$dst_dir")
- for dot_ig in x $vc_ignore; do
- test $dot_ig = x && continue
- ig=$parent/$dot_ig
- insert_vc_ignore $ig "${dst_dir##*/}"
- done
- fi
- if $copy; then
- {
- test ! -h "$dst" || {
- echo "$me: rm -f $dst" &&
- rm -f "$dst"
- }
- } &&
- test -f "$dst" &&
- cmp -s "$src" "$dst" || {
- echo "$me: cp -fp $src $dst" &&
- cp -fp "$src" "$dst"
- }
- else
-
-
-
-
-
-
- test -h "$dst" &&
- src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
- dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
- test "$src_i" = "$dst_i" &&
- both_ls=$(ls -dt "$src" "$dst") &&
- test "X$both_ls" = "X$dst$nl$src" || {
- dot_dots=
- case $src in
- /*) ;;
- *)
- case /$dst/ in
- *//* | */../* | */./* | /*/*/*/*/*/)
- die "invalid symlink calculation: $src -> $dst";;
- /*/*/*/*/) dot_dots=../../../;;
- /*/*/*/) dot_dots=../../;;
- /*/*/) dot_dots=../;;
- esac;;
- esac
- echo "$me: ln -fs $dot_dots$src $dst" &&
- ln -fs "$dot_dots$src" "$dst"
- }
- fi
- }
- }
- case "$0" in
- */*) test -r "$0.conf" && . "$0.conf" ;;
- *) test -r "$0.conf" && . ./"$0.conf" ;;
- esac
- test -z "${gnulib_extra_files}" && \
- gnulib_extra_files="
- build-aux/install-sh
- build-aux/mdate-sh
- build-aux/texinfo.tex
- build-aux/depcomp
- build-aux/config.guess
- build-aux/config.sub
- doc/INSTALL
- "
- if test "$vc_ignore" = auto; then
- vc_ignore=
- test -d .git && vc_ignore=.gitignore
- test -d CVS && vc_ignore="$vc_ignore .cvsignore"
- fi
- for option
- do
- case $option in
- --help)
- usage
- exit;;
- --gnulib-srcdir=*)
- GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
- --skip-po)
- SKIP_PO=t;;
- --force)
- checkout_only_file=;;
- --copy)
- copy=true;;
- --bootstrap-sync)
- bootstrap_sync=true;;
- --no-bootstrap-sync)
- bootstrap_sync=false;;
- --no-git)
- use_git=false;;
- *)
- die "$option: unknown option";;
- esac
- done
- $use_git || test -d "$GNULIB_SRCDIR" \
- || die "Error: --no-git requires --gnulib-srcdir"
- if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
- die "Bootstrapping from a non-checked-out distribution is risky."
- fi
- gitignore_entries() {
- sed '/^#/d; /^$/d' "$@"
- }
- insert_if_absent() {
- file=$1
- str=$2
- test -f $file || touch $file
- test -r $file || die "Error: failed to read ignore file: $file"
- duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
- if [ "$duplicate_entries" ] ; then
- die "Error: Duplicate entries in $file: " $duplicate_entries
- fi
- linesold=$(gitignore_entries $file | wc -l)
- linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l)
- if [ $linesold != $linesnew ] ; then
- { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
- || die "insert_if_absent $file $str: failed"
- fi
- }
- insert_vc_ignore() {
- vc_ignore_file="$1"
- pattern="$2"
- case $vc_ignore_file in
- *.gitignore)
-
-
-
- pattern=$(echo "$pattern" | sed s,^,/,);;
- esac
- insert_if_absent "$vc_ignore_file" "$pattern"
- }
- found_aux_dir=no
- grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
- >/dev/null && found_aux_dir=yes
- grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
- >/dev/null && found_aux_dir=yes
- test $found_aux_dir = yes \
- || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
- if test ! -d $build_aux; then
- mkdir $build_aux
- for dot_ig in x $vc_ignore; do
- test $dot_ig = x && continue
- insert_vc_ignore $dot_ig $build_aux
- done
- fi
- sort_ver() {
- ver1="$1"
- ver2="$2"
-
- i=1
- while : ; do
- p1=$(echo "$ver1" | cut -d. -f$i)
- p2=$(echo "$ver2" | cut -d. -f$i)
- if [ ! "$p1" ]; then
- echo "$1 $2"
- break
- elif [ ! "$p2" ]; then
- echo "$2 $1"
- break
- elif [ ! "$p1" = "$p2" ]; then
- if [ "$p1" -gt "$p2" ] 2>/dev/null; then
- echo "$2 $1"
- elif [ "$p2" -gt "$p1" ] 2>/dev/null; then
- echo "$1 $2"
- else
- lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
- if [ "$lp" = "$p2" ]; then
- echo "$1 $2"
- else
- echo "$2 $1"
- fi
- fi
- break
- fi
- i=$(($i+1))
- done
- }
- get_version() {
- app=$1
- $app --version >/dev/null 2>&1 || { $app --version; return 1; }
- $app --version 2>&1 |
- sed -n '# Move version to start of line.
- s/.*[v ]\([0-9]\)/\1/
- # Skip lines that do not start with version.
- /^[0-9]/!d
- # Remove characters after the version.
- s/[^.a-z0-9-].*//
- # The first component must be digits only.
- s/^\([0-9]*\)[a-z-].*/\1/
- #the following essentially does s/5.005/5.5/
- s/\.0*\([1-9]\)/.\1/g
- p
- q'
- }
- check_versions() {
- ret=0
- while read app req_ver; do
-
- if test "$app" = libtool; then
- app=libtoolize
- fi
-
- if test "$app" = git; then
- $use_git || continue
- fi
-
- appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
- test "$appvar" = TAR && appvar=AMTAR
- case $appvar in
- GZIP) ;;
- PERL::*) ;;
- *) eval "app=\${$appvar-$app}" ;;
- esac
-
-
-
-
-
-
- case $app in
- automake-ng|aclocal-ng)
- app=${app%-ng}
- ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
- warn_ "Error: '$app' not found or not from Automake-NG"
- ret=1
- continue
- } ;;
-
-
- perl::*)
-
- app="${app#perl::}"
- if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
- warn_ "Error: perl module '$app' not found"
- ret=1
- fi
- continue
- ;;
- esac
- if [ "$req_ver" = "-" ]; then
-
-
- if ! check_exists --verbose $app; then
- warn_ "Error: '$app' not found"
- ret=1
- fi
- else
-
- inst_ver=$(get_version $app)
- if [ ! "$inst_ver" ]; then
- warn_ "Error: '$app' not found"
- ret=1
- else
- latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
- if [ ! "$latest_ver" = "$inst_ver" ]; then
- warnf_ '%s\n' \
- "Error: '$app' version == $inst_ver is too old" \
- " '$app' version >= $req_ver is required"
- ret=1
- fi
- fi
- fi
- done
- return $ret
- }
- print_versions() {
- echo "Program Min_version"
- echo "----------------------"
- printf %s "$buildreq"
- echo "----------------------"
-
- }
- if test x"$SKIP_PO" = x; then
- find_tool SHA1SUM sha1sum gsha1sum shasum sha1
- fi
- use_libtool=0
- grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
- && use_libtool=1
- grep '^[ ]*LT_INIT' configure.ac >/dev/null \
- && use_libtool=1
- if test $use_libtool = 1; then
- find_tool LIBTOOLIZE glibtoolize libtoolize
- fi
- case $buildreq in
- *automake*) ;;
- *) buildreq="automake 1.9
- $buildreq" ;;
- esac
- case $buildreq in
- *autoconf*) ;;
- *) buildreq="autoconf 2.59
- $buildreq" ;;
- esac
- if test -d "$local_gl_dir" \
- && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
- case $buildreq in
- *patch*) ;;
- *) buildreq="patch -
- $buildreq" ;;
- esac
- fi
- if ! printf "$buildreq" | check_versions; then
- echo >&2
- if test -f README-prereq; then
- die "See README-prereq for how to get the prerequisite programs"
- else
- die "Please install the prerequisite programs"
- fi
- fi
- probe=$(echo 'm4_quote([hi])' | autom4te -l M4sugar -t 'm4_quote:$%' -)
- if test "x$probe" != xhi; then
- warn_ "WARNING: your autom4te wrapper eats stdin;"
- warn_ "if bootstrap fails, consider upgrading your autotools"
- fi
- echo "$0: Bootstrapping from checked-out $package sources..."
- if $use_git && test -d .git && check_exists git; then
- if git config merge.merge-changelog.driver >/dev/null ; then
- :
- elif check_exists git-merge-changelog; then
- echo "$0: initializing git-merge-changelog driver"
- git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
- git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
- else
- echo "$0: consider installing git-merge-changelog from gnulib"
- fi
- fi
- cleanup_gnulib() {
- status=$?
- rm -fr "$gnulib_path"
- exit $status
- }
- git_modules_config () {
- test -f .gitmodules && git config --file .gitmodules "$@"
- }
- if $use_git; then
- gnulib_path=$(git_modules_config submodule.gnulib.path)
- test -z "$gnulib_path" && gnulib_path=gnulib
- fi
- case ${GNULIB_SRCDIR--} in
- -)
-
- if git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- git submodule init -- "$gnulib_path" || exit $?
- git submodule update -- "$gnulib_path" || exit $?
- elif [ ! -d "$gnulib_path" ]; then
- echo "$0: getting gnulib files..."
- trap cleanup_gnulib 1 2 13 15
- shallow=
- git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
- git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
- cleanup_gnulib
- trap - 1 2 13 15
- fi
- GNULIB_SRCDIR=$gnulib_path
- ;;
- *)
-
- if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
- git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- if git submodule -h|grep -- --reference > /dev/null; then
-
- git submodule update --init --reference "$GNULIB_SRCDIR" \
- "$gnulib_path" || exit $?
- else
-
- if test -f "$gnulib_path"/gnulib-tool; then
-
- git submodule update -- "$gnulib_path" || exit $?
- else
-
- rmdir "$gnulib_path" 2>/dev/null
- git clone --reference "$GNULIB_SRCDIR" \
- "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
- && git submodule init -- "$gnulib_path" \
- && git submodule update -- "$gnulib_path" \
- || exit $?
- fi
- fi
- GNULIB_SRCDIR=$gnulib_path
- fi
- ;;
- esac
- if $bootstrap_sync; then
- cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
- echo "$0: updating bootstrap and restarting..."
- case $(sh -c 'echo "$1"' -- a) in
- a) ignored=--;;
- *) ignored=ignored;;
- esac
- exec sh -c \
- 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
- $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
- "$0" "$@" --no-bootstrap-sync
- }
- fi
- gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
- <$gnulib_tool || exit $?
- download_po_files() {
- subdir=$1
- domain=$2
- echo "$me: getting translations into $subdir for $domain..."
- cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
- eval "$cmd" && return
-
- cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
- eval "$cmd"
- }
- update_po_files() {
-
-
- po_dir=$1
- domain=$2
-
-
- ref_po_dir="$po_dir/.reference"
- test -d $ref_po_dir || mkdir $ref_po_dir || return
- download_po_files $ref_po_dir $domain \
- && ls "$ref_po_dir"/*.po 2>/dev/null |
- sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
- langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g')
- test "$langs" = '*' && langs=x
- for po in $langs; do
- case $po in x) continue;; esac
- new_po="$ref_po_dir/$po.po"
- cksum_file="$ref_po_dir/$po.s1"
- if ! test -f "$cksum_file" ||
- ! test -f "$po_dir/$po.po" ||
- ! $SHA1SUM -c "$cksum_file" < "$new_po" > /dev/null 2>&1; then
- echo "$me: updated $po_dir/$po.po..."
- cp "$new_po" "$po_dir/$po.po" \
- && $SHA1SUM < "$new_po" > "$cksum_file" || return
- fi
- done
- }
- case $SKIP_PO in
- '')
- if test -d po; then
- update_po_files po $package || exit
- fi
- if test -d runtime-po; then
- update_po_files runtime-po $package-runtime || exit
- fi;;
- esac
- version_controlled_file() {
- parent=$1
- file=$2
- if test -d .git; then
- git rm -n "$file" > /dev/null 2>&1
- elif test -d .svn; then
- svn log -r HEAD "$file" > /dev/null 2>&1
- elif test -d CVS; then
- grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
- grep '^/[^/]*/[0-9]' > /dev/null
- else
- warn_ "no version control for $file?"
- false
- fi
- }
- with_gettext=yes
- grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
- with_gettext=no
- if test $with_gettext = yes || test $use_libtool = 1; then
- tempbase=.bootstrap$$
- trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
- > $tempbase.0 > $tempbase.1 &&
- find . ! -type d -print | sort > $tempbase.0 || exit
- if test $with_gettext = yes; then
-
-
- echo "$0: $AUTOPOINT --force"
- $AUTOPOINT --force || exit
- fi
-
-
-
-
-
- if test $use_libtool = 1; then
- install=
- case $($LIBTOOLIZE --help) in
- *--install*) install=--install ;;
- esac
- echo "running: $LIBTOOLIZE $install --copy"
- $LIBTOOLIZE $install --copy
- fi
- find . ! -type d -print | sort >$tempbase.1
- old_IFS=$IFS
- IFS=$nl
- for file in $(comm -13 $tempbase.0 $tempbase.1); do
- IFS=$old_IFS
- parent=${file%/*}
- version_controlled_file "$parent" "$file" || {
- for dot_ig in x $vc_ignore; do
- test $dot_ig = x && continue
- ig=$parent/$dot_ig
- insert_vc_ignore "$ig" "${file##*/}"
- done
- }
- done
- IFS=$old_IFS
- rm -f $tempbase.0 $tempbase.1
- trap - 1 2 13 15
- fi
- gnulib_tool_options="\
- --import\
- --no-changelog\
- --aux-dir $build_aux\
- --doc-base $doc_base\
- --lib $gnulib_name\
- --m4-base $m4_base/\
- --source-base $source_base/\
- --tests-base $tests_base\
- --local-dir $local_gl_dir\
- $gnulib_tool_option_extras\
- "
- if test $use_libtool = 1; then
- case "$gnulib_tool_options " in
- *' --libtool '*) ;;
- *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
- esac
- fi
- echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
- $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
- || die "gnulib-tool failed"
- for file in $gnulib_files; do
- symlink_to_dir "$GNULIB_SRCDIR" $file \
- || die "failed to symlink $file"
- done
- bootstrap_post_import_hook \
- || die "bootstrap_post_import_hook failed"
- find "$m4_base" "$source_base" \
- -depth \( -name '*.m4' -o -name '*.[ch]' \) \
- -type l -xtype l -delete > /dev/null 2>&1
- AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
- case $($AUTORECONF --help) in
- *--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
- esac
- echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
- AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
- || die "autoreconf failed"
- for file in $gnulib_extra_files; do
- case $file in
- */INSTALL) dst=INSTALL;;
- build-aux/*) dst=$build_aux/${file#build-aux/};;
- *) dst=$file;;
- esac
- symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
- || die "failed to symlink $file"
- done
- if test $with_gettext = yes; then
-
- echo "$0: Creating po/Makevars from po/Makevars.template ..."
- rm -f po/Makevars
- sed '
- /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
- /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
- /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
- /^XGETTEXT_OPTIONS *=/{
- s/$/ \\/
- a\
- '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
- }
- ' po/Makevars.template >po/Makevars \
- || die 'cannot generate po/Makevars'
-
-
-
- case $gnulib_modules in
- *gettext-h*) ;;
- *gettext*)
- cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
- || die "cannot create po/Makefile.in.in"
- ;;
- esac
- if test -d runtime-po; then
-
- rm -f runtime-po/Makevars
- sed '
- /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/
- /^subdir *=.*/s/=.*/= runtime-po/
- /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
- /^XGETTEXT_OPTIONS *=/{
- s/$/ \\/
- a\
- '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
- }
- ' po/Makevars.template >runtime-po/Makevars \
- || die 'cannot generate runtime-po/Makevars'
-
- (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
- fi
- fi
- bootstrap_epilogue
- echo "$0: done. Now you can run './configure'."
|