3 # we don't want VERSION in our config.h
4 if test -n "`grep '^#undef VERSION' config.h.in`"; then
5 grep -v '^#undef VERSION' config.h.in > config.h.in.temp
6 mv -f config.h.in.temp config.h.in
9 AM_CONFIG_HEADER(config.h)
10 AM_INIT_AUTOMAKE(Irssi-SILC, 0.8.5+)
20 AC_PATH_PROG(sedpath, sed)
21 AC_PATH_PROG(perlpath, perl)
23 dnl * --disable-static isn't a good idea, complain if it's used
24 if test "x$enable_static" = "xno"; then
25 AC_ERROR([Don't give --disable-static option to configure])
28 AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h sys/ioctl.h sys/resource.h)
30 # check posix headers..
31 AC_CHECK_HEADERS(sys/time.h sys/utsname.h regex.h)
34 [ --with-socks Build with socks support],
35 if test x$withval = xyes; then
38 if test "x$withval" = xno; then
47 [ --with-textui Build text frontend],
48 if test x$withval = xyes; then
51 if test "x$withval" = xno; then
60 [ --with-bot Build irssi-bot],
61 if test x$withval = xyes; then
64 if test "x$withval" = xno; then
73 [ --with-proxy Build irssi-proxy],
74 if test x$withval = xyes; then
77 if test "x$withval" = xno; then
86 [ --with-terminfo Use terminfo directly instead of curses],
87 if test x$withval = xyes; then
90 if test "x$withval" = xno; then
99 [ --with-modules Specify what modules to build in binary],
100 if test x$withval != xyes -a x$withval != xno; then
101 build_modules="$withval"
104 if test "x$prefix" != "xNONE"; then
105 prefix=`eval echo $prefix`
106 PERL_MM_PARAMS="INSTALLDIRS=perl PREFIX=$prefix"
107 perl_library_dir="PERL_USE_LIB"
114 [ --with-glib2 Use GLIB 2.0 instead of 1.2],
115 if test x$withval = xyes; then
118 if test "x$withval" = xno; then
126 AC_ARG_WITH(perl-staticlib,
127 [ --with-perl-staticlib Specify that we want to link perl libraries
128 statically in irssi, default is no],
129 if test x$withval = xyes; then
130 want_staticperllib=yes
132 if test "x$withval" = xno; then
133 want_staticperllib=no
135 want_staticperllib=yes
138 want_staticperllib=no)
141 AC_ARG_WITH(perl-lib,
142 [ --with-perl-lib=[site|vendor|DIR] Specify where to install the
143 Perl libraries for irssi, default is site],
144 if test "x$withval" = xyes; then
146 elif test "x$withval" = xno; then
148 elif test "x$withval" = xsite; then
152 elif test "x$withval" = xvendor; then
155 if test -z "`$perlpath -v|grep '5\.0'`"; then
156 PERL_MM_PARAMS="INSTALLDIRS=vendor"
158 PERL_MM_PARAMS="INSTALLDIRS=perl PREFIX=`perl -e 'use Config; print $Config{prefix}'`"
160 perl_library_dir="(vendor default - `$perlpath -e 'use Config; print $Config{archlib}'`)"
164 PERL_MM_PARAMS="INSTALLDIRS=perl LIB=$withval"
165 perl_library_dir="PERL_USE_LIB"
171 [ --with-perl[=yes|no|module] Build with Perl support - also specifies
172 if it should be built into main irssi binary
173 (static, default) or as module],
174 if test x$withval = xyes; then
176 elif test x$withval = xstatic; then
178 elif test x$withval = xmodule; then
186 [ --with-tests Run all the tests],
187 if test x$withval != xno; then
194 [ --enable-ipv6 Enable IPv6 support],
195 if test x$enableval = xyes; then
198 if test "x$enableval" = xno; then
207 dnl ** just some generic stuff...
210 dnl * OS specific options
213 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
220 AC_CHECK_FUNCS(mkfifo fcntl nl_langinfo)
222 AC_CHECK_FUNC(socket, [], [
223 AC_CHECK_LIB(socket, socket, [
224 LIBS="$LIBS -lsocket"
228 AC_CHECK_FUNC(inet_addr, [], [
229 AC_CHECK_LIB(nsl, inet_addr, [
234 dnl * gcc specific options
235 if test "x$ac_cv_prog_gcc" = "xyes"; then
236 CFLAGS="$CFLAGS -Wall"
239 dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would
240 dnl * accept header files where to find the typedef..
241 AC_MSG_CHECKING([for socklen_t])
242 AC_CACHE_VAL(irssi_cv_type_socklen_t,
244 #include <sys/types.h>
245 #include <sys/socket.h>],
247 irssi_cv_type_socklen_t=yes,
248 irssi_cv_type_socklen_t=no,
250 if test $irssi_cv_type_socklen_t = no; then
251 AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
253 AC_MSG_RESULT($irssi_cv_type_socklen_t)
256 dnl ** check for socks
259 if test "x$want_socks" = "xyes"; then
260 AC_CHECK_LIB(socks, connect, [
262 AC_CHECK_HEADER(socks.h, [
263 AC_DEFINE(HAVE_SOCKS_H)
264 CFLAGS="$CFLAGS -DSOCKS"
265 AC_MSG_RESULT(["socks5 library found, building with it"])
267 AC_MSG_RESULT(["socks4 library found, building with it"])
268 CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dgetpeername=Rgetpeername -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
274 dnl ** fe-text checks
277 AC_DEFUN(AC_CHECK_GLIBDIR,[
278 AC_MSG_CHECKING([whether GLib is unpacked to irssi dir])
280 GLIB_DIR=`for d in *; do test -f $d/glib.h && echo $d; done`
281 if test -n "$GLIB_DIR"; then
282 dnl * glib in irssi directory, use it
283 AC_MSG_RESULT([yes, using it])
285 dnl * we have to do this at this point so we know what libs gmodule needs
286 if test ! -f $GLIB_DIR/.libs/libglib.a; then
288 echo "configuring GLib ..."
291 if test ! -f glib-config; then
299 GLIB_LDEXTRA=`$GLIB_DIR/glib-config --libs gmodule|$sedpath -e 's/-lglib//' -e 's/-lgmodule//' -e 's,-L/usr/local/lib ,,'|$sedpath 's/ \+/ /g'`
300 full_glib_dir="`pwd`/$GLIB_DIR"
301 GLIB_CFLAGS="-I$full_glib_dir -I$full_glib_dir/gmodule"
302 if test -f $full_glib_dir/.libs/libglib.a; then
303 GLIB_LIBS="$full_glib_dir/.libs/libglib.a $GLIB_LDEXTRA"
304 if test -f $full_glib_dir/gmodule/.libs/libgmodule.a; then
305 GLIB_LIBS="$GLIB_LIBS $full_glib_dir/gmodule/.libs/libgmodule.a"
306 AC_DEFINE(HAVE_GMODULE)
310 GLIB_LIBS="$full_glib_dir/libglib.a $GLIB_LDEXTRA"
311 if test -f $full_glib_dir/gmodule/libgmodule.a; then
312 GLIB_LIBS="$GLIB_LIBS $full_glib_dir/gmodule/libgmodule.a"
313 AC_DEFINE(HAVE_GMODULE)
317 AC_SUBST(GLIB_CFLAGS)
326 if test -z "$GLIB_DIR"; then
327 if test "x$with_glib2" = "xyes"; then
328 dnl * check only for glib2
331 dnl * check glib1 then glib2
335 for try in $checks; do
337 if test $try = 1 -o $try = 3; then
340 echo "*** trying without -lgmodule"
343 if test $try = 1 -o $try = 2; then
348 AM_PATH_GLIB($glib_version,[],[], [$glib_modules])
349 if test "$GLIB_LIBS"; then
350 if test $glib_modules = gmodule; then
351 AC_DEFINE(HAVE_GMODULE)
358 if test -z "$GLIB_LIBS"; then
360 echo "*** If you don't have GLIB, you can get it from ftp://ftp.gtk.org"
361 echo "*** If you can't install GLIB anywhere or if you don't want to,"
362 echo "*** you can just unpack it to Irssi's source directory and"
363 echo "*** Irssi will automatically compile and use it."
366 dnl * I think it's pretty safe to assume GLib 1.2.9 since the next
367 dnl * will be 2.0 (or 1.4?) and it's not sure if irssi compiles
368 dnl * with it (yea, just a few weeks after I put this text for 1.2.8
369 dnl * the 1.2.9 came :) .. and then .10
370 glib_file=glib-1.2.10.tar.gz
373 if test -n "`ncftpget 2>/dev/null|grep -i ncftp`"; then
374 dlcmd="ncftpget ftp://ftp.gtk.org/pub/gtk/v1.2/$glib_file"
376 if test -n "`wget 2>/dev/null|grep -i wget`"; then
377 dlcmd="wget http://irssi.org/files/$glib_file"
379 if test -n "$dlcmd"; then
380 echo "*** I can download GLib for you now. If you don't want to, press CTRL-C now."
382 echo "*** Press ENTER to continue"
385 if `gunzip $glib_file`; then
386 glib_file=`echo $glib_file|$sedpath s/\.gz$//`
387 if `tar xf $glib_file`; then
394 if test -z "$GLIB_LIBS"; then
395 AC_ERROR([GLIB is required to build irssi.])
400 LIBS="$LIBS $GLIB_LIBS"
403 dnl ** check if we can link dynamic libraries to modules
404 dnl ** also checks if libraries are built to .libs dir
407 AC_MSG_CHECKING([if we can link dynamic libraries with modules])
410 dnl ** compile object file
411 cat > conftest.c <<EOF
413 int modfunc(){return (int)floor(1.2);}
416 ./libtool --mode=compile $CC $CFLAGS -c conftest.c 2> /dev/null > /dev/null
417 if test ! -s conftest.lo; then
418 AC_ERROR([error compiling test module])
421 dnl ** link to library
422 ./libtool --mode=link $CC $CFLAGS $LDFLAGS -rpath /usr/lib conftest.lo -lm -o libconftest.la > /dev/null
423 if test ! -s .libs/libconftest.a; then
424 AC_ERROR([error, can't even find .a library])
427 dnl ** check if dynamic linking worked
428 libfile=`grep '^library_names' libconftest.la|$sedpath "s/library_names='\(.*\)'.*/\1/"|$sedpath 's/.* \([[^ ]]*\)$/\1/'`
429 if test ! -s .libs/$libfile; then
430 AC_MSG_RESULT([no, error linking test module])
432 cat > conftest.c <<EOF
435 GModule *m; int (*modfunc)(void);
436 m = g_module_open(".libs/$libfile", 0);
437 if (!m) g_print("error loading: %s", g_module_error());
438 else if (!g_module_symbol(m, "modfunc", (gpointer *) &modfunc))
439 g_print("modfunc() symbol not found from module");
440 else if (modfunc() == 1) g_print("ok"); else g_print("wrong result?! 1 vs %d", modfunc());
443 $CC $CFLAGS $LDFLAGS conftest.c -o conftest $GLIB_CFLAGS $GLIB_LIBS 2> /dev/null > /dev/null
444 if test ! -s conftest; then
445 AC_MSG_RESULT([no, error compiling test program])
447 status="`./conftest`"
448 if test "x$status" = "xok"; then
452 AC_MSG_RESULT([no, error running: $status])
456 rm -rf conftest conftest.* libconftest.* .libs
462 if test "x$want_textui" = "xyes"; then
465 LIBS="$LIBS $CURSES_LIBS"
466 if test "x$has_curses" = "xtrue"; then
467 AC_CHECK_FUNC(use_default_colors, AC_DEFINE(HAVE_NCURSES_USE_DEFAULT_COLORS))
468 AC_CHECK_FUNC(idcok, AC_DEFINE(HAVE_CURSES_IDCOK))
469 AC_CHECK_FUNC(resizeterm, AC_DEFINE(HAVE_CURSES_RESIZETERM))
470 AC_CHECK_FUNC(wresize, AC_DEFINE(HAVE_CURSES_WRESIZE))
471 AC_CHECK_FUNC(setupterm,, [
475 AC_CHECK_LIB(tinfo, setupterm, [
478 ], AC_CHECK_LIB(termlib, tgetent, [
479 LIBS="$LIBS -ltermlib"
481 ], AC_CHECK_LIB(termcap, tgetent, [
482 LIBS="$LIBS -ltermcap"
485 AC_ERROR(Terminfo/termcap not found - install ncurses-devel package)
489 if test "x$want_termcap" = "xyes"; then
490 AC_CHECK_FUNC(tparm,, need_tparm=yes)
492 AC_DEFINE(HAVE_TERMINFO)
500 if test "$want_perl" != "no"; then
501 AC_MSG_CHECKING(for working Perl support)
503 if test -z "$perlpath"; then
504 perl_check_error="perl binary not found"
506 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
509 if test -z "$PERL_CFLAGS"; then
510 if test -n "$perl_check_error"; then
511 perl_check_error="Error getting perl CFLAGS"
513 AC_MSG_RESULT([not found, building without Perl])
516 PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null`
518 dnl * Perl 5.004 and older use perl_xxx variables while
519 dnl * later use PL_perl_xxx variables ..
520 have_pl_perl=`$perlpath -e 'print $] < 5.005 ? "no" : "yes";'`
521 if test "x$have_pl_perl" = "xyes"; then
522 AC_DEFINE(HAVE_PL_PERL)
525 if test "x$DYNLIB_MODULES" = "xno" -a "$want_perl" != "static"; then
526 dnl * wanted perl as module, won't get it.
528 perl_mod_error="Dynamic library dependencies don't work with modules"
531 if test "$want_perl" != "static"; then
532 dnl * dynaloader.a -> libperl_dynaloader.la
533 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
536 dnl * don't check libperl.a if dynaloader.a wasn't found..
537 if test -n "$DYNALOADER_A"; then
538 dnl * find either libperl.a or libperl.so
539 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 } } };'`
540 if test -z "$LIBPERL_A"; then
541 perl_mod_error="Didn't find location of -lperl"
543 elif test "$LIBPERL_A" = "-lperl"; then
548 dnl * remove all database stuffs
549 dnl * nsl is already in ldflags
550 dnl * libc is of course linked without needing -lc
551 dnl * -rdynamic must not be in LIBADD line
552 for word in -ldb -ldbm -lndbm -lgdbm -lc -rdynamic; do
553 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e "s/$word //" -e "s/$word$//"`
558 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lposix //' -e 's/-lposix$//'`
561 if test "x$ac_cv_prog_gcc" = "xyes"; then
562 PERL_CFLAGS=`echo $PERL_CFLAGS | $sedpath -e 's/-Ae //' -e 's/-Ae$//'`
563 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-Ae //' -e 's/-Ae$//'`
570 dnl * check that perl's ldflags actually work
571 echo "main(){perl_alloc(); return 0;}" > conftest.c
572 $CC $CFLAGS conftest.c -o conftest $LDFLAGS $PERL_LDFLAGS 2> perl.error.tmp > /dev/null
573 if test ! -s conftest; then
574 perl_check_error="Error linking with perl libraries: $PERL_LDFLAGS: `cat perl.error.tmp`"
575 AC_MSG_RESULT([error linking with perl libraries, building without Perl])
582 if test "x$want_perl" != "xno"; then
583 if test "x$want_perl" = "xstatic"; then
585 elif test -z "$DYNALOADER_A"; then
586 AC_MSG_RESULT([error parsing ldopts, building Perl into irssi binary instead of as module])
590 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
591 if test -n "$LIBPERL_A"; then
592 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
595 AC_SUBST(DYNALOADER_A)
598 if test "x$want_perl" = "xstatic"; then
599 dnl * building with static perl support
600 dnl * all PERL_LDFLAGS linking is done in fe-text
601 PERL_LINK_FLAGS="$PERL_LDFLAGS"
602 PERL_LINK_LIBS="../perl/libperl_core_static.la"
603 PERL_FE_LINK_LIBS="../perl/libfe_perl_static.la"
605 AC_DEFINE(HAVE_STATIC_PERL)
607 dnl * build only static library of perl module
610 perl_static_lib=libperl_core_static.la
611 perl_static_fe_lib=libfe_perl_static.la
612 PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool'
614 dnl * build dynamic library of perl module
615 perl_module_lib=libperl_core.la
616 perl_module_fe_lib=libfe_perl.la
619 PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool'
622 if test "x$want_staticperllib" = "xyes"; then
623 PERL_MM_PARAMS="$PERL_MM_PARAMS LINKTYPE=static"
624 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"
630 # figure out the correct @INC path - we'll need to do this
631 # through MakeMaker since it's difficult to get it right
633 if test "x$perl_set_use_lib" = "xyes"; then
634 perl -e 'use ExtUtils::MakeMaker; WriteMakefile("NAME" => "test", "MAKEFILE" => "Makefile.test");' $PERL_MM_PARAMS >/dev/null
635 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;'`
639 AC_SUBST(perl_module_lib)
640 AC_SUBST(perl_static_lib)
641 AC_SUBST(perl_module_fe_lib)
642 AC_SUBST(perl_static_fe_lib)
643 AC_SUBST(PERL_LIBTOOL)
645 AC_SUBST(PERL_LINK_FLAGS)
646 AC_SUBST(PERL_LINK_LIBS)
647 AC_SUBST(PERL_FE_LINK_LIBS)
649 AC_SUBST(PERL_LDFLAGS)
650 AC_SUBST(PERL_CFLAGS)
652 AC_SUBST(PERL_USE_LIB)
653 AC_SUBST(PERL_MM_PARAMS)
654 AC_SUBST(PERL_STATIC_LIBS)
658 dnl ** check what we want to build
659 AM_CONDITIONAL(BUILD_TEXTUI, test "$want_textui" = "yes")
660 AM_CONDITIONAL(BUILD_IRSSIBOT, test "$want_irssibot" = "yes")
661 AM_CONDITIONAL(BUILD_IRSSIPROXY, test "$want_irssiproxy" = "yes")
662 AM_CONDITIONAL(BUILD_PLUGINS, test "$want_plugins" = "yes")
663 AM_CONDITIONAL(BUILD_SERVERTEST, test -n "$TEST_DIR")
664 AM_CONDITIONAL(HAVE_PERL, test "$want_perl" != "no")
665 AM_CONDITIONAL(HAVE_STATIC_PERL, test "$want_perl" = "static")
666 AM_CONDITIONAL(NEED_TPARM, test "$need_tparm" = "yes")
667 AM_CONDITIONAL(USE_CURSES, test "$want_terminfo" != "yes" -a "$want_termcap" != "yes")
669 # move LIBS to PROG_LIBS so they're not tried to be used when linking eg. perl libraries
675 dnl ** Keep all the libraries here so each frontend doesn't need to
676 dnl ** keep track of them all
678 dnl ** (these could be made configurable)
682 if test -n "$build_modules"; then
683 silc_MODULES="$silc_MODULES $build_modules"
686 dnl ****************************************
688 AC_SUBST(CHAT_MODULES)
689 AC_SUBST(silc_MODULES)
691 CORE_LIBS="../core/libcore.a ../lib-config/libirssi_config.a ../lib-popt/libpopt.a"
695 for c in $CHAT_MODULES; do
700 CHAT_LIBS="$CHAT_LIBS ../$c/lib$c.a ../$c/core/lib${c}_core.a"
701 if test -f $srcdir/src/fe-common/$c/module.h; then
702 FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/$c/libfe_common_$c.a "
704 for s in `eval echo \\$${c}_MODULES`; do
705 CHAT_LIBS="$CHAT_LIBS ../$c/$s/lib${c}_$s.a"
706 module_inits="$module_inits ${c}_${s}_init();"
707 module_deinits="${c}_${s}_deinit(); $module_deinits"
708 if test -f $srcdir/src/fe-common/$c/$s/module.h; then
709 FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/$c/$s/libfe_${c}_$s.a "
710 fe_module_inits="$fe_module_inits fe_${c}_${s}_init();"
711 fe_module_deinits="fe_${c}_${s}_deinit(); $fe_module_deinits"
715 file="$srcdir/src/$c/$c.c"
716 echo "/* this file is automatically generated by configure - don't change */" > $file
717 echo "void ${c}_core_init(void); void ${c}_core_deinit(void);" >> $file
718 if test -n "$module_inits"; then
719 echo "$module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
720 echo "$module_deinits" | $sedpath -e 's/ *$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
722 echo "void ${c}_init(void) { ${c}_core_init(); $module_inits }" >> $file
723 echo "void ${c}_deinit(void) { $module_deinits ${c}_core_deinit(); }" >> $file
725 if test -f $srcdir/src/fe-common/$c/module.h; then
726 file="$srcdir/src/fe-common/$c/${c}-modules.c"
727 echo "/* this file is automatically generated by configure - don't change */" > $file
728 if test -n "$fe_module_inits"; then
729 echo "$fe_module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
730 echo "$fe_module_deinits" | $sedpath -e 's/ *$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
732 echo "void fe_${c}_modules_init(void) { $fe_module_inits }" >> $file
733 echo "void fe_${c}_modules_deinit(void) { $fe_module_deinits }" >> $file
737 FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/core/libfe_common_core.a"
739 dnl ** common libraries needed by frontends
740 COMMON_NOUI_LIBS="$CHAT_LIBS $CORE_LIBS $INTLLIBS"
741 COMMON_LIBS="$FE_COMMON_LIBS $COMMON_NOUI_LIBS"
742 AC_SUBST(COMMON_NOUI_LIBS)
743 AC_SUBST(COMMON_LIBS)
749 if test "x$want_ipv6" = "xyes"; then
750 AC_MSG_CHECKING([for IPv6])
751 AC_CACHE_VAL(irssi_cv_type_in6_addr,
753 #include <sys/types.h>
754 #include <sys/socket.h>
755 #include <netinet/in.h>
757 #include <arpa/inet.h>],
758 [struct in6_addr i;],
759 irssi_cv_type_in6_addr=yes,
760 irssi_cv_type_in6_addr=no,
762 if test $irssi_cv_type_in6_addr = yes; then
765 AC_MSG_RESULT($irssi_cv_type_in6_addr)
769 dnl ** IRSSI_VERSION_DATE and IRSSI_VERSION_TIME
771 #VERSION_DATE=`head -1 $srcdir/ChangeLog|sed 's/^\(....\)-\(..\)-\(..\).*/\1\2\3/'`
772 #VERSION_TIME=`head -1 $srcdir/ChangeLog|sed -e 's/^[[^ ]]* \(..\):\(..\).*/\1\2/' -e 's/^0*//'`
773 #AC_SUBST(VERSION_DATE)
774 #AC_SUBST(VERSION_TIME)
777 # Glue into SILC build system
779 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
780 AC_SUBST(INCLUDE_DEFINES_INT)
786 src/fe-common/Makefile
787 src/fe-common/core/Makefile
788 src/fe-common/silc/Makefile
790 src/lib-config/Makefile
791 src/lib-popt/Makefile
793 src/silc/core/Makefile
795 src/perl/common/Makefile.PL
796 src/perl/ui/Makefile.PL
797 src/perl/textui/Makefile.PL
801 docs/help/in/Makefile
807 dnl ** for building from objdir
808 old_dir=`pwd` && cd $srcdir && whole_dir=`pwd` && cd $old_dir
809 if test "x$old_dir" != "x$whole_dir"; then
810 $LN_S $srcdir/irssi-version.h irssi-version.h
812 if test "x$want_perl" != "xno"; then
814 for i in $whole_dir/src/perl/common $whole_dir/src/perl/irc $whole_dir/src/perl/ui $whole_dir/src/perl/textui; do
815 subdirfiles=`echo $subdirfiles $i/typemap $i/module.h $i/*.pm $i/*.xs`
817 for file in $whole_dir/src/perl/*.[[ch]] $whole_dir/src/perl/libperl_orig.la $whole_dir/src/perl/libperl_dynaloader.la $subdirfiles; do
818 link=`echo $file|$sedpath "s?$whole_dir/??"`
827 if test "x$want_textui" = "xno"; then
829 elif test "x$want_termcap" = "xyes"; then
830 text="yes, using termcap"
831 elif test "x$want_terminfo" = "xyes"; then
832 text="yes, using terminfo"
834 text="yes, using curses"
836 echo "Building text frontend ..... : $text"
837 echo "Building irssi bot ......... : $want_irssibot"
838 echo "Building irssi proxy ....... : $want_irssiproxy"
839 echo "Building with IPv6 support . : $want_ipv6"
840 if test "x$have_gmodule" = "xyes"; then
841 echo "Building with module support : yes"
843 echo "Building with module support : NO!! /LOAD will not work!"
844 echo " - You're missing gmodule (comes with glib) for some reason,"
845 echo " or it doesn't work in your system."
848 if test "x$want_perl" = "xstatic"; then
849 echo "Building with Perl support . : static (in irssi binary)"
850 elif test "x$want_perl" = "xmodule"; then
851 echo "Building with Perl support . : module"
853 if test -z "$perl_check_error"; then
854 echo "Building with Perl support . : no"
856 echo "Building with Perl support . : NO!"
857 echo " - $perl_check_error"
861 if test "x$want_perl" != "xno" -a "x$perl_mod_error" != "x"; then
862 echo " - NOTE: Perl support will be compiled statically to irssi, not as"
863 echo " a module as requested. Reason:"
864 echo " $perl_mod_error"
866 if test -f /etc/debian_version; then
867 echo " - Try: apt-get install libperl-dev"
871 if test "x$want_perl" != "xno"; then
872 if test "$perl_library_dir" = "PERL_USE_LIB"; then
873 perl_library_dir=$PERL_USE_LIB
875 if test -z "$perl_library_dir"; then
876 perl_library_dir="(site default - `$perlpath -e 'use Config; print $Config{sitearch}'`)"
878 echo "Perl library directory ..... : $perl_library_dir"
879 if test "x$perl_prefix_note" = "xyes"; then
880 echo " - NOTE: This was automatically set to the same directory you gave with"
881 echo " --prefix. If you want the perl libraries to install to their 'correct'"
882 echo " path, you'll need to give --with-perl-lib=site option to configure."
883 echo " Anyway, installing perl to this directory should work just as well."
887 echo "Install prefix ............. : $prefix"
890 echo "If there was any problems, read the INSTALL file."