2 # Run this to generate all the initial makefiles, etc.
5 : ${AUTOHEADER=autoheader}
8 : ${LIBTOOLIZE=libtoolize}
9 : ${INTLTOOLIZE=intltoolize}
13 test -z "$srcdir" && srcdir
=.
20 CONFIGURE
=configure.ac
26 ($AUTOCONF --version) < /dev
/null
> /dev
/null
2>&1 ||
{
28 echo "You must have autoconf installed to compile $PROJECT."
29 echo "Download the appropriate package for your distribution,"
30 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
34 (grep "^IT_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev
/null
) && {
35 ($INTLTOOLIZE --version) < /dev
/null
> /dev
/null
2>&1 ||
{
37 echo "You must have \`intltoolize' installed to compile $PROJECT."
38 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.22.tar.gz"
39 echo "(or a newer version if it is available)"
44 ($AUTOMAKE --version) < /dev
/null
> /dev
/null
2>&1 ||
{
46 echo "You must have automake installed to compile $PROJECT."
47 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.7.tar.gz"
48 echo "(or a newer version if it is available)"
52 (grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev
/null
) && {
53 ($LIBTOOL --version) < /dev
/null
> /dev
/null
2>&1 ||
{
55 echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
56 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz"
57 echo "(or a newer version if it is available)"
62 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev
/null
; then
63 if grep "sed.*POTFILES" "$CONFIGURE" >/dev
/null
; then
66 if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev
/null
; then
67 GETTEXTIZE
="glib-gettextize"
68 GETTEXTIZE_URL
="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
70 GETTEXTIZE
="gettextize"
71 GETTEXTIZE_URL
="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
74 $GETTEXTIZE --version < /dev
/null
> /dev
/null
2>&1
75 if test $?
-ne 0; then
77 echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
78 echo "Get $GETTEXTIZE_URL"
79 echo "(or a newer version if it is available)"
85 if test "$DIE" -eq 1; then
89 test $TEST_TYPE $FILE ||
{
90 echo "You must run this script in the top-level $PROJECT directory"
94 #if test -z "$*"; then
95 # echo "I am going to run ./configure with no arguments - if you wish "
96 # echo "to pass any to it, please specify them on the $0 command line."
100 *xlc |
*xlc\
* |
*lcc |
*lcc\
*) am_opt
=--include-deps;;
106 if test -f $dr/NO-AUTO-GEN
; then
107 echo skipping
$dr -- flagged as no auto-gen
110 macrodirs
= #`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
112 aclocalinclude
="$ACLOCAL_FLAGS"
113 for k
in $macrodirs; do
115 aclocalinclude
="$aclocalinclude -I $k"
117 ## echo "**Warning**: No such directory \`$k'. Ignored."
120 if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE >/dev
/null
; then
121 if grep "sed.*POTFILES" $CONFIGURE >/dev
/null
; then
122 : do nothing
-- we still have an old unmodified configure.
in
124 echo "Creating $dr/aclocal.m4 ..."
125 test -r $dr/aclocal.
m4 ||
touch $dr/aclocal.
m4
126 echo "Running glib-gettextize... Ignore non-fatal messages."
127 echo "no" | glib-gettextize
--force --copy
128 echo "Making $dr/aclocal.m4 writable ..."
129 test -r $dr/aclocal.
m4 && chmod u
+w
$dr/aclocal.
m4
132 if grep "^AC_PROG_INTLTOOL" $CONFIGURE >/dev
/null ||
133 grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev
/null
; then
134 echo "Running $INTLTOOLIZE..."
135 $INTLTOOLIZE --copy --force --automake
137 if grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev
/null
; then
138 echo "Running $LIBTOOLIZE..."
139 $LIBTOOLIZE --force --copy
141 echo "Running $ACLOCAL $aclocalinclude ..."
142 $ACLOCAL $aclocalinclude
143 if grep "^A[CM]_CONFIG_HEADER" $CONFIGURE >/dev
/null
; then
144 echo "Running $AUTOHEADER..."
147 echo "Running $AUTOMAKE --gnu $am_opt ..."
148 $AUTOMAKE --add-missing --gnu $am_opt
149 echo "Running $AUTOCONF ..."
155 conf_flags
="--enable-maintainer-mode"
159 if test x
$NOCONFIGURE = x
; then
160 echo Running
$srcdir/configure
$conf_flags "$@" ...
161 $srcdir/configure
$conf_flags "$@" \
162 && echo Now
type \
`make\' to compile $PROJECT || exit 1
164 echo Skipping configure process.