cannam@89
|
1 #!/bin/sh
|
cannam@89
|
2 # Run this to generate all the initial makefiles, etc.
|
cannam@89
|
3
|
cannam@89
|
4 srcdir=`dirname $0`
|
cannam@89
|
5 test -z "$srcdir" && srcdir=.
|
cannam@89
|
6
|
cannam@89
|
7 DIE=0
|
cannam@89
|
8
|
cannam@89
|
9 (test -f $srcdir/configure.ac) || {
|
cannam@89
|
10 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
cannam@89
|
11 echo " top-level package directory"
|
cannam@89
|
12 exit 1
|
cannam@89
|
13 }
|
cannam@89
|
14
|
cannam@89
|
15 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
cannam@89
|
16 echo
|
cannam@89
|
17 echo "**Error**: You must have \`autoconf' installed."
|
cannam@89
|
18 echo "Download the appropriate package for your distribution,"
|
cannam@89
|
19 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
cannam@89
|
20 DIE=1
|
cannam@89
|
21 }
|
cannam@89
|
22
|
cannam@89
|
23 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
|
cannam@89
|
24 (libtoolize --version) < /dev/null > /dev/null 2>&1 \
|
cannam@89
|
25 && LIBTOOLIZE=libtoolize || {
|
cannam@89
|
26 (glibtoolize --version) < /dev/null > /dev/null 2>&1 \
|
cannam@89
|
27 && LIBTOOLIZE=glibtoolize || {
|
cannam@89
|
28 echo
|
cannam@89
|
29 echo "**Error**: You must have \`libtool' installed."
|
cannam@89
|
30 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
|
cannam@89
|
31 DIE=1
|
cannam@89
|
32 }
|
cannam@89
|
33 }
|
cannam@89
|
34 }
|
cannam@89
|
35
|
cannam@89
|
36 (automake --version) < /dev/null > /dev/null 2>&1 || {
|
cannam@89
|
37 echo
|
cannam@89
|
38 echo "**Error**: You must have \`automake' installed."
|
cannam@89
|
39 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
|
cannam@89
|
40 DIE=1
|
cannam@89
|
41 NO_AUTOMAKE=yes
|
cannam@89
|
42 }
|
cannam@89
|
43
|
cannam@89
|
44
|
cannam@89
|
45 # if no automake, don't bother testing for aclocal
|
cannam@89
|
46 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
cannam@89
|
47 echo
|
cannam@89
|
48 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
|
cannam@89
|
49 echo "installed doesn't appear recent enough."
|
cannam@89
|
50 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
|
cannam@89
|
51 DIE=1
|
cannam@89
|
52 }
|
cannam@89
|
53
|
cannam@89
|
54 if test "$DIE" -eq 1; then
|
cannam@89
|
55 exit 1
|
cannam@89
|
56 fi
|
cannam@89
|
57
|
cannam@89
|
58 if test -z "$*"; then
|
cannam@89
|
59 echo "**Warning**: I am going to run \`configure' with no arguments."
|
cannam@89
|
60 echo "If you wish to pass any to it, please specify them on the"
|
cannam@89
|
61 echo \`$0\'" command line."
|
cannam@89
|
62 echo
|
cannam@89
|
63 fi
|
cannam@89
|
64
|
cannam@89
|
65 case $CC in
|
cannam@89
|
66 xlc )
|
cannam@89
|
67 am_opt=--include-deps;;
|
cannam@89
|
68 esac
|
cannam@89
|
69
|
cannam@89
|
70 for coin in `find $srcdir -name configure.ac -print`
|
cannam@89
|
71 do
|
cannam@89
|
72 dr=`dirname $coin`
|
cannam@89
|
73 if test -f $dr/NO-AUTO-GEN; then
|
cannam@89
|
74 echo skipping $dr -- flagged as no auto-gen
|
cannam@89
|
75 else
|
cannam@89
|
76 echo processing $dr
|
cannam@89
|
77 ( cd $dr
|
cannam@89
|
78
|
cannam@89
|
79 aclocalinclude="$ACLOCAL_FLAGS"
|
cannam@89
|
80
|
cannam@89
|
81 if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
|
cannam@89
|
82 echo "Creating $dr/aclocal.m4 ..."
|
cannam@89
|
83 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
cannam@89
|
84 echo "Running glib-gettextize... Ignore non-fatal messages."
|
cannam@89
|
85 echo "no" | glib-gettextize --force --copy
|
cannam@89
|
86 echo "Making $dr/aclocal.m4 writable ..."
|
cannam@89
|
87 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
cannam@89
|
88 fi
|
cannam@89
|
89 if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
|
cannam@89
|
90 echo "Running intltoolize..."
|
cannam@89
|
91 intltoolize --copy --force --automake
|
cannam@89
|
92 fi
|
cannam@89
|
93 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
|
cannam@89
|
94 if test -z "$NO_LIBTOOLIZE" ; then
|
cannam@89
|
95 echo "Running libtoolize..."
|
cannam@89
|
96 $LIBTOOLIZE --force --copy
|
cannam@89
|
97 fi
|
cannam@89
|
98 fi
|
cannam@89
|
99 echo "Running aclocal $aclocalinclude ..."
|
cannam@89
|
100 aclocal $aclocalinclude
|
cannam@89
|
101 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
|
cannam@89
|
102 echo "Running autoheader..."
|
cannam@89
|
103 autoheader
|
cannam@89
|
104 fi
|
cannam@89
|
105 echo "Running automake --gnu $am_opt ..."
|
cannam@89
|
106 automake --add-missing --gnu $am_opt
|
cannam@89
|
107 echo "Running autoconf ..."
|
cannam@89
|
108 autoconf
|
cannam@89
|
109 )
|
cannam@89
|
110 fi
|
cannam@89
|
111 done
|
cannam@89
|
112
|
cannam@89
|
113 conf_flags="--enable-maintainer-mode"
|
cannam@89
|
114
|
cannam@89
|
115 if test x$NOCONFIGURE = x; then
|
cannam@89
|
116 echo Running $srcdir/configure $conf_flags "$@" ...
|
cannam@89
|
117 $srcdir/configure $conf_flags "$@" \
|
cannam@89
|
118 && echo Now type \`make\' to compile. || exit 1
|
cannam@89
|
119 else
|
cannam@89
|
120 echo Skipping configure process.
|
cannam@89
|
121 fi
|