File: libtoolize

package info (click to toggle)
opencollada 0.1.0~20160714.0ec5063%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 97,716 kB
  • ctags: 121,475
  • sloc: cpp: 644,904; ansic: 214,354; php: 12,096; python: 11,837; java: 11,005; sh: 10,339; xml: 9,726; makefile: 2,022; asm: 1,852; ruby: 101; lisp: 84; perl: 67; awk: 48
file content (372 lines) | stat: -rwxr-xr-x 10,770 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
#! /bin/sh
# libtoolize - Prepare a package to use libtool.
# libtoolize.  Generated from libtoolize.in by configure.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# The name of this program.
progname=`echo "$0" | sed 's%^.*/%%'`

# Constants.
PROGRAM=libtoolize
PACKAGE=libtool
VERSION=1.5.26

# Directory names.
prefix=/usr
datarootdir=${prefix}/share
datadir=${datarootdir}
pkgdatadir=${datadir}/libtool
aclocaldir=${datadir}/aclocal

libtool_m4="$aclocaldir/libtool.m4"
ltdl_m4="$aclocaldir/ltdl.m4"

dry_run=no
help="Try \`$progname --help' for more information."
rm="rm -f"
ln_s="ln -s"
cp="cp -f -p"
mkdir="mkdir"
tar="tar"

# Global variables.
automake=
copy=
force=
ltdl=
ltdl_tar=
configure_ac=
status=0

for arg
do
  case "$arg" in
  --help)
    cat <<EOF
Usage: $progname [OPTION]...

Prepare a package to use libtool.

    --automake        work silently, and assume that Automake is in use
-c, --copy            copy files rather than symlinking them
    --debug           enable verbose shell tracing
-n, --dry-run         print commands rather than running them
-f, --force           replace existing files
    --help            display this message and exit
    --ltdl            install libltdl in a subdirectory
    --ltdl-tar        install the libltdl tarball
    --version         print version information and exit

