[w32handle] Remove unused header includes
[mono-project.git] / libgc / autogen.sh
blob65e1f25f39c8e8bbc424ae640a1cbb0f7cae3937
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 case $CC in
78 xlc )
79 am_opt=--include-deps;;
80 esac
83 if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
84 if test -z "$NO_LIBTOOLIZE" ; then
85 echo "Running libtoolize..."
86 $LIBTOOLIZE --force --copy
90 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -Wnone"
91 echo "Running aclocal $ACLOCAL_FLAGS ..."
92 aclocal $ACLOCAL_FLAGS || {
93 echo
94 echo "**Error**: aclocal failed. This may mean that you have not"
95 echo "installed all of the packages you need, or you may need to"
96 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
97 echo "for the prefix where you installed the packages whose"
98 echo "macros were not found"
99 exit 1
102 if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
103 echo "Running autoheader..."
104 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
107 echo "Running automake --gnu $am_opt ..."
108 automake --add-missing --gnu -Wno-obsolete $am_opt ||
109 { echo "**Error**: automake failed."; exit 1; }
110 echo "Running autoconf ..."
111 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
114 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
116 if test x$NOCONFIGURE = x; then
117 echo Running $srcdir/configure $conf_flags "$@" ...
118 $srcdir/configure $conf_flags "$@" \
119 && echo Now type \`make\' to compile $PKG_NAME || exit 1
120 else
121 echo Skipping configure process.