[Bf-committers] bootstrap replacement

Michel Selten bf-committers@blender.org
25 Nov 2002 20:09:19 +0100


--=-V0Ne5LNA909HuJMKZS5C
Content-Type: multipart/alternative; boundary="=-84JsjBo+FH3cr7moGq7T"


--=-84JsjBo+FH3cr7moGq7T
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

I've been following the recent activities on Blender development and I
must say that I'm impressed as how things are going. In the attachement
you'll find a replacement for the current bootstrap script. I took it
from a GNOME project and made some adjustments.
Here's what it does:
- Checks for autoconf, automake and aclocal.
- Also checks for gettext and libtool. These may be needed in the
future.
  If you want to disable these to checks, just remove them or put them
in
  comment for future use. gettext is used for i18n. libtool is used for
library
  generation.
- Shows the process of ./configure. This is helpful to see what is found
and,
  more importantly, what is NOT found.

I haven't figured out yet what the large 'for' loop is doing. I left it
in the autogen.sh script because it doesn't do any harm on my system. I
assume it is used for i18n macros (gettext).
The script is called autogen.sh because that is a more common name for
these scripts and it is being used in a lot of projects (ie all
GNOME/GTK+ projects use it). Feel free to rename it.

I hope this is a useful addition to the project. In the meantime I will
try to figure out why some parts of Blender are not compiling on my
system and give some feedback.

