2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
17 AUTOHEADER=autoheader2.50
19 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
25 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
27 echo "You must have autoconf installed to compile $PROJECT."
28 echo "Download the appropriate package for your distribution,"
29 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
36 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
41 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
43 echo "You must have automake installed to compile $PROJECT."
44 echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
45 echo "(or a newer version if it is available)"
49 if test "$DIE" -eq 1; then
53 test $TEST_TYPE $FILE || {
54 echo "You must run this script in the top-level $PROJECT directory"
59 gunzip --stdout glib-1.2.10.tar.gz | tar xf - || {
60 echo "glib tarball not unpacked"
64 chmod +w `find glib-1.2.10 -name Makefile.am`
65 perl -p -i.bak -e "s/lib_LTLIBRARIES/noinst_LTLIBRARIES/g" `find glib-1.2.10 -name Makefile.am`
66 perl -p -i.bak -e "s/bin_SCRIPTS/noinst_SCRIPTS/g" `find glib-1.2.10 -name Makefile.am`
67 perl -p -i.bak -e "s/include_HEADERS/noinst_HEADERS/g" `find glib-1.2.10 -name Makefile.am`
68 perl -p -i.bak -e "s/glibnoinst_HEADERS/noinst_HEADERS/g" `find glib-1.2.10 -name Makefile.am`
69 perl -p -i.bak -e 's/([a-zA-Z0-9]+)_DATA/noinst_DATA/g' `find glib-1.2.10 -name Makefile.am`
70 perl -p -i.bak -e "s/info_TEXINFOS/noinst_TEXINFOS/g" `find glib-1.2.10 -name Makefile.am`
71 perl -p -i.bak -e "s/man_MANS/noinst_MANS/g" `find glib-1.2.10 -name Makefile.am`
73 ## patch gslist.c to have stable sort
74 perl -p -w -i.bak -e 's/if \(compare_func\(l1->data,l2->data\) < 0\)/if \(compare_func\(l1->data,l2->data\) <= 0\)/g' glib-1.2.10/gslist.c
76 # Update random auto* files to actually have something which have a snowball's
77 # chance in a hot place of working with modern auto* tools.
79 (cd glib-1.2.10 && for p in ../glib-patches/*.diff; do echo $p; patch -p1 < $p || exit 1; done ) || exit 1
81 (cd glib-1.2.10 && libtoolize --copy --force && $ACLOCAL $ACLOCAL_FLAGS && $AUTOMAKE && $AUTOCONF) || exit 1
85 echo "I am going to run ./configure with no arguments - if you wish "
86 echo "to pass any to it, please specify them on the $0 command line."
88 case "--no-configure" in
89 "*$") run_configure=no
93 libtoolize --copy --force
95 echo $ACLOCAL $ACLOCAL_FLAGS
96 $ACLOCAL $ACLOCAL_FLAGS
98 # optionally feature autoheader
99 ($AUTOHEADER --version) < /dev/null > /dev/null 2>&1 && $AUTOHEADER
106 if [ "$run_configure" = "yes" ]; then
109 $srcdir/configure --enable-maintainer-mode --disable-shared --disable-threads "$@"
111 echo "Now type 'make' to compile $PROJECT."
113 echo "Now type './configure && make' to compile $PROJECT."