File: autogen.sh

package info (click to toggle)
gummi 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,940 kB
  • sloc: ansic: 8,894; sh: 145; makefile: 77; python: 38
file content (33 lines) | stat: -rwxr-xr-x 1,014 bytes parent folder | download
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
#! /bin/sh

# modified from the freetype2 project - thank you!
check_tool_version () {
  field=$2
  # assume output of "[TOOL] --version" is "toolname (GNU toolname foo bar) version"
  if test "$field"x = x; then
    field=3  # default to 3 for all GNU autotools, after filtering enclosed string
  fi
  version=`$1 --version | head -1 | sed 's/([^)]*)/()/g' | cut -d ' ' -f $field`
  # cut off patch from version format (major.minor.patch)
  echo `echo $version | cut -d"." -f1,2`
}

AM_VERSION=`check_tool_version automake`
AC_VERSION=

set -x

if [ "x${ACLOCAL_DIR}" != "x" ]; then
  ACLOCAL_ARG=-I ${ACLOCAL_DIR}
fi

${ACLOCAL:-aclocal-$AM_VERSION} ${ACLOCAL_ARG}
${AUTOHEADER:-autoheader$AC_VERSION}
AUTOMAKE=${AUTOMAKE:-automake-$AM_VERSION} libtoolize -c --automake
${AUTOMAKE:-automake-$AM_VERSION} --add-missing --copy --include-deps
${AUTOCONF:-autoconf$AC_VERSION}

# mkinstalldirs was not correctly installed in some cases.
cp -f /usr/share/automake-${AM_VERSION}/mkinstalldirs .

rm -rf autom4te.cache