2 # Run this to generate all the initial makefiles, etc.
6 if [ -n "$GNOME2_PATH" ]; then
7 ACLOCAL_FLAGS="-I $GNOME2_PATH/share/aclocal $ACLOCAL_FLAGS"
8 PATH="$GNOME2_PATH/bin:$PATH"
12 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
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/"
20 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
21 (libtool --version) < /dev/null > /dev/null 2>&1 || {
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)"
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 || {
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)"
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 || {
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)"
52 (automake --version) < /dev/null > /dev/null 2>&1 || {
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)"
62 # if no automake, don't bother testing for aclocal
63 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
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)"
72 if test "$DIE" -eq 1; 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."
85 am_opt=--include-deps;;
88 for coin in `find $srcdir -name configure.in -print`
91 if test -f $dr/NO-AUTO-GEN; then
92 echo skipping $dr -- flagged as no auto-gen
95 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
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"
104 echo "deletefiles is $DELETEFILES"
105 aclocalinclude="$ACLOCAL_FLAGS"
106 for k in $aclocalinclude; do
108 if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
113 for k in $macrodirs; do
115 aclocalinclude="$aclocalinclude -I $k"
116 if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
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
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
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
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
147 echo "Running aclocal $aclocalinclude ..."
148 aclocal $aclocalinclude || {
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"
158 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
159 echo "Running autoheader..."
160 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
162 echo "Running automake --gnu $am_opt ..."
163 automake --add-missing --gnu $am_opt ||
164 { echo "**Error**: automake failed."; exit 1; }
165 echo "Running autoconf ..."
166 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
171 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
173 if test x$NOCONFIGURE = x; then
174 echo Running $srcdir/configure $conf_flags "$@" ...
175 $srcdir/configure $conf_flags "$@" \
176 && echo Now type \`make\' to compile $PKG_NAME || exit 1
178 echo Skipping configure process.