diff options
author | Timo Sirainen <cras@irssi.org> | 2000-11-23 22:42:37 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-11-23 22:42:37 +0000 |
commit | 972c06ba17399eaeb1866d6f95c117b9f83e07bd (patch) | |
tree | d3bfa68639cfe62245c7181e19bcbf87cca38e2a /configure.in | |
parent | 8ce36c05eab6c1787c4e62052fb8d2ba6369cbe8 (diff) | |
download | irssi-972c06ba17399eaeb1866d6f95c117b9f83e07bd.zip |
If glib sources are found from some subdirectory, always compile it and
use it even if glib is already installed somewhere else.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@860 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 19b5776a..d5044a51 100644 --- a/configure.in +++ b/configure.in @@ -226,9 +226,31 @@ dnl ** dnl ** fe-text checks dnl ** -AM_PATH_GLIB(1.2.0,,, gmodule) -if test "x$GLIB_LIBS" = "x"; then - AC_ERROR([GLib is required to build irssi]) +AC_PATH_PROG(sedpath, sed) +AC_MSG_CHECKING([whether GLib is unpacked to irssi dir]) + +GLIB_DIR=`for d in *; do test -e $d/glib.h && echo $d; done` +if test "x$GLIB_DIR" != "x"; then + dnl glib in irssi directory, use it + AC_MSG_RESULT([yes, using it]) + + full_glib_dir="`pwd`/$GLIB_DIR" + GLIB_CFLAGS="-I$full_glib_dir" + GLIB_LIBS="$full_glib_dir/.libs/libglib.a $full_glib_dir/gmodule/.libs/libgmodule.a" + AC_SUBST(GLIB_DIR) + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) +else + AC_MSG_RESULT([no]) + AM_PATH_GLIB(1.2.0,,, gmodule) + if test "x$GLIB_LIBS" = "x"; then + echo + echo "*** If you don't have GLIB, you can get it from ftp://ftp.gtk.org" + echo "*** If you can't install GLIB anywhere or if you don't want to," + echo "*** you can just unpack it to Irssi's source directory and" + echo "*** Irssi will automatically compile and use it." + AC_ERROR([GLIB is required to build irssi.]) + fi fi PROG_LIBS="$PROG_LIBS $GLIB_LIBS" @@ -271,7 +293,6 @@ else has_curses=false fi -AC_PATH_PROG(sedpath, sed) if test "$want_perl" != "no"; then AC_PATH_PROG(perlpath, perl) AC_MSG_CHECKING(for Perl compile flags) @@ -521,6 +542,15 @@ if test "x$want_perl" != "xno"; then fi fi +if test "x$GLIB_DIR" != "x"; then + echo + echo "configuring GLib ..." + echo + cd $GLIB_DIR + ./configure + cd .. +fi + echo if test "x$curses_error" != "xyes"; then |