~ubuntu-branches/debian/sid/redland-bindings/sid

« back to all changes in this revision

Viewing changes to autogen.sh

  • Committer: Package Import Robot
  • Author(s): Dave Beckett
  • Date: 2013-01-22 16:03:44 UTC
  • mfrom: (0.1.10)
  • Revision ID: package-import@ubuntu.com-20130122160344-vxrnfl0xynfzbze7
Tags: 1.0.16.1-1
* New upstream release
* Add dpkg-buildflags to configure for hardening

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
#
3
 
# autogen.sh - Generates initial makefiles from a pristine CVS tree
 
3
# autogen.sh - Generates initial makefiles from a pristine source tree
4
4
#
5
5
# USAGE:
6
6
#   autogen.sh [configure options]
12
12
#  programs that would be run.
13
13
#   e.g. DRYRUN=1 ./autogen.sh
14
14
#
 
15
# NOCONFIGURE
 
16
#  If set to any value it will generate all files but not invoke the
 
17
#  generated configure script.
 
18
#   e.g. NOCONFIGURE=1 ./autogen.sh
 
19
#
15
20
# AUTOMAKE ACLOCAL AUTOCONF AUTOHEADER LIBTOOLIZE GTKDOCIZE
16
21
#  If set (named after program) then this overrides any searching for
17
22
#  the programs on the current PATH.
40
45
# Where the GNU config.sub, config.guess might be found
41
46
CONFIG_DIR=${CONFIG_DIR-../config}
42
47
 
 
48
# GIT sub modules file
 
49
GITMODULES='.gitmodules'
 
50
 
43
51
# The programs required for configuring which will be searched for
44
52
# in the current PATH.
45
53
# Set an envariable of the same name in uppercase, to override scan
65
73
fi
66
74
 
67
75
# Some dependencies for autotools:
 
76
# automake 1.13 requires autoconf 2.65
 
77
# automake 1.12 requires autoconf 2.62
68
78
# automake 1.11 requires autoconf 2.62 (needed for AM_SILENT_RULES)
69
 
automake_min_vers=011100
 
79
automake_min_vers=011102
70
80
aclocal_min_vers=$automake_min_vers
71
81
autoconf_min_vers=026200
72
82
autoheader_min_vers=$autoconf_min_vers
76
86
 
77
87
# Default program arguments
78
88
automake_args="--gnu --add-missing --force --copy -Wall"
79
 
aclocal_args=
80
 
autoconf_args=
 
89
aclocal_args="-Wall"
 
90
autoconf_args="-Wall"
81
91
libtoolize_args="--force --copy --automake $ltdl_args"
82
92
gtkdocize_args="--copy"
83
93
# --enable-gtk-doc does no harm if it's not available
276
286
fi
277
287
 
278
288
 
 
289
# Initialise and/or update GIT submodules
 
290
if test -f $GITMODULES ; then
 
291
  echo " "
 
292
  modules=`sed -n -e 's/^.*path = \(.*\)/\1/p' $GITMODULES`
 
293
  for module in $modules; do
 
294
    if test `ls -1 $module | wc -l` -eq 0; then
 
295
       echo "$program: Initializing git submodule in $module"
 
296
       $DRYRUN git submodule init $module
 
297
    fi
 
298
  done
 
299
  echo "$program: Updating git submodules: $modules"
 
300
  $DRYRUN git submodule update
 
301
fi
 
302
 
279
303
for coin in `find $SRCDIR -name configure.ac -print | grep -v /releases/`
280
304
do 
 
305
  status=0
281
306
  dir=`dirname $coin`
282
307
  if test -f "$dir/NO-AUTO-GEN"; then
283
 
    echo $program: Skipping $dir -- flagged as no auto-gen
 
308
    echo "$program: Skipping $dir -- flagged as no auto-generation"
284
309
  else
285
310
    echo " "
286
311
    echo $program: Processing directory $dir
321
346
      echo "$program: Running $libtoolize $libtoolize_args"
322
347
      $DRYRUN rm -f ltmain.sh libtool
323
348
      eval $DRYRUN $libtoolize $libtoolize_args
 
349
      status=$?
 
350
      if test $status != 0; then
 
351
          break
 
352
      fi
324
353
 
325
354
      if grep "^GTK_DOC_CHECK" configure.ac >/dev/null; then
326
355
        # gtkdocize junk
327
356
        $DRYRUN rm -rf gtk-doc.make
328
357
        echo "$program: Running $gtkdocize $gtkdocize_args"
329
358
        $DRYRUN $gtkdocize $gtkdocize_args
 
359
        status=$?
 
360
        if test $status != 0; then
 
361
            break
 
362
        fi
 
363
      fi
 
364
 
 
365
      if test ! -f NEWS; then
 
366
        echo "$program: Creating empty NEWS file to allow configure to work"
 
367
        $DRYRUN touch -t 200001010000 NEWS
330
368
      fi
331
369
 
332
370
      echo "$program: Running $aclocal $aclocal_args"
334
372
      if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
335
373
        echo "$program: Running $autoheader"
336
374
        $DRYRUN $autoheader
 
375
        status=$?
 
376
        if test $status != 0; then
 
377
            break
 
378
        fi
337
379
      fi
338
380
      echo "$program: Running $automake $automake_args"
339
 
      $DRYRUN $automake $automake_args $automake_args
340
 
      echo "$program: Running $autoconf"
 
381
      $DRYRUN $automake $automake_args
 
382
      status=$?
 
383
      if test $status != 0; then
 
384
          break
 
385
      fi
 
386
 
 
387
      echo "$program: Running $autoconf $autoconf_args"
341
388
      $DRYRUN $autoconf $autoconf_args
 
389
      status=$?
 
390
      if test $status != 0; then
 
391
          break
 
392
      fi
342
393
    )
343
394
  fi
 
395
 
 
396
  if test $status != 0; then
 
397
    echo "$program: FAILED to configure $dir"
 
398
    exit $status
 
399
  fi
 
400
 
344
401
done
345
402
 
346
403
 
 
404
 
347
405
rm -f config.cache
348
406
 
349
407
AUTOMAKE=$automake
351
409
ACLOCAL=$aclocal
352
410
export AUTOMAKE AUTOCONF ACLOCAL
353
411
 
354
 
echo " "
355
 
if test -z "$*"; then
356
 
  echo "$program: WARNING: Running \`configure' with no arguments."
357
 
  echo "If you wish to pass any to it, please specify them on the"
358
 
  echo "\`$program' command line."
359
 
fi
360
 
 
361
 
echo "$program: Running ./configure $configure_args $@"
362
 
if test "X$DRYRUN" = X; then
363
 
  $DRYRUN ./configure $configure_args "$@" \
364
 
  && echo "$program: Now type \`make' to compile this package" || exit 1
365
 
else
366
 
  $DRYRUN ./configure $configure_args "$@"
367
 
fi
 
412
if test "X$NOCONFIGURE" = X; then
 
413
  echo " "
 
414
  if test -z "$*"; then
 
415
    echo "$program: WARNING: Running \`configure' with no arguments."
 
416
    echo "If you wish to pass any to it, please specify them on the"
 
417
    echo "\`$program' command line."
 
418
  fi
 
419
 
 
420
  echo "$program: Running ./configure $configure_args $@"
 
421
  if test "X$DRYRUN" = X; then
 
422
    $DRYRUN ./configure $configure_args "$@" \
 
423
    && echo "$program: Now type \`make' to compile this package" || exit 1
 
424
  else
 
425
    $DRYRUN ./configure $configure_args "$@"
 
426
  fi
 
427
fi
 
428
 
 
429
exit $status