1 | #!/bin/sh |
---|
2 | # Run this to generate all the initial makefiles, etc. |
---|
3 | |
---|
4 | DIE=0 |
---|
5 | |
---|
6 | if [ -n "$GNOME2_PATH" ]; then |
---|
7 | ACLOCAL_FLAGS="-I $GNOME2_PATH/share/aclocal $ACLOCAL_FLAGS" |
---|
8 | PATH="$GNOME2_PATH/bin:$PATH" |
---|
9 | export PATH |
---|
10 | fi |
---|
11 | |
---|
12 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { |
---|
13 | echo |
---|
14 | echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME." |
---|
15 | echo "Download the appropriate package for your distribution," |
---|
16 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
---|
17 | DIE=1 |
---|
18 | } |
---|
19 | |
---|
20 | (grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && { |
---|
21 | (intltoolize --version) < /dev/null > /dev/null 2>&1 || { |
---|
22 | echo |
---|
23 | echo "**Error**: You must have \`intltoolize' installed to compile $PKG_NAME." |
---|
24 | echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.10.tar.gz" |
---|
25 | echo "(or a newer version if it is available)" |
---|
26 | DIE=1 |
---|
27 | } |
---|
28 | } |
---|
29 | |
---|
30 | (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && { |
---|
31 | (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { |
---|
32 | echo |
---|
33 | echo "**Error**: You must have \`xml-i18n-toolize' installed to compile $PKG_NAME." |
---|
34 | echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/xml-i18n-tools/xml-i18n-tools-0.9.tar.gz" |
---|
35 | echo "(or a newer version of xml-i18n-tools or intltool if it is available)" |
---|
36 | DIE=1 |
---|
37 | } |
---|
38 | } |
---|
39 | |
---|
40 | (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { |
---|
41 | (libtool --version) < /dev/null > /dev/null 2>&1 || { |
---|
42 | echo |
---|
43 | echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME." |
---|
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 $PKG_NAME." |
---|
55 | # echo "Get ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.10.39.tar.gz" |
---|
56 | # echo "(or a newer version if it is available)" |
---|
57 | # DIE=1 |
---|
58 | # } |
---|
59 | #} |
---|
60 | |
---|
61 | #grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && { |
---|
62 | # grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ |
---|
63 | # (gettext --version) < /dev/null > /dev/null 2>&1 || { |
---|
64 | # echo |
---|
65 | # echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME." |
---|
66 | # echo "Get ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.10.39.tar.gz" |
---|
67 | # echo "(or a newer version if it is available)" |
---|
68 | # DIE=1 |
---|
69 | # } |
---|
70 | #} |
---|
71 | |
---|
72 | (automake --version) < /dev/null > /dev/null 2>&1 || { |
---|
73 | echo |
---|
74 | echo "**Error**: You must have \`automake' installed to compile $PKG_NAME." |
---|
75 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" |
---|
76 | echo "(or a newer version if it is available)" |
---|
77 | DIE=1 |
---|
78 | NO_AUTOMAKE=yes |
---|
79 | } |
---|
80 | |
---|
81 | |
---|
82 | # if no automake, don't bother testing for aclocal |
---|
83 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { |
---|
84 | echo |
---|
85 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" |
---|
86 | echo "installed doesn't appear recent enough." |
---|
87 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" |
---|
88 | echo "(or a newer version if it is available)" |
---|
89 | DIE=1 |
---|
90 | } |
---|
91 | |
---|
92 | if test "$DIE" -eq 1; then |
---|
93 | exit 1 |
---|
94 | fi |
---|
95 | |
---|
96 | if test -z "$*"; then |
---|
97 | echo "**Warning**: I am going to run \`configure' with no arguments." |
---|
98 | echo "If you wish to pass any to it, please specify them on the" |
---|
99 | echo \`$0\'" command line." |
---|
100 | echo |
---|
101 | fi |
---|
102 | |
---|
103 | case $CC in |
---|
104 | xlc ) |
---|
105 | am_opt=--include-deps;; |
---|
106 | esac |
---|
107 | |
---|
108 | for coin in `find $srcdir -name configure.in -print` |
---|
109 | do |
---|
110 | dr=`dirname $coin` |
---|
111 | if test -f $dr/NO-AUTO-GEN; then |
---|
112 | echo skipping $dr -- flagged as no auto-gen |
---|
113 | else |
---|
114 | echo processing $dr |
---|
115 | macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` |
---|
116 | ( cd $dr |
---|
117 | macrosdir=`find . -name macros -print` |
---|
118 | for i in $macrodirs; do |
---|
119 | if test -f $i/gnome-gettext.m4; then |
---|
120 | DELETEFILES="$DELETEFILES $i/gnome-gettext.m4" |
---|
121 | fi |
---|
122 | done |
---|
123 | |
---|
124 | echo "deletefiles is $DELETEFILES" |
---|
125 | aclocalinclude="$ACLOCAL_FLAGS" |
---|
126 | for k in $aclocalinclude; do |
---|
127 | if test -d $k; then |
---|
128 | if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then |
---|
129 | rm -f $DELETEFILES |
---|
130 | fi |
---|
131 | fi |
---|
132 | done |
---|
133 | for k in $macrodirs; do |
---|
134 | if test -d $k; then |
---|
135 | aclocalinclude="$aclocalinclude -I $k" |
---|
136 | if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then |
---|
137 | rm -f $DELETEFILES |
---|
138 | fi |
---|
139 | fi |
---|
140 | done |
---|
141 | if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then |
---|
142 | if grep "sed.*POTFILES" configure.in >/dev/null; then |
---|
143 | : do nothing -- we still have an old unmodified configure.in |
---|
144 | else |
---|
145 | echo "Creating $dr/aclocal.m4 ..." |
---|
146 | test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 |
---|
147 | echo "Running gettextize... Ignore non-fatal messages." |
---|
148 | echo "no" | gettextize --force --copy |
---|
149 | echo "Making $dr/aclocal.m4 writable ..." |
---|
150 | test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 |
---|
151 | fi |
---|
152 | fi |
---|
153 | if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then |
---|
154 | echo "Creating $dr/aclocal.m4 ..." |
---|
155 | test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 |
---|
156 | echo "Running gettextize... Ignore non-fatal messages." |
---|
157 | echo "no" | gettextize --force --copy |
---|
158 | echo "Making $dr/aclocal.m4 writable ..." |
---|
159 | test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 |
---|
160 | fi |
---|
161 | if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then |
---|
162 | echo "Running intltoolize..." |
---|
163 | intltoolize --copy --force --automake |
---|
164 | fi |
---|
165 | if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then |
---|
166 | echo "Running xml-i18n-toolize..." |
---|
167 | xml-i18n-toolize --copy --force --automake |
---|
168 | fi |
---|
169 | if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then |
---|
170 | if test -z "$NO_LIBTOOLIZE" ; then |
---|
171 | echo "Running libtoolize..." |
---|
172 | libtoolize --force --copy |
---|
173 | fi |
---|
174 | fi |
---|
175 | echo "Running aclocal $aclocalinclude ..." |
---|
176 | aclocal $aclocalinclude || { |
---|
177 | echo |
---|
178 | echo "**Error**: aclocal failed. This may mean that you have not" |
---|
179 | echo "installed all of the packages you need, or you may need to" |
---|
180 | echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" |
---|
181 | echo "for the prefix where you installed the packages whose" |
---|
182 | echo "macros were not found" |
---|
183 | exit 1 |
---|
184 | } |
---|
185 | |
---|
186 | if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then |
---|
187 | echo "Running autoheader..." |
---|
188 | autoheader || { echo "**Error**: autoheader failed."; exit 1; } |
---|
189 | fi |
---|
190 | echo "Running automake --gnu $am_opt ..." |
---|
191 | automake --add-missing --gnu $am_opt || |
---|
192 | { echo "**Error**: automake failed."; exit 1; } |
---|
193 | echo "Running autoconf ..." |
---|
194 | autoconf || { echo "**Error**: autoconf failed."; exit 1; } |
---|
195 | ) || exit 1 |
---|
196 | fi |
---|
197 | done |
---|
198 | |
---|
199 | conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c |
---|
200 | |
---|
201 | if test x$NOCONFIGURE = x; then |
---|
202 | echo Running $srcdir/configure $conf_flags "$@" ... |
---|
203 | $srcdir/configure $conf_flags "$@" \ |
---|
204 | && echo Now type \`make\' to compile $PKG_NAME || exit 1 |
---|
205 | else |
---|
206 | echo Skipping configure process. |
---|
207 | fi |
---|