You must \`cd' to the top directory of your package before you run
\`$progname'.

Report bugs to <bug-libtool@gnu.org>.
EOF
    exit $?
    ;;

  --version)
    echo "$PROGRAM (GNU $PACKAGE) $VERSION"
    echo
    echo "Copyright (C) 2005 Free Software Foundation, Inc."
    echo "This is free software; see the source for copying conditions.  There is NO"
    echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    exit $?
    ;;

  --automake)
    automake=yes
    ;;

  -c | --copy)
    ln_s=
    ;;

  --debug)
    echo "$progname: enabling shell trace mode"
    set -x
    ;;

  -n | --dry-run)
    if test "$dry_run" != yes; then
      dry_run=yes
      rm="echo $rm"
      test -n "$ln_s" && ln_s="echo $ln_s"
      cp="echo $cp"
      mkdir="echo mkdir"
      tar="echo $tar"
    fi
    ;;

  -f | --force)
    force=yes
    ;;

  --ltdl)
    ltdl=yes
    ;;

  --ltdl-tar)
    ltdl_tar=yes
    ;;

  -*)
    echo "$progname: unrecognized option \`$arg'" 1>&2
    echo "$help" 1>&2
    exit 1
    ;;

  *)
    echo "$progname: too many arguments" 1>&2
    echo "$help" 1>&2
    exit 1
    ;;
  esac
done

if test -f configure.ac; then
  configure_ac=configure.ac
elif test -f configure.in; then
  configure_ac=configure.in
else
  echo "$progname: \`configure.ac' does not exist" 1>&2
  echo "$help" 1>&2
  exit 1
fi


files=`cd $pkgdatadir && ls`
if test -z "$files"; then
  echo "$progname: cannot list files in \`$pkgdatadir'" 1>&2
  exit 1
fi
files='config.guess config.sub ltmain.sh'

auxdir=.
auxdirline=`grep '^AC_CONFIG_AUX_DIR' $configure_ac 2>/dev/null`
if test -n "$auxdirline"; then
  # Handle explicit AC_CONFIG_AUX_DIR settings.
  auxdir=`echo "$auxdirline" | sed 's/^AC_CONFIG_AUX_DIR(\([^)]*\)).*$/\1/'`

  if test "$auxdir" = "$auxdirline"; then
    echo "$progname: invalid AC_CONFIG_AUX_DIR syntax: $auxdirline" 1>&2
    exit 1
  else
    # Strip any quote brackets.
    auxdir=`echo "$auxdir" | sed 's/^\[\(.*\)\]$/\1/g'`
    case "$auxdir" in
    *\$*)
      echo "$progname: cannot handle variables in AC_CONFIG_AUX_DIR" 1>&2
      exit 1
      ;;
    *)
    ;;
    esac
  fi
else
  # Try to discover auxdir the same way it is discovered by configure.
  # Note that we default to the current directory.
  for dir in . .. ../..; do
    if test -f $dir/install-sh; then
      auxdir=$dir
      break
    elif test -f $dir/install.sh; then
      auxdir=$dir
      break
    fi
  done
fi

if test -z "$automake"; then
  if grep '^A[MC]_PROG_LIBTOOL' $configure_ac >/dev/null 2>&1; then :
  else
    echo "Remember to add \`AC_PROG_LIBTOOL' to \`$configure_ac'."
  fi

  if grep '^AC_PROG_RANLIB' $configure_ac >/dev/null 2>&1; then
    echo "Using \`AC_PROG_RANLIB' is rendered obsolete by \`AC_PROG_LIBTOOL'"
  fi

  if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then
    updatemsg="update your \`aclocal.m4' by running aclocal"
  else
    updatemsg="add the contents of \`$libtool_m4' to \`aclocal.m4'"
  fi

  if grep '^AC_DEFUN(\[A[MC]_PROG_LIBTOOL' aclocal.m4 >/dev/null 2>&1; then
    # Check the version number on libtool.m4 and the one used in aclocal.m4.
    instserial=`grep '^# serial ' $libtool_m4 | grep 'A[MC]_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`

    if test -z "$instserial"; then
      echo "$progname: warning: no serial number on \`$libtool_m4'" 1>&2
    else
      # If the local macro has no serial number, we assume it's ancient.
      localserial=`grep '^# serial ' aclocal.m4 | grep 'A[MC]_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`

      test -z "$localserial" && localserial=0

      if test "$localserial" -lt "$instserial"; then
	echo "You should $updatemsg."
      elif test "$localserial" -gt "$instserial"; then
	echo "$progname: \`$libtool_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2
	if test -z "$force"; then
	  echo "Use \`--force' to replace newer libtool files with this version." 1>&2
	  exit 1
	fi
	echo "To remain compatible, you should $updatemsg."
      fi
    fi
  else
    echo "You should $updatemsg."
  fi

  if grep '^AC_LIB_LTDL' $configure_ac >/dev/null 2>&1; then
    if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then
      updatemsg="update your \`aclocal.m4' by running aclocal"
    else
      updatemsg="add the contents of \`$ltdl_m4' to \`aclocal.m4'"
    fi

    if grep '^AC_DEFUN(AC_LIB_LTDL' aclocal.m4 >/dev/null 2>&1; then
      # Check the version number on ltdl.m4 and the one used in aclocal.m4.
      instserial=`grep '^# serial ' $ltdl_m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`

      if test -z "$instserial"; then
	echo "$progname: warning: no serial number on \`$ltdl_m4'" 1>&2
      else
	# If the local macro has no serial number, we assume it's ancient.
	localserial=`grep '^# serial ' aclocal.m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`

	test -z "$localserial" && localserial=0

	if test "$localserial" -lt "$instserial"; then
	  echo "You should $updatemsg."
	elif test "$localserial" -gt "$instserial"; then
	  echo "$progname: \`$ltld_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2
	  if test -z "$force"; then
	    echo "Use \`--force' to replace newer libtool files with this version." 1>&2
	    exit 1
	  fi
	  echo "To remain compatible, you should $updatemsg."
	fi
      fi
    else
      echo "You should $updatemsg."
    fi
  fi
