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.6+)
21 AC_PATH_PROG(sedpath, sed)
22 AC_PATH_PROG(perlpath, perl)
24 dnl * --disable-static isn't a good idea, complain if it's used
25 if test "x$enable_static" = "xno"; then
26 AC_ERROR([Don't give --disable-static option to configure])
29 AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h sys/ioctl.h sys/resource.h)
31 # check posix headers..
32 AC_CHECK_HEADERS(sys/time.h sys/utsname.h regex.h)
35 [ --with-socks Build with socks support],
36 if test x$withval = xyes; then
39 if test "x$withval" = xno; then
48 [ --with-textui Build text frontend],
49 if test x$withval = xyes; then
52 if test "x$withval" = xno; then
61 [ --with-bot Build irssi-bot],
62 if test x$withval = xyes; then
65 if test "x$withval" = xno; then
74 [ --with-proxy Build irssi-proxy],
75 if test x$withval = xyes; then
78 if test "x$withval" = xno; then
87 [ --with-terminfo Use terminfo directly instead of curses],
88 if test x$withval = xyes; then
91 if test "x$withval" = xno; then
100 [ --with-modules Specify what modules to build in binary],
101 if test x$withval != xyes -a x$withval != xno; then
102 build_modules="$withval"
105 if test "x$prefix" != "xNONE"; then
106 prefix=`eval echo $prefix`
107 PERL_MM_PARAMS="INSTALLDIRS=perl PREFIX=$prefix"
108 perl_library_dir="PERL_USE_LIB"
114 AC_ARG_WITH(with-glib2,
115 [ --with-glib2 Use GLIB 2.0 instead of 1.2],
116 if test x$withval = xyes; then
119 if test "x$withval" = xno; then
127 AC_ARG_WITH(perl-staticlib,
128 [ --with-perl-staticlib Specify that we want to link perl libraries
129 statically in irssi, default is no],
130 if test x$withval = xyes; then
131 want_staticperllib=yes
133 if test "x$withval" = xno; then
134 want_staticperllib=no
136 want_staticperllib=yes
139 want_staticperllib=no)
142 AC_ARG_WITH(perl-lib,
143 [ --with-perl-lib=[site|vendor|DIR] Specify where to install the
144 Perl libraries for irssi, default is site],
145 if test "x$withval" = xyes; then
147 elif test "x$withval" = xno; then
149 elif test "x$withval" = xsite; then
153 elif test "x$withval" = xvendor; then
156 if test -z "`$perlpath -v|grep '5\.0'`"; then
157 PERL_MM_PARAMS="INSTALLDIRS=vendor"
159 PERL_MM_PARAMS="INSTALLDIRS=perl PREFIX=`perl -e 'use Config; print $Config{prefix}'`"
161 perl_library_dir="(vendor default - `$perlpath -e 'use Config; print $Config{archlib}'`)"
165 PERL_MM_PARAMS="INSTALLDIRS=perl LIB=$withval"
166 perl_library_dir="PERL_USE_LIB"
172 [ --with-perl[=yes|no|module] Build with Perl support - also specifies
173 if it should be built into main irssi binary
174 (static, default) or as module],
175 if test x$withval = xyes; then
177 elif test x$withval = xstatic; then
179 elif test x$withval = xmodule; then
187 [ --enable-ipv6 Enable IPv6 support],
188 if test x$enableval = xyes; then
191 if test "x$enableval" = xno; then
200 dnl ** just some generic stuff...
203 dnl * OS specific options
206 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
213 AC_CHECK_FUNCS(mkfifo fcntl nl_langinfo)
215 AC_CHECK_FUNC(socket, [], [
216 AC_CHECK_LIB(socket, socket, [
217 LIBS="$LIBS -lsocket"
221 AC_CHECK_FUNC(inet_addr, [], [
222 AC_CHECK_LIB(nsl, inet_addr, [
227 dnl * gcc specific options
228 if test "x$ac_cv_prog_gcc" = "xyes"; then
229 CFLAGS="$CFLAGS -Wall"
232 dnl * socklen_t - AC_CHECK_TYPE() would be _really_ useful if it only would
233 dnl * accept header files where to find the typedef..
234 AC_MSG_CHECKING([for socklen_t])
235 AC_CACHE_VAL(irssi_cv_type_socklen_t,
237 #include <sys/types.h>
238 #include <sys/socket.h>],
240 irssi_cv_type_socklen_t=yes,
241 irssi_cv_type_socklen_t=no,
243 if test $irssi_cv_type_socklen_t = no; then
244 AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
246 AC_MSG_RESULT($irssi_cv_type_socklen_t)
248 dnl * off_t checks, try to make it 64bit
249 AC_DEFINE_UNQUOTED(_FILE_OFFSET_BITS, $preferred_off_t_bits)
252 AC_CHECK_SIZEOF(long)
253 AC_CHECK_SIZEOF(long long)
255 if test $sizeof_off_t = 8; then
261 if test x$sizeof_off_t = x$ac_cv_sizeof_long; then
262 # try to use unsigned long always first
263 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "lu")
264 AC_DEFINE(UOFF_T_LONG)
265 elif test x$sizeof_off_t = x$ac_cv_sizeof_int; then
267 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "u")
268 AC_DEFINE(UOFF_T_INT)
269 elif test x$sizeof_off_t = x$ac_cv_sizeof_long_long; then
270 # and finally long long
271 AC_DEFINE_UNQUOTED(PRIuUOFF_T, "llu")
272 AC_DEFINE(UOFF_T_LONG_LONG)
274 AC_ERROR([Couldn't find integer type for off_t])
278 dnl ** check for socks
281 if test "x$want_socks" = "xyes"; then
282 AC_CHECK_LIB(socks, connect, [
284 AC_CHECK_HEADER(socks.h, [
285 AC_DEFINE(HAVE_SOCKS_H)
286 CFLAGS="$CFLAGS -DSOCKS"
287 AC_MSG_RESULT(["socks5 library found, building with it"])
289 AC_MSG_RESULT(["socks4 library found, building with it"])
290 CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dgetpeername=Rgetpeername -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
296 dnl ** fe-text checks
299 AC_DEFUN(AC_CHECK_GLIBDIR,[
300 AC_MSG_CHECKING([whether GLib is unpacked to irssi dir])
302 GLIB_DIR=`for d in *; do test -f $d/glib.h && echo $d; done`
303 if test -n "$GLIB_DIR"; then
304 dnl * glib in irssi directory, use it
305 AC_MSG_RESULT([yes, using it])
307 dnl * we have to do this at this point so we know what libs gmodule needs
308 if test ! -f $GLIB_DIR/.libs/libglib.a; then
310 echo "configuring GLib ..."
313 if test ! -f glib-config; then
321 GLIB_LDEXTRA=`$GLIB_DIR/glib-config --libs gmodule|$sedpath -e 's/-lglib//' -e 's/-lgmodule//' -e 's,-L/usr/local/lib ,,'|$sedpath 's/ \+/ /g'`
322 full_glib_dir="`pwd`/$GLIB_DIR"
323 GLIB_CFLAGS="-I$full_glib_dir -I$full_glib_dir/gmodule"
324 if test -f $full_glib_dir/.libs/libglib.a; then
325 GLIB_LIBS="$full_glib_dir/.libs/libglib.a $GLIB_LDEXTRA"
326 if test -f $full_glib_dir/gmodule/.libs/libgmodule.a; then
327 GLIB_LIBS="$GLIB_LIBS $full_glib_dir/gmodule/.libs/libgmodule.a"
328 AC_DEFINE(HAVE_GMODULE)
332 GLIB_LIBS="$full_glib_dir/libglib.a $GLIB_LDEXTRA"
333 if test -f $full_glib_dir/gmodule/libgmodule.a; then
334 GLIB_LIBS="$GLIB_LIBS $full_glib_dir/gmodule/libgmodule.a"
335 AC_DEFINE(HAVE_GMODULE)
339 AC_SUBST(GLIB_CFLAGS)
348 if test -z "$GLIB_DIR"; then
349 if test "x$with_glib2" = "xyes"; then
350 dnl * check only for glib2
353 dnl * check glib1 then glib2
357 for try in $checks; do
359 if test $try = 1 -o $try = 3; then
362 echo "*** trying without -lgmodule"
365 if test $try = 1 -o $try = 2; then
370 AM_PATH_GLIB($glib_version,[],[], [$glib_modules])
371 if test "$GLIB_LIBS"; then
372 if test $glib_modules = gmodule; then
373 AC_DEFINE(HAVE_GMODULE)
380 if test -z "$GLIB_LIBS"; then
382 echo "*** If you don't have GLIB, you can get it from ftp://ftp.gtk.org"
383 echo "*** If you can't install GLIB anywhere or if you don't want to,"
384 echo "*** you can just unpack it to Irssi's source directory and"
385 echo "*** Irssi will automatically compile and use it."
388 dnl * I think it's pretty safe to assume GLib 1.2.9 since the next
389 dnl * will be 2.0 (or 1.4?) and it's not sure if irssi compiles
390 dnl * with it (yea, just a few weeks after I put this text for 1.2.8
391 dnl * the 1.2.9 came :) .. and then .10
392 glib_file=glib-1.2.10.tar.gz
395 if test -n "`ncftpget 2>/dev/null|grep -i ncftp`"; then
396 dlcmd="ncftpget ftp://ftp.gtk.org/pub/gtk/v1.2/$glib_file"
398 if test -n "`wget 2>/dev/null|grep -i wget`"; then
399 dlcmd="wget http://irssi.org/files/$glib_file"
401 if test -n "$dlcmd"; then
402 echo "*** I can download GLib for you now. If you don't want to, press CTRL-C now."
404 echo "*** Press ENTER to continue"
407 if `gunzip $glib_file`; then
408 glib_file=`echo $glib_file|$sedpath s/\.gz$//`
409 if `tar xf $glib_file`; then
416 if test -z "$GLIB_LIBS"; then
417 AC_ERROR([GLIB is required to build irssi.])
422 LIBS="$LIBS $GLIB_LIBS"
425 dnl ** check if we can link dynamic libraries to modules
426 dnl ** also checks if libraries are built to .libs dir
429 AC_MSG_CHECKING([if we can link dynamic libraries with modules])
432 dnl ** compile object file
433 cat > conftest.c <<EOF
435 int modfunc(){return (int)floor(1.2);}
438 ./libtool --mode=compile $CC $CFLAGS -c conftest.c 2> /dev/null > /dev/null
439 if test ! -s conftest.lo; then
440 AC_ERROR([error compiling test module])
443 dnl ** link to library
444 ./libtool --mode=link $CC $CFLAGS $LDFLAGS -rpath /usr/lib conftest.lo -lm -o libconftest.la > /dev/null
445 if test ! -s .libs/libconftest.a; then
446 AC_ERROR([error, can't even find .a library])
449 dnl ** check if dynamic linking worked
450 libfile=`grep '^library_names' libconftest.la|$sedpath "s/library_names='\(.*\)'.*/\1/"|$sedpath 's/.* \([[^ ]]*\)$/\1/'`
451 if test ! -s .libs/$libfile; then
452 AC_MSG_RESULT([no, error linking test module])
454 cat > conftest.c <<EOF
457 GModule *m; int (*modfunc)(void);
458 m = g_module_open(".libs/$libfile", 0);
459 if (!m) g_print("error loading: %s", g_module_error());
460 else if (!g_module_symbol(m, "modfunc", (gpointer *) &modfunc))
461 g_print("modfunc() symbol not found from module");
462 else if (modfunc() == 1) g_print("ok"); else g_print("wrong result?! 1 vs %d", modfunc());
465 $CC $CFLAGS $LDFLAGS conftest.c -o conftest $GLIB_CFLAGS $GLIB_LIBS 2> /dev/null > /dev/null
466 if test ! -s conftest; then
467 AC_MSG_RESULT([no, error compiling test program])
469 status="`./conftest`"
470 if test "x$status" = "xok"; then
474 AC_MSG_RESULT([no, error running: $status])
478 rm -rf conftest conftest.* libconftest.* .libs
484 if test "x$want_textui" = "xyes"; then
487 TEXTUI_LIBS="$LIBS $CURSES_LIBS"
488 if test "x$has_curses" = "xtrue"; then
489 AC_CHECK_FUNC(use_default_colors, AC_DEFINE(HAVE_NCURSES_USE_DEFAULT_COLORS))
490 AC_CHECK_FUNC(idcok, AC_DEFINE(HAVE_CURSES_IDCOK))
491 AC_CHECK_FUNC(resizeterm, AC_DEFINE(HAVE_CURSES_RESIZETERM))
492 AC_CHECK_FUNC(wresize, AC_DEFINE(HAVE_CURSES_WRESIZE))
493 AC_CHECK_FUNC(setupterm,, [
497 AC_CHECK_LIB(tinfo, setupterm, [
498 TEXTUI_LIBS="$LIBS -ltinfo"
500 ], AC_CHECK_LIB(termlib, tgetent, [
501 TEXTUI_LIBS="$LIBS -ltermlib"
503 ], AC_CHECK_LIB(termcap, tgetent, [
504 TEXTUI_LIBS="$LIBS -ltermcap"
507 AC_ERROR(Terminfo/termcap not found - install ncurses-devel package)
511 AC_SUBST(TEXTUI_LIBS)
512 if test "x$want_termcap" = "xyes"; then
513 AC_CHECK_FUNC(tparm,, need_tparm=yes)
515 AC_DEFINE(HAVE_TERMINFO)
523 if test "$want_perl" != "no"; then
524 AC_MSG_CHECKING(for working Perl support)
526 if test -z "$perlpath"; then
527 perl_check_error="perl binary not found"
529 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
532 if test -z "$PERL_CFLAGS"; then
533 if test -n "$perl_check_error"; then
534 perl_check_error="Error getting perl CFLAGS"
536 AC_MSG_RESULT([not found, building without Perl])
539 PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null`
541 dnl * Perl 5.004 and older use perl_xxx variables while
542 dnl * later use PL_perl_xxx variables ..
543 have_pl_perl=`$perlpath -e 'print $] < 5.005 ? "no" : "yes";'`
544 if test "x$have_pl_perl" = "xyes"; then
545 AC_DEFINE(HAVE_PL_PERL)
548 if test "x$DYNLIB_MODULES" = "xno" -a "$want_perl" != "static"; then
549 dnl * wanted perl as module, won't get it.
551 perl_mod_error="Dynamic library dependencies don't work with modules"
554 if test "$want_perl" != "static"; then
555 dnl * dynaloader.a -> libperl_dynaloader.la
556 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
559 dnl * don't check libperl.a if dynaloader.a wasn't found..
560 if test -n "$DYNALOADER_A"; then
561 dnl * find either libperl.a or libperl.so
562 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 } } };'`
563 if test -z "$LIBPERL_A"; then
564 perl_mod_error="Didn't find location of -lperl"
566 elif test "$LIBPERL_A" = "-lperl"; then
571 dnl * remove all database stuffs
572 dnl * nsl is already in ldflags
573 dnl * libc is of course linked without needing -lc
574 dnl * -rdynamic must not be in LIBADD line
575 for word in -ldb -ldbm -lndbm -lgdbm -lc -rdynamic; do
576 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e "s/$word //" -e "s/$word$//"`
581 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lposix //' -e 's/-lposix$//'`
584 if test "x$ac_cv_prog_gcc" = "xyes"; then
585 PERL_CFLAGS=`echo $PERL_CFLAGS | $sedpath -e 's/-Ae //' -e 's/-Ae$//'`
586 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-Ae //' -e 's/-Ae$//'`
593 dnl * check that perl's ldflags actually work
594 echo "main(){perl_alloc(); return 0;}" > conftest.c
595 $CC $CFLAGS conftest.c -o conftest $LDFLAGS $PERL_LDFLAGS 2> perl.error.tmp > /dev/null
596 if test ! -s conftest; then
597 perl_check_error="Error linking with perl libraries: $PERL_LDFLAGS: `cat perl.error.tmp`"
598 AC_MSG_RESULT([error linking with perl libraries, building without Perl])
605 if test "x$want_perl" != "xno"; then
606 if test "x$want_perl" = "xstatic"; then
608 elif test -z "$DYNALOADER_A"; then
609 AC_MSG_RESULT([error parsing ldopts, building Perl into irssi binary instead of as module])
613 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
614 if test -n "$LIBPERL_A"; then
615 PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
618 AC_SUBST(DYNALOADER_A)
621 if test "x$want_perl" = "xstatic"; then
622 dnl * building with static perl support
623 dnl * all PERL_LDFLAGS linking is done in fe-text
624 PERL_LINK_FLAGS="$PERL_LDFLAGS"
625 PERL_LINK_LIBS="../perl/libperl_core_static.la"
626 PERL_FE_LINK_LIBS="../perl/libfe_perl_static.la"
628 AC_DEFINE(HAVE_STATIC_PERL)
630 dnl * build only static library of perl module
633 perl_static_lib=libperl_core_static.la
634 perl_static_fe_lib=libfe_perl_static.la
635 PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool'
637 dnl * build dynamic library of perl module
638 perl_module_lib=libperl_core.la
639 perl_module_fe_lib=libfe_perl.la
642 PERL_LIBTOOL='$(SHELL) $(top_builddir)/libtool'
645 if test "x$want_staticperllib" = "xyes"; then
646 PERL_MM_PARAMS="$PERL_MM_PARAMS LINKTYPE=static"
647 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"
653 # figure out the correct @INC path - we'll need to do this
654 # through MakeMaker since it's difficult to get it right
656 if test "x$perl_set_use_lib" = "xyes"; then
657 perl -e 'use ExtUtils::MakeMaker; WriteMakefile("NAME" => "test", "MAKEFILE" => "Makefile.test");' $PERL_MM_PARAMS >/dev/null
658 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;'`
662 AC_SUBST(perl_module_lib)
663 AC_SUBST(perl_static_lib)
664 AC_SUBST(perl_module_fe_lib)
665 AC_SUBST(perl_static_fe_lib)
666 AC_SUBST(PERL_LIBTOOL)
668 AC_SUBST(PERL_LINK_FLAGS)
669 AC_SUBST(PERL_LINK_LIBS)
670 AC_SUBST(PERL_FE_LINK_LIBS)
672 AC_SUBST(PERL_LDFLAGS)
673 AC_SUBST(PERL_CFLAGS)
675 AC_SUBST(PERL_USE_LIB)
676 AC_SUBST(PERL_MM_PARAMS)
677 AC_SUBST(PERL_STATIC_LIBS)
681 dnl ** check what we want to build
682 AM_CONDITIONAL(BUILD_TEXTUI, test "$want_textui" = "yes")
683 AM_CONDITIONAL(BUILD_IRSSIBOT, test "$want_irssibot" = "yes")
684 AM_CONDITIONAL(BUILD_IRSSIPROXY, test "$want_irssiproxy" = "yes")
685 AM_CONDITIONAL(BUILD_PLUGINS, test "$want_plugins" = "yes")
686 AM_CONDITIONAL(HAVE_PERL, test "$want_perl" != "no")
687 AM_CONDITIONAL(HAVE_STATIC_PERL, test "$want_perl" = "static")
688 AM_CONDITIONAL(NEED_TPARM, test "$need_tparm" = "yes")
689 AM_CONDITIONAL(USE_CURSES, test "$want_terminfo" != "yes" -a "$want_termcap" != "yes")
691 # move LIBS to PROG_LIBS so they're not tried to be used when linking eg. perl libraries
697 dnl ** Keep all the libraries here so each frontend doesn't need to
698 dnl ** keep track of them all
700 dnl ** (these could be made configurable)
704 if test -n "$build_modules"; then
705 silc_MODULES="$silc_MODULES $build_modules"
708 dnl ****************************************
710 AC_SUBST(CHAT_MODULES)
711 AC_SUBST(silc_MODULES)
713 CORE_LIBS="../core/libcore.a ../lib-config/libirssi_config.a ../lib-popt/libpopt.a"
717 for c in $CHAT_MODULES; do
722 CHAT_LIBS="$CHAT_LIBS ../$c/lib$c.a ../$c/core/lib${c}_core.a"
723 if test -f $srcdir/src/fe-common/$c/module.h; then
724 FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/$c/libfe_common_$c.a "
726 for s in `eval echo \\$${c}_MODULES`; do
727 CHAT_LIBS="$CHAT_LIBS ../$c/$s/lib${c}_$s.a"
728 module_inits="$module_inits ${c}_${s}_init();"
729 module_deinits="${c}_${s}_deinit(); $module_deinits"
730 if test -f $srcdir/src/fe-common/$c/$s/module.h; then
731 FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/$c/$s/libfe_${c}_$s.a "
732 fe_module_inits="$fe_module_inits fe_${c}_${s}_init();"
733 fe_module_deinits="fe_${c}_${s}_deinit(); $fe_module_deinits"
737 file="$srcdir/src/$c/$c.c"
738 echo "/* this file is automatically generated by configure - don't change */" > $file
739 echo "void ${c}_core_init(void); void ${c}_core_deinit(void);" >> $file
740 if test -n "$module_inits"; then
741 echo "$module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
742 echo "$module_deinits" | $sedpath -e 's/ *$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
744 echo "void ${c}_init(void) { ${c}_core_init(); $module_inits }" >> $file
745 echo "void ${c}_deinit(void) { $module_deinits ${c}_core_deinit(); }" >> $file
747 if test -f $srcdir/src/fe-common/$c/module.h; then
748 file="$srcdir/src/fe-common/$c/${c}-modules.c"
749 echo "/* this file is automatically generated by configure - don't change */" > $file
750 if test -n "$fe_module_inits"; then
751 echo "$fe_module_inits" | $sedpath -e 's/()/(void)/g' -e 's/ /void /g' >> $file
752 echo "$fe_module_deinits" | $sedpath -e 's/ *$//' -e 's/()/(void)/g' -e 's/ /void /g' -e 's/^/void /' >> $file
754 echo "void fe_${c}_modules_init(void) { $fe_module_inits }" >> $file
755 echo "void fe_${c}_modules_deinit(void) { $fe_module_deinits }" >> $file
759 FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/core/libfe_common_core.a"
761 dnl ** common libraries needed by frontends
762 COMMON_NOUI_LIBS="$CHAT_LIBS $CORE_LIBS"
763 COMMON_LIBS="$FE_COMMON_LIBS $COMMON_NOUI_LIBS"
764 AC_SUBST(COMMON_NOUI_LIBS)
765 AC_SUBST(COMMON_LIBS)
771 if test "x$want_ipv6" = "xyes"; then
772 AC_MSG_CHECKING([for IPv6])
773 AC_CACHE_VAL(irssi_cv_type_in6_addr,
775 #include <sys/types.h>
776 #include <sys/socket.h>
777 #include <netinet/in.h>
779 #include <arpa/inet.h>],
780 [struct in6_addr i;],
781 irssi_cv_type_in6_addr=yes,
782 irssi_cv_type_in6_addr=no,
784 if test $irssi_cv_type_in6_addr = yes; then
787 AC_MSG_RESULT($irssi_cv_type_in6_addr)
791 dnl ** IRSSI_VERSION_DATE and IRSSI_VERSION_TIME
793 #VERSION_DATE=`head -1 $srcdir/ChangeLog|sed 's/^\(....\)-\(..\)-\(..\).*/\1\2\3/'`
794 #VERSION_TIME=`head -1 $srcdir/ChangeLog|sed -e 's/^[[^ ]]* \(..\):\(..\).*/\1\2/' -e 's/^0*//'`
795 #AC_SUBST(VERSION_DATE)
796 #AC_SUBST(VERSION_TIME)
799 # Glue into SILC build system
801 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
802 AC_SUBST(INCLUDE_DEFINES_INT)
808 src/fe-common/Makefile
809 src/fe-common/core/Makefile
810 src/fe-common/silc/Makefile
812 src/lib-config/Makefile
813 src/lib-popt/Makefile
815 src/silc/core/Makefile
817 src/perl/common/Makefile.PL
818 src/perl/ui/Makefile.PL
819 src/perl/textui/Makefile.PL
823 docs/help/in/Makefile
829 dnl ** for building from objdir
830 old_dir=`pwd` && cd $srcdir && whole_dir=`pwd` && cd $old_dir
831 if test "x$old_dir" != "x$whole_dir"; then
832 $LN_S $srcdir/irssi-version.h irssi-version.h
834 if test "x$want_perl" != "xno"; then
836 for i in $whole_dir/src/perl/common $whole_dir/src/perl/irc $whole_dir/src/perl/ui $whole_dir/src/perl/textui; do
837 subdirfiles=`echo $subdirfiles $i/typemap $i/module.h $i/*.pm $i/*.xs`
839 for file in $whole_dir/src/perl/*.[[ch]] $whole_dir/src/perl/libperl_orig.la $whole_dir/src/perl/libperl_dynaloader.la $subdirfiles; do
840 link=`echo $file|$sedpath "s?$whole_dir/??"`
849 if test "x$want_textui" = "xno"; then
851 elif test "x$want_termcap" = "xyes"; then
852 text="yes, using termcap"
853 elif test "x$want_terminfo" = "xyes"; then
854 text="yes, using terminfo"
856 text="yes, using curses"
858 echo "Building text frontend ..... : $text"
859 echo "Building irssi bot ......... : $want_irssibot"
860 echo "Building irssi proxy ....... : $want_irssiproxy"
861 echo "Building with IPv6 support . : $want_ipv6"
862 if test "x$have_gmodule" = "xyes"; then
863 echo "Building with module support : yes"
865 echo "Building with module support : NO!! /LOAD will not work!"
866 echo " - You're missing gmodule (comes with glib) for some reason,"
867 echo " or it doesn't work in your system."
870 if test "x$want_perl" = "xstatic"; then
871 echo "Building with Perl support . : static (in irssi binary)"
872 elif test "x$want_perl" = "xmodule"; then
873 echo "Building with Perl support . : module"
875 if test -z "$perl_check_error"; then
876 echo "Building with Perl support . : no"
878 echo "Building with Perl support . : NO!"
879 echo " - $perl_check_error"
883 if test "x$want_perl" != "xno" -a "x$perl_mod_error" != "x"; then
884 echo " - NOTE: Perl support will be compiled statically to irssi, not as"
885 echo " a module as requested. Reason:"
886 echo " $perl_mod_error"
888 if test -f /etc/debian_version; then
889 echo " - Try: apt-get install libperl-dev"
893 if test "x$want_perl" != "xno"; then
894 if test "$perl_library_dir" = "PERL_USE_LIB"; then
895 perl_library_dir=$PERL_USE_LIB
897 if test -z "$perl_library_dir"; then
898 perl_library_dir="(site default - `$perlpath -e 'use Config; print $Config{sitearch}'`)"
900 echo "Perl library directory ..... : $perl_library_dir"
901 if test "x$perl_prefix_note" = "xyes"; then
902 echo " - NOTE: This was automatically set to the same directory you gave with"
903 echo " --prefix. If you want the perl libraries to install to their 'correct'"
904 echo " path, you'll need to give --with-perl-lib=site option to configure."
905 echo " Anyway, installing perl to this directory should work just as well."
909 echo "Install prefix ............. : $prefix"
912 echo "If there was any problems, read the INSTALL file."