autogen.sh
author James Bowes <jbowes@redhat.com>
Wed Jul 09 10:11:13 2008 -0400 (2008-07-09)
changeset 318 829d6711b316
parent 241 c3eb520e2219
child 323 3b24a0bd41ee
permissions -rwxr-xr-x
Use strings to identify section types in the on-disk repo format.

Previously, a given razor file type had a fixed number of sections in a
fixed order, identified by an integer type. Now, sections are identified
by a named string (stored in a string pool after the section lists).

This will allow for razor files to contain arbitrary sections.

For bonus points, also drop the 4k section alignment and change the
magic byte string to "RZDB".

committer: Kristian H?gsberg <krh@redhat.com>
rhughes@241
     1
#!/bin/sh
rhughes@241
     2
# Run this to generate all the initial makefiles, etc.
rhughes@241
     3
rhughes@241
     4
srcdir=`dirname $0`
rhughes@241
     5
test -z "$srcdir" && srcdir=.
rhughes@241
     6
rhughes@241
     7
DIE=0
rhughes@241
     8
rhughes@241
     9
(test -f $srcdir/configure.ac) || {
rhughes@241
    10
    echo -n "**Error**: Directory $srcdir does not look like the"
rhughes@241
    11
    echo " top-level package directory"
rhughes@241
    12
    exit 1
rhughes@241
    13
}
rhughes@241
    14
rhughes@241
    15
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
rhughes@241
    16
  echo
rhughes@241
    17
  echo "**Error**: You must have autoconf installed."
rhughes@241
    18
  echo "Download the appropriate package for your distribution,"
rhughes@241
    19
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
rhughes@241
    20
  DIE=1
rhughes@241
    21
}
rhughes@241
    22
rhughes@241
    23
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
rhughes@241
    24
  (libtool --version) < /dev/null > /dev/null 2>&1 || {
rhughes@241
    25
    echo
rhughes@241
    26
    echo "**Error**: You must have libtool installed."
rhughes@241
    27
    echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
rhughes@241
    28
    DIE=1
rhughes@241
    29
  }
rhughes@241
    30
}
rhughes@241
    31
rhughes@241
    32
(automake --version) < /dev/null > /dev/null 2>&1 || {
rhughes@241
    33
  echo
rhughes@241
    34
  echo "**Error**: You must have automake installed."
rhughes@241
    35
  echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
rhughes@241
    36
  DIE=1
rhughes@241
    37
  NO_AUTOMAKE=yes
rhughes@241
    38
}
rhughes@241
    39
rhughes@241
    40
rhughes@241
    41
# if no automake, don't bother testing for aclocal
rhughes@241
    42
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
rhughes@241
    43
  echo
rhughes@241
    44
  echo "**Error**: Missing aclocal.  The version of automake"
rhughes@241
    45
  echo "installed doesn't appear recent enough."
rhughes@241
    46
  echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
rhughes@241
    47
  DIE=1
rhughes@241
    48
}
rhughes@241
    49
rhughes@241
    50
if test "$DIE" -eq 1; then
rhughes@241
    51
  exit 1
rhughes@241
    52
fi
rhughes@241
    53
rhughes@241
    54
if test -z "$*"; then
rhughes@241
    55
  echo "**Warning**: I am going to run configure with no arguments."
rhughes@241
    56
  echo "If you wish to pass any to it, please specify them on the"
rhughes@241
    57
  echo $0 " command line."
rhughes@241
    58
  echo
rhughes@241
    59
fi
rhughes@241
    60
rhughes@241
    61
case $CC in
rhughes@241
    62
xlc )
rhughes@241
    63
  am_opt=--include-deps;;
rhughes@241
    64
esac
rhughes@241
    65
rhughes@241
    66
      aclocalinclude="$ACLOCAL_FLAGS"
rhughes@241
    67
rhughes@241
    68
      if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
rhughes@241
    69
	if test -z "$NO_LIBTOOLIZE" ; then 
rhughes@241
    70
	  echo "Running libtoolize..."
rhughes@241
    71
	  libtoolize --force --copy
rhughes@241
    72
	fi
rhughes@241
    73
      fi
rhughes@241
    74
      echo "Running aclocal $aclocalinclude ..."
rhughes@241
    75
      aclocal $aclocalinclude
rhughes@241
    76
      if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
rhughes@241
    77
	echo "Running autoheader..."
rhughes@241
    78
	autoheader
rhughes@241
    79
      fi
rhughes@241
    80
      echo "Running automake --gnu -Wno-portability $am_opt ..."
rhughes@241
    81
      automake --add-missing --gnu -Wno-portability $am_opt
rhughes@241
    82
      echo "Running autoconf ..."
rhughes@241
    83
      autoconf
rhughes@241
    84
rhughes@241
    85
intltoolize --copy --force --automake                  || exit 1
rhughes@241
    86
krh@262
    87
gtkdocize --copy --flavour no-tmpl
krh@262
    88
rhughes@241
    89
conf_flags="--enable-maintainer-mode"
rhughes@241
    90
rhughes@241
    91
if test x$NOCONFIGURE = x; then
rhughes@241
    92
  echo "Running $srcdir/configure $conf_flags $@ ..."
rhughes@241
    93
  $srcdir/configure $conf_flags "$@" \
rhughes@241
    94
  && echo "Now type make to compile." || exit 1
rhughes@241
    95
else
rhughes@241
    96
  echo "Skipping configure process."
rhughes@241
    97
fi