Question:
Why did you use configure.ac instead of configure.in? Again, it's just a
name, but configure.in seems to be a bit more standard.
(I'm refering to configure.ac in the autogen.sh script right now btw.)

With regards,
             Michel



--=-84JsjBo+FH3cr7moGq7T
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/1.0.4">
</HEAD>
<BODY>
<TT>Hi,</TT>
<BR>
<TT></TT>
<BR>
<TT>I've been following the recent activities on Blender development and I must say that I'm impressed as how things are going. In the attachement you'll find a replacement for the current bootstrap script. I took it from a GNOME project and made some adjustments.</TT>
<BR>
<TT>Here's what it does:</TT>
<BR>
<TT>- Checks for autoconf, automake and aclocal.</TT>
<BR>
<TT>- Also checks for gettext and libtool. These may be needed in the future.</TT>
<BR>
<TT>&nbsp; If you want to disable these to checks, just remove them or put them in</TT>
<BR>
<TT>&nbsp; comment for future use. gettext is used for i18n. libtool is used for library</TT>
<BR>
<TT>&nbsp; generation.</TT>
<BR>
<TT>- Shows the process of ./configure. This is helpful to see what is found and,</TT>
<BR>
<TT>&nbsp; more importantly, what is NOT found.</TT>
<BR>
<TT></TT>
<BR>
<TT>I haven't figured out yet what the large 'for' loop is doing. I left it in the autogen.sh script because it doesn't do any harm on my system. I assume it is used for i18n macros (gettext).</TT>
<BR>
<TT>The script is called autogen.sh because that is a more common name for these scripts and it is being used in a lot of projects (ie all GNOME/GTK+ projects use it). Feel free to rename it.</TT>
<BR>
<TT></TT>
<BR>
<TT>I hope this is a useful addition to the project. In the meantime I will try to figure out why some parts of Blender are not compiling on my system and give some feedback.</TT>
<BR>
<TT></TT>
<BR>
<TT>Question:</TT>
<BR>
<TT>Why did you use configure.ac instead of configure.in? Again, it's just a name, but configure.in seems to be a bit more standard.</TT>
<BR>
<TT>(I'm refering to configure.ac in the autogen.sh script right now btw.)</TT>
<BR>
<TT></TT>
<BR>
<TT>With regards,</TT>
<BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Michel</TT>
<BR>
<TT></TT>
<BR>
<TT></TT>
</BODY>
</HTML>

--=-84JsjBo+FH3cr7moGq7T--

--=-V0Ne5LNA909HuJMKZS5C
Content-Disposition: attachment; filename=autogen.sh
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-sh; name=autogen.sh; charset=ISO-8859-1

#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=3D`dirname $0`

DIE=3D0

(autoconf --version) < /dev/null > /dev/null 2>&1 || {
  echo
  echo "**Error**: You must have \`autoconf' installed to."
  echo "Download the appropriate package for your distribution,"
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
  DIE=3D1
}

(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
  (libtool --version) < /dev/null > /dev/null 2>&1 || {
    echo
    echo "**Error**: You must have \`libtool' installed."
    echo "Download the appropriate package for your distribution,"
    echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/"
    DIE=3D1
  }
}

grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
  grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
  (gettext --version) < /dev/null > /dev/null 2>&1 || {
    echo
    echo "**Error**: You must have \`gettext' installed."
    echo "Download the appropriate package for your distribution,"
    echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/gettext/"
    DIE=3D1
  }
}

grep "^AM_GNOME_GETTEXT" $srcdir/configure.ac >/dev/null && {
  grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
  (gettext --version) < /dev/null > /dev/null 2>&1 || {
    echo
    echo "**Error**: You must have \`gettext' installed."
    echo "Download the appropriate package for your distribution,"
    echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/gettext/"
    DIE=3D1
  }
}

(automake --version) < /dev/null > /dev/null 2>&1 || {
  echo
  echo "**Error**: You must have \`automake' installed."
  echo "Download the appropriate package for your distribution,"
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
  DIE=3D1
  NO_AUTOMAKE=3Dyes
}


# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 =
|| {
  echo
  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
  echo "installed doesn't appear recent enough."
  echo "Download the appropriate package for your distribution,"
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
  DIE=3D1
}

if test "$DIE" -eq 1; then
  exit 1
fi

if test -z "$*"; then
  echo "**Warning**: I am going to run \`configure' with no arguments."
  echo "If you wish to pass any to it, please specify them on the"
  echo \`$0\'" command line."
  echo
fi

case $CC in
xlc )
  am_opt=3D--include-deps;;
esac

for coin in `find $srcdir -name configure.in -print`
do=20
  dr=3D`dirname $coin`
  if test -f $dr/NO-AUTO-GEN; then
    echo skipping $dr -- flagged as no auto-gen
  else
    echo processing $dr
    macrodirs=3D`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
    ( cd $dr
      aclocalinclude=3D"$ACLOCAL_FLAGS"
      for k in $macrodirs; do
  	if test -d $k; then
          aclocalinclude=3D"$aclocalinclude -I $k"
  	##else=20
	##  echo "**Warning**: No such directory \`$k'.  Ignored."
        fi
      done
      if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
	if grep "sed.*POTFILES" configure.in >/dev/null; then
	  : do nothing -- we still have an old unmodified configure.in
	else
	  echo "Creating $dr/aclocal.m4 ..."
	  test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
	  echo "Running gettextize...  Ignore non-fatal messages."
	  echo "no" | gettextize --force --copy
	  echo "Making $dr/aclocal.m4 writable ..."
	  test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
        fi
      fi
      if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
	echo "Creating $dr/aclocal.m4 ..."
	test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
	echo "Running gettextize...  Ignore non-fatal messages."
	echo "no" | gettextize --force --copy
	echo "Making $dr/aclocal.m4 writable ..."
	test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
      fi
      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
	echo "Running libtoolize..."
	libtoolize --force --copy
      fi
      echo "Running aclocal $aclocalinclude ..."
      aclocal $aclocalinclude
      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
	echo "Running autoheader..."
	autoheader
      fi
      echo "Running automake --gnu $am_opt ..."
      automake --add-missing --gnu $am_opt
      echo "Running autoconf ..."
      autoconf
    )
  fi
done

#conf_flags=3D"--enable-maintainer-mode --enable-compile-warnings" #--enabl=
e-iso-c

if test x$NOCONFIGURE =3D x; then
  echo Running $srcdir/configure $conf_flags "$@" ...
  $srcdir/configure $conf_flags "$@" \
  && echo Now type \`make\' to compile $PKG_NAME
else
  echo Skipping configure process.
fi

--=-V0Ne5LNA909HuJMKZS5C--