AC_INIT(src)
+# we don't want VERSION in our config.h
+if test -n "`grep '^#undef VERSION' config.h.in`"; then
+ grep -v '^#undef VERSION' config.h.in > config.h.in.temp
+ mv -f config.h.in.temp config.h.in
+fi
+
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(Irssi SILC, 0.7.98.3)
+AM_INIT_AUTOMAKE(SILC-Client, 0.8.6+)
AM_MAINTAINER_MODE
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
-dnl * ahem.. :) we don't want static libraries for modules
-if test "x$lt_target" = "x"; then
- if test "$target" = "NONE"; then
- lt_target="$host"
- else
- lt_target="$target"
- fi
-fi
+AC_PATH_PROG(sedpath, sed)
+AC_PATH_PROG(perlpath, perl)
+
dnl * --disable-static isn't a good idea, complain if it's used
if test "x$enable_static" = "xno"; then
AC_ERROR([Don't give --disable-static option to configure])
fi
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --disable-static --output=libtool-shared --no-verify $ac_aux_dir/ltmain.sh $lt_target \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h sys/ioctl.h libintl.h)
+AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h sys/ioctl.h sys/resource.h)
# check posix headers..
AC_CHECK_HEADERS(sys/time.h sys/utsname.h regex.h)
-AC_ARG_WITH(big5,
-[ --with-big5 Build with tr-Chinese Big5 support],
- if test x$withval = xyes; then
- want_big5=yes
- else
- if test "x$withval" = xno; then
- want_big5=no
- else
- want_big5=yes
- fi
- fi,
- want_big5=no)
-
AC_ARG_WITH(socks,
[ --with-socks Build with socks support],
if test x$withval = xyes; then
fi,
want_irssiproxy=no)
+AC_ARG_WITH(terminfo,
+[ --with-terminfo Use terminfo directly instead of curses],
+ if test x$withval = xyes; then
+ want_terminfo=yes
+ else
+ if test "x$withval" = xno; then
+ want_terminfo=no
+ else
+ want_terminfo=yes
+ fi
+ fi,
+ want_terminfo=yes)
AC_ARG_WITH(modules,
[ --with-modules Specify what modules to build in binary],
build_modules="$withval"
fi)
-if test "x$prefix" = "xNONE"; then
- PERL_LIB_DIR=""
-else
- PERL_LIB_DIR="$prefix"
+if test "x$prefix" != "xNONE"; then
+ prefix=`eval echo $prefix`
+ PERL_MM_PARAMS="INSTALLDIRS=perl PREFIX=$prefix"
+ perl_library_dir="PERL_USE_LIB"
+ perl_set_use_lib=yes
+
+ perl_prefix_note=yes
fi
-AC_ARG_ENABLE(perl-path,
-[ --enable-perl-path=dir Specify where to install the Perl libraries for irssi],
- if test x$enableval = xyes; then
- want_perl=yes
+AC_ARG_WITH(with-glib2,
+[ --with-glib2 Use GLIB 2.0 instead of 1.2],
+ if test x$withval = xyes; then
+ want_glib2=yes
else
- if test "x$enableval" = xno; then
- want_perl=no
+ if test "x$withval" = xno; then
+ want_glib2=no
else
- want_perl=yes
- PERL_LIB_DIR="$enableval"
- perl_lib_dir_given=yes
+ want_glib2=yes
fi
fi,
- want_perl=yes)
+ want_glib2=yes)
-AC_ARG_ENABLE(perl,
-[ --enable-perl[=yes|no|static] Build with Perl support - also specifies
- if it should be built into main irssi binary
- (static) or as module (default)],
- if test x$enableval = xyes; then
- want_perl=yes
- elif test x$enableval = xstatic; then
- want_perl=static
+AC_ARG_WITH(perl-staticlib,
+[ --with-perl-staticlib Specify that we want to link perl libraries
+ statically in irssi, default is no],
+ if test x$withval = xyes; then
+ want_staticperllib=yes
else
- want_perl=no
+ if test "x$withval" = xno; then
+ want_staticperllib=no
+ else
+ want_staticperllib=yes
+ fi
fi,
- want_perl=yes)
+ want_staticperllib=no)
-AC_ARG_WITH(tests,
-[ --with-tests Run all the tests],
- if test x$withval != xno; then
- TEST_DIR=test
- fi,
- TEST_DIR=)
-AC_SUBST(TEST_DIR)
-AC_ARG_ENABLE(curses-windows,
-[ --enable-curses-windows Use curses windows],
- if test x$enableval != xno; then
- AC_DEFINE(USE_CURSES_WINDOWS)
+AC_ARG_WITH(perl-lib,
+[ --with-perl-lib=[site|vendor|DIR] Specify where to install the
+ Perl libraries for irssi, default is site],
+ if test "x$withval" = xyes; then
+ want_perl=yes
+ elif test "x$withval" = xno; then
+ want_perl=no
+ elif test "x$withval" = xsite; then
+ want_perl=yes
+ perl_prefix_note=no
+ PERL_MM_PARAMS=""
+ elif test "x$withval" = xvendor; then
+ want_perl=yes
+ perl_prefix_note=no
+ if test -z "`$perlpath -v|grep '5\.0'`"; then
+ PERL_MM_PARAMS="INSTALLDIRS=vendor"
+ else
+ PERL_MM_PARAMS="INSTALLDIRS=perl PREFIX=`perl -e 'use Config; print $Config{prefix}'`"
+ fi
+ perl_library_dir="(vendor default - `$perlpath -e 'use Config; print $Config{archlib}'`)"
+ else
+ want_perl=yes
+ perl_prefix_note=no
+ PERL_MM_PARAMS="INSTALLDIRS=perl LIB=$withval"
+ perl_library_dir="PERL_USE_LIB"
+ perl_set_use_lib=yes
fi,
- AC_DEFINE(USE_CURSES_WINDOWS))
+ want_perl=yes)
-AC_ARG_ENABLE(memdebug,
-[ --enable-memdebug Enable memory debugging],
- if test x$enableval = xyes; then
- want_memdebug=yes
+AC_ARG_WITH(perl,
+[ --with-perl[=yes|no|module] Build with Perl support - also specifies
+ if it should be built into main irssi binary
+ (static, default) or as module],
+ if test x$withval = xyes; then
+ want_perl=static
+ elif test x$withval = xstatic; then
+ want_perl=static
+ elif test x$withval = xmodule; then
+ want_perl=module
else
- if test "x$enableval" = xno; then
- want_memdebug=no
- else
- want_memdebug=yes
- fi
+ want_perl=no
fi,
- want_memdebug=no)
+ want_perl=static)
+
+AC_ARG_WITH(file-offset-size,
+[ --with-file-offset-size=BITS Set size of file offsets. Usually 32 or 64.
+ (default: 64 if available)],
+ preferred_off_t_bits=$withval,
+ preferred_off_t_bits=64)
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6 Enable IPv6 support],
dnl ** just some generic stuff...
dnl **
-AC_CHECK_FUNCS(mkfifo fcntl)
-
-AC_CHECK_LIB(socket, socket, [
- PROG_LIBS="$PROG_LIBS -lsocket"
-])
-
-AC_CHECK_LIB(nsl, inet_addr, [
- PROG_LIBS="$PROG_LIBS -lnsl"
-], -lsocket)
-
-dnl * gcc specific options
-if test "x$ac_cv_prog_gcc" = "xyes"; then
- CFLAGS="$CFLAGS -Wall"
-fi
-
dnl * OS specific options
case "$host_os" in
hpux*)
;;
esac
+
+AC_CHECK_FUNCS(mkfifo fcntl nl_langinfo)
+
+AC_CHECK_FUNC(socket, [], [
+ AC_CHECK_LIB(socket, socket, [
+ LIBS="$LIBS -lsocket"
+ ])
+])
+
+AC_CHECK_FUNC(inet_addr, [], [
+ AC_CHECK_LIB(nsl, inet_addr, [
+ LIBS="$LIBS -lnsl"
+ ])
+])
+
+dnl * gcc specific options
+if test "x$ac_cv_prog_gcc" = "xyes"; then
+ CFLAGS="$CFLAGS -Wall"
+fi
+
dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would
dnl * accept header files where to find the typedef..
AC_MSG_CHECKING([for socklen_t])
if test "x$want_socks" = "xyes"; then
AC_CHECK_LIB(socks, connect, [
- PROG_LIBS="$PROG_LIBS -lsocks"
+ LIBS="$LIBS -lsocks"
AC_CHECK_HEADER(socks.h, [
AC_DEFINE(HAVE_SOCKS_H)
CFLAGS="$CFLAGS -DSOCKS"
dnl ** fe-text checks
dnl **
-AC_PATH_PROG(sedpath, sed)
-
AC_DEFUN(AC_CHECK_GLIBDIR,[
AC_MSG_CHECKING([whether GLib is unpacked to irssi dir])
GLIB_DIR=`for d in *; do test -f $d/glib.h && echo $d; done`
- if test "x$GLIB_DIR" != "x"; then
+ if test -n "$GLIB_DIR"; then
dnl * glib in irssi directory, use it
AC_MSG_RESULT([yes, using it])
if test -f $full_glib_dir/gmodule/.libs/libgmodule.a; then
GLIB_LIBS="$GLIB_LIBS $full_glib_dir/gmodule/.libs/libgmodule.a"
AC_DEFINE(HAVE_GMODULE)
+ have_gmodule=yes
fi
else
GLIB_LIBS="$full_glib_dir/libglib.a $GLIB_LDEXTRA"
if test -f $full_glib_dir/gmodule/libgmodule.a; then
GLIB_LIBS="$GLIB_LIBS $full_glib_dir/gmodule/libgmodule.a"
AC_DEFINE(HAVE_GMODULE)
+ have_gmodule=yes
fi
fi
AC_SUBST(GLIB_CFLAGS)
AC_CHECK_GLIBDIR
-if test "x$GLIB_DIR" = "x"; then
- AM_PATH_GLIB(1.2.0,,, gmodule)
- if test "x$GLIB_LIBS" = "x"; then
- echo "*** trying without -lgmodule"
- glib_config_args=
- AM_PATH_GLIB(1.2.0)
+if test -z "$GLIB_DIR"; then
+ if test "x$with_glib2" = "xyes"; then
+ dnl * check only for glib2
+ checks="3 4"
else
- AC_DEFINE(HAVE_GMODULE)
+ dnl * check glib1 then glib2
+ checks="1 2 3 4"
fi
- if test "x$GLIB_LIBS" = "x"; then
+ for try in $checks; do
+ glib_config_args=
+ if test $try = 1 -o $try = 3; then
+ glib_modules=gmodule
+ else
+ echo "*** trying without -lgmodule"
+ glib_modules=
+ fi
+ if test $try = 1 -o $try = 2; then
+ glib_version=1.2.0
+ else
+ glib_version=2.0.0
+ fi
+ AM_PATH_GLIB($glib_version,[],[], [$glib_modules])
+ if test "$GLIB_LIBS"; then
+ if test $glib_modules = gmodule; then
+ AC_DEFINE(HAVE_GMODULE)
+ have_gmodule=yes
+ fi
+ break
+ fi
+ done
+
+ if test -z "$GLIB_LIBS"; 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,"
glib_file=glib-1.2.10.tar.gz
dlcmd=
- if test "x`ncftpget 2>/dev/null|grep -i ncftp`" != "x"; then
+ if test -n "`ncftpget 2>/dev/null|grep -i ncftp`"; then
dlcmd="ncftpget ftp://ftp.gtk.org/pub/gtk/v1.2/$glib_file"
fi
- if test "x`wget 2>/dev/null|grep -i wget`" != "x"; then
+ if test -n "`wget 2>/dev/null|grep -i wget`"; then
dlcmd="wget http://irssi.org/files/$glib_file"
fi
- if test "x$dlcmd" != "x"; then
+ if test -n "$dlcmd"; then
echo "*** I can download GLib for you now. If you don't want to, press CTRL-C now."
+ echo
+ echo "*** Press ENTER to continue"
read answer
eval $dlcmd
if `gunzip $glib_file`; then
fi
fi
- if test "x$GLIB_LIBS" = "x"; then
+ if test -z "$GLIB_LIBS"; then
AC_ERROR([GLIB is required to build irssi.])
fi
fi
fi
-PROG_LIBS="$PROG_LIBS $GLIB_LIBS"
+LIBS="$LIBS $GLIB_LIBS"
dnl **
dnl ** check if we can link dynamic libraries to modules
dnl ** compile object file
cat > conftest.c <<EOF
#include <math.h>
-int modfunc(void){return (int)floor(1.2);}
+int modfunc(){return (int)floor(1.2);}
EOF
./libtool --mode=compile $CC $CFLAGS -c conftest.c 2> /dev/null > /dev/null
else if (modfunc() == 1) g_print("ok"); else g_print("wrong result?! 1 vs %d", modfunc());
return 0; }
EOF
- $CC $CFLAGS conftest.c -o conftest $GLIB_CFLAGS $GLIB_LIBS 2> /dev/null > /dev/null
+ $CC $CFLAGS $LDFLAGS conftest.c -o conftest $GLIB_CFLAGS $GLIB_LIBS 2> /dev/null > /dev/null
if test ! -s conftest; then
AC_MSG_RESULT([no, error compiling test program])
else
if test "x$want_textui" = "xyes"; then
AC_CHECK_CURSES
- if test "x$has_ncurses" != "x"; then
- AC_CHECK_LIB(ncurses, use_default_colors, [
- AC_DEFINE(HAVE_NCURSES_USE_DEFAULT_COLORS)
- ],, $CURSES_LIBS)
- AC_CHECK_LIB(ncurses, idcok, [
- AC_DEFINE(HAVE_CURSES_IDCOK)
- ],, $CURSES_LIBS)
- AC_CHECK_LIB(ncurses, resizeterm, [
- AC_DEFINE(HAVE_CURSES_RESIZETERM)
- ],, $CURSES_LIBS)
- AC_CHECK_LIB(ncurses, wresize, [
- AC_DEFINE(HAVE_CURSES_WRESIZE)
- ],, $CURSES_LIBS)
- elif test "x$has_curses" = "xtrue"; then
- AC_CHECK_LIB(curses, idcok, [
- AC_DEFINE(HAVE_CURSES_IDCOK)
- ],, $CURSES_LIBS)
- AC_CHECK_LIB(curses, resizeterm, [
- AC_DEFINE(HAVE_CURSES_RESIZETERM)
- ],, $CURSES_LIBS)
- AC_CHECK_LIB(curses, wresize, [
- AC_DEFINE(HAVE_CURSES_WRESIZE)
- ],, $CURSES_LIBS)
+ TEXTUI_LIBS="$LIBS $CURSES_LIBS"
+ if test "x$has_curses" = "xtrue"; then
+ AC_CHECK_FUNC(use_default_colors, AC_DEFINE(HAVE_NCURSES_USE_DEFAULT_COLORS))
+ AC_CHECK_FUNC(idcok, AC_DEFINE(HAVE_CURSES_IDCOK))
+ AC_CHECK_FUNC(resizeterm, AC_DEFINE(HAVE_CURSES_RESIZETERM))
+ AC_CHECK_FUNC(wresize, AC_DEFINE(HAVE_CURSES_WRESIZE))
+ AC_CHECK_FUNC(setupterm,, [
+ want_termcap=yes
+ ])
else
- want_textui=no
- curses_error=yes
+ AC_CHECK_LIB(tinfo, setupterm, [
+ TEXTUI_LIBS="$LIBS -ltinfo"
+ want_terminfo=yes
+ ], AC_CHECK_LIB(termlib, tgetent, [
+ TEXTUI_LIBS="$LIBS -ltermlib"
+ want_termcap=yes
+ ], AC_CHECK_LIB(termcap, tgetent, [
+ TEXTUI_LIBS="$LIBS -ltermcap"
+ want_termcap=yes
+ ], [
+ AC_ERROR(Terminfo/termcap not found - install ncurses-devel package)
+ want_textui=no
+ ])))
fi
-else
- has_curses=false
+ AC_SUBST(TEXTUI_LIBS)
+ if test "x$want_termcap" = "xyes"; then
+ AC_CHECK_FUNC(tparm,, need_tparm=yes)
+ else
+ AC_DEFINE(HAVE_TERMINFO)
+ fi
fi
dnl **
dnl **
if test "$want_perl" != "no"; then
- AC_PATH_PROG(perlpath, perl)
AC_MSG_CHECKING(for working Perl support)
- if test "x$perlpath" = "x"; then
+ if test -z "$perlpath"; then
perl_check_error="perl binary not found"
else
PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
fi
- if test "x$PERL_CFLAGS" = "x"; then
- perl_check_error="Error getting perl CFLAGS"
+ if test -z "$PERL_CFLAGS"; then
+ if test -n "$perl_check_error"; then
+ perl_check_error="Error getting perl CFLAGS"
+ fi
AC_MSG_RESULT([not found, building without Perl])
want_perl=no
else
fi
dnl * don't check libperl.a if dynaloader.a wasn't found..
- if test "x$DYNALOADER_A" != "x"; then
+ if test -n "$DYNALOADER_A"; then
dnl * find either libperl.a or libperl.so
LIBPERL_A=`echo "$PERL_LDFLAGS -L/usr/lib"|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/) { my $dir=$1; if (\`ls $dir/libperl.so* 2>/dev/null\`) { print "-lperl"; last; }; if (-e "$dir/libperl.a") { print "$dir/libperl.a"; last } } };'`
- if test "x$LIBPERL_A" = "x"; then
+ if test -z "$LIBPERL_A"; then
perl_mod_error="Didn't find location of -lperl"
DYNALOADER_A=
elif test "$LIBPERL_A" = "-lperl"; then
esac
dnl * check that perl's ldflags actually work
- AC_CACHE_VAL(irssi_cv_lib_perl_works, [
- echo "main(){perl_alloc(); return 0;}" > conftest.c
- $CC $CFLAGS conftest.c -o conftest $LDFLAGS $PERL_LDFLAGS 2> /dev/null > /dev/null
- if test -s conftest; then
- irssi_cv_lib_perl_works=yes
- else
- irssi_cv_lib_perl_works=no
- fi
- ])
-
- if test "x$irssi_cv_lib_perl_works" = "xno"; then
- perl_check_error="Error linking with perl libraries: $PERL_LDFLAGS"
+ echo "main(){perl_alloc(); return 0;}" > conftest.c
+ $CC $CFLAGS conftest.c -o conftest $LDFLAGS $PERL_LDFLAGS 2> perl.error.tmp > /dev/null
+ if test ! -s conftest; then
+ perl_check_error="Error linking with perl libraries: $PERL_LDFLAGS: `cat perl.error.tmp`"
AC_MSG_RESULT([error linking with perl libraries, building without Perl])
want_perl=no
fi
+
+ rm -f perl.error.tmp
fi
if test "x$want_perl" != "xno"; then
if test "x$want_perl" = "xstatic"; then
AC_MSG_RESULT(ok)
- elif test "x$DYNALOADER_A" = "x"; then
+ elif test -z "$DYNALOADER_A"; then
AC_MSG_RESULT([error parsing ldopts, building Perl into irssi binary instead of as module])
want_perl=static
else
AC_MSG_RESULT(ok)
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
- if test "x$LIBPERL_A" != "x"; then
+ if test -n "$LIBPERL_A"; then
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
fi
AC_SUBST(LIBPERL_A)
if test "x$want_perl" = "xstatic"; then
dnl * building with static perl support
dnl * all PERL_LDFLAGS linking is done in fe-text
- PERL_LDFLAGS="../perl/libperl_static.la $PERL_LDFLAGS"
- PERL_LINK_LIBS="$PERL_LDFLAGS"
+ PERL_LINK_FLAGS="$PERL_LDFLAGS"
+ PERL_LINK_LIBS="../perl/libperl_core_static.la"
PERL_FE_LINK_LIBS="../perl/libfe_perl_static.la"
PERL_LDFLAGS=
AC_DEFINE(HAVE_STATIC_PERL)
dnl * build only static library of perl module
perl_module_lib=
perl_module_fe_lib=
- perl_static_lib=libperl_static.la
+ perl_static_lib=libperl_core_static.la
perl_static_fe_lib=libfe_perl_static.la
PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool'
else
- dnl * build dynamic library of perl module,
- dnl * use libtool-shared to prevent creating of
- dnl * libperl.a
+ dnl * build dynamic library of perl module
perl_module_lib=libperl_core.la
perl_module_fe_lib=libfe_perl.la
perl_static_lib=
perl_static_fe_lib=
- PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool-shared'
+ PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool'
fi
+
+ if test "x$want_staticperllib" = "xyes"; then
+ PERL_MM_PARAMS="$PERL_MM_PARAMS LINKTYPE=static"
+ PERL_LINK_LIBS="$PERL_LINK_LIBS ../perl/common/blib/arch/auto/Irssi/Irssi.a ../perl/irc/blib/arch/auto/Irssi/Irc/Irc.a ../perl/ui/blib/arch/auto/Irssi/UI/UI.a ../perl/textui/blib/arch/auto/Irssi/TextUI/TextUI.a"
+ PERL_STATIC_LIBS=1
+ else
+ PERL_STATIC_LIBS=0
+ fi
+
+ # figure out the correct @INC path - we'll need to do this
+ # through MakeMaker since it's difficult to get it right
+ # otherwise.
+ if test "x$perl_set_use_lib" = "xyes"; then
+ perl -e 'use ExtUtils::MakeMaker; WriteMakefile("NAME" => "test", "MAKEFILE" => "Makefile.test");' $PERL_MM_PARAMS >/dev/null
+ PERL_USE_LIB=`perl -e 'open(F, "Makefile.test"); while (<F>) { chomp; if (/^(\w+) = (.*$)/) { $keys{$1} = $2; } }; $key = $keys{INSTALLARCHLIB}; while ($key =~ /\\$\((\w+)\)/) { $value = $keys{$1}; $key =~ s/\\$\($1\)/$value/; }; print $key;'`
+ rm -f Makefile.test
+ fi
+
AC_SUBST(perl_module_lib)
AC_SUBST(perl_static_lib)
AC_SUBST(perl_module_fe_lib)
AC_SUBST(perl_static_fe_lib)
AC_SUBST(PERL_LIBTOOL)
+ AC_SUBST(PERL_LINK_FLAGS)
AC_SUBST(PERL_LINK_LIBS)
- AC_SUBST(PERL_FE_LINK_LIBS)
+ AC_SUBST(PERL_FE_LINK_LIBS)
AC_SUBST(PERL_LDFLAGS)
AC_SUBST(PERL_CFLAGS)
- AC_SUBST(PERL_LIB_DIR)
+
+ AC_SUBST(PERL_USE_LIB)
+ AC_SUBST(PERL_MM_PARAMS)
+ AC_SUBST(PERL_STATIC_LIBS)
fi
fi
AM_CONDITIONAL(BUILD_IRSSIBOT, test "$want_irssibot" = "yes")
AM_CONDITIONAL(BUILD_IRSSIPROXY, test "$want_irssiproxy" = "yes")
AM_CONDITIONAL(BUILD_PLUGINS, test "$want_plugins" = "yes")
-AM_CONDITIONAL(BUILD_SERVERTEST, test "x$TEST_DIR" != "x")
AM_CONDITIONAL(HAVE_PERL, test "$want_perl" != "no")
AM_CONDITIONAL(HAVE_STATIC_PERL, test "$want_perl" = "static")
+AM_CONDITIONAL(NEED_TPARM, test "$need_tparm" = "yes")
+AM_CONDITIONAL(USE_CURSES, test "$want_terminfo" != "yes" -a "$want_termcap" != "yes")
+AM_CONDITIONAL(BUILD_SERVERTEST, false)
+# move LIBS to PROG_LIBS so they're not tried to be used when linking eg. perl libraries
+PROG_LIBS=$LIBS
+LIBS=
AC_SUBST(PROG_LIBS)
dnl **
CHAT_MODULES="silc"
silc_MODULES=""
-if test "x$build_modules" != "x"; then
+if test -n "$build_modules"; then
silc_MODULES="$silc_MODULES $build_modules"
fi
-#PROG_LIBS="$PROG_LIBS -lsilc"
dnl ****************************************
FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/$c/libfe_common_$c.a "
fi
for s in `eval echo \\$${c}_MODULES`; do
- CHAT_LIBS="$CHAT_LIBS ../$c/$s/.libs/lib${c}_$s.a"
+ CHAT_LIBS="$CHAT_LIBS ../$c/$s/lib${c}_$s.a"
module_inits="$module_inits ${c}_${s}_init();"
module_deinits="${c}_${s}_deinit(); $module_deinits"
if test -f $srcdir/src/fe-common/$c/$s/module.h; then
- FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/$c/$s/.libs/libfe_${c}_$s.a "
+ FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/$c/$s/libfe_${c}_$s.a "
fe_module_inits="$fe_module_inits fe_${c}_${s}_init();"
fe_module_deinits="fe_${c}_${s}_deinit(); $fe_module_deinits"
fi
file="$srcdir/src/$c/$c.c"
echo "/* this file is automatically generated by configure - don't change */" > $file
echo "void ${c}_core_init(void); void ${c}_core_deinit(void);" >> $file
- if test "x$module_inits" != "x"; then
+ if test -n "$module_inits"; then
echo "$module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
echo "$module_deinits" | $sedpath -e 's/ *$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
fi
if test -f $srcdir/src/fe-common/$c/module.h; then
file="$srcdir/src/fe-common/$c/${c}-modules.c"
echo "/* this file is automatically generated by configure - don't change */" > $file
- if test "x$fe_module_inits" != "x"; then
+ if test -n "$fe_module_inits"; then
echo "$fe_module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
echo "$fe_module_deinits" | $sedpath -e 's/ *$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
fi
FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/core/libfe_common_core.a"
dnl ** common libraries needed by frontends
-COMMON_NOUI_LIBS="$CHAT_LIBS $CORE_LIBS $INTLLIBS"
+COMMON_NOUI_LIBS="$CHAT_LIBS $CORE_LIBS"
COMMON_LIBS="$FE_COMMON_LIBS $COMMON_NOUI_LIBS"
AC_SUBST(COMMON_NOUI_LIBS)
AC_SUBST(COMMON_LIBS)
dnl **
-dnl ** memory debugging
-dnl **
-
-if test "x$want_memdebug" = "xyes"; then
- AC_DEFINE(MEM_DEBUG)
-fi
-AM_CONDITIONAL(BUILD_MEMDEBUG, test "x$want_memdebug" = "xyes")
-
-dnl **
-dnl ** tr-Chinese Big5 support
+dnl ** IPv6 support
dnl **
-if test "x$want_big5" = "xyes"; then
- AC_DEFINE(WANT_BIG5)
+if test "x$want_ipv6" = "xyes"; then
+ AC_MSG_CHECKING([for IPv6])
+ AC_CACHE_VAL(irssi_cv_type_in6_addr,
+ [AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <arpa/inet.h>],
+ [struct in6_addr i;],
+ irssi_cv_type_in6_addr=yes,
+ irssi_cv_type_in6_addr=no,
+ )])
+ if test $irssi_cv_type_in6_addr = yes; then
+ AC_DEFINE(HAVE_IPV6)
+ fi
+ AC_MSG_RESULT($irssi_cv_type_in6_addr)
fi
dnl **
-dnl ** IPv6 support
+dnl ** IRSSI_VERSION_DATE and IRSSI_VERSION_TIME
dnl **
+#VERSION_DATE=`head -1 $srcdir/ChangeLog|sed 's/^\(....\)-\(..\)-\(..\).*/\1\2\3/'`
+#VERSION_TIME=`head -1 $srcdir/ChangeLog|sed -e 's/^[[^ ]]* \(..\):\(..\).*/\1\2/' -e 's/^0*//'`
+#AC_SUBST(VERSION_DATE)
+#AC_SUBST(VERSION_TIME)
-if test "x$want_ipv6" = "xyes"; then
- AC_DEFINE(HAVE_IPV6)
-fi
+#
+# Glue into SILC build system
+#
+INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
+AC_SUBST(INCLUDE_DEFINES_INT)
AC_OUTPUT(
Makefile
src/lib-popt/Makefile
src/silc/Makefile
src/silc/core/Makefile
+src/perl/Makefile
+src/perl/common/Makefile.PL
+src/perl/ui/Makefile.PL
+src/perl/textui/Makefile.PL
+src/perl/silc/Makefile.PL
+scripts/Makefile
docs/Makefile
docs/help/Makefile
docs/help/in/Makefile
+irssi-version.h
stamp.h
irssi.spec
-irssi-version.h
irssi-config)
dnl ** for building from objdir
-if test "x$want_perl" != "xno"; then
- old_dir=`pwd` && cd $srcdir && whole_dir=`pwd` && cd $old_dir
+old_dir=`pwd` && cd $srcdir && whole_dir=`pwd` && cd $old_dir
+if test "x$old_dir" != "x$whole_dir"; then
+ $LN_S $srcdir/irssi-version.h irssi-version.h
- if test "x$old_dir" != "x$whole_dir"; then
- for file in $whole_dir/src/perl/*.[[ch]] $whole_dir/src/perl/libperl_orig.la $whole_dir/src/perl/libperl_dynaloader.la $whole_dir/src/perl/common/typemap $whole_dir/src/perl/common/module.h $whole_dir/src/perl/common/*.xs $whole_dir/src/perl/irc/typemap $whole_dir/src/perl/irc/module.h $whole_dir/src/perl/irc/*.xs; do
+ if test "x$want_perl" != "xno"; then
+ subdirfiles=""
+ for i in $whole_dir/src/perl/common $whole_dir/src/perl/irc $whole_dir/src/perl/ui $whole_dir/src/perl/textui; do
+ subdirfiles=`echo $subdirfiles $i/typemap $i/module.h $i/*.pm $i/*.xs`
+ done
+ for file in $whole_dir/src/perl/*.[[ch]] $whole_dir/src/perl/libperl_orig.la $whole_dir/src/perl/libperl_dynaloader.la $subdirfiles; do
link=`echo $file|$sedpath "s?$whole_dir/??"`
rm -f $link
$LN_S $file $link
echo
-if test "x$curses_error" != "xyes"; then
- echo "Building text frontend ..... : $want_textui"
+if test "x$want_textui" = "xno"; then
+ text=no
+elif test "x$want_termcap" = "xyes"; then
+ text="yes, using termcap"
+elif test "x$want_terminfo" = "xyes"; then
+ text="yes, using terminfo"
else
- echo "Building text frontend ..... : NO!!"
- echo " - Because curses was not found, specify the path to it with"
- echo " --with-curses=/dir and make sure you have the curses headers"
- echo " installed (usually in ncurses-devel package)"
+ text="yes, using curses"
fi
+echo "Building text frontend ..... : $text"
echo "Building irssi bot ......... : $want_irssibot"
echo "Building irssi proxy ....... : $want_irssiproxy"
echo "Building with IPv6 support . : $want_ipv6"
+if test "x$have_gmodule" = "xyes"; then
+ echo "Building with module support : yes"
+else
+ echo "Building with module support : NO!! /LOAD will not work!"
+ echo " - You're missing gmodule (comes with glib) for some reason,"
+ echo " or it doesn't work in your system."
+fi
if test "x$want_perl" = "xstatic"; then
echo "Building with Perl support . : static (in irssi binary)"
-elif test "x$want_perl" = "xyes"; then
+elif test "x$want_perl" = "xmodule"; then
echo "Building with Perl support . : module"
else
- if test "x$perl_check_error" = "x"; then
+ if test -z "$perl_check_error"; then
echo "Building with Perl support . : no"
else
echo "Building with Perl support . : NO!"
echo " - NOTE: Perl support will be compiled statically to irssi, not as"
echo " a module as requested. Reason:"
echo " $perl_mod_error"
+
+ if test -f /etc/debian_version; then
+ echo " - Try: apt-get install libperl-dev"
+ fi
fi
-if test "x$want_perl" = "xyes"; then
- if test "x$PERL_LIB_DIR" = "x"; then
- echo "Perl library directory ..... : (default - usually /usr/local/lib/perl_site)"
- else
- echo "Perl library directory ..... : $PERL_LIB_DIR"
- if test "x$perl_lib_dir_given" != "xyes"; then
- echo " - NOTE: This was automatically set to the same directory you gave with"
- echo " --prefix. If you want the perl libraries to install to their 'correct'"
- echo " path, you'll need to give --enable-perl-path= (nothing after '=') option"
- echo " to configure. Anyway, installing perl to this directory should work"
- echo " just as well.."
- fi
+if test "x$want_perl" != "xno"; then
+ if test "$perl_library_dir" = "PERL_USE_LIB"; then
+ perl_library_dir=$PERL_USE_LIB
+ fi
+ if test -z "$perl_library_dir"; then
+ perl_library_dir="(site default - `$perlpath -e 'use Config; print $Config{sitearch}'`)"
+ fi
+ echo "Perl library directory ..... : $perl_library_dir"
+ if test "x$perl_prefix_note" = "xyes"; then
+ echo " - NOTE: This was automatically set to the same directory you gave with"
+ echo " --prefix. If you want the perl libraries to install to their 'correct'"
+ echo " path, you'll need to give --with-perl-lib=site option to configure."
+ echo " Anyway, installing perl to this directory should work just as well."
fi
fi
+
echo "Install prefix ............. : $prefix"
+echo
+echo "If there was any problems, read the INSTALL file."