Merge lp:~lifeless/desktop-switcher/autogen into lp:desktop-switcher
- autogen
- Merge into trunk
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Robert Collins | ||||
Proposed branch: | lp:~lifeless/desktop-switcher/autogen | ||||
Merge into: | lp:desktop-switcher | ||||
Diff against target: |
514 lines 1 file modified
autogen.sh (+10/-499) |
||||
To merge this branch: | bzr merge lp:~lifeless/desktop-switcher/autogen | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aurélien Gâteau (community) | Approve | ||
Neil J. Patel (community) | Approve | ||
Review via email: mp+14070@code.launchpad.net |
Commit message
Description of the change
Robert Collins (lifeless) wrote : | # |
Neil J. Patel (njpatel) wrote : | # |
Although I removed this from the builds page as it's no longer in Karmic as it doesn't work very well with the latest GNOME release.
Robert Collins (lifeless) wrote : | # |
On Wed, 2009-10-28 at 09:01 +0000, Neil J. Patel wrote:
> Review: Approve
> Although I removed this from the builds page as it's no longer in Karmic as it doesn't work very well with the latest GNOME release.
Ok cool - have you deleted it from bobthebuilder too?
-Rob
Neil J. Patel (njpatel) wrote : | # |
Hmm, it wasn't autobuilt, but I guess I need to delete it from Hudson.
Aurélien Gâteau (agateau) wrote : | # |
Can't really comment on the change, lacking some autotools fu, but I would suggest passing shell args to gnome-autogen.sh, ie invoking it as "gnome-autogen.sh "$@"'. This makes it possible to prevent gnome-autogen.sh to run ./configure or to pass additional arguments to ./configure.
Robert Collins (lifeless) wrote : | # |
So, as this is approved, could someone land it? Or do I have access to do that.
@aurelien, that makes sense to me, I was just cargo culting another NBR source tree with this change though.
Robert Collins (lifeless) wrote : | # |
obsolete thing, not needed.
Unmerged revisions
- 35. By Robert Collins
-
Use gnome autogen script.
Preview Diff
1 | === modified file 'autogen.sh' | |||
2 | --- autogen.sh 2008-09-24 11:03:29 +0000 | |||
3 | +++ autogen.sh 2009-10-28 05:35:18 +0000 | |||
4 | @@ -1,500 +1,11 @@ | |||
5 | 1 | #!/bin/sh | 1 | #!/bin/sh |
505 | 2 | # Run this to generate all the initial makefiles, etc. | 2 | |
506 | 3 | 3 | PKG_NAME="desktop-switcher" | |
507 | 4 | #name of package | 4 | |
508 | 5 | PKG_NAME=${PKG_NAME:-Package} | 5 | which gnome-autogen.sh || { |
509 | 6 | srcdir=${srcdir:-.} | 6 | echo "You need gnome-common from GNOME SVN" |
510 | 7 | 7 | exit 1 | |
511 | 8 | # default version requirements ... | 8 | } |
512 | 9 | REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.53} | 9 | |
513 | 10 | REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.9} | 10 | USE_GNOME2_MACROS=1 \ |
514 | 11 | REQUIRED_LIBTOOL_VERSION=${REQUIRED_LIBTOOL_VERSION:-1.5} | 11 | . gnome-autogen.sh |
16 | 12 | REQUIRED_GETTEXT_VERSION=${REQUIRED_GETTEXT_VERSION:-0.12} | ||
17 | 13 | REQUIRED_GLIB_GETTEXT_VERSION=${REQUIRED_GLIB_GETTEXT_VERSION:-2.2.0} | ||
18 | 14 | REQUIRED_INTLTOOL_VERSION=${REQUIRED_INTLTOOL_VERSION:-0.30} | ||
19 | 15 | REQUIRED_PKG_CONFIG_VERSION=${REQUIRED_PKG_CONFIG_VERSION:-0.14.0} | ||
20 | 16 | REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0} | ||
21 | 17 | REQUIRED_DOC_COMMON_VERSION=${REQUIRED_DOC_COMMON_VERSION:-2.3.0} | ||
22 | 18 | REQUIRED_GNOME_DOC_UTILS_VERSION=${REQUIRED_GNOME_DOC_UTILS_VERSION:-0.4.2} | ||
23 | 19 | |||
24 | 20 | # a list of required m4 macros. Package can set an initial value | ||
25 | 21 | REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-} | ||
26 | 22 | FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-} | ||
27 | 23 | |||
28 | 24 | # Not all echo versions allow -n, so we check what is possible. This test is | ||
29 | 25 | # based on the one in autoconf. | ||
30 | 26 | ECHO_C= | ||
31 | 27 | ECHO_N= | ||
32 | 28 | case `echo -n x` in | ||
33 | 29 | -n*) | ||
34 | 30 | case `echo 'x\c'` in | ||
35 | 31 | *c*) ;; | ||
36 | 32 | *) ECHO_C='\c';; | ||
37 | 33 | esac;; | ||
38 | 34 | *) | ||
39 | 35 | ECHO_N='-n';; | ||
40 | 36 | esac | ||
41 | 37 | |||
42 | 38 | # some terminal codes ... | ||
43 | 39 | boldface="`tput bold 2>/dev/null`" | ||
44 | 40 | normal="`tput sgr0 2>/dev/null`" | ||
45 | 41 | printbold() { | ||
46 | 42 | echo $ECHO_N "$boldface" $ECHO_C | ||
47 | 43 | echo "$@" | ||
48 | 44 | echo $ECHO_N "$normal" $ECHO_C | ||
49 | 45 | } | ||
50 | 46 | printerr() { | ||
51 | 47 | echo "$@" >&2 | ||
52 | 48 | } | ||
53 | 49 | |||
54 | 50 | # Usage: | ||
55 | 51 | # compare_versions MIN_VERSION ACTUAL_VERSION | ||
56 | 52 | # returns true if ACTUAL_VERSION >= MIN_VERSION | ||
57 | 53 | compare_versions() { | ||
58 | 54 | ch_min_version=$1 | ||
59 | 55 | ch_actual_version=$2 | ||
60 | 56 | ch_status=0 | ||
61 | 57 | IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." | ||
62 | 58 | set $ch_actual_version | ||
63 | 59 | for ch_min in $ch_min_version; do | ||
64 | 60 | ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes | ||
65 | 61 | if [ -z "$ch_min" ]; then break; fi | ||
66 | 62 | if [ -z "$ch_cur" ]; then ch_status=1; break; fi | ||
67 | 63 | if [ $ch_cur -gt $ch_min ]; then break; fi | ||
68 | 64 | if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi | ||
69 | 65 | done | ||
70 | 66 | IFS="$ch_save_IFS" | ||
71 | 67 | return $ch_status | ||
72 | 68 | } | ||
73 | 69 | |||
74 | 70 | # Usage: | ||
75 | 71 | # version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE | ||
76 | 72 | # checks to see if the package is available | ||
77 | 73 | version_check() { | ||
78 | 74 | vc_package=$1 | ||
79 | 75 | vc_variable=$2 | ||
80 | 76 | vc_checkprogs=$3 | ||
81 | 77 | vc_min_version=$4 | ||
82 | 78 | vc_source=$5 | ||
83 | 79 | vc_status=1 | ||
84 | 80 | |||
85 | 81 | vc_checkprog=`eval echo "\\$$vc_variable"` | ||
86 | 82 | if [ -n "$vc_checkprog" ]; then | ||
87 | 83 | printbold "using $vc_checkprog for $vc_package" | ||
88 | 84 | return 0 | ||
89 | 85 | fi | ||
90 | 86 | |||
91 | 87 | if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then | ||
92 | 88 | vc_comparator="=" | ||
93 | 89 | else | ||
94 | 90 | vc_comparator=">=" | ||
95 | 91 | fi | ||
96 | 92 | printbold "checking for $vc_package $vc_comparator $vc_min_version..." | ||
97 | 93 | for vc_checkprog in $vc_checkprogs; do | ||
98 | 94 | echo $ECHO_N " testing $vc_checkprog... " $ECHO_C | ||
99 | 95 | if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then | ||
100 | 96 | vc_actual_version=`$vc_checkprog --version | head -n 1 | \ | ||
101 | 97 | sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` | ||
102 | 98 | if compare_versions $vc_min_version $vc_actual_version; then | ||
103 | 99 | echo "found $vc_actual_version" | ||
104 | 100 | # set variables | ||
105 | 101 | eval "$vc_variable=$vc_checkprog; \ | ||
106 | 102 | ${vc_variable}_VERSION=$vc_actual_version" | ||
107 | 103 | vc_status=0 | ||
108 | 104 | break | ||
109 | 105 | else | ||
110 | 106 | echo "too old (found version $vc_actual_version)" | ||
111 | 107 | fi | ||
112 | 108 | else | ||
113 | 109 | echo "not found." | ||
114 | 110 | fi | ||
115 | 111 | done | ||
116 | 112 | if [ "$vc_status" != 0 ]; then | ||
117 | 113 | printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed" | ||
118 | 114 | printerr " to build $PKG_NAME. Download the appropriate package for" | ||
119 | 115 | printerr " from your distribution or get the source tarball at" | ||
120 | 116 | printerr " $vc_source" | ||
121 | 117 | printerr | ||
122 | 118 | fi | ||
123 | 119 | return $vc_status | ||
124 | 120 | } | ||
125 | 121 | |||
126 | 122 | # Usage: | ||
127 | 123 | # require_m4macro filename.m4 | ||
128 | 124 | # adds filename.m4 to the list of required macros | ||
129 | 125 | require_m4macro() { | ||
130 | 126 | case "$REQUIRED_M4MACROS" in | ||
131 | 127 | $1\ * | *\ $1\ * | *\ $1) ;; | ||
132 | 128 | *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;; | ||
133 | 129 | esac | ||
134 | 130 | } | ||
135 | 131 | |||
136 | 132 | forbid_m4macro() { | ||
137 | 133 | case "$FORBIDDEN_M4MACROS" in | ||
138 | 134 | $1\ * | *\ $1\ * | *\ $1) ;; | ||
139 | 135 | *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;; | ||
140 | 136 | esac | ||
141 | 137 | } | ||
142 | 138 | |||
143 | 139 | # Usage: | ||
144 | 140 | # add_to_cm_macrodirs dirname | ||
145 | 141 | # Adds the dir to $cm_macrodirs, if it's not there yet. | ||
146 | 142 | add_to_cm_macrodirs() { | ||
147 | 143 | case $cm_macrodirs in | ||
148 | 144 | "$1 "* | *" $1 "* | *" $1") ;; | ||
149 | 145 | *) cm_macrodirs="$cm_macrodirs $1";; | ||
150 | 146 | esac | ||
151 | 147 | } | ||
152 | 148 | |||
153 | 149 | # Usage: | ||
154 | 150 | # print_m4macros_error | ||
155 | 151 | # Prints an error message saying that autoconf macros were misused | ||
156 | 152 | print_m4macros_error() { | ||
157 | 153 | printerr "***Error***: some autoconf macros required to build $PKG_NAME" | ||
158 | 154 | printerr " were not found in your aclocal path, or some forbidden" | ||
159 | 155 | printerr " macros were found. Perhaps you need to adjust your" | ||
160 | 156 | printerr " ACLOCAL_FLAGS?" | ||
161 | 157 | printerr | ||
162 | 158 | } | ||
163 | 159 | |||
164 | 160 | # Usage: | ||
165 | 161 | # check_m4macros | ||
166 | 162 | # Checks that all the requested macro files are in the aclocal macro path | ||
167 | 163 | # Uses REQUIRED_M4MACROS and ACLOCAL variables. | ||
168 | 164 | check_m4macros() { | ||
169 | 165 | # construct list of macro directories | ||
170 | 166 | cm_macrodirs=`$ACLOCAL --print-ac-dir` | ||
171 | 167 | # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9 | ||
172 | 168 | # but it contains only Automake's own macros, so we can ignore it. | ||
173 | 169 | |||
174 | 170 | # Read the dirlist file, supported by Automake >= 1.7. | ||
175 | 171 | if compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then | ||
176 | 172 | cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist` | ||
177 | 173 | if [ -n "$cm_dirlist" ] ; then | ||
178 | 174 | for cm_dir in $cm_dirlist; do | ||
179 | 175 | if [ -d $cm_dir ]; then | ||
180 | 176 | add_to_cm_macrodirs $cm_dir | ||
181 | 177 | fi | ||
182 | 178 | done | ||
183 | 179 | fi | ||
184 | 180 | fi | ||
185 | 181 | |||
186 | 182 | # Parse $ACLOCAL_FLAGS | ||
187 | 183 | set - $ACLOCAL_FLAGS | ||
188 | 184 | while [ $# -gt 0 ]; do | ||
189 | 185 | if [ "$1" = "-I" ]; then | ||
190 | 186 | add_to_cm_macrodirs "$2" | ||
191 | 187 | shift | ||
192 | 188 | fi | ||
193 | 189 | shift | ||
194 | 190 | done | ||
195 | 191 | |||
196 | 192 | cm_status=0 | ||
197 | 193 | if [ -n "$REQUIRED_M4MACROS" ]; then | ||
198 | 194 | printbold "Checking for required M4 macros..." | ||
199 | 195 | # check that each macro file is in one of the macro dirs | ||
200 | 196 | for cm_macro in $REQUIRED_M4MACROS; do | ||
201 | 197 | cm_macrofound=false | ||
202 | 198 | for cm_dir in $cm_macrodirs; do | ||
203 | 199 | if [ -f "$cm_dir/$cm_macro" ]; then | ||
204 | 200 | cm_macrofound=true | ||
205 | 201 | break | ||
206 | 202 | fi | ||
207 | 203 | # The macro dir in Cygwin environments may contain a file | ||
208 | 204 | # called dirlist containing other directories to look in. | ||
209 | 205 | if [ -f "$cm_dir/dirlist" ]; then | ||
210 | 206 | for cm_otherdir in `cat $cm_dir/dirlist`; do | ||
211 | 207 | if [ -f "$cm_otherdir/$cm_macro" ]; then | ||
212 | 208 | cm_macrofound=true | ||
213 | 209 | break | ||
214 | 210 | fi | ||
215 | 211 | done | ||
216 | 212 | fi | ||
217 | 213 | done | ||
218 | 214 | if $cm_macrofound; then | ||
219 | 215 | : | ||
220 | 216 | else | ||
221 | 217 | printerr " $cm_macro not found" | ||
222 | 218 | cm_status=1 | ||
223 | 219 | fi | ||
224 | 220 | done | ||
225 | 221 | fi | ||
226 | 222 | if [ "$cm_status" != 0 ]; then | ||
227 | 223 | print_m4macros_error | ||
228 | 224 | return $cm_status | ||
229 | 225 | fi | ||
230 | 226 | if [ -n "$FORBIDDEN_M4MACROS" ]; then | ||
231 | 227 | printbold "Checking for forbidden M4 macros..." | ||
232 | 228 | # check that each macro file is in one of the macro dirs | ||
233 | 229 | for cm_macro in $FORBIDDEN_M4MACROS; do | ||
234 | 230 | cm_macrofound=false | ||
235 | 231 | for cm_dir in $cm_macrodirs; do | ||
236 | 232 | if [ -f "$cm_dir/$cm_macro" ]; then | ||
237 | 233 | cm_macrofound=true | ||
238 | 234 | break | ||
239 | 235 | fi | ||
240 | 236 | done | ||
241 | 237 | if $cm_macrofound; then | ||
242 | 238 | printerr " $cm_macro found (should be cleared from macros dir)" | ||
243 | 239 | cm_status=1 | ||
244 | 240 | fi | ||
245 | 241 | done | ||
246 | 242 | fi | ||
247 | 243 | if [ "$cm_status" != 0 ]; then | ||
248 | 244 | print_m4macros_error | ||
249 | 245 | fi | ||
250 | 246 | return $cm_status | ||
251 | 247 | } | ||
252 | 248 | |||
253 | 249 | # try to catch the case where the macros2/ directory hasn't been cleared out. | ||
254 | 250 | forbid_m4macro gnome-cxx-check.m4 | ||
255 | 251 | |||
256 | 252 | want_libtool=false | ||
257 | 253 | want_gettext=false | ||
258 | 254 | want_glib_gettext=false | ||
259 | 255 | want_intltool=false | ||
260 | 256 | want_pkg_config=false | ||
261 | 257 | want_gtk_doc=false | ||
262 | 258 | want_gnome_doc_utils=false | ||
263 | 259 | |||
264 | 260 | configure_files="`find $srcdir -name '{arch}' -prune -o -name '_darcs' -prune -o -name '.??*' -prune -o -name configure.ac -print -o -name configure.in -print`" | ||
265 | 261 | for configure_ac in $configure_files; do | ||
266 | 262 | dirname=`dirname $configure_ac` | ||
267 | 263 | if [ -f $dirname/NO-AUTO-GEN ]; then | ||
268 | 264 | echo skipping $dirname -- flagged as no auto-gen | ||
269 | 265 | continue | ||
270 | 266 | fi | ||
271 | 267 | if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null || | ||
272 | 268 | grep "^LT_INIT" $configure_ac >/dev/null; then | ||
273 | 269 | want_libtool=true | ||
274 | 270 | fi | ||
275 | 271 | if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then | ||
276 | 272 | want_gettext=true | ||
277 | 273 | fi | ||
278 | 274 | if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then | ||
279 | 275 | want_glib_gettext=true | ||
280 | 276 | fi | ||
281 | 277 | if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null || | ||
282 | 278 | grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then | ||
283 | 279 | want_intltool=true | ||
284 | 280 | fi | ||
285 | 281 | if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then | ||
286 | 282 | want_pkg_config=true | ||
287 | 283 | fi | ||
288 | 284 | if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then | ||
289 | 285 | want_gtk_doc=true | ||
290 | 286 | fi | ||
291 | 287 | if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then | ||
292 | 288 | want_gnome_doc_utils=true | ||
293 | 289 | fi | ||
294 | 290 | |||
295 | 291 | # check to make sure gnome-common macros can be found ... | ||
296 | 292 | if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null || | ||
297 | 293 | grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null || | ||
298 | 294 | grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then | ||
299 | 295 | require_m4macro gnome-common.m4 | ||
300 | 296 | fi | ||
301 | 297 | if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null || | ||
302 | 298 | grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then | ||
303 | 299 | require_m4macro gnome-compiler-flags.m4 | ||
304 | 300 | fi | ||
305 | 301 | done | ||
306 | 302 | |||
307 | 303 | DIE=0 | ||
308 | 304 | |||
309 | 305 | #tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13 | ||
310 | 306 | WANT_AUTOCONF_2_5=1 | ||
311 | 307 | export WANT_AUTOCONF_2_5 | ||
312 | 308 | version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \ | ||
313 | 309 | "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz" || DIE=1 | ||
314 | 310 | AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/` | ||
315 | 311 | |||
316 | 312 | case $REQUIRED_AUTOMAKE_VERSION in | ||
317 | 313 | 1.4*) automake_progs="automake-1.4" ;; | ||
318 | 314 | 1.5*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;; | ||
319 | 315 | 1.6*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;; | ||
320 | 316 | 1.7*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;; | ||
321 | 317 | 1.8*) automake_progs="automake-1.10 automake-1.9 automake-1.8" ;; | ||
322 | 318 | 1.9*) automake_progs="automake-1.10 automake-1.9" ;; | ||
323 | 319 | 1.10*) automake_progs="automake-1.10" ;; | ||
324 | 320 | esac | ||
325 | 321 | version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \ | ||
326 | 322 | "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" || DIE=1 | ||
327 | 323 | ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/` | ||
328 | 324 | |||
329 | 325 | if $want_libtool; then | ||
330 | 326 | version_check libtool LIBTOOLIZE libtoolize $REQUIRED_LIBTOOL_VERSION \ | ||
331 | 327 | "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz" || DIE=1 | ||
332 | 328 | require_m4macro libtool.m4 | ||
333 | 329 | fi | ||
334 | 330 | |||
335 | 331 | if $want_gettext; then | ||
336 | 332 | version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \ | ||
337 | 333 | "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz" || DIE=1 | ||
338 | 334 | require_m4macro gettext.m4 | ||
339 | 335 | fi | ||
340 | 336 | |||
341 | 337 | if $want_glib_gettext; then | ||
342 | 338 | version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \ | ||
343 | 339 | "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" || DIE=1 | ||
344 | 340 | require_m4macro glib-gettext.m4 | ||
345 | 341 | fi | ||
346 | 342 | |||
347 | 343 | if $want_intltool; then | ||
348 | 344 | version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \ | ||
349 | 345 | "http://ftp.gnome.org/pub/GNOME/sources/intltool/" || DIE=1 | ||
350 | 346 | require_m4macro intltool.m4 | ||
351 | 347 | fi | ||
352 | 348 | |||
353 | 349 | if $want_pkg_config; then | ||
354 | 350 | version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \ | ||
355 | 351 | "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" || DIE=1 | ||
356 | 352 | require_m4macro pkg.m4 | ||
357 | 353 | fi | ||
358 | 354 | |||
359 | 355 | if $want_gtk_doc; then | ||
360 | 356 | version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \ | ||
361 | 357 | "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" || DIE=1 | ||
362 | 358 | require_m4macro gtk-doc.m4 | ||
363 | 359 | fi | ||
364 | 360 | |||
365 | 361 | if $want_gnome_doc_utils; then | ||
366 | 362 | version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \ | ||
367 | 363 | "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/" || DIE=1 | ||
368 | 364 | fi | ||
369 | 365 | |||
370 | 366 | if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then | ||
371 | 367 | version_check gnome-common DOC_COMMON gnome-doc-common \ | ||
372 | 368 | $REQUIRED_DOC_COMMON_VERSION " " || DIE=1 | ||
373 | 369 | fi | ||
374 | 370 | |||
375 | 371 | check_m4macros || DIE=1 | ||
376 | 372 | |||
377 | 373 | if [ "$DIE" -eq 1 ]; then | ||
378 | 374 | exit 1 | ||
379 | 375 | fi | ||
380 | 376 | |||
381 | 377 | if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then | ||
382 | 378 | printerr "**Warning**: I am going to run \`configure' with no arguments." | ||
383 | 379 | printerr "If you wish to pass any to it, please specify them on the" | ||
384 | 380 | printerr \`$0\'" command line." | ||
385 | 381 | printerr | ||
386 | 382 | fi | ||
387 | 383 | |||
388 | 384 | topdir=`pwd` | ||
389 | 385 | for configure_ac in $configure_files; do | ||
390 | 386 | dirname=`dirname $configure_ac` | ||
391 | 387 | basename=`basename $configure_ac` | ||
392 | 388 | if [ -f $dirname/NO-AUTO-GEN ]; then | ||
393 | 389 | echo skipping $dirname -- flagged as no auto-gen | ||
394 | 390 | elif [ ! -w $dirname ]; then | ||
395 | 391 | echo skipping $dirname -- directory is read only | ||
396 | 392 | else | ||
397 | 393 | printbold "Processing $configure_ac" | ||
398 | 394 | cd $dirname | ||
399 | 395 | |||
400 | 396 | # Note that the order these tools are called should match what | ||
401 | 397 | # autoconf's "autoupdate" package does. See bug 138584 for | ||
402 | 398 | # details. | ||
403 | 399 | |||
404 | 400 | # programs that might install new macros get run before aclocal | ||
405 | 401 | if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null || | ||
406 | 402 | grep "^LT_INIT" $basename >/dev/null; then | ||
407 | 403 | printbold "Running $LIBTOOLIZE..." | ||
408 | 404 | $LIBTOOLIZE --force --copy || exit 1 | ||
409 | 405 | fi | ||
410 | 406 | |||
411 | 407 | if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then | ||
412 | 408 | printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages." | ||
413 | 409 | echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1 | ||
414 | 410 | elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then | ||
415 | 411 | if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then | ||
416 | 412 | printbold "Running autopoint..." | ||
417 | 413 | autopoint --force || exit 1 | ||
418 | 414 | else | ||
419 | 415 | printbold "Running $GETTEXTIZE... Ignore non-fatal messages." | ||
420 | 416 | echo "no" | $GETTEXTIZE --force --copy || exit 1 | ||
421 | 417 | fi | ||
422 | 418 | fi | ||
423 | 419 | |||
424 | 420 | if grep "^AC_PROG_INTLTOOL" $basename >/dev/null || | ||
425 | 421 | grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then | ||
426 | 422 | printbold "Running $INTLTOOLIZE..." | ||
427 | 423 | $INTLTOOLIZE --force --copy --automake || exit 1 | ||
428 | 424 | fi | ||
429 | 425 | if grep "^GTK_DOC_CHECK" $basename >/dev/null; then | ||
430 | 426 | printbold "Running $GTKDOCIZE..." | ||
431 | 427 | $GTKDOCIZE --copy || exit 1 | ||
432 | 428 | fi | ||
433 | 429 | |||
434 | 430 | if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then | ||
435 | 431 | printbold "Running gnome-doc-common..." | ||
436 | 432 | gnome-doc-common --copy || exit 1 | ||
437 | 433 | fi | ||
438 | 434 | if grep "^GNOME_DOC_INIT" $basename >/dev/null; then | ||
439 | 435 | printbold "Running $GNOME_DOC_PREPARE..." | ||
440 | 436 | $GNOME_DOC_PREPARE --force --copy || exit 1 | ||
441 | 437 | fi | ||
442 | 438 | |||
443 | 439 | # Now run aclocal to pull in any additional macros needed | ||
444 | 440 | |||
445 | 441 | # if the AC_CONFIG_MACRO_DIR() macro is used, pass that | ||
446 | 442 | # directory to aclocal. | ||
447 | 443 | m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` | ||
448 | 444 | if [ -n "$m4dir" ]; then | ||
449 | 445 | m4dir="-I $m4dir" | ||
450 | 446 | fi | ||
451 | 447 | printbold "Running $ACLOCAL..." | ||
452 | 448 | $ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1 | ||
453 | 449 | |||
454 | 450 | if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then | ||
455 | 451 | printerr "*** obsolete gnome macros were used in $configure_ac" | ||
456 | 452 | fi | ||
457 | 453 | |||
458 | 454 | # Now that all the macros are sorted, run autoconf and autoheader ... | ||
459 | 455 | printbold "Running $AUTOCONF..." | ||
460 | 456 | $AUTOCONF || exit 1 | ||
461 | 457 | if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then | ||
462 | 458 | printbold "Running $AUTOHEADER..." | ||
463 | 459 | $AUTOHEADER || exit 1 | ||
464 | 460 | # this prevents automake from thinking config.h.in is out of | ||
465 | 461 | # date, since autoheader doesn't touch the file if it doesn't | ||
466 | 462 | # change. | ||
467 | 463 | test -f config.h.in && touch config.h.in | ||
468 | 464 | fi | ||
469 | 465 | |||
470 | 466 | # Finally, run automake to create the makefiles ... | ||
471 | 467 | printbold "Running $AUTOMAKE..." | ||
472 | 468 | if [ -f COPYING ]; then | ||
473 | 469 | cp -pf COPYING COPYING.autogen_bak | ||
474 | 470 | fi | ||
475 | 471 | if [ -f INSTALL ]; then | ||
476 | 472 | cp -pf INSTALL INSTALL.autogen_bak | ||
477 | 473 | fi | ||
478 | 474 | if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then | ||
479 | 475 | $AUTOMAKE --gnu --add-missing --force --copy || exit 1 | ||
480 | 476 | else | ||
481 | 477 | $AUTOMAKE --gnu --add-missing --copy || exit 1 | ||
482 | 478 | fi | ||
483 | 479 | if [ -f COPYING.autogen_bak ]; then | ||
484 | 480 | cmp COPYING COPYING.autogen_bak > /dev/null || cp -pf COPYING.autogen_bak COPYING | ||
485 | 481 | rm -f COPYING.autogen_bak | ||
486 | 482 | fi | ||
487 | 483 | if [ -f INSTALL.autogen_bak ]; then | ||
488 | 484 | cmp INSTALL INSTALL.autogen_bak > /dev/null || cp -pf INSTALL.autogen_bak INSTALL | ||
489 | 485 | rm -f INSTALL.autogen_bak | ||
490 | 486 | fi | ||
491 | 487 | |||
492 | 488 | cd "$topdir" | ||
493 | 489 | fi | ||
494 | 490 | done | ||
495 | 491 | |||
496 | 492 | conf_flags="--enable-maintainer-mode" | ||
497 | 493 | |||
498 | 494 | if test x$NOCONFIGURE = x; then | ||
499 | 495 | printbold Running $srcdir/configure $conf_flags "$@" ... | ||
500 | 496 | $srcdir/configure $conf_flags "$@" \ | ||
501 | 497 | && echo Now type \`make\' to compile $PKG_NAME || exit 1 | ||
502 | 498 | else | ||
503 | 499 | echo Skipping configure process. | ||
504 | 500 | fi |
This should fix builds with automake1.11