"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 # a fix for older automake/autoconf versions
5 if test -e m4; then :
6 else
7 mkdir m4
8 fi
9
10 srcdir=`dirname $0`
11 test -z "$srcdir" && srcdir=.
12
13 DIE=0
14
15 case `uname -s` in
16 # fixes for Mac OSX
17 Darwin)
18 libtoolize=glibtoolize
19 libtool=glibtool
20 touch=gtouch
21 # On Mac OS fink uses /sw and Macport uses /opt
22 if [ -d "/sw/share/aclocal" ]; then
23 ACLOCAL_FLAGS="-I /sw/share/aclocal $ACLOCAL_FLAGS"
24 fi
25 if [ -d "/opt/local/share/aclocal" ]; then
26 ACLOCAL_FLAGS="-I /opt/local/share/aclocal $ACLOCAL_FLAGS"
27 fi
28 ;;
29 # default for other unices
30 *)
31 libtoolize=libtoolize
32 libtool=libtool
33 ;;
34 esac
35
36 if [ -n "$GNOME2_DIR" ]; then
37 ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
38 LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
39 PATH="$GNOME2_DIR/bin:$PATH"
40 export PATH
41 export LD_LIBRARY_PATH
42 fi
43
44 (test -f $srcdir/configure.ac) || {
45 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
46 echo " top-level package directory"
47 exit 1
48 }
49
50 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
51 echo
52 echo "**Error**: You must have \`autoconf' installed."
53 echo "Download the appropriate package for your distribution,"
54 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
55 DIE=1
56 }
57
58 (grep "^AC_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
59 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
60 echo
61 echo "**Error**: You must have \`intltool' installed."
62 echo "You can get it from:"
63 echo " ftp://ftp.gnome.org/pub/GNOME/"
64 DIE=1
65 }
66 }
67
68 (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && {
69 (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
70 echo
71 echo "**Error**: You must have \`xml-i18n-toolize' installed."
72 echo "You can get it from:"
73 echo " ftp://ftp.gnome.org/pub/GNOME/"
74 DIE=1
75 }
76 }
77
78 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
79 ($libtool --version) < /dev/null > /dev/null 2>&1 || {
80 echo
81 echo "**Error**: You must have \`libtool' installed."
82 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
83 DIE=1
84 }
85 }
86
87 (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && {
88 (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \
89 (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
90 echo
91 echo "**Error**: You must have \`glib' installed."
92 echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
93 DIE=1
94 }
95 }
96
97 (automake --version) < /dev/null > /dev/null 2>&1 || {
98 echo
99 echo "**Error**: You must have \`automake' installed."
100 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
101 DIE=1
102 NO_AUTOMAKE=yes
103 }
104
105
106 # if no automake, don't bother testing for aclocal
107 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
108 echo
109 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
110 echo "installed doesn't appear recent enough."
111 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
112 DIE=1
113 }
114
115 if test "$DIE" -eq 1; then
116 exit 1
117 fi
118
119 if test -z "$*"; then
120 echo "**Warning**: I am going to run \`configure' with no arguments."
121 echo "If you wish to pass any to it, please specify them on the"
122 echo \`$0\'" command line."
123 echo
124 fi
125
126 case $CC in
127 xlc )
128 am_opt=--include-deps;;
129 esac
130
131 for coin in `find $srcdir -path $srcdir/_darcs -prune -o -name configure.ac -print`
132 do
133 dr=`dirname $coin`
134 if test -f $dr/NO-AUTO-GEN; then
135 echo skipping $dr -- flagged as no auto-gen
136 else
137 echo processing $dr
138 ( cd $dr
139
140 aclocalinclude="$ACLOCAL_FLAGS"
141
142 if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
143 echo "Creating $dr/aclocal.m4 ..."
144 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
145 echo "Running glib-gettextize... Ignore non-fatal messages."
146 echo "no" | glib-gettextize --force --copy
147 echo "Making $dr/aclocal.m4 writable ..."
148 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
149 fi
150 if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
151 echo "Running intltoolize..."
152 intltoolize --copy --force --automake
153 fi
154 if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then
155 echo "Running xml-i18n-toolize..."
156 xml-i18n-toolize --copy --force --automake
157 fi
158 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
159 if test -z "$NO_LIBTOOLIZE" ; then
160 echo "Running libtoolize..."
161 $libtoolize --force --copy
162 fi
163 fi
164 echo "Running aclocal $aclocalinclude ..."
165 aclocal $aclocalinclude
166 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
167 echo "Running autoheader..."
168 autoheader
169 fi
170 echo "Running automake --gnu $am_opt ..."
171 automake --add-missing --copy --gnu $am_opt
172 echo "Running autoconf ..."
173 autoconf
174 )
175 fi
176 done
177
178 conf_flags="--enable-maintainer-mode"
179
180 if test x$NOCONFIGURE = x; then
181 echo Running $srcdir/configure $conf_flags "$@" ...
182 $srcdir/configure $conf_flags "$@" \
183 && echo Now type \`make\' to compile. || exit 1
184 else
185 echo Skipping configure process.
186 fi