[lldb] fix helper for interpreter stacktraces (#13211)
[mono-project.git] / libgc / autogen.sh
blob3bc6e781905e0b8d210bef0ee80851ba58dc09db
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3 # Ripped off from GNOME macros version
5 DIE=0
7 srcdir=`dirname $0`
8 test -z "$srcdir" && srcdir=.
10 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
11 echo
12 echo "**Error**: You must have \`autoconf' installed to compile Mono."
13 echo "Download the appropriate package for your distribution,"
14 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
15 DIE=1
18 if [ -z "$LIBTOOLIZE" ]; then
19 LIBTOOLIZE=`which glibtoolize 2>/dev/null`
20 if [ ! -x "$LIBTOOLIZE" ]; then
21 LIBTOOLIZE=`which libtoolize`
25 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
26 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
27 echo
28 echo "**Error**: You must have \`libtoolize' installed to compile Mono."
29 echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.2.tar.gz"
30 echo "(or a newer version if it is available)"
31 DIE=1
35 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
36 grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
37 (gettext --version) < /dev/null > /dev/null 2>&1 || {
38 echo
39 echo "**Error**: You must have \`gettext' installed to compile Mono."
40 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
41 echo "(or a newer version if it is available)"
42 DIE=1
46 (automake --version) < /dev/null > /dev/null 2>&1 || {
47 echo
48 echo "**Error**: You must have \`automake' installed to compile Mono."
49 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
50 echo "(or a newer version if it is available)"
51 DIE=1
52 NO_AUTOMAKE=yes
56 # if no automake, don't bother testing for aclocal
57 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
58 echo
59 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
60 echo "installed doesn't appear recent enough."
61 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
62 echo "(or a newer version if it is available)"
63 DIE=1
66 if test "$DIE" -eq 1; then
67 exit 1
70 if test x$NOCONFIGURE = x && test -z "$*"; then
71 echo "**Warning**: I am going to run \`configure' with no arguments."
72 echo "If you wish to pass any to it, please specify them on the"
73 echo \`$0\'" command line."
74 echo
77 am_opt="--add-missing --copy --gnu -Wno-obsolete"
79 case $CC in
80 xlc )
81 am_opt="$am_opt --include-deps";;
82 esac
84 if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
85 if test -z "$NO_LIBTOOLIZE" ; then
86 echo "Running libtoolize..."
87 $LIBTOOLIZE --force --copy
91 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -Wnone"
92 echo "Running aclocal $ACLOCAL_FLAGS ..."
93 aclocal $ACLOCAL_FLAGS || {
94 echo
95 echo "**Error**: aclocal failed. This may mean that you have not"
96 echo "installed all of the packages you need, or you may need to"
97 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
98 echo "for the prefix where you installed the packages whose"
99 echo "macros were not found"
100 exit 1
103 if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
104 echo "Running autoheader..."
105 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
108 echo "Running automake $am_opt ..."
109 automake $am_opt ||
110 { echo "**Error**: automake failed."; exit 1; }
111 echo "Running autoconf ..."
112 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
115 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
117 if test x$NOCONFIGURE = x; then
118 echo Running $srcdir/configure $conf_flags "$@" ...
119 $srcdir/configure $conf_flags "$@" \
120 && echo Now type \`make\' to compile $PKG_NAME || exit 1
121 else
122 echo Skipping configure process.