3 # Download and build glib 1.2.x statically and then compile GNU Midnight
4 # Commander against it.
5 # Copyright (C) 2003 Pavel Roskin
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc.,
19 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 : ${GLIB_VERSION=1.2.10}
24 GLIB_DIR
="glib-$GLIB_VERSION"
25 GLIB_TARBALL
="glib-$GLIB_VERSION.tar.gz"
26 GLIB_URL
="ftp://ftp.gtk.org/pub/gtk/v1.2/$GLIB_TARBALL"
27 GLIB_INSTDIR
="$MC_TOPDIR/glib-inst"
30 curl
--remote-name "$1" || \
31 wget
--passive-ftp "$1" || \
33 ftp "$1" </dev
/null || \
37 if test -f src
/dir.c
; then : ; else
38 echo "Not in the top-level directory of GNU Midnight Commander." 2>&1
42 if test -f configure
; then : ; else
43 .
/autogen.sh
--help >/dev
/null ||
exit 1
46 if gzip -vt "$GLIB_TARBALL"; then : ; else
51 gzip -cd "$GLIB_TARBALL" |
tar xf
-
53 if test -f glist.c
; then : ; else
54 echo "glib source is incomplete" 2>&1
58 rm -rf "$GLIB_INSTDIR"
59 .
/configure
--disable-shared --with-glib12 --prefix="$GLIB_INSTDIR" ||
exit 1
61 make install ||
exit 1
64 .
/configure GLIB_CONFIG
="$GLIB_INSTDIR/bin/glib-config" \
65 PKG_CONFIG
=/bin
/false
"$@" ||
exit 1
69 echo "GNU Midnight Commander has been successfully compiled"