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_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
21 (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
23 echo "**Error**: You must have \`xml-i18n-toolize' installed to compile Gnome."
24 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/xml-i18n-tools/xml-i18n-tools-0.6.tar.gz"
25 echo "(or a newer version if it is available)"
30 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
31 (libtool --version) < /dev/null > /dev/null 2>&1 || {
33 echo "**Error**: You must have \`libtool' installed to compile Gnome."
34 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
35 echo "(or a newer version if it is available)"
40 #grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
41 # grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
42 # (gettext --version) < /dev/null > /dev/null 2>&1 || {
44 # echo "**Error**: You must have \`gettext' installed to compile Gnome."
45 # echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
46 # echo "(or a newer version if it is available)"
51 #grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
52 # grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
53 # (gettext --version) < /dev/null > /dev/null 2>&1 || {
55 # echo "**Error**: You must have \`gettext' installed to compile Gnome."
56 # echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
57 # echo "(or a newer version if it is available)"
62 (automake --version) < /dev/null > /dev/null 2>&1 || {
64 echo "**Error**: You must have \`automake' installed to compile Gnome."
65 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
66 echo "(or a newer version if it is available)"
72 # if no automake, don't bother testing for aclocal
73 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
75 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
76 echo "installed doesn't appear recent enough."
77 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
78 echo "(or a newer version if it is available)"
82 if test "$DIE" -eq 1; then
87 echo "**Warning**: I am going to run \`configure' with no arguments."
88 echo "If you wish to pass any to it, please specify them on the"
89 echo \`$0\'" command line."
95 am_opt=--include-deps;;
98 for coin in `find $srcdir -name configure.in -print`
101 if test -f $dr/NO-AUTO-GEN; then
102 echo skipping $dr -- flagged as no auto-gen
105 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
107 macrosdir=`find . -name macros -print`
108 for i in $macrodirs; do
109 if test -f $i/gnome-gettext.m4; then
110 DELETEFILES="$DELETEFILES $i/gnome-gettext.m4"
114 echo "deletefiles is $DELETEFILES"
115 aclocalinclude="$ACLOCAL_FLAGS"
116 for k in $aclocalinclude; do
118 if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
123 for k in $macrodirs; do
125 aclocalinclude="$aclocalinclude -I $k"
126 if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
131 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
132 if grep "sed.*POTFILES" configure.in >/dev/null; then
133 : do nothing -- we still have an old unmodified configure.in
135 echo "Creating $dr/aclocal.m4 ..."
136 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
137 echo "Running gettextize... Ignore non-fatal messages."
138 echo "no" | gettextize --force --copy
139 echo "Making $dr/aclocal.m4 writable ..."
140 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
143 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
144 echo "Creating $dr/aclocal.m4 ..."
145 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
146 echo "Running gettextize... Ignore non-fatal messages."
147 echo "no" | gettextize --force --copy
148 echo "Making $dr/aclocal.m4 writable ..."
149 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
151 if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
152 echo "Running xml-i18n-toolize... Ignore non-fatal messages."
153 xml-i18n-toolize --copy --force --automake
155 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
156 if test -z "$NO_LIBTOOLIZE" ; then
157 echo "Running libtoolize..."
158 libtoolize --force --copy
161 echo "Running aclocal $aclocalinclude ..."
162 aclocal $aclocalinclude || {
164 echo "**Error**: aclocal failed. This may mean that you have not"
165 echo "installed all of the packages you need, or you may need to"
166 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
167 echo "for the prefix where you installed the packages whose"
168 echo "macros were not found"
172 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
173 echo "Running autoheader..."
174 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
176 echo "Running automake --gnu $am_opt ..."
177 automake --add-missing --gnu $am_opt ||
178 { echo "**Error**: automake failed."; exit 1; }
179 echo "Running autoconf ..."
180 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
185 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
187 if test x$NOCONFIGURE = x; then
188 echo Running $srcdir/configure $conf_flags "$@" ...
189 $srcdir/configure $conf_flags "$@" \
190 && echo Now type \`make\' to compile $PKG_NAME || exit 1
192 echo Skipping configure process.