~ubuntu-branches/ubuntu/dapper/cappuccino/dapper

« back to all changes in this revision

Viewing changes to macros/autogen.sh

  • Committer: Bazaar Package Importer
  • Author(s): Lars Wirzenius
  • Date: 2005-04-28 16:32:00 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050428163200-6ktj118672tak662
Tags: 0.4-2.1
* Non-maintainer upload.
* Rebuilt since linc no longer in archive. Closes: #306151
  (the bug is release critical, hence the urgency).
* debian/menu: Quoted values that weren't quoted, since that's what the
  menu file syntax requires.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 Gnome."
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 "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
21
 
  (libtool --version) < /dev/null > /dev/null 2>&1 || {
22
 
    echo
23
 
    echo "**Error**: You must have \`libtool' installed to compile Gnome."
24
 
    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
25
 
    echo "(or a newer version if it is available)"
26
 
    DIE=1
27
 
  }
28
 
}
29
 
 
30
 
#grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
31
 
#  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
32
 
#  (gettext --version) < /dev/null > /dev/null 2>&1 || {
33
 
#    echo
34
 
#    echo "**Error**: You must have \`gettext' installed to compile Gnome."
35
 
#    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
36
 
#    echo "(or a newer version if it is available)"
37
 
#    DIE=1
38
 
#  }
39
 
#}
40
 
 
41
 
grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
42
 
  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
43
 
  (gettext --version) < /dev/null > /dev/null 2>&1 || {
44
 
    echo
45
 
    echo "**Error**: You must have \`gettext' installed to compile Gnome."
46
 
    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
47
 
    echo "(or a newer version if it is available)"
48
 
    DIE=1
49
 
  }
50
 
}
51
 
 
52
 
(automake --version) < /dev/null > /dev/null 2>&1 || {
53
 
  echo
54
 
  echo "**Error**: You must have \`automake' installed to compile Gnome."
55
 
  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
56
 
  echo "(or a newer version if it is available)"
57
 
  DIE=1
58
 
  NO_AUTOMAKE=yes
59
 
}
60
 
 
61
 
 
62
 
# if no automake, don't bother testing for aclocal
63
 
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
64
 
  echo
65
 
  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
66
 
  echo "installed doesn't appear recent enough."
67
 
  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
68
 
  echo "(or a newer version if it is available)"
69
 
  DIE=1
70
 
}
71
 
 
72
 
if test "$DIE" -eq 1; then
73
 
  exit 1
74
 
fi
75
 
 
76
 
if test -z "$*"; then
77
 
  echo "**Warning**: I am going to run \`configure' with no arguments."
78
 
  echo "If you wish to pass any to it, please specify them on the"
79
 
  echo \`$0\'" command line."
80
 
  echo
81
 
fi
82
 
 
83
 
case $CC in
84
 
xlc )
85
 
  am_opt=--include-deps;;
86
 
esac
87
 
 
88
 
for coin in `find $srcdir -name configure.in -print`
89
 
do 
90
 
  dr=`dirname $coin`
91
 
  if test -f $dr/NO-AUTO-GEN; then
92
 
    echo skipping $dr -- flagged as no auto-gen
93
 
  else
94
 
    echo processing $dr
95
 
    macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
96
 
    ( cd $dr
97
 
      macrosdir=`find . -name macros -print`
98
 
      for i in $macrodirs; do
99
 
        if test -f $i/gnome-gettext.m4; then
100
 
          DELETEFILES="$DELETEFILES $i/gnome-gettext.m4"
101
 
        fi
102
 
      done
103
 
 
104
 
      echo "deletefiles is $DELETEFILES"
105
 
      aclocalinclude="$ACLOCAL_FLAGS"
106
 
      for k in $aclocalinclude; do
107
 
        if test -d $k; then
108
 
          if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
109
 
            rm -f $DELETEFILES
110
 
          fi
111
 
        fi
112
 
      done
113
 
      for k in $macrodirs; do
114
 
        if test -d $k; then
115
 
          aclocalinclude="$aclocalinclude -I $k"
116
 
          if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
117
 
            rm -f $DELETEFILES
118
 
          fi
119
 
        fi
120
 
      done
121
 
      if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
122
 
        if grep "sed.*POTFILES" configure.in >/dev/null; then
123
 
          : do nothing -- we still have an old unmodified configure.in
124
 
        else
125
 
          echo "Creating $dr/aclocal.m4 ..."
126
 
          test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
127
 
          echo "Running gettextize...  Ignore non-fatal messages."
128
 
          echo "no" | gettextize --force --copy
129
 
          echo "Making $dr/aclocal.m4 writable ..."
130
 
          test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
131
 
        fi
132
 
      fi
133
 
      if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
134
 
        echo "Creating $dr/aclocal.m4 ..."
135
 
        test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
136
 
        echo "Running gettextize...  Ignore non-fatal messages."
137
 
        echo "no" | gettextize --force --copy
138
 
        echo "Making $dr/aclocal.m4 writable ..."
139
 
        test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
140
 
      fi
141
 
      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
142
 
        if test -z "$NO_LIBTOOLIZE" ; then 
143
 
          echo "Running libtoolize..."
144
 
          libtoolize --force --copy
145
 
        fi
146
 
      fi
147
 
      echo "Running aclocal $aclocalinclude ..."
148
 
      aclocal $aclocalinclude || {
149
 
        echo
150
 
        echo "**Error**: aclocal failed. This may mean that you have not"
151
 
        echo "installed all of the packages you need, or you may need to"
152
 
        echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
153
 
        echo "for the prefix where you installed the packages whose"
154
 
        echo "macros were not found"
155
 
        exit 1
156
 
      }
157
 
 
158
 
      echo "Running automake --gnu $am_opt ..."
159
 
      automake --add-missing --gnu $am_opt ||
160
 
        { echo "**Error**: automake failed."; exit 1; }
161
 
      echo "Running autoconf ..."
162
 
      autoconf || { echo "**Error**: autoconf failed."; exit 1; }
163
 
    ) || exit 1
164
 
  fi
165
 
done
166
 
 
167
 
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
168
 
 
169
 
if test x$NOCONFIGURE = x; then
170
 
  echo Running $srcdir/configure $conf_flags "$@" ...
171
 
  $srcdir/configure $conf_flags "$@" \
172
 
  && echo Now type \`make\' to compile $PKG_NAME || exit 1
173
 
else
174
 
  echo Skipping configure process.
175
 
fi