fi


if test "x$ltdl" = xyes; then
  test -d libltdl || $mkdir libltdl
  ltdlfiles=`cd $pkgdatadir && ls libltdl/*`
  if test -z "$ltdlfiles"; then
    echo "$progname: cannot list files in \`$pkgdatadir/libltdl'" 1>&2
    exit 1
  fi
else
  ltdlfiles=
fi

for file in $ltdlfiles; do
  if test -f "$file" && test -z "$force"; then
    test -z "$automake" && echo "$progname: \`$file' exists: use \`--force' to overwrite" 1>&2
    continue
  fi

  $rm $file
  if test -n "$ln_s" && $ln_s $pkgdatadir/$file $file; then :
  elif { ( cd $pkgdatadir 2>/dev/null && $tar chf - $file 2> /dev/null; ) \
      | ( umask 0 && $tar xf - > /dev/null 2>&1; ); } ; then :
  elif $cp $pkgdatadir/$file $file; then :
  else
    echo "$progname: cannot copy \`$pkgdatadir/$file' to \`$file'" 1>&2
    status=1
  fi
done

if test "x$ltdl_tar" = x"yes"; then
  if test "x$dry_run" = x"yes"; then
    echo "tar -cf - libltdl | gzip --best > libltdl.tar.gz"
  elif test -f libltdl.tar.gz && test -z "$force"; then
    test -z "$automake" && echo "$progname: \`libltdl.tar.gz' exists: use \`--force' to overwrite" 1>&2
  else
    test -d libltdl && ${rm}r libltdl
    $mkdir libltdl
    ltdlfiles=`cd $pkgdatadir && ls libltdl/*`
    for file in $ltdlfiles; do
      if { ( cd $pkgdatadir 2>/dev/null && $tar chf - $file 2> /dev/null; ) \
          | ( umask 0 && $tar xf - > /dev/null 2>&1; ); } ; then :
      elif $cp $pkgdatadir/$file $file; then :
      else
	echo "$progname: cannot copy \`$pkgdatadir/$file' to \`$file'" 1>&2
	status=1
	break
      fi
    done
    for file in $files; do
      if { ( cd $pkgdatadir 2>/dev/null && $tar chf - $file 2> /dev/null; ) \
          | ( umask 0 && cd libltdl 2>/dev/null && $tar xf - > /dev/null 2>&1; ); } ; then :
      elif $cp $pkgdatadir/$file libltdl/$file; then :
      else
	echo "$progname: cannot copy \`$pkgdatadir/$file' to \`libltdl/$file'" 1>&2
	status=1
	break
      fi
    done
    tar -cf - libltdl | gzip --best > libltdl.tar.gz
    ${rm}r libltdl
  fi
fi

# Change to the auxiliary directory.
if test "$auxdir" != .; then
  test -z "$automake" && echo "Putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
  test "x$dry_run" = x"yes" && echo "cd $auxdir"
  cd $auxdir || exit 1
fi

for file in $files; do
  if test -f "$file" && test -z "$force"; then
    test -z "$automake" && echo "$progname: \`$file' exists: use \`--force' to overwrite" 1>&2
    continue
  fi

  $rm $file
  if test -n "$ln_s" && $ln_s $pkgdatadir/$file $file; then :
  elif { ( cd $pkgdatadir 2>/dev/null && $tar chf - $file 2> /dev/null; ) \
      | ( umask 0 && $tar xf - > /dev/null 2>&1; ); } ; then :
  elif $cp $pkgdatadir/$file $file; then :
  else
    echo "$progname: cannot copy \`$pkgdatadir/$file' to \`$file'" 1>&2
    status=1
  fi
done

exit $status

# Local Variables:
# mode:shell-script
# sh-indentation:2
# End: