Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 143 lines (120 sloc) 4.017 kb
4416217 2001-08-02 Alex Graveley <alex@ximian.com>
Alex Graveley authored
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3 # Ripped off from GNOME macros version
4
5 DIE=0
6
7 srcdir=`dirname $0`
8 test -z "$srcdir" && srcdir=.
9
10 if [ -n "$MONO_PATH" ]; then
bd1ca2e @gonzalop 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
gonzalop authored
11 # from -> /mono/lib:/another/mono/lib
12 # to -> /mono /another/mono
13 for i in `echo ${MONO_PATH} | tr ":" " "`; do
14 i=`dirname ${i}`
15 if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then
16 ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS"
17 fi
18 if [ -n "{i}" -a -d "${i}/bin" ]; then
19 PATH="${i}/bin:$PATH"
20 fi
21 done
4416217 2001-08-02 Alex Graveley <alex@ximian.com>
Alex Graveley authored
22 export PATH
23 fi
24
25 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
26 echo
27 echo "**Error**: You must have \`autoconf' installed to compile Mono."
28 echo "Download the appropriate package for your distribution,"
29 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
30 DIE=1
31 }
32
4cdbd45 @vargaz 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
vargaz authored
33 if [ -z "$LIBTOOL" ]; then
df95853 @vargaz 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
vargaz authored
34 LIBTOOL=`which glibtool 2>/dev/null`
35 if [ ! -x "$LIBTOOL" ]; then
50edd0e 2003-11-07 Bernie Solomon <bernard@ugsolutions.com>
Bernie Solomon authored
36 LIBTOOL=`which libtool`
37 fi
4cdbd45 @vargaz 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
vargaz authored
38 fi
39
4416217 2001-08-02 Alex Graveley <alex@ximian.com>
Alex Graveley authored
40 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
4cdbd45 @vargaz 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
vargaz authored
41 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
4416217 2001-08-02 Alex Graveley <alex@ximian.com>
Alex Graveley authored
42 echo
43 echo "**Error**: You must have \`libtool' installed to compile Mono."
44 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
45 echo "(or a newer version if it is available)"
46 DIE=1
47 }
48 }
49
50 grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
51 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
52 (gettext --version) < /dev/null > /dev/null 2>&1 || {
53 echo
54 echo "**Error**: You must have \`gettext' installed to compile Mono."
55 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
56 echo "(or a newer version if it is available)"
57 DIE=1
58 }
59 }
60
61 (automake --version) < /dev/null > /dev/null 2>&1 || {
62 echo
63 echo "**Error**: You must have \`automake' installed to compile Mono."
64 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
65 echo "(or a newer version if it is available)"
66 DIE=1
67 NO_AUTOMAKE=yes
68 }
69
70
71 # if no automake, don't bother testing for aclocal
72 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
73 echo
74 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
75 echo "installed doesn't appear recent enough."
76 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
77 echo "(or a newer version if it is available)"
78 DIE=1
79 }
80
81 if test "$DIE" -eq 1; then
82 exit 1
83 fi
84
85 if test -z "$*"; then
86 echo "**Warning**: I am going to run \`configure' with no arguments."
87 echo "If you wish to pass any to it, please specify them on the"
88 echo \`$0\'" command line."
89 echo
90 fi
91
92 case $CC in
93 xlc )
94 am_opt=--include-deps;;
95 esac
96
da356f9 run automake, aotoconf, ...
Dietmar Maurer authored
97
98 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
99 if test -z "$NO_LIBTOOLIZE" ; then
100 echo "Running libtoolize..."
4cdbd45 @vargaz 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
vargaz authored
101 ${LIBTOOL}ize --force --copy
da356f9 run automake, aotoconf, ...
Dietmar Maurer authored
102 fi
103 fi
104
f93100c @dickp 2001-11-09 Dick Porter <dick@ximian.com>
dickp authored
105 echo "Running aclocal $ACLOCAL_FLAGS ..."
106 aclocal $ACLOCAL_FLAGS || {
da356f9 run automake, aotoconf, ...
Dietmar Maurer authored
107 echo
108 echo "**Error**: aclocal failed. This may mean that you have not"
109 echo "installed all of the packages you need, or you may need to"
110 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
111 echo "for the prefix where you installed the packages whose"
112 echo "macros were not found"
113 exit 1
114 }
115
116 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
117 echo "Running autoheader..."
118 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
119 fi
120
121 echo "Running automake --gnu $am_opt ..."
122 automake --add-missing --gnu $am_opt ||
123 { echo "**Error**: automake failed."; exit 1; }
124 echo "Running autoconf ..."
125 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
126
5e2afe9 2003-06-08 Martin Baulig <martin@ximian.com>
Martin Baulig authored
127 if test -d $srcdir/libgc; then
128 echo Running libgc/autogen.sh ...
129 (cd $srcdir/libgc ; NOCONFIGURE=1 ./autogen.sh "$@")
130 echo Done running libgc/autogen.sh ...
131 fi
132
da356f9 run automake, aotoconf, ...
Dietmar Maurer authored
133
4416217 2001-08-02 Alex Graveley <alex@ximian.com>
Alex Graveley authored
134 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
135
136 if test x$NOCONFIGURE = x; then
137 echo Running $srcdir/configure $conf_flags "$@" ...
138 $srcdir/configure $conf_flags "$@" \
139 && echo Now type \`make\' to compile $PKG_NAME || exit 1
140 else
141 echo Skipping configure process.
142 fi
Something went wrong with that request. Please try again.