~gnome3-team/mutter/trunk

« back to all changes in this revision

Viewing changes to autogen.sh

  • Committer: rhp
  • Date: 2001-06-02 04:14:18 UTC
  • Revision ID: git-v1:e47c4d16a27aae7c3b8831b9855f25a9dfb8473f
...

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
srcdir=`dirname $0`
 
5
test -z "$srcdir" && srcdir=.
 
6
 
 
7
ORIGDIR=`pwd`
 
8
cd $srcdir
 
9
PROJECT=metacity
 
10
TEST_TYPE=-f
 
11
FILE=src/display.c
 
12
 
 
13
DIE=0
 
14
 
 
15
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
 
16
        echo
 
17
        echo "You must have autoconf installed to compile $PROJECT."
 
18
        echo "Download the appropriate package for your distribution,"
 
19
        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
 
20
        DIE=1
 
21
}
 
22
 
 
23
(automake --version) < /dev/null > /dev/null 2>&1 || {
 
24
        echo
 
25
        echo "You must have automake installed to compile $PROJECT."
 
26
        echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
 
27
        echo "(or a newer version if it is available)"
 
28
        DIE=1
 
29
}
 
30
 
 
31
(grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && {
 
32
  (libtool --version) < /dev/null > /dev/null 2>&1 || {
 
33
    echo
 
34
    echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
 
35
    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
 
36
    echo "(or a newer version if it is available)"
 
37
    DIE=1
 
38
  }
 
39
}
 
40
 
 
41
grep "^AM_GNU_GETTEXT" 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 $PROJECT."
 
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
if test "$DIE" -eq 1; then
 
53
        exit 1
 
54
fi
 
55
 
 
56
test $TEST_TYPE $FILE || {
 
57
        echo "You must run this script in the top-level $PROJECT directory"
 
58
        exit 1
 
59
}
 
60
 
 
61
if test -z "$*"; then
 
62
        echo "I am going to run ./configure with no arguments - if you wish "
 
63
        echo "to pass any to it, please specify them on the $0 command line."
 
64
fi
 
65
 
 
66
case $CC in
 
67
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
 
68
esac
 
69
 
 
70
for coin in `find . -name configure.in -print`
 
71
do 
 
72
  dr=`dirname $coin`
 
73
  if test -f $dr/NO-AUTO-GEN; then
 
74
    echo skipping $dr -- flagged as no auto-gen
 
75
  else
 
76
    echo processing $dr
 
77
    macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
 
78
    ( cd $dr
 
79
      aclocalinclude="$ACLOCAL_FLAGS"
 
80
      for k in $macrodirs; do
 
81
        if test -d $k; then
 
82
          aclocalinclude="$aclocalinclude -I $k"
 
83
        ##else 
 
84
        ##  echo "**Warning**: No such directory \`$k'.  Ignored."
 
85
        fi
 
86
      done
 
87
      if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
 
88
        if grep "sed.*POTFILES" configure.in >/dev/null; then
 
89
          : do nothing -- we still have an old unmodified configure.in
 
90
        else
 
91
          echo "Creating $dr/aclocal.m4 ..."
 
92
          test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
 
93
          echo "Running gettextize...  Ignore non-fatal messages."
 
94
          echo "no" | gettextize --force --copy
 
95
          echo "Making $dr/aclocal.m4 writable ..."
 
96
          test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
 
97
        fi
 
98
      fi
 
99
      if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
 
100
        echo "Creating $dr/aclocal.m4 ..."
 
101
        test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
 
102
        echo "Running gettextize...  Ignore non-fatal messages."
 
103
        echo "no" | gettextize --force --copy
 
104
        echo "Making $dr/aclocal.m4 writable ..."
 
105
        test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
 
106
      fi
 
107
      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
 
108
        echo "Running libtoolize..."
 
109
        libtoolize --force --copy
 
110
      fi
 
111
      echo "Running aclocal $aclocalinclude ..."
 
112
      aclocal $aclocalinclude
 
113
      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
 
114
        echo "Running autoheader..."
 
115
        autoheader
 
116
      fi
 
117
      echo "Running automake --gnu $am_opt ..."
 
118
      automake --add-missing --gnu $am_opt
 
119
      echo "Running autoconf ..."
 
120
      autoconf
 
121
    )
 
122
  fi
 
123
done
 
124
 
 
125
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
 
126
 
 
127
cd "$ORIGDIR"
 
128
 
 
129
if test x$NOCONFIGURE = x; then
 
130
  echo Running $srcdir/configure $conf_flags "$@" ...
 
131
  $srcdir/configure $conf_flags "$@" \
 
132
  && echo Now type \`make\' to compile $PROJECT  || exit 1
 
133
else
 
134
  echo Skipping configure process.
 
135
fi