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 $PKG_NAME."
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 "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
21 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
23 echo "**Error**: You must have \`intltoolize' installed to compile $PKG_NAME."
24 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.10.tar.gz"
25 echo "(or a newer version if it is available)"
30 (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
31 (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
33 echo "**Error**: You must have \`xml-i18n-toolize' installed to compile $PKG_NAME."
34 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/xml-i18n-tools/xml-i18n-tools-0.9.tar.gz"
35 echo "(or a newer version of xml-i18n-tools or intltool if it is available)"
40 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
41 (libtool --version) < /dev/null > /dev/null 2>&1 || {
43 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
44 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
45 echo "(or a newer version if it is available)"
50 #grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
51 # grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
52 # (gettext --version) < /dev/null > /dev/null 2>&1 || {
54 # echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
55 # echo "Get ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.10.39.tar.gz"
56 # echo "(or a newer version if it is available)"
61 #grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
62 # grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
63 # (gettext --version) < /dev/null > /dev/null 2>&1 || {
65 # echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
66 # echo "Get ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.10.39.tar.gz"
67 # echo "(or a newer version if it is available)"
72 (automake --version) < /dev/null > /dev/null 2>&1 || {
74 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
75 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
76 echo "(or a newer version if it is available)"
82 # if no automake, don't bother testing for aclocal
83 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
85 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
86 echo "installed doesn't appear recent enough."
87 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
88 echo "(or a newer version if it is available)"
92 if test "$DIE" -eq 1; then
97 echo "**Warning**: I am going to run \`configure' with no arguments."
98 echo "If you wish to pass any to it, please specify them on the"
99 echo \`$0\'" command line."
105 am_opt=--include-deps;;
108 for coin in `find $srcdir -name configure.in -print`
111 if test -f $dr/NO-AUTO-GEN; then
112 echo skipping $dr -- flagged as no auto-gen
115 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
117 macrosdir=`find . -name macros -print`
118 for i in $macrodirs; do
119 if test -f $i/gnome-gettext.m4; then
120 DELETEFILES="$DELETEFILES $i/gnome-gettext.m4"
124 echo "deletefiles is $DELETEFILES"
125 aclocalinclude="$ACLOCAL_FLAGS"
126 for k in $aclocalinclude; do
128 if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
133 for k in $macrodirs; do
135 aclocalinclude="$aclocalinclude -I $k"
136 if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
141 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
142 if grep "sed.*POTFILES" configure.in >/dev/null; then
143 : do nothing -- we still have an old unmodified configure.in
145 echo "Creating $dr/aclocal.m4 ..."
146 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
147 echo "Running gettextize... Ignore non-fatal messages."
148 echo "no" | gettextize --force --copy
149 echo "Making $dr/aclocal.m4 writable ..."
150 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
153 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
154 echo "Creating $dr/aclocal.m4 ..."
155 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
156 echo "Running gettextize... Ignore non-fatal messages."
157 echo "no" | gettextize --force --copy
158 echo "Making $dr/aclocal.m4 writable ..."
159 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
161 if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
162 echo "Running intltoolize..."
163 intltoolize --copy --force --automake
165 if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
166 echo "Running xml-i18n-toolize..."
167 xml-i18n-toolize --copy --force --automake
169 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
170 if test -z "$NO_LIBTOOLIZE" ; then
171 echo "Running libtoolize..."
172 libtoolize --force --copy
175 echo "Running aclocal $aclocalinclude ..."
176 aclocal $aclocalinclude || {
178 echo "**Error**: aclocal failed. This may mean that you have not"
179 echo "installed all of the packages you need, or you may need to"
180 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
181 echo "for the prefix where you installed the packages whose"
182 echo "macros were not found"
186 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
187 echo "Running autoheader..."
188 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
190 echo "Running automake --gnu $am_opt ..."
191 automake --add-missing --gnu $am_opt ||
192 { echo "**Error**: automake failed."; exit 1; }
193 echo "Running autoconf ..."
194 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
199 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
201 if test x$NOCONFIGURE = x; then
202 echo Running $srcdir/configure $conf_flags "$@" ...
203 $srcdir/configure $conf_flags "$@" \
204 && echo Now type \`make\' to compile $PKG_NAME || exit 1
206 echo Skipping configure process.