1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

good-bye and thanks, autotools

This commit is contained in:
Ailin Nemui 2022-02-18 20:50:37 +01:00
parent cf6bc31172
commit b8736225cf
64 changed files with 118 additions and 3866 deletions

View File

@ -7,10 +7,8 @@ name: Check Irssi
env:
apt_build_deps: libutf8proc-dev libperl-dev libotr5-dev
apt_build_deps_meson: ninja-build
apt_build_deps_autotools: autoconf automake libtool
get_pip_build_deps_meson: pip3 install setuptools${setuptools_ver}; pip3 install wheel; pip3 install meson${meson_ver}
build_options_meson: -Dwith-proxy=yes -Dwith-bot=yes -Dwith-perl=yes -Dwith-otr=yes
build_options_configure: --with-proxy=module --with-bot --with-perl=module --with-otr=module
prefix: ~/irssi-build
jobs:
dist:
@ -18,13 +16,11 @@ jobs:
steps:
- name: prepare required software
run: |
sudo apt update && sudo apt install $apt_build_deps $apt_build_deps_autotools
sudo apt update && sudo apt install $apt_build_deps
- uses: actions/checkout@main
- name: make dist
run: |
# make dist
./autogen.sh $build_options_configure
make dist
./utils/make-dist.sh
- uses: actions/upload-artifact@v2
with:
path: irssi-*.tar.gz
@ -39,7 +35,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-latest]
builder: [meson, configure]
builder: [meson]
compiler: [clang, gcc]
flags: [regular]
include:
@ -49,7 +45,7 @@ jobs:
setuptools_ver: <51
- os: ubuntu-latest
builder: meson
meson_ver: <0.60.0
meson_ver: <0.61.2
- os: ubuntu-latest
builder: meson
flags: meson-latest FAILURE-OK
@ -77,23 +73,6 @@ jobs:
ninja -C Build
ninja -C Build install
if: ${{ matrix.builder == 'meson' }}
- name: build and install with Makefile
run: |
# make install
cd irssi-*/
mkdir Build
cd Build
../configure $build_options_configure --prefix=${prefix/\~/~} --enable-always-build-tests
make CFLAGS="-Wall -Werror -Werror=declaration-after-statement"
make install
if: ${{ matrix.builder == 'configure' }}
- name: run tests with Makefile
run: |
# make check
cd irssi-*/Build
make -C tests -sk check
find -name test-suite.log -exec cat {} +
if: ${{ matrix.builder == 'configure' }}
- name: run tests with Meson
run: |
# ninja test

3
.gitignore vendored
View File

@ -86,3 +86,6 @@ src/fe-fuzz/oom-*
Build
subprojects/*
!subprojects/*.wrap
Irssi-Dist
setup.cfg
*.egg-info

58
INSTALL
View File

@ -17,21 +17,12 @@ For most people, this should work just fine:
su
ninja -C Build install
For the moment, autotools is also supported:
meson options
./autogen.sh (for people who just cloned the repository)
./configure (if this script already exists, skip ./autogen.sh)
make
su
make install (not _really_ required except for perl support)
configure options
These options can be given to meson or ./configure.
The first syntax is for meson, the 2nd for ./configure
These options can be given to meson.
For a complete list of options, run
meson configure / ./configure --help
meson configure
--prefix
@ -39,33 +30,28 @@ configure options
YES, you can install Irssi WITHOUT ROOT permissions
by using --prefix=/home/dir
-Dwith-proxy=yes / --with-proxy
-Dwith-proxy=yes
Build the Irssi proxy (see startup-HOWTO).
-Dwith-perl=[yes|no] / --with-perl=[yes|no|module]
-Dwith-perl=[yes|no]
Enable Perl support
yes enable builtin (default)
no disable
module enable as module
-Dwith-perl-lib=[site|vendor|DIR] / --with-perl-lib=[site|vendor|DIR]
-Dwith-perl-lib=[site|vendor|DIR]
Specify installation dir for Perl libraries
site install in dir for site-specific modules (default)
vendor install in dir for vendor-specific modules
DIR install in DIR
[N/A] / --with-socks
Build with socks library
-Dwith-bot=yes / --with-bot
-Dwith-bot=yes
Build irssi-bot
-Dwithout-textui=yes / --without-textui
-Dwithout-textui=yes
Build without text frontend
@ -82,31 +68,18 @@ the -Dc_args and -Dc_link_args options variable, eg.:
Perl support generates most of the problems. There's quite a many
things that can go wrong:
- Compiling fails if you compile irssi with GCC in a system that has
perl compiled with some other C compiler. Very common problem with
non-Linux/BSD systems. You'll need to edit src/perl/*/Makefile files
and remove the parameters that gcc doesn't like. Mostly you'll just
need to keep the -I and -D parameters and add -fPIC.
- If there's any weird crashing at startup, you might have older irssi's
perl libraries installed somewhere, and you should remove those.
- Dynamic libraries don't want to work with some systems, so if your
system complains about some missing symbol in Irssi.so file, configure
irssi with --with-perl-staticlib option (NOT same as --with-perl=static).
- If configure complains that it doesn't find some perl stuff, you're
- If meson complains that it doesn't find some perl stuff, you're
probably missing libperl.so or libperl.a. In debian, you'll need to do
apt-get install libperl-dev
- For unprivileged home directory installations, you probably do not want
to specify --with-perl-lib=(site|vendor). Instead, you can use the
default perl installation target (below the irssi prefix). If you are
using local::lib you can also choose to install there by specifying
--with-perl-lib=$PERL_LOCAL_LIB_ROOT/lib/perl5
You can verify that the perl module is loaded and working with "/LOAD"
command. It should print something like:
Module Type Submodules
...
perl static core fe
perl dynamic fe core
System specific notes
@ -134,13 +107,4 @@ would call:
Getting perl scripting to work needs a few things:
- configure with --with-perl-staticlib
- libperl.dll is required in linking and running irssi, it's normally
located somewhere around /usr/lib/perl5/5.6.1/cygwin/CORE/libperl5_6_1.dll
copy it to eg. /usr/bin/libperl.dll
- -DUSEIMPORTLIB is needed to be defined while compiling src/perl directory.
It doesn't hurt to be defined everywhere, so configure irssi with:
CFLAGS='-DUSEIMPORTLIB' ./configure --with-perl-staticlib
- TODO

25
MANIFEST.in Normal file
View File

@ -0,0 +1,25 @@
global-include meson.build
recursive-include src *.c *.h meson.build
recursive-include src/perl *.c *.h *.xs *.pm *.pl typemap meson.build
recursive-include tests *.c meson.build
include meson_options.txt
include subprojects/*.wrap
prune subprojects/*/
include utils/*.pl utils/*.sh
exclude utils/make-dist.sh
include irssi.conf
include themes/*.theme
include docs/*.1 docs/*.txt docs/*.html
include docs/help/in/[a-z]*.in
include scripts/*.pl scripts/examples/*.pl
include NEWS
prune Build
prune dist
prune *.egg-info

View File

@ -1,35 +0,0 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
# create default-config.h
BUILT_SOURCES = default-config.h default-theme.h irssi-version.h
CLEANFILES = default-config.h default-theme.h
@MAINTAINER_MODE_TRUE@.PHONY: irssi-version.h
default-config.h: $(srcdir)/irssi.conf
$(srcdir)/utils/file2header.sh $(srcdir)/irssi.conf default_config > default-config.h
default-theme.h: $(srcdir)/themes/default.theme
$(srcdir)/utils/file2header.sh $(srcdir)/themes/default.theme default_theme > default-theme.h
irssi-version.h:
VERSION="$(VERSION)" $(srcdir)/utils/irssi-version.sh $(srcdir) | \
cmp -s - $@ || VERSION="$(VERSION)" $(srcdir)/utils/irssi-version.sh $(srcdir) >$@
SUBDIRS = src tests docs scripts themes utils
confdir = $(sysconfdir)
conf_DATA = irssi.conf
pkgconfig_DATA = irssi-1.pc
pkginclude_HEADERS = irssi-config.h irssi-version.h
EXTRA_DIST = \
ChangeLog \
autogen.sh \
README.md \
$(conf_DATA) \
irssi-icon.png \
meson.build \
meson_options.txt

View File

@ -1,67 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
PKG_NAME="Irssi"
srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
mydir=`pwd`
if test ! -f "$srcdir"/configure.ac; then
echo -n "**Error**: Directory \`$srcdir' does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
fi
cd "$srcdir"
# create help files
echo "Creating help files..."
perl utils/syntax.pl
echo "Creating ChangeLog..."
git log > ChangeLog
if test "$?" -ne 0; then
echo "**Error**: ${PKG_NAME} Autogen must be run in a git clone, cannot proceed."
exit 1
fi
files=`echo docs/help/in/*.in|sed -e 's,docs/help/in/Makefile.in ,,' -e 's,docs/help/in/,!,g' -e 's/\.in /.in ?/g'`
cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/in/Makefile.am
files=`echo $files|sed 's/\.in//g'`
cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/Makefile.am
if test x$NOCONFIGURE = x && test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
rm -f aclocal.m4
echo "Running autoreconf ..."
autoreconf -i || exit $?
# make sure perl hashes have correct length
find src/perl -name '*.c' -o -name '*.xs' -exec grep -n hv_store {} + | perl -l -ne 'if (/"(\w+)",\s*(\d+)/ && $2 != length $1) { $X=1; print "Incorrect key length in $_" } END { exit $X }'
cd "$mydir"
conf_flags="--enable-maintainer-mode"
if test x$NOCONFIGURE = x; then
echo Running "$srcdir"/configure $conf_flags "$@" ...
"$srcdir"/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
else
echo Skipping configure process.
fi
if grep -q '==\|\[\[' "$srcdir"/build-aux/test-driver; then
echo
echo "************************************************************************"
echo "**Warning**: your build is not portable, please do not make dist"
echo " see https://bugzilla.opensuse.org/show_bug.cgi?id=1076146"
echo "************************************************************************"
fi

View File

@ -1,821 +0,0 @@
AC_INIT(irssi, 1.4-head-an)
AC_CONFIG_SRCDIR([src])
AC_CONFIG_AUX_DIR(build-aux)
AC_PREREQ(2.50)
AC_CONFIG_HEADERS([irssi-config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 no-define foreign subdir-objects nostdinc])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CPP
AM_PROG_LIBTOOL
AC_PATH_PROG(sedpath, sed)
AC_PATH_PROG(perlpath, perl)
PKG_INSTALLDIR
AC_CHECK_HEADERS(unistd.h dirent.h sys/ioctl.h sys/resource.h)
# check posix headers..
AC_CHECK_HEADERS(sys/socket.h sys/time.h sys/utsname.h)
AC_SYS_LARGEFILE
AC_ARG_WITH(socks,
[ --with-socks Build with socks support],
if test x$withval = xno; then
want_socks=no
else
want_socks=yes
fi,
want_socks=no)
AC_ARG_WITH(textui,
[ --without-textui Build without text frontend],
if test x$withval = xno; then
want_textui=no
else
want_textui=yes
fi,
want_textui=yes)
AC_ARG_WITH(bot,
[ --with-bot Build irssi-bot],
if test x$withval = xno; then
want_irssibot=no
else
want_irssibot=yes
fi,
want_irssibot=no)
AC_ARG_WITH(fuzzer,
[ --with-fuzzer Build irssi-fuzzer],
if test x$withval = xno; then
want_irssifuzzer=no
else
want_irssifuzzer=yes
fi,
want_irssifuzzer=no)
AC_ARG_WITH(fuzzer-lib,
[ --with-fuzzer-lib Specify path to fuzzer library],
fuzzerlibpath="$withval")
AC_ARG_WITH(proxy,
[ --with-proxy Build irssi-proxy],
if test x$withval = xno; then
want_irssiproxy=no
else
want_irssiproxy=yes
fi,
want_irssiproxy=no)
AC_ARG_WITH(modules,
[ --with-modules Specify what modules to build in binary],
if test x$withval != xyes -a x$withval != xno; then
build_modules="$withval"
fi)
if test "x$prefix" != "xNONE"; then
prefix=`eval echo $prefix`
PERL_MM_PARAMS="INSTALLDIRS=perl INSTALL_BASE=$prefix"
perl_set_use_lib=yes
perl_prefix_note=yes
fi
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 = xno; then
want_staticperllib=no
else
want_staticperllib=yes
fi,
want_staticperllib=no)
AC_ARG_WITH(perl-lib,
[ --with-perl-lib=[perl|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" = xperl; then
want_perl=yes
perl_prefix_note=no
PERL_MM_PARAMS="INSTALLDIRS=perl"
perl_set_use_lib=no
elif test "x$withval" = xsite; then
want_perl=yes
perl_prefix_note=no
PERL_MM_PARAMS=""
perl_set_use_lib=no
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=`$perlpath -e 'use Config; print $Config{prefix}'`"
fi
perl_set_use_lib=no
else
want_perl=yes
perl_prefix_note=no
PERL_MM_PARAMS="INSTALLDIRS=perl LIB=$withval"
perl_set_use_lib=yes
fi,
want_perl=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
want_perl=no
fi,
want_perl=static)
AC_ARG_WITH(otr,
[ --with-otr[=yes|no|static] Build with OTR support - also specifies
if it should be built into the main irssi
binary (static) or as a module (default)],
if test x$withval = xyes; then
want_otr=module
elif test x$withval = xstatic; then
want_otr=static
elif test x$withval = xmodule; then
want_otr=module
else
want_otr=no
fi,
want_otr=no)
AC_ARG_ENABLE(true-color,
[ --enable-true-color Build with true color support in terminal],
if test x$enableval = xno ; then
want_truecolor=no
else
want_truecolor=yes
fi,
want_truecolor=no)
AC_ARG_ENABLE(gregex,
[ --disable-gregex Build without GRegex (fall back to regex.h)],
if test x$enableval = xno ; then
want_gregex=no
else
want_gregex=yes
fi,
want_gregex=yes)
AC_ARG_ENABLE(utf8proc,
[ --disable-utf8proc Build without Julia's utf8proc],
if test x$enableval = xno ; then
want_utf8proc=no
else
want_utf8proc=yes
fi,
want_utf8proc=yes)
AC_ARG_WITH(capsicum,
[ --with-capsicum Build with Capsicum support],
if test x$withval = xno; then
want_capsicum=no
else
want_capsicum=yes
fi,
want_capsicum=yes)
dnl **
dnl ** just some generic stuff...
dnl **
dnl * OS specific options
case "$host_os" in
hpux*)
CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
;;
*)
;;
esac
AC_SEARCH_LIBS([socket], [network socket])
AC_SEARCH_LIBS([inet_addr], [nsl])
dnl * gcc specific options
if test "x$ac_cv_prog_gcc" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
fi
AC_CHECK_TYPE(socklen_t, ,
[AC_DEFINE([socklen_t], [int], [Define to 'int' if <sys/socket.h> doesn't define.])], [
AC_INCLUDES_DEFAULT
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(off_t)
if test $ac_cv_sizeof_off_t = 8; then
offt_64bit=yes
else
offt_64bit=no
fi
dnl **
dnl ** check for socks
dnl **
if test "x$want_socks" = "xyes"; then
AC_CHECK_LIB(socks, connect, [
AC_DEFINE(HAVE_SOCKS,, Build with socks support)
LIBS="$LIBS -lsocks"
AC_CHECK_HEADER(socks.h, [
AC_DEFINE(HAVE_SOCKS_H)
CFLAGS="$CFLAGS -DSOCKS"
AC_MSG_RESULT(["socks5 library found, building with it"])
], [
AC_MSG_RESULT(["socks4 library found, building with it"])
CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dgetpeername=Rgetpeername -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
])
])
fi
dnl **
dnl ** fe-text checks
dnl **
for try in 1 2; do
if test $try = 1; then
glib_modules=gmodule
else
echo "*** trying without -lgmodule"
glib_modules=
fi
AM_PATH_GLIB_2_0(2.32.0,,, $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/pub/glib/"
echo "*** We recommend you get the latest stable GLIB 2 version."
echo "*** Compile and install it, and make sure pkg-config finds it,"
echo "*** by adding the path where the .pc file is located to PKG_CONFIG_PATH"
echo -n "*** Or alternatively install your distribution's package"
if test -f /etc/debian_version; then
echo :
echo "*** sudo apt-get install libglib2.0-dev"
elif test -f /etc/redhat-release; then
echo " (glib2-devel)"
else
echo .
fi
echo
AC_ERROR([GLIB is required to build irssi.])
fi
LIBS="$LIBS $GLIB_LIBS"
GLIB_TESTS
dnl **
dnl ** OpenSSL checks
dnl **
PKG_CHECK_MODULES([OPENSSL], [openssl], [
CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
LIBS="$LIBS $OPENSSL_LIBS"
], [
AC_CHECK_LIB([ssl], [SSL_library_init], [
LIBS="$LIBS -lssl -lcrypto"
], [
AC_MSG_ERROR([The OpenSSL library was not found])
])
])
dnl **
dnl ** utf8proc
dnl **
if test "x$want_utf8proc" != "xno"; then
AC_CHECK_HEADER([utf8proc.h], [
AC_CHECK_LIB([utf8proc], [utf8proc_version], [
want_utf8proc=yes
AC_DEFINE(HAVE_LIBUTF8PROC,, [Define to 1 if you have the `utf8proc' library (-lutf8proc).])
LIBS="$LIBS -lutf8proc"
], [
want_utf8proc="no, library not found"
])
], [
want_utf8proc="no, library header not found"
])
fi
dnl **
dnl ** curses checks
dnl **
if test "x$want_textui" != "xno"; then
TEXTUI_NO_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS([setupterm], [tinfo ncursesw ncurses terminfo], [want_textui=yes], [
AC_ERROR(Terminfo not found - install libncurses-dev or ncurses-devel package)
want_textui="no, Terminfo not found"
])
TEXTUI_LIBS="$LIBS"
AC_SUBST(TEXTUI_LIBS)
LIBS="$TEXTUI_NO_LIBS"
AC_CHECK_HEADER([term.h], [
AC_DEFINE(HAVE_TERM_H, [], [Define to 1 if you have the `term.h' header.])
])
fi
dnl **
dnl ** irssifuzzer checks
dnl **
if test "$want_irssifuzzer" != "no"; then
dnl * we need to build with -fsanitize-coverage=trace-pc-guard
dnl * otherwise fuzzer won't be very successful at finding bugs :)
if test -z "$SANFLAGS"; then
SANFLAGS="-g -fsanitize=address -fsanitize-coverage=trace-pc-guard"
fi
CFLAGS="$CFLAGS $SANFLAGS"
CXXFLAGS="$CXXFLAGS $SANFLAGS"
AC_MSG_CHECKING(for fuzzer library)
if test -z "$fuzzerlibpath"; then
AC_MSG_RESULT([not found, building without fuzzer front end])
want_irssifuzzer=no
else
FUZZER_LIBS="$fuzzerlibpath"
AC_SUBST(FUZZER_LIBS)
fi
fi
dnl **
dnl ** perl checks
dnl **
if test "$want_perl" != "no"; then
AC_MSG_CHECKING(for working Perl support)
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$ac_cv_prog_gcc" = "xyes" -a -z "`echo $host_os|grep 'bsd\|linux'`"; then
dnl * several systems have Perl compiled with native compiler
dnl * but irssi is being compiled with GCC. Here we try to
dnl * fix those command line options a bit so GCC won't
dnl * complain about them. Normally there's only few options
dnl * that we want to keep:
dnl * -Ddefine -Uundef -I/path -fopt -mopt -iwithsysroot
PERL_CFLAGS=`echo $PERL_CFLAGS | $perlpath -pe 's/^(.* )?-@<:@^DUIifm@:>@@<:@^ @:>@+/\1/g; s/^(.* )?\+@<:@^ @:>@+/\1/g'`
PERL_EXTRA_OPTS="CCCDLFLAGS=\"-fPIC\""
AC_SUBST(PERL_EXTRA_OPTS)
fi
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
PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null`
dnl * remove all database stuffs
dnl * nsl is already in ldflags
dnl * libc is of course linked without needing -lc
dnl * -rdynamic must not be in LIBADD line
for word in -ldb -ldbm -lndbm -lgdbm -lc -rdynamic; do
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e "s/$word //" -e "s/$word$//"`
done
case "$host_os" in
linux*)
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lposix //' -e 's/-lposix$//'`
;;
hpux*)
if test "x$ac_cv_prog_gcc" = "xyes"; then
PERL_CFLAGS=`echo $PERL_CFLAGS | $sedpath -e 's/-Ae //' -e 's/-Ae$//'`
PERL_LDFLAGS=`echo $PERL_LDFLAGS | $sedpath -e 's/-Ae //' -e 's/-Ae$//'`
fi
;;
*)
;;
esac
dnl * check that perl's ldflags actually work
echo "#include <EXTERN.h>" > conftest.c
echo "#include <perl.h>" >> conftest.c
echo "int main(){perl_alloc(); return 0;}" >> conftest.c
$CC $CFLAGS $PERL_CFLAGS conftest.c -o conftest $LDFLAGS $PERL_LDFLAGS 2> perl.error.tmp > /dev/null
if test ! -s conftest -a "x$ignore_perl_errors" = "x"; 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
AC_MSG_RESULT(ok)
if test "x$want_perl" = "xstatic"; then
dnl * building with static perl support
dnl * all PERL_LDFLAGS linking is done in fe-text
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_core_static.la
perl_static_fe_lib=libfe_perl_static.la
else
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=
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
# remove any prefix from PERL_MM_OPT
PERL_MM_OPT=`perl -MText::ParseWords -e 'sub qu{$_=shift;s{^(.*?)=(.*)$}{($a,$b)=($1,$2);$b=~s/"/\\\\"/g;qq{$a="$b"}}ge if /@<:@\s"@:>@/;$_} local $,=" "; print map qu($_), grep !/^(INSTALL_BASE|PREFIX)=/, shellwords(@ARGV)' "$PERL_MM_OPT"`
# figure out the correct @INC path - we'll need to do this
# through MakeMaker since it's difficult to get it right
# otherwise.
$perlpath -MExtUtils::MakeMaker -e 'WriteMakefile(NAME => "test", MAKEFILE => "Makefile.test", FIRST_MAKEFILE => "/dev/null", NO_META => 1, NO_MYMETA => 1);' $PERL_MM_PARAMS >/dev/null
echo 'show-INSTALLDIRS:' >> Makefile.test
echo ' @echo $(INSTALLDIRS)' >> Makefile.test
perl_INSTALLDIRS=`$am_make -s -f Makefile.test show-INSTALLDIRS`
if test "x$perl_INSTALLDIRS" = "xsite"; then
perl_library_dir="site default"
perl_INSTALL_VAR=INSTALLSITEARCH
elif test "x$perl_INSTALLDIRS" = "xvendor"; then
perl_library_dir="vendor default"
perl_INSTALL_VAR=INSTALLVENDORARCH
else
perl_library_dir="module default"
perl_INSTALL_VAR=INSTALLARCHLIB
fi
echo 'show-ARCHLIB:' >> Makefile.test
echo ' @echo $('"$perl_INSTALL_VAR"')' >> Makefile.test
perl_use_lib=`$am_make -s -f Makefile.test show-ARCHLIB`
rm -f Makefile.test
if test "x$perl_set_use_lib" = "xyes"; then
if $perlpath -e 'exit ! grep $_ eq $ARGV@<:@0@:>@, grep /^\//, @INC' "$perl_use_lib"; then
perl_library_dir="other path in @INC"
perl_set_use_lib=no
else
perl_library_dir="prepends to @INC with /set perl_use_lib"
PERL_USE_LIB="$perl_use_lib"
fi
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_LINK_FLAGS)
AC_SUBST(PERL_LINK_LIBS)
AC_SUBST(PERL_FE_LINK_LIBS)
AC_SUBST(PERL_LDFLAGS)
AC_SUBST(PERL_CFLAGS)
AC_SUBST(PERL_USE_LIB)
AC_SUBST(PERL_MM_OPT)
AC_SUBST(PERL_MM_PARAMS)
AC_SUBST(PERL_STATIC_LIBS)
fi
fi
dnl **
dnl ** check for capsicum
dnl **
if test "x$want_capsicum" = "xyes"; then
AC_CHECK_LIB(c, cap_enter, [
AC_CHECK_LIB(nv, nvlist_create, [
AC_DEFINE(HAVE_CAPSICUM,, Build with Capsicum support)
LIBS="$LIBS -lnv"
], [
want_capsicum="no, nvlist_create not found"
])
], [
want_capsicum="no, cap_enter not found"
])
fi
dnl **
dnl ** OTR checks
dnl **
have_otr=no
if test "x$want_otr" != "xno"; then
AM_PATH_LIBGCRYPT(1:1.2.0, [], [AC_ERROR(libgcrypt 1.2.0 or newer is required.)])
AM_PATH_LIBOTR(4.1.0, [], [AC_ERROR([libotr 4.1.0 or newer is required.])])
OTR_CFLAGS="$LIBOTR_CFLAGS $LIBGCRYPT_CFLAGS"
OTR_LDFLAGS="$LIBOTR_LIBS $LIBGCRYPT_LIBS"
AC_SUBST(otr_module_lib)
AC_SUBST(otr_static_lib)
if test "x$want_otr" != "xno"; then
if test "x$want_otr" = "xstatic"; then
otr_module_lib=
otr_static_lib=libotr_core_static.la
OTR_LINK_LIBS="../otr/libotr_core_static.la"
OTR_LINK_FLAGS="$OTR_LDFLAGS"
AC_DEFINE(HAVE_STATIC_OTR)
else
otr_module_lib=libotr_core.la
otr_static_lib=
fi
fi
AC_SUBST(otr_module_lib)
AC_SUBST(otr_static_lib)
AC_SUBST(OTR_CFLAGS)
AC_SUBST(OTR_LDFLAGS)
AC_SUBST(OTR_LINK_LIBS)
AC_SUBST(OTR_LINK_FLAGS)
have_otr=yes
fi
dnl ** check what we want to build
AM_CONDITIONAL(BUILD_TEXTUI, test "$want_textui" = "yes")
AM_CONDITIONAL(BUILD_IRSSIBOT, test "$want_irssibot" = "yes")
AM_CONDITIONAL(BUILD_IRSSIFUZZER, test "$want_irssifuzzer" = "yes")
AM_CONDITIONAL(BUILD_IRSSIPROXY, test "$want_irssiproxy" = "yes")
AM_CONDITIONAL(HAVE_PERL, test "$want_perl" != "no")
AM_CONDITIONAL(HAVE_CAPSICUM, test "x$want_capsicum" = "xyes")
AM_CONDITIONAL(USE_GREGEX, test "x$want_gregex" = "xyes")
AM_CONDITIONAL(HAVE_OTR, test "x$have_otr" != "xno")
# 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 **
dnl ** Keep all the libraries here so each frontend doesn't need to
dnl ** keep track of them all
dnl **
dnl ** (these could be made configurable)
CHAT_MODULES="irc"
irc_MODULES="dcc flood notifylist"
if test -n "$build_modules"; then
irc_MODULES="$irc_MODULES $build_modules"
fi
dnl ****************************************
AC_SUBST(CHAT_MODULES)
AC_SUBST(irc_MODULES)
CORE_LIBS="../core/libcore.a ../lib-config/libirssi_config.a"
FE_COMMON_LIBS=""
CHAT_LIBS=""
for c in $CHAT_MODULES; do
CHAT_LIBS="$CHAT_LIBS ../$c/lib$c.a ../$c/core/lib${c}_core.a"
if test -f $srcdir/src/fe-common/$c/module.h; then
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/lib${c}_$s.a"
if test -f $srcdir/src/fe-common/$c/$s/module.h; then
FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/$c/$s/libfe_${c}_$s.a "
fi
done
done
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"
COMMON_LIBS="$FE_COMMON_LIBS $COMMON_NOUI_LIBS"
AC_SUBST(COMMON_NOUI_LIBS)
AC_SUBST(COMMON_LIBS)
if test "x$want_truecolor" = "xyes"; then
AC_DEFINE([TERM_TRUECOLOR], [], [true color support in terminal])
else
want_truecolor=no
fi
if test "x$want_gregex" = "xyes"; then
AC_DEFINE([USE_GREGEX], [], [use GRegex for regular expressions])
else
want_gregex=no
fi
AC_DEFINE([FHS_PREFIX], [""], [Alternate filesystem prefix for Termux])
AH_TEMPLATE(HAVE_GMODULE)
AH_TEMPLATE(HAVE_SOCKS_H, [misc..])
AH_TEMPLATE(HAVE_STATIC_PERL)
AH_TEMPLATE(HAVE_STATIC_OTR)
AH_TEMPLATE(PRIuUOFF_T, [printf()-format for uoff_t, eg. "u" or "lu" or "llu"])
AH_TEMPLATE(UOFF_T_INT, [What type should be used for uoff_t])
AH_TEMPLATE(UOFF_T_LONG)
AH_TEMPLATE(UOFF_T_LONG_LONG)
AC_CONFIG_FILES([
Makefile
src/Makefile
src/core/Makefile
src/irc/Makefile
src/irc/core/Makefile
src/irc/dcc/Makefile
src/irc/notifylist/Makefile
src/irc/proxy/Makefile
src/irc/flood/Makefile
src/fe-common/Makefile
src/fe-common/core/Makefile
src/fe-common/irc/Makefile
src/fe-common/irc/dcc/Makefile
src/fe-common/irc/notifylist/Makefile
src/fe-fuzz/Makefile
src/fe-fuzz/irc/Makefile
src/fe-fuzz/irc/core/Makefile
src/fe-fuzz/fe-common/Makefile
src/fe-fuzz/fe-common/core/Makefile
src/fe-none/Makefile
src/fe-text/Makefile
src/lib-config/Makefile
src/perl/Makefile
src/perl/common/Makefile.PL
src/perl/irc/Makefile.PL
src/perl/ui/Makefile.PL
src/perl/textui/Makefile.PL
src/otr/Makefile
scripts/Makefile
scripts/examples/Makefile
tests/Makefile
tests/fe-common/Makefile
tests/fe-common/core/Makefile
tests/fe-text/Makefile
tests/irc/Makefile
tests/irc/core/Makefile
tests/irc/flood/Makefile
docs/Makefile
docs/help/Makefile
docs/help/in/Makefile
utils/Makefile
themes/Makefile
irssi-1.pc
])
dnl ** make the paths like include headers later
AC_CONFIG_LINKS([irssi/irssi-config.h:irssi-config.h])
AC_LINK_FILES([$srcdir/src],[irssi/src])
AC_OUTPUT
$LN_S ../irssi-version.h irssi/irssi-version.h
dnl ** for building from objdir
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$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/*.h $i/*.pm $i/*.xs`
done
for file in $whole_dir/src/perl/module.h $subdirfiles; do
link=`echo $file|$sedpath "s?$whole_dir/??"`
rm -f $link
$LN_S $file $link
done
fi
fi
echo
echo "Building text frontend ........... : $want_textui"
echo "Building irssi bot ............... : $want_irssibot"
echo "Building irssi proxy ............. : $want_irssiproxy"
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" = "xmodule"; then
echo "Building with Perl support ....... : module"
else
if test -z "$perl_check_error"; then
echo "Building with Perl support ....... : no"
else
echo "Building with Perl support ....... : NO!"
echo " - $perl_check_error"
if test -f /etc/debian_version; then
echo " - Try: sudo apt-get install libperl-dev"
elif test -f /etc/redhat-release; then
echo " - Try installing perl-devel"
fi
fi
fi
if test "x$want_perl" != "xno" -a "x$perl_mod_error" != "x"; then
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: sudo apt-get install libperl-dev"
fi
fi
if test "x$want_perl" != "xno"; then
echo "Perl library directory ........... : ($perl_library_dir - $perl_use_lib)"
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 "Building with 64bit DCC support .. : $offt_64bit"
echo "Building with true color support.. : $want_truecolor"
echo "Building with GRegex ............. : $want_gregex"
echo "Building with Capsicum ........... : $want_capsicum"
echo "Building with utf8proc ........... : $want_utf8proc"
if test "x$want_otr" = "xstatic"; then
echo "Building with OTR support ........ : static (in irssi binary)"
elif test "x$want_otr" = "xmodule"; then
echo "Building with OTR support ........ : module"
else
echo "Building with OTR support ........ : no"
fi
echo
echo "If there are any problems, read the INSTALL file."

View File

@ -1,21 +0,0 @@
man_MANS = \
irssi.1
doc_DATA = \
capsicum.txt \
design.html \
design.txt \
formats.txt \
manual.txt \
faq.html \
faq.txt \
perl.txt \
signals.txt \
special_vars.txt \
startup-HOWTO.html \
startup-HOWTO.txt
EXTRA_DIST = $(doc_DATA) $(man_MANS) \
meson.build
SUBDIRS = help

View File

@ -1,13 +0,0 @@
# Makefile.am is autogenerated by autogen.sh from Makefile.am.gen
helpdir = $(datadir)/irssi/help
help_DATA = \
@HELPFILES@
EXTRA_DIST = \
Makefile.am.gen \
$(help_DATA) \
meson.build
SUBDIRS = in

View File

@ -1,5 +0,0 @@
# Makefile.am is autogenerated by autogen.sh from Makefile.am.gen
EXTRA_DIST = \
Makefile.am.gen \
@HELPFILES@

View File

@ -1,20 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
prog_libs="@PROG_LIBS@"
common_libs="@COMMON_LIBS@"
perl_link_libs="@PERL_LINK_LIBS@"
perl_fe_link_libs="@PERL_FE_LINK_LIBS@"
perl_link_flags="@PERL_LINK_FLAGS@"
chat_modules="@CHAT_MODULES@"
irc_modules="@irc_MODULES@"
Name: Irssi
Description: Irssi chat client
Version: @PACKAGE_VERSION@
Cflags: -I${includedir} @OPENSSL_CFLAGS@
Requires: glib-2.0

View File

@ -1,208 +0,0 @@
# Configure paths for GLIB
# Owen Taylor 1997-2001
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
dnl gthread is specified in MODULES, pass to pkg-config
dnl
AC_DEFUN([AM_PATH_GLIB_2_0],
[dnl
dnl Get the cflags and libraries from pkg-config
dnl
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
pkg_config_args=glib-2.0
for module in . $4
do
case "$module" in
gmodule)
pkg_config_args="$pkg_config_args gmodule-2.0"
;;
gmodule-no-export)
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
;;
gobject)
pkg_config_args="$pkg_config_args gobject-2.0"
;;
gthread)
pkg_config_args="$pkg_config_args gthread-2.0"
;;
esac
done
PKG_PROG_PKG_CONFIG([0.7])
no_glib=""
if test "x$PKG_CONFIG" = x ; then
no_glib=yes
PKG_CONFIG=no
fi
min_glib_version=ifelse([$1], ,2.0.0,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
if test "x$PKG_CONFIG" != xno ; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
enable_glibtest=no
fi
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
:
else
no_glib=yes
fi
fi
if test x"$no_glib" = x ; then
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of pkg-config to some extent)
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If pkg-config was correct, then it is best\n");
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
printf("*** to point to the correct configuration files\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$PKG_CONFIG" = "no" ; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occurred. This usually means GLIB is incorrectly installed."])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
GLIB_GENMARSHAL=""
GOBJECT_QUERY=""
GLIB_MKENUMS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_GENMARSHAL)
AC_SUBST(GOBJECT_QUERY)
AC_SUBST(GLIB_MKENUMS)
rm -f conf.glibtest
])

View File

@ -1,28 +0,0 @@
dnl GLIB_TESTS
dnl
AC_DEFUN([GLIB_TESTS],
[
AC_ARG_ENABLE(installed-tests,
AS_HELP_STRING([--enable-installed-tests],
[Enable installation of some test cases]),
[case ${enableval} in
yes) ENABLE_INSTALLED_TESTS="1" ;;
no) ENABLE_INSTALLED_TESTS="" ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
esac])
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
AC_ARG_ENABLE(always-build-tests,
AS_HELP_STRING([--enable-always-build-tests],
[Enable always building tests during 'make all']),
[case ${enableval} in
yes) ENABLE_ALWAYS_BUILD_TESTS="1" ;;
no) ENABLE_ALWAYS_BUILD_TESTS="" ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
esac])
AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
if test "$ENABLE_INSTALLED_TESTS" = "1"; then
AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
fi
])

View File

@ -1,143 +0,0 @@
# libgcrypt.m4 - Autoconf macros to detect libgcrypt
# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Last-changed: 2014-10-02
dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
dnl with the API version to also check the API compatibility. Example:
dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
dnl this features allows to prevent build against newer versions of libgcrypt
dnl with a changed API.
dnl
dnl If a prefix option is not used, the config script is first
dnl searched in $SYSROOT/bin and then along $PATH. If the used
dnl config script does not match the host specification the script
dnl is added to the gpg_config_script_warn variable.
dnl
AC_DEFUN([AM_PATH_LIBGCRYPT],
[ AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_WITH(libgcrypt-prefix,
AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
[prefix where LIBGCRYPT is installed (optional)]),
libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
if test x"${LIBGCRYPT_CONFIG}" = x ; then
if test x"${libgcrypt_config_prefix}" != x ; then
LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
else
case "${SYSROOT}" in
/*)
if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
fi
;;
'')
;;
*)
AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
;;
esac
fi
fi
AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
tmp=ifelse([$1], ,1:1.2.0,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
else
req_libgcrypt_api=0
min_libgcrypt_version="$tmp"
fi
AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
ok=no
if test "$LIBGCRYPT_CONFIG" != "no" ; then
req_major=`echo $min_libgcrypt_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
req_minor=`echo $min_libgcrypt_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
req_micro=`echo $min_libgcrypt_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
major=`echo $libgcrypt_config_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
minor=`echo $libgcrypt_config_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
micro=`echo $libgcrypt_config_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
if test "$major" -gt "$req_major"; then
ok=yes
else
if test "$major" -eq "$req_major"; then
if test "$minor" -gt "$req_minor"; then
ok=yes
else
if test "$minor" -eq "$req_minor"; then
if test "$micro" -ge "$req_micro"; then
ok=yes
fi
fi
fi
fi
fi
fi
if test $ok = yes; then
AC_MSG_RESULT([yes ($libgcrypt_config_version)])
else
AC_MSG_RESULT(no)
fi
if test $ok = yes; then
# If we have a recent libgcrypt, we should also check that the
# API is compatible
if test "$req_libgcrypt_api" -gt 0 ; then
tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBGCRYPT API version])
if test "$req_libgcrypt_api" -eq "$tmp" ; then
AC_MSG_RESULT([okay])
else
ok=no
AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
fi
fi
fi
fi
if test $ok = yes; then
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
ifelse([$2], , :, [$2])
libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
if test x"$libgcrypt_config_host" != xnone ; then
if test x"$libgcrypt_config_host" != x"$host" ; then
AC_MSG_WARN([[
***
*** The config script $LIBGCRYPT_CONFIG was
*** built for $libgcrypt_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-libgcrypt-prefix
*** to specify a matching config script or use \$SYSROOT.
***]])
gpg_config_script_warn="$gpg_config_script_warn libgcrypt"
fi
fi
else
LIBGCRYPT_CFLAGS=""
LIBGCRYPT_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBGCRYPT_CFLAGS)
AC_SUBST(LIBGCRYPT_LIBS)
])

View File

@ -1,134 +0,0 @@
dnl
dnl Off-the-Record Messaging library
dnl Copyright (C) 2004-2007 Ian Goldberg, Chris Alexander, Nikita Borisov
dnl <otr@cypherpunks.ca>
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of version 2.1 of the GNU Lesser General
dnl Public License as published by the Free Software Foundation.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
dnl
dnl AM_PATH_LIBOTR([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for libotr, and define LIBOTR_CFLAGS and LIBOTR_LIBS as appropriate.
dnl enables arguments --with-libotr-prefix=
dnl --with-libotr-inc-prefix=
dnl
dnl You must already have found libgcrypt with AM_PATH_LIBGCRYPT
dnl
dnl Adapted from alsa.m4, originally by
dnl Richard Boulton <richard-alsa@tartarus.org>
dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
dnl Jaroslav Kysela <perex@suse.cz>
AC_DEFUN([AM_PATH_LIBOTR],
[dnl Save the original CFLAGS, LDFLAGS, and LIBS
libotr_save_CFLAGS="$CFLAGS"
libotr_save_LDFLAGS="$LDFLAGS"
libotr_save_LIBS="$LIBS"
libotr_found=yes
dnl
dnl Get the cflags and libraries for libotr
dnl
AC_ARG_WITH(libotr-prefix,
[ --with-libotr-prefix=PFX Prefix where libotr is installed(optional)],
[libotr_prefix="$withval"], [libotr_prefix=""])
AC_ARG_WITH(libotr-inc-prefix,
[ --with-libotr-inc-prefix=PFX Prefix where libotr includes are (optional)],
[libotr_inc_prefix="$withval"], [libotr_inc_prefix=""])
dnl Add any special include directories
AC_MSG_CHECKING(for libotr CFLAGS)
if test "$libotr_inc_prefix" != "" ; then
LIBOTR_CFLAGS="$LIBOTR_CFLAGS -I$libotr_inc_prefix"
CFLAGS="$CFLAGS $LIBOTR_CFLAGS"
fi
AC_MSG_RESULT($LIBOTR_CFLAGS)
dnl add any special lib dirs
AC_MSG_CHECKING(for libotr LIBS)
if test "$libotr_prefix" != "" ; then
LIBOTR_LIBS="$LIBOTR_LIBS -L$libotr_prefix"
LDFLAGS="$LDFLAGS $LIBOTR_LIBS"
fi
dnl add the libotr library
LIBOTR_LIBS="$LIBOTR_LIBS -lotr"
LIBS="$LIBOTR_LIBS $LIBS"
AC_MSG_RESULT($LIBOTR_LIBS)
dnl Check for a working version of libotr that is of the right version.
min_libotr_version=ifelse([$1], ,3.0.0,$1)
no_libotr=""
libotr_min_major_version=`echo $min_libotr_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
libotr_min_minor_version=`echo $min_libotr_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
libotr_min_sub_version=`echo $min_libotr_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
AC_MSG_CHECKING(for libotr headers version $libotr_min_major_version.x >= $min_libotr_version)
AC_LANG_SAVE
AC_LANG_C
AC_TRY_COMPILE([
#include <stdlib.h>
#include <libotr/version.h>
], [
# if(OTRL_VERSION_MAJOR != $libotr_min_major_version)
# error not present
# else
# if(OTRL_VERSION_MINOR > $libotr_min_minor_version)
exit(0);
# else
# if(OTRL_VERSION_MINOR < $libotr_min_minor_version)
# error not present
# endif
# if(OTRL_VERSION_SUB < $libotr_min_sub_version)
# error not present
# endif
# endif
# endif
exit(0);
],
[AC_MSG_RESULT(found.)],
[AC_MSG_RESULT(not present.)
ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libotr not found.)])
libotr_found=no]
)
AC_LANG_RESTORE
dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
AC_CHECK_LIB([otr], [otrl_message_receiving],,
[ifelse([$3], , [AC_MSG_ERROR(No linkable libotr was found.)])
libotr_found=no],
$LIBGCRYPT_LIBS
)
LDFLAGS="$libotr_save_LDFLAGS"
LIBS="$libotr_save_LIBS"
if test "x$libotr_found" = "xyes" ; then
ifelse([$2], , :, [$2])
else
LIBOTR_CFLAGS=""
LIBOTR_LIBS=""
ifelse([$3], , :, [$3])
fi
dnl That should be it. Now just export our symbols:
AC_SUBST(LIBOTR_CFLAGS)
AC_SUBST(LIBOTR_LIBS)
])

275
m4/pkg.m4
View File

@ -1,275 +0,0 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR

View File

@ -1,18 +0,0 @@
SUBDIRS = examples
scriptdir = $(datadir)/irssi/scripts
script_DATA = \
autoop.pl \
autorejoin.pl \
buf.pl \
dns.pl \
kills.pl \
mail.pl \
mlock.pl \
quitmsg.pl \
scriptassist.pl \
usercount.pl
EXTRA_DIST = $(script_DATA) \
meson.build

View File

@ -1,8 +0,0 @@
scriptdir = $(datadir)/irssi/scripts
script_DATA = \
command.pl \
msg-event.pl \
redirect.pl
EXTRA_DIST = $(script_DATA)

View File

@ -1,27 +0,0 @@
if BUILD_TEXTUI
TEXTUI=fe-text
endif
if BUILD_IRSSIBOT
BOTUI=fe-none
endif
if BUILD_IRSSIFUZZER
FUZZERUI=fe-fuzz
endif
if HAVE_PERL
PERLDIR=perl
endif
if HAVE_OTR
OTRDIR=otr
endif
pkginc_srcdir=$(pkgincludedir)/src
pkginc_src_HEADERS = \
common.h
SUBDIRS = lib-config core irc fe-common $(PERLDIR) $(OTRDIR) $(TEXTUI) $(BOTUI) $(FUZZERUI)
EXTRA_DIST = meson.build

View File

@ -1,122 +0,0 @@
noinst_LIBRARIES = libcore.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS) \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DMODULEDIR=\""$(libdir)/irssi/modules"\"
if USE_GREGEX
regex_impl=iregex-gregex.c
else
regex_impl=iregex-regexh.c
endif
libcore_a_SOURCES = \
args.c \
channels.c \
channels-setup.c \
commands.c \
chat-commands.c \
chat-protocols.c \
chatnets.c \
core.c \
expandos.c \
ignore.c \
levels.c \
line-split.c \
log.c \
log-away.c \
masks.c \
misc.c \
modules.c \
modules-load.c \
net-disconnect.c \
net-nonblock.c \
net-sendbuffer.c \
network.c \
network-openssl.c \
nicklist.c \
nickmatch-cache.c \
pidwait.c \
queries.c \
rawlog.c \
recode.c \
refstrings.c \
servers.c \
servers-reconnect.c \
servers-setup.c \
session.c \
settings.c \
signals.c \
special-vars.c \
utf8.c \
$(regex_impl) \
wcwidth.c \
wcwidth-wrapper.c \
tls.c \
write-buffer.c
if HAVE_CAPSICUM
libcore_a_SOURCES += \
capsicum.c
endif
structure_headers = \
channel-rec.h \
channel-setup-rec.h \
chatnet-rec.h \
query-rec.h \
server-rec.h \
server-setup-rec.h \
server-connect-rec.h \
window-item-rec.h
pkginc_coredir=$(pkgincludedir)/src/core
pkginc_core_HEADERS = \
args.h \
capsicum.h \
channels.h \
channels-setup.h \
commands.h \
chat-protocols.h \
chatnets.h \
core.h \
expandos.h \
ignore.h \
levels.h \
line-split.h \
log.h \
masks.h \
misc.h \
module.h \
modules.h \
modules-load.h \
net-disconnect.h \
net-nonblock.h \
net-sendbuffer.h \
network.h \
network-openssl.h \
nick-rec.h \
nicklist.h \
nickmatch-cache.h \
pidwait.h \
queries.h \
rawlog.h \
recode.h \
refstrings.h \
servers.h \
servers-reconnect.h \
servers-setup.h \
session.h \
settings.h \
signals.h \
special-vars.h \
utf8.h \
iregex.h \
window-item-def.h \
tls.h \
write-buffer.h \
$(structure_headers)
EXTRA_DIST = meson.build

View File

@ -1,3 +0,0 @@
SUBDIRS = core irc
EXTRA_DIST = meson.build

View File

@ -1,73 +0,0 @@
noinst_LIBRARIES = libfe_common_core.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS) \
-DHELPDIR=\""$(datadir)/irssi/help"\" \
-DTHEMESDIR=\""$(datadir)/irssi/themes"\"
libfe_common_core_a_SOURCES = \
chat-completion.c \
command-history.c \
completion.c \
fe-channels.c \
fe-common-core.c \
fe-core-commands.c \
fe-exec.c \
fe-expandos.c \
fe-help.c \
fe-ignore.c \
fe-ignore-messages.c \
fe-log.c \
fe-messages.c \
fe-modules.c \
fe-queries.c \
fe-server.c \
fe-settings.c \
fe-tls.c \
formats.c \
hilight-text.c \
keyboard.c \
module-formats.c \
printtext.c \
fe-recode.c \
themes.c \
window-activity.c \
window-commands.c \
window-items.c \
windows-layout.c \
fe-windows.c
if HAVE_CAPSICUM
libfe_common_core_a_SOURCES += \
fe-capsicum.c
endif
pkginc_fe_common_coredir=$(pkgincludedir)/src/fe-common/core
pkginc_fe_common_core_HEADERS = \
command-history.h \
chat-completion.h \
completion.h \
fe-capsicum.h \
fe-channels.h \
fe-common-core.h \
fe-core-commands.h \
fe-exec.h \
fe-messages.h \
fe-queries.h \
fe-settings.h \
fe-tls.h \
formats.h \
hilight-text.h \
keyboard.h \
module-formats.h \
module.h \
printtext.h \
fe-recode.h \
themes.h \
window-activity.h \
window-items.h \
windows-layout.h \
fe-windows.h
EXTRA_DIST = meson.build

View File

@ -1,42 +0,0 @@
SUBDIRS = dcc notifylist
noinst_LIBRARIES = libfe_common_irc.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS) \
-DHELPDIR=\""$(datadir)/irssi/help"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\"
real_sources = \
fe-irc-channels.c \
fe-irc-commands.c \
fe-irc-messages.c \
fe-irc-queries.c \
fe-irc-server.c \
fe-ircnet.c \
fe-ctcp.c \
fe-events.c \
fe-events-numeric.c \
fe-modes.c \
fe-netjoin.c \
fe-netsplit.c \
fe-common-irc.c \
fe-whois.c \
fe-sasl.c \
fe-cap.c \
irc-completion.c \
module-formats.c
libfe_common_irc_a_SOURCES = \
$(real_sources) \
irc-modules.c
pkginc_fe_common_ircdir=$(pkgincludedir)/src/fe-common/irc
pkginc_fe_common_irc_HEADERS = \
fe-irc-server.h \
fe-irc-channels.h \
module.h \
module-formats.h
EXTRA_DIST = meson.build

View File

@ -1,24 +0,0 @@
noinst_LIBRARIES = libfe_irc_dcc.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS) \
-DHELPDIR=\""$(datadir)/irssi/help"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\"
libfe_irc_dcc_a_SOURCES = \
fe-dcc.c \
fe-dcc-chat.c \
fe-dcc-chat-messages.c \
fe-dcc-get.c \
fe-dcc-send.c \
module-formats.c \
fe-dcc-server.c
pkginc_fe_common_irc_dccdir=$(pkgincludedir)/src/fe-common/irc/dcc
pkginc_fe_common_irc_dcc_HEADERS = \
module.h \
module-formats.h \
fe-dcc.h
EXTRA_DIST = meson.build

View File

@ -1,18 +0,0 @@
noinst_LIBRARIES = libfe_irc_notifylist.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS) \
-DHELPDIR=\""$(datadir)/irssi/help"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\"
libfe_irc_notifylist_a_SOURCES = \
fe-notifylist.c \
module-formats.c
pkginc_fe_common_irc_notifylistdir=$(pkgincludedir)/src/fe-common/irc/notifylist
pkginc_fe_common_irc_notifylist_HEADERS = \
module.h \
module-formats.h
EXTRA_DIST = meson.build

View File

@ -1,40 +0,0 @@
SUBDIRS = irc fe-common
bin_PROGRAMS = irssi-fuzz server-fuzz
# Force link with CXX for libfuzzer support
CCLD=$(CXX) $(CXXFLAGS)
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
irssi_fuzz_DEPENDENCIES = @COMMON_LIBS@
irssi_fuzz_LDADD = \
@COMMON_LIBS@ \
@PROG_LIBS@ \
$(FUZZER_LIBS)
irssi_fuzz_SOURCES = \
irssi.c \
null-logger.c \
../fe-text/module-formats.c
server_fuzz_DEPENDENCIES = @COMMON_LIBS@
server_fuzz_LDADD = \
@COMMON_LIBS@ \
@PROG_LIBS@ \
$(FUZZER_LIBS)
server_fuzz_SOURCES = \
server.c \
null-logger.c \
../fe-text/module-formats.c
noinst_HEADERS = \
null-logger.h \
../fe-text/module-formats.h
EXTRA_DIST = meson.build

View File

@ -1,3 +0,0 @@
SUBDIRS = core
EXTRA_DIST = meson.build

View File

@ -1,33 +0,0 @@
bin_PROGRAMS = theme-load-fuzz
# Force link with CXX for libfuzzer support
CCLD=$(CXX) $(CXXFLAGS)
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
LDADD = \
../../../irc/libirc.a \
../../../irc/core/libirc_core.a \
../../../irc/dcc/libirc_dcc.a \
../../../irc/flood/libirc_flood.a \
../../../irc/notifylist/libirc_notifylist.a \
../../../fe-common/core/libfe_common_core.a \
../../../fe-common/irc/libfe_common_irc.a \
../../../fe-common/irc/dcc/libfe_irc_dcc.a \
../../../fe-common/irc/notifylist/libfe_irc_notifylist.a \
../../../core/libcore.a \
../../../lib-config/libirssi_config.a \
@PROG_LIBS@ \
$(FUZZER_LIBS)
theme_load_fuzz_SOURCES = \
../../null-logger.c \
theme-load.c \
$(top_srcdir)/src/fe-text/module-formats.c
noinst_HEADERS = \
$(top_srcdir)/src/fe-text/module-formats.h
EXTRA_DIST = meson.build

View File

@ -1,3 +0,0 @@
SUBDIRS = core
EXTRA_DIST = meson.build

View File

@ -1,33 +0,0 @@
bin_PROGRAMS = event-get-params-fuzz
# Force link with CXX for libfuzzer support
CCLD=$(CXX) $(CXXFLAGS)
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
LDADD = \
../../../irc/libirc.a \
../../../irc/core/libirc_core.a \
../../../irc/dcc/libirc_dcc.a \
../../../irc/flood/libirc_flood.a \
../../../irc/notifylist/libirc_notifylist.a \
../../../fe-common/core/libfe_common_core.a \
../../../fe-common/irc/libfe_common_irc.a \
../../../fe-common/irc/dcc/libfe_irc_dcc.a \
../../../fe-common/irc/notifylist/libfe_irc_notifylist.a \
../../../core/libcore.a \
../../../lib-config/libirssi_config.a \
@PROG_LIBS@ \
$(FUZZER_LIBS)
event_get_params_fuzz_SOURCES = \
../../null-logger.c \
event-get-params.c \
$(top_srcdir)/src/fe-text/module-formats.c
noinst_HEADERS = \
$(top_srcdir)/src/fe-text/module-formats.h
EXTRA_DIST = meson.build

View File

@ -1,21 +0,0 @@
bin_PROGRAMS = botti
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
botti_DEPENDENCIES = @COMMON_NOUI_LIBS@
botti_LDADD = \
@COMMON_NOUI_LIBS@ \
@PERL_LINK_LIBS@ \
@PERL_LINK_FLAGS@ \
@PROG_LIBS@
botti_SOURCES = \
irssi.c
noinst_HEADERS = \
module.h
EXTRA_DIST = meson.build

View File

@ -1,75 +0,0 @@
bin_PROGRAMS = irssi
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
irssi_DEPENDENCIES = \
@COMMON_LIBS@ \
@PERL_LINK_LIBS@ \
@PERL_FE_LINK_LIBS@ \
@OTR_LINK_LIBS@
irssi_LDFLAGS = -export-dynamic
irssi_LDADD = \
@COMMON_LIBS@ \
@PERL_LINK_LIBS@ \
@PERL_FE_LINK_LIBS@ \
@OTR_LINK_LIBS@ \
@OTR_LINK_FLAGS@ \
@PERL_LINK_FLAGS@ \
@PROG_LIBS@ \
@TEXTUI_LIBS@
terminfo_sources = \
term-terminfo.c \
terminfo-core.c
use_term_sources = $(terminfo_sources)
irssi_SOURCES = \
gui-entry.c \
gui-expandos.c \
gui-printtext.c \
gui-readline.c \
gui-windows.c \
lastlog.c \
mainwindows.c \
mainwindow-activity.c \
mainwindows-layout.c \
statusbar.c \
statusbar-config.c \
statusbar-items.c \
term.c \
$(use_term_sources) \
textbuffer.c \
textbuffer-commands.c \
textbuffer-view.c \
textbuffer-formats.c \
irssi.c \
module-formats.c
pkginc_fe_textdir=$(pkgincludedir)/src/fe-text
pkginc_fe_text_HEADERS = \
gui-printtext.h \
gui-windows.h \
mainwindows.h \
statusbar.h \
statusbar-item.h \
term.h \
textbuffer.h \
textbuffer-view.h \
textbuffer-formats.h
noinst_HEADERS = \
gui-entry.h \
gui-readline.h \
statusbar-config.h \
terminfo-core.h \
module.h \
module-formats.h
EXTRA_DIST = \
$(terminfo_sources) \
meson.build

View File

@ -1,11 +0,0 @@
if BUILD_IRSSIPROXY
PROXY=proxy
endif
SUBDIRS = core dcc flood notifylist $(PROXY)
noinst_LIBRARIES = libirc.a
libirc_a_SOURCES = irc.c
EXTRA_DIST = meson.build

View File

@ -1,62 +0,0 @@
noinst_LIBRARIES = libirc_core.a
AM_CPPFLAGS = \
-I$(top_builddir) \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
$(GLIB_CFLAGS)
libirc_core_a_SOURCES = \
bans.c \
ctcp.c \
channels-query.c \
channel-events.c \
channel-rejoin.c \
irc.c \
irc-core.c \
irc-channels.c \
irc-channels-setup.c \
irc-chatnets.c \
irc-commands.c \
irc-expandos.c \
irc-masks.c \
irc-nicklist.c \
irc-queries.c \
irc-servers.c \
irc-servers-reconnect.c \
irc-servers-setup.c \
irc-session.c \
irc-cap.c \
sasl.c \
lag.c \
massjoin.c \
modes.c \
mode-lists.c \
netsplit.c \
servers-idle.c \
servers-redirect.c
pkginc_irc_coredir=$(pkgincludedir)/src/irc/core
pkginc_irc_core_HEADERS = \
bans.h \
ctcp.h \
channel-events.h \
channel-rejoin.h \
irc.h \
irc-channels.h \
irc-chatnets.h \
irc-commands.h \
irc-masks.h \
irc-nicklist.h \
irc-queries.h \
irc-servers.h \
irc-servers-setup.h \
irc-cap.h \
sasl.h \
modes.h \
mode-lists.h \
module.h \
netsplit.h \
servers-idle.h \
servers-redirect.h
EXTRA_DIST = meson.build

View File

@ -1,30 +0,0 @@
noinst_LIBRARIES = libirc_dcc.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
libirc_dcc_a_SOURCES = \
dcc.c \
dcc-chat.c \
dcc-get.c \
dcc-send.c \
dcc-resume.c \
dcc-autoget.c \
dcc-queue.c \
dcc-server.c
pkginc_irc_dccdir=$(pkgincludedir)/src/irc/dcc
pkginc_irc_dcc_HEADERS = \
dcc-rec.h \
dcc-file-rec.h \
dcc.h \
dcc-file.h \
dcc-chat.h \
dcc-get.h \
dcc-send.h \
dcc-queue.h \
module.h \
dcc-server.h
EXTRA_DIST = meson.build

View File

@ -1,15 +0,0 @@
noinst_LIBRARIES = libirc_flood.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
libirc_flood_a_SOURCES = \
autoignore.c \
flood.c
pkginc_irc_flooddir=$(pkgincludedir)/src/irc/flood
pkginc_irc_flood_HEADERS = \
module.h
EXTRA_DIST = meson.build

View File

@ -1,20 +0,0 @@
noinst_LIBRARIES = libirc_notifylist.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
libirc_notifylist_a_SOURCES = \
notifylist.c \
notify-commands.c \
notify-ison.c \
notify-setup.c \
notify-whois.c
pkginc_irc_notifylistdir=$(pkgincludedir)/src/irc/notifylist
pkginc_irc_notifylist_HEADERS = \
notifylist.h \
notify-setup.h \
module.h
EXTRA_DIST = meson.build

View File

@ -1,28 +0,0 @@
moduledir = $(libdir)/irssi/modules
module_LTLIBRARIES = libirc_proxy.la
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
libirc_proxy.a:
rm -f libirc_proxy.a
$(LN_S) .libs/libirc_proxy.a libirc_proxy.a
libirc_proxy_la_LDFLAGS = -module -avoid-version
libirc_proxy_la_DEPENDENCIES = libirc_proxy.a
libirc_proxy_la_SOURCES = \
proxy.c \
dump.c \
listen.c
noinst_HEADERS = \
module.h \
proxy.h
clean-generic:
rm -f libirc_proxy.a
EXTRA_DIST = meson.build

View File

@ -1,18 +0,0 @@
noinst_LIBRARIES = libirssi_config.a
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
libirssi_config_a_SOURCES = \
get.c \
set.c \
parse.c \
write.c
pkginc_lib_configdir=$(pkgincludedir)/src/lib-config
pkginc_lib_config_HEADERS = \
iconfig.h \
module.h
EXTRA_DIST = meson.build

View File

@ -1,40 +0,0 @@
moduledir = $(libdir)/irssi/modules
module_LTLIBRARIES = $(otr_module_lib)
noinst_LTLIBRARIES = $(otr_static_lib)
EXTRA_LTLIBRARIES = \
libotr_core.la \
libotr_core_static.la
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS) \
$(OTR_CFLAGS)
libotr_core_la_LDFLAGS = -module -avoid-version -rpath $(moduledir)
libotr_core_la_LIBADD = $(OTR_LDFLAGS)
otr_sources = \
key.c \
otr-module.c \
otr-formats.c \
otr-ops.c \
otr-fe.c \
otr.c
libotr_core_la_SOURCES = \
$(otr_sources)
libotr_core_static_la_SOURCES = \
$(otr_sources)
noinst_HEADERS = \
irssi-otr.h \
key.h \
module.h \
otr-formats.h \
otr-fe.h \
otr.h
EXTRA_DIST = meson.build

View File

@ -1,170 +0,0 @@
moduledir = $(libdir)/irssi/modules
perl_dirs = common irc ui textui
module_LTLIBRARIES = $(perl_module_lib) $(perl_module_fe_lib)
noinst_LTLIBRARIES = $(perl_static_lib) $(perl_static_fe_lib)
EXTRA_LTLIBRARIES = \
libperl_core.la libfe_perl.la \
libperl_core_static.la libfe_perl_static.la
libperl_core_la_LDFLAGS = -module -avoid-version -rpath $(moduledir)
libfe_perl_la_LDFLAGS = -module -avoid-version -rpath $(moduledir)
perl-core.lo: irssi-core.pl.h
perl-signals.lo: perl-signals-list.h
AM_CPPFLAGS = \
-I$(top_builddir) \
-I$(builddir) \
$(GLIB_CFLAGS) \
-DSCRIPTDIR=\""$(datadir)/irssi/scripts"\" \
-DPERL_USE_LIB=\""$(PERL_USE_LIB)"\" \
-DPERL_STATIC_LIBS=$(PERL_STATIC_LIBS) \
$(PERL_CFLAGS)
perl_sources = \
perl-core.c \
perl-common.c \
perl-signals.c \
perl-sources.c
perl_fe_sources = \
module-formats.c \
perl-fe.c
noinst_HEADERS = \
module.h \
module-fe.h \
module-formats.h \
perl-core.h \
perl-common.h \
perl-signals.h \
perl-sources.h
libperl_core_la_SOURCES = \
$(perl_sources)
libperl_core_static_la_SOURCES = \
$(perl_sources)
libfe_perl_la_SOURCES = \
$(perl_fe_sources)
libfe_perl_static_la_SOURCES = \
$(perl_fe_sources)
perl-signals-list.h: $(top_srcdir)/docs/signals.txt $(srcdir)/get-signals.pl
cat $(top_srcdir)/docs/signals.txt | $(perlpath) $(srcdir)/get-signals.pl > perl-signals-list.h
irssi-core.pl.h: irssi-core.pl
$(top_srcdir)/utils/file2header.sh $(srcdir)/irssi-core.pl irssi_core_code > irssi-core.pl.h
common_sources = \
common/Irssi.xs \
common/Irssi.pm \
common/Channel.xs \
common/Core.xs \
common/Expando.xs \
common/Ignore.xs \
common/Log.xs \
common/Masks.xs \
common/Query.xs \
common/Rawlog.xs \
common/Server.xs \
common/Settings.xs \
common/Makefile.PL.in \
common/typemap \
common/module.h
irc_sources = \
irc/Irc.xs \
irc/Irc.pm \
irc/Dcc.xs \
irc/Channel.xs \
irc/Ctcp.xs \
irc/Query.xs \
irc/Server.xs \
irc/Modes.xs \
irc/Netsplit.xs \
irc/Notifylist.xs \
irc/Client.xs \
irc/Makefile.PL.in \
irc/typemap \
irc/module.h
ui_sources = \
ui/UI.xs \
ui/UI.pm \
ui/Formats.xs \
ui/Themes.xs \
ui/Window.xs \
ui/Makefile.PL.in \
ui/typemap \
ui/module.h
textui_sources = \
textui/TextUI.xs \
textui/TextUI.pm \
textui/TextBuffer.xs \
textui/TextBufferView.xs \
textui/Statusbar.xs \
textui/Makefile.PL.in \
textui/wrapper_buffer_line.h \
textui/typemap \
textui/module.h
EXTRA_DIST = \
get-signals.pl \
irssi-core.pl \
Makefile_silent.pm \
$(common_sources) \
$(irc_sources) \
$(ui_sources) \
$(textui_sources) \
meson.build \
common/meson.build \
irc/meson.build \
ui/meson.build \
textui/meson.build
am_v_pl__show_gen = $(am__v_pl__show_gen_$(V))
am_v_pl__hide_gen = $(am__v_pl__hide_gen_$(V))
am__v_pl__show_gen_ = $(am__v_pl__show_gen_$(AM_DEFAULT_VERBOSITY))
am__v_pl__hide_gen_ = $(am__v_pl__hide_gen_$(AM_DEFAULT_VERBOSITY))
am__v_pl__show_gen_0 = echo " GEN " $$dir ;
am__v_pl__hide_gen_0 = > /dev/null
am__v_pl__show_gen_1 =
am__v_pl__hide_gen_1 =
all-local:
$(AM_V_GEN)for dir in $(perl_dirs); do \
cd $$dir && \
if [ ! -f Makefile ]; then \
$(am_v_pl__show_gen)$(perlpath) Makefile.PL $(PERL_MM_PARAMS) $(am_v_pl__hide_gen); \
fi && \
($(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS) || \
$(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS)) && \
cd ..; \
done
install-exec-local:
for dir in $(perl_dirs); do \
cd $$dir && $(MAKE) install && cd ..; \
done
clean-generic:
for dir in $(perl_dirs); do \
cd $$dir; \
$(MAKE) clean; \
cd ..; \
done
distclean-generic:
for dir in $(perl_dirs); do \
cd $$dir; \
$(MAKE) realclean; rm -f Makefile.PL Makefile; \
cd ..; \
done
libperl_core_la_LIBADD = $(PERL_LDFLAGS)

View File

@ -1,76 +0,0 @@
push @ExtUtils::MakeMaker::Overridable, qw(pm_to_blib);
my $verb = $AM_DEFAULT_VERBOSITY;
{ package MY;
sub _center {
my $z = shift;
(length $z == 2 ? " $z " : length $z == 4 ? " $z " : " $z ").' '
}
sub _silent_cmd {
my $z = shift;
$z =~ s{\t(?:- ?)?\K(?=\$\((?|(CC)CMD|(XS)UBPPRUN|(LD|MV|CHMOD)|(RM)_R?F|(CP)_NONEMPTY|FULL_(AR)\)))}{\$(PL_AM_V_$1)}g;
$z
}
sub c_o { _silent_cmd(shift->SUPER::c_o(@_)) }
sub xs_c { _silent_cmd(shift->SUPER::xs_c(@_)) }
sub xs_o { _silent_cmd(shift->SUPER::xs_o(@_)) }
sub dynamic_lib { _silent_cmd(shift->SUPER::dynamic_lib(@_)) }
sub static_lib { _silent_cmd(shift->SUPER::static_lib(@_)) }
sub dynamic_bs {
my $ret = shift->SUPER::dynamic_bs(@_);
$ret =~ s{Running Mkbootstrap for}{\$(PL_AM_V_BS_Text)}g;
_silent_cmd($ret)
}
sub pm_to_blib {
my $ret = shift->SUPER::pm_to_blib(@_);
$ret =~ s{^(\t(?:- ?)?)(?:\$\(NOECHO\) ?)?(.*-e ['"]pm_to_blib(.*\\\n)*.*)$}{$1\$(PL_AM_V_BLIB)$2\$(PL_AM_V_BLIB_Hide)}mg;
$ret
}
sub post_constants {
my $ret = shift->SUPER::post_constants(@_);
my @terse = qw(cc xs ld chmod cp ar blib);
my @silent = qw(mv rm);
my @special = qw(BLIB_Hide);
#default verbosity from command line parameter
$ret .= "
AM_DEFAULT_VERBOSITY = @{[$verb ? 1 : 0]}
";
#default options forward
$ret .= "
PL_AM_V_${_} = \$(pl_am__v_${_}_\$(V))
pl_am__v_${_}_ = \$(pl_am__v_${_}_\$(AM_DEFAULT_VERBOSITY))
" for @special, map uc, @terse, @silent;
#quoted plain text needs extra quotes
$ret .= "
PL_AM_V_BS_Text = \"\$(pl_am__v_BS_Text_\$(V))\"
pl_am__v_BS_Text_ = \$(pl_am__v_BS_Text_\$(AM_DEFAULT_VERBOSITY))
"
#hide pm_to_blib output
. "
pl_am__v_BLIB_Hide_0 = \$(DEV_NULL)
pl_am__v_BLIB_Hide_1 =
"
#text for Mkbootstrap
. "
pl_am__v_BS_Text_0 = \"@{[_center('BS')]}\"
pl_am__v_BS_Text_1 = \"Running Mkbootstrap for\"
";
#"terse" output
$ret .= "
pl_am__v_${_}_0 = \$(NOECHO)echo \"@{[_center($_)]}\" \$\@;
" for map uc, @terse;
#no output
$ret .= "
pl_am__v_${_}_0 = \$(NOECHO)
" for map uc, @silent;
#in verbose mode the "terse" echo expands to nothing
$ret .= "
pl_am__v_${_}_1 =
" for map uc, @terse, @silent;
$ret
}
}
1;

View File

@ -1,7 +0,0 @@
use ExtUtils::MakeMaker;our $AM_DEFAULT_VERBOSITY='@AM_DEFAULT_VERBOSITY@';require "@top_srcdir@/src/perl/Makefile_silent.pm";
WriteMakefile('NAME' => 'Irssi',
'LIBS' => '',
'OBJECT' => '$(O_FILES)',
'INC' => '-I../../.. @GLIB_CFLAGS@',
'VERSION_FROM' => '@srcdir@/Irssi.pm');

View File

@ -1,8 +0,0 @@
use ExtUtils::MakeMaker;our $AM_DEFAULT_VERBOSITY='@AM_DEFAULT_VERBOSITY@';require "@top_srcdir@/src/perl/Makefile_silent.pm";
WriteMakefile('NAME' => 'Irssi::Irc',
'LIBS' => '',
'OBJECT' => '$(O_FILES)',
'TYPEMAPS' => ['../common/typemap'],
'INC' => '-I../../.. @GLIB_CFLAGS@',
'VERSION_FROM' => '@srcdir@/Irc.pm');

View File

@ -1,8 +0,0 @@
use ExtUtils::MakeMaker;our $AM_DEFAULT_VERBOSITY='@AM_DEFAULT_VERBOSITY@';require "@top_srcdir@/src/perl/Makefile_silent.pm";
WriteMakefile('NAME' => 'Irssi::TextUI',
'LIBS' => '',
'OBJECT' => '$(O_FILES)',
'TYPEMAPS' => ['../common/typemap', '../ui/typemap'],
'INC' => '-I../../.. @GLIB_CFLAGS@',
'VERSION_FROM' => '@srcdir@/TextUI.pm');

View File

@ -1,8 +0,0 @@
use ExtUtils::MakeMaker;our $AM_DEFAULT_VERBOSITY='@AM_DEFAULT_VERBOSITY@';require "@top_srcdir@/src/perl/Makefile_silent.pm";
WriteMakefile('NAME' => 'Irssi::UI',
'LIBS' => '',
'OBJECT' => '$(O_FILES)',
'TYPEMAPS' => ['../common/typemap'],
'INC' => '-I../../.. @GLIB_CFLAGS@',
'VERSION_FROM' => '@srcdir@/UI.pm');

View File

@ -1,7 +0,0 @@
if BUILD_TEXTUI
TEXTUI=fe-text
endif
SUBDIRS = fe-common irc $(TEXTUI)
EXTRA_DIST = meson.build

View File

@ -1,3 +0,0 @@
SUBDIRS = core
EXTRA_DIST = meson.build

View File

@ -1,27 +0,0 @@
include $(top_srcdir)/utils/glib-tap.mk
PACKAGE_STRING=fe-common/core
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
test_programs = test-formats
test_formats_CPPFLAGS = \
$(AM_CPPFLAGS)
test_formats_DEPENDENCIES = \
../../../src/core/libcore.a \
../../../src/lib-config/libirssi_config.a
test_formats_LDADD = \
../../../src/fe-common/core/libfe_common_core.a \
../../../src/core/libcore.a \
../../../src/lib-config/libirssi_config.a \
@PROG_LIBS@
test_formats_SOURCES = \
test-formats.c
EXTRA_DIST += meson.build

View File

@ -1,38 +0,0 @@
include $(top_srcdir)/utils/glib-tap.mk
PACKAGE_STRING=fe-text
AM_CPPFLAGS = \
-I$(top_builddir) \
$(GLIB_CFLAGS)
test_programs = test-paste-join-multiline
test_paste_join_multiline_CPPFLAGS = \
$(AM_CPPFLAGS)
# test_paste_join_multiline_DEPENDENCIES =
test_paste_join_multiline_LDADD = \
../../src/fe-common/core/libfe_common_core.a \
../../src/core/libcore.a \
../../src/lib-config/libirssi_config.a \
@PROG_LIBS@ \
@TEXTUI_LIBS@
test_paste_join_multiline_SOURCES = \
../../src/fe-text/gui-entry.c \
../../src/fe-text/mainwindows.c \
../../src/fe-text/term-terminfo.c \
../../src/fe-text/terminfo-core.c \
../../src/fe-text/term.c \
../../src/fe-text/textbuffer-formats.c \
../../src/fe-text/textbuffer-view.c \
../../src/fe-text/textbuffer.c \
../../src/fe-text/gui-windows.c \
../../src/fe-text/gui-printtext.c \
mock-irssi.c \
test-paste-join-multiline.c
EXTRA_DIST += meson.build

View File

@ -1,5 +0,0 @@
SUBDIRS = \
core \
flood
EXTRA_DIST = meson.build

View File

@ -1,31 +0,0 @@
include $(top_srcdir)/utils/glib-tap.mk
PACKAGE_STRING=irc/core
AM_CPPFLAGS = \
-I$(top_builddir) \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
$(GLIB_CFLAGS)
test_programs = test-channel-events test-irc
CPPFLAGS = \
$(AM_CPPFLAGS)
DEPENDENCIES = \
../../../src/core/libcore.a \
../../../src/lib-config/libirssi_config.a
LDADD = \
../../../src/irc/core/libirc_core.a \
../../../src/core/libcore.a \
../../../src/lib-config/libirssi_config.a \
@PROG_LIBS@
test_channel_events_SOURCES = \
test-channel-events.c
test_irc_SOURCES = \
test-irc.c
EXTRA_DIST += meson.build

View File

@ -1,37 +0,0 @@
include $(top_srcdir)/utils/glib-tap.mk
PACKAGE_STRING=irc/flood
AM_CPPFLAGS = \
-I$(top_builddir) \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
$(GLIB_CFLAGS)
test_programs = \
test-796
test_796_CPPFLAGS = \
$(AM_CPPFLAGS)
test_796_DEPENDENCIES = \
../../../src/core/libcore.a \
../../../src/lib-config/libirssi_config.a
test_796_LDADD = \
../../../src/irc/libirc.a \
../../../src/fe-common/irc/libfe_common_irc.a \
../../../src/fe-common/irc/dcc/libfe_irc_dcc.a \
../../../src/fe-common/irc/notifylist/libfe_irc_notifylist.a \
../../../src/irc/dcc/libirc_dcc.a \
../../../src/irc/notifylist/libirc_notifylist.a \
../../../src/irc/flood/libirc_flood.a \
../../../src/irc/core/libirc_core.a \
../../../src/fe-common/core/libfe_common_core.a \
../../../src/core/libcore.a \
../../../src/lib-config/libirssi_config.a \
@PROG_LIBS@
test_796_SOURCES = \
test-796.c
EXTRA_DIST += meson.build

View File

@ -1,6 +0,0 @@
themedir = $(datadir)/irssi/themes
theme_DATA = default.theme colorless.theme
EXTRA_DIST = \
$(theme_DATA) \
meson.build

View File

@ -1,6 +0,0 @@
EXTRA_DIST = \
file2header.sh \
irssi-version.sh \
syntax.pl \
tap-driver.sh \
tap-test

3
utils/check-perl-hash.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
# make sure perl hashes have correct length
find src/perl \( -name '*.c' -o -name '*.xs' \) -exec grep -n hv_store {} + | perl -l -ne 'if (/"(\w+)",\s*(\d+)/ && $2 != length $1) { $X=1; print "Incorrect key length in $_" } END { exit $X }'

View File

@ -1,5 +1,5 @@
#!/bin/sh
echo "const char *$2 ="
cat $1|sed 's/\\/\\\\/g'|sed 's/"/\\"/g'|sed 's/^/\"/'|sed 's/$/\\n\"/'
sed 's/\\/\\\\/g;s/"/\\"/g;s/^/\"/;s/$/\\n\"/' "$1"
echo ";"

View File

@ -1,134 +0,0 @@
# GLIB - Library of useful C routines
TESTS_ENVIRONMENT= \
G_TEST_SRCDIR="$(abs_srcdir)" \
G_TEST_BUILDDIR="$(abs_builddir)" \
G_DEBUG=gc-friendly \
MALLOC_CHECK_=2 \
MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/utils/tap-driver.sh
LOG_COMPILER = $(top_srcdir)/utils/tap-test
NULL =
# initialize variables for unconditional += appending
BUILT_SOURCES =
BUILT_EXTRA_DIST =
CLEANFILES = *.log *.trs
DISTCLEANFILES =
MAINTAINERCLEANFILES =
EXTRA_DIST =
TESTS =
installed_test_LTLIBRARIES =
installed_test_PROGRAMS =
installed_test_SCRIPTS =
nobase_installed_test_DATA =
noinst_LTLIBRARIES =
noinst_PROGRAMS =
noinst_SCRIPTS =
noinst_DATA =
check_LTLIBRARIES =
check_PROGRAMS =
check_SCRIPTS =
check_DATA =
# We support a fairly large range of possible variables. It is expected that all types of files in a test suite
# will belong in exactly one of the following variables.
#
# First, we support the usual automake suffixes, but in lowercase, with the customary meaning:
#
# test_programs, test_scripts, test_data, test_ltlibraries
#
# The above are used to list files that are involved in both uninstalled and installed testing. The
# test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.
# Note that _data is always used with the nobase_ automake variable name to ensure that installed test data is
# installed in the same way as it appears in the package layout.
#
# In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',
# like so:
#
# installed_test_programs, uninstalled_test_programs
# installed_test_scripts, uninstalled_test_scripts
# installed_test_data, uninstalled_test_data
# installed_test_ltlibraries, uninstalled_test_ltlibraries
#
# Additionally, we support 'extra' infixes for programs and scripts. This is used for support programs/scripts
# that should not themselves be run as testcases (but exist to be used from other testcases):
#
# test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs
# test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts
#
# Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or data
# file automatically end up in the tarball.
#
# dist_test_scripts, dist_test_data, dist_test_extra_scripts
# dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts
# dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts
#
# Note that no file is automatically disted unless it appears in one of the dist_ variables. This follows the
# standard automake convention of not disting programs scripts or data by default.
#
# test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their disted
# variants) will be run as part of the in-tree 'make check'. These are all assumed to be runnable under
# gtester. That's a bit strange for scripts, but it's possible.
TESTS += $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \
$(dist_test_scripts) $(dist_uninstalled_test_scripts)
# Note: build even the installed-only targets during 'make check' to ensure that they still work.
# We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to
# prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were
# filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.
all_test_programs = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \
$(test_extra_programs) $(uninstalled_test_extra_programs) $(installed_test_extra_programs)
all_test_scripts = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(uninstalled_test_extra_scripts) $(installed_test_extra_scripts)
all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) \
$(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) $(dist_installed_test_extra_scripts)
all_test_scripts += $(all_dist_test_scripts)
EXTRA_DIST += $(all_dist_test_scripts)
all_test_data = $(test_data) $(uninstalled_test_data) $(installed_test_data)
all_dist_test_data = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data)
all_test_data += $(all_dist_test_data)
EXTRA_DIST += $(all_dist_test_data)
all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)
if ENABLE_ALWAYS_BUILD_TESTS
noinst_LTLIBRARIES += $(all_test_ltlibs)
noinst_PROGRAMS += $(all_test_programs)
noinst_SCRIPTS += $(all_test_scripts)
noinst_DATA += $(all_test_data)
else
check_LTLIBRARIES += $(all_test_ltlibs)
check_PROGRAMS += $(all_test_programs)
check_SCRIPTS += $(all_test_scripts)
check_DATA += $(all_test_data)
endif
if ENABLE_INSTALLED_TESTS
installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
$(test_extra_programs) $(installed_test_extra_programs)
installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(test_installed_extra_scripts)
installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
$(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
nobase_installed_test_DATA += $(test_data) $(installed_test_data)
nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data)
installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries)
installed_testcases = $(test_programs) $(installed_test_programs) \
$(test_scripts) $(installed_test_scripts) \
$(dist_test_scripts) $(dist_installed_test_scripts)
installed_test_meta_DATA = $(installed_testcases:=.test)
%.test: %$(EXEEXT) Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Exec=$(installed_testdir)/$<' >> $@.tmp; \
mv $@.tmp $@)
CLEANFILES += $(installed_test_meta_DATA)
endif

View File

@ -1,20 +1,20 @@
#!/bin/sh
DATE=`GIT_DIR=$1/.git git log -1 --pretty=format:%ci HEAD 2>/dev/null`
DATE=$(GIT_DIR=$1/.git git log -1 --pretty=format:%ci HEAD 2>/dev/null)
VERSION_DATE=`echo $DATE | cut -f 1 -d ' ' | tr -d -`
VERSION_TIME=`echo $DATE | cut -f 2 -d ' ' | awk -F: '{printf "%d", $1$2}'`
VERSION_DATE=$(echo "$DATE" | cut -f 1 -d ' ' | tr -d -)
VERSION_TIME=$(echo "$DATE" | cut -f 2 -d ' ' | awk -F: '{printf "%d", $1$2}')
if test -z "$VERSION_DATE"; then
DATE=`grep '^v' $1/NEWS | head -1`
VERSION_DATE=`echo "$DATE" | cut -f 2 -d ' ' | tr -d -`
DATE=$(grep '^v' "$1"/NEWS | head -1)
VERSION_DATE=$(echo "$DATE" | cut -f 2 -d ' ' | tr -d -)
case $VERSION_DATE in
*xx)
VERSION_DATE=`date +%Y%m%d`
VERSION_DATE=$(date +%Y%m%d)
;;
esac
VERSION_TIME=`echo "$DATE" | cut -f 1 -d ' ' | tr -d v | tr .- ' '`
VERSION_TIME=`printf %d%d%02d $VERSION_TIME 2>/dev/null`
VERSION_TIME=$(echo "$DATE" | cut -f 1 -d ' ' | tr -d v | tr .- ' ')
VERSION_TIME=$(printf %d%d%02d $VERSION_TIME 2>/dev/null)
fi
echo "#define IRSSI_VERSION_DATE $VERSION_DATE"

61
utils/make-dist.sh Executable file
View File

@ -0,0 +1,61 @@
#!/bin/sh
# Run this to create a distribution tarball from a git checkout
set -e
PKG_NAME="Irssi"
repo_root="$(git rev-parse --show-toplevel)"
dist_tmp="$repo_root/${PKG_NAME}-Dist"
if [ -z "$repo_root" ]; then
echo "**Error**: ${PKG_NAME} make-dist.sh must be run in a git clone, cannot proceed."
exit 1
fi
if [ ! -f "$repo_root"/irssi.conf ]; then
echo -n "**Error**: Directory \`$repo_root' does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
fi
cd "$repo_root"
./utils/check-perl-hash.sh
rm -fr "$dist_tmp"
git clone --no-local "$repo_root" "$dist_tmp"
cd "$dist_tmp"
if [ ! -f meson.build ]; then
echo "**Error**: ${PKG_NAME} make-dist.sh could not find meson.build, cannot proceed."
exit 1
fi
name=$(perl -0777 -n -e "m{project\\(\\s*'(.*?)'}s and print \$1 and exit" meson.build)
version=$(perl -0777 -n -e "m{project\\(.*?,\\s*version\\s*:\\s*'(.*?)'}s and print \$1 and exit" meson.build)
if [ -z "$name" ] || [ -z "$version" ]; then
echo "**Error**: ${PKG_NAME} make-dist.sh could not find either name or version, cannot proceed."
exit 1
fi
cat <<SETUP_CFG >setup.cfg
[metadata]
name = $name
version = $version
url = https://ailin-nemui.github.io/irssi/
maintainer = Ailin Nemui
license = GNU General Public License v2 or later (GPLv2+)
SETUP_CFG
python3 -c 'from setuptools import *;setup()' sdist --formats=tar
tar --delete --file "dist/$name-$version.tar" \
"$name-$version/setup.cfg" \
"$name-$version/$name.egg-info" \
"$name-$version/PKG-INFO"
xz -k "dist/$name-$version.tar"
gzip -k "dist/$name-$version.tar"
mv -v dist/*.tar.* "$repo_root"
cd "$repo_root"
# rm -fr "$dist_tmp"

View File

@ -19,7 +19,7 @@ srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
srcdir="$srcdir"/..
if test ! -f "$srcdir"/configure.ac; then
if test ! -f "$srcdir"/irssi.conf; then
echo -n "**Error**: Directory \`$srcdir' does not look like the"
echo " top-level $PKG_NAME directory"
exit 1

View File

@ -9,7 +9,7 @@ srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
srcdir="$srcdir"/..
if test ! -f "$srcdir"/configure.ac; then
if test ! -f "$srcdir"/irssi.conf; then
echo -n "**Error**: Directory \`$srcdir' does not look like the"
echo " top-level $PKG_NAME directory"
exit 1

View File

@ -1,652 +0,0 @@
#! /bin/sh
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
scriptversion=2011-12-27.17; # UTC
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
set -u
me=tap-driver.sh
fatal ()
{
echo "$me: fatal: $*" >&2
exit 1
}
usage_error ()
{
echo "$me: $*" >&2
print_usage >&2
exit 2
}
print_usage ()
{
cat <<END
Usage:
tap-driver.sh --test-name=NAME --log-file=PATH --trs-file=PATH
[--expect-failure={yes|no}] [--color-tests={yes|no}]
[--enable-hard-errors={yes|no}] [--ignore-exit]
[--diagnostic-string=STRING] [--merge|--no-merge]
[--comments|--no-comments] [--] TEST-COMMAND
The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
END
}
# TODO: better error handling in option parsing (in particular, ensure
# TODO: $log_file, $trs_file and $test_name are defined).
test_name= # Used for reporting.
log_file= # Where to save the result and output of the test script.
trs_file= # Where to save the metadata of the test run.
expect_failure=0
color_tests=0
merge=0
ignore_exit=0
comments=0
diag_string='#'
while test $# -gt 0; do
case $1 in
--help) print_usage; exit $?;;
--version) echo "$me $scriptversion"; exit $?;;
--test-name) test_name=$2; shift;;
--log-file) log_file=$2; shift;;
--trs-file) trs_file=$2; shift;;
--color-tests) color_tests=$2; shift;;
--expect-failure) expect_failure=$2; shift;;
--enable-hard-errors) shift;; # No-op.
--merge) merge=1;;
--no-merge) merge=0;;
--ignore-exit) ignore_exit=1;;
--comments) comments=1;;
--no-comments) comments=0;;
--diagnostic-string) diag_string=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
esac
shift
done
test $# -gt 0 || usage_error "missing test command"
case $expect_failure in
yes) expect_failure=1;;
*) expect_failure=0;;
esac
if test $color_tests = yes; then
init_colors='
color_map["red"]="" # Red.
color_map["grn"]="" # Green.
color_map["lgn"]="" # Light green.
color_map["blu"]="" # Blue.
color_map["mgn"]="" # Magenta.
color_map["std"]="" # No color.
color_for_result["ERROR"] = "mgn"
color_for_result["PASS"] = "grn"
color_for_result["XPASS"] = "red"
color_for_result["FAIL"] = "red"
color_for_result["XFAIL"] = "lgn"
color_for_result["SKIP"] = "blu"'
else
init_colors=''
fi
# :; is there to work around a bug in bash 3.2 (and earlier) which
# does not always set '$?' properly on redirection failure.
# See the Autoconf manual for more details.
:;{
(
# Ignore common signals (in this subshell only!), to avoid potential
# problems with Korn shells. Some Korn shells are known to propagate
# to themselves signals that have killed a child process they were
# waiting for; this is done at least for SIGINT (and usually only for
# it, in truth). Without the `trap' below, such a behaviour could
# cause a premature exit in the current subshell, e.g., in case the
# test command it runs gets terminated by a SIGINT. Thus, the awk
# script we are piping into would never seen the exit status it
# expects on its last input line (which is displayed below by the
# last `echo $?' statement), and would thus die reporting an internal
# error.
# For more information, see the Autoconf manual and the threads:
# <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
# <http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
trap : 1 3 2 13 15
if test $merge -gt 0; then
exec 2>&1
else
exec 2>&3
fi
"$@"
echo $?
) | LC_ALL=C ${AM_TAP_AWK-awk} \
-v me="$me" \
-v test_script_name="$test_name" \
-v log_file="$log_file" \
-v trs_file="$trs_file" \
-v expect_failure="$expect_failure" \
-v merge="$merge" \
-v ignore_exit="$ignore_exit" \
-v comments="$comments" \
-v diag_string="$diag_string" \
'
# FIXME: the usages of "cat >&3" below could be optimized when using
# FIXME: GNU awk, and/on on systems that supports /dev/fd/.
# Implementation note: in what follows, `result_obj` will be an
# associative array that (partly) simulates a TAP result object
# from the `TAP::Parser` perl module.
## ----------- ##
## FUNCTIONS ##
## ----------- ##
function fatal(msg)
{
print me ": " msg | "cat >&2"
exit 1
}
function abort(where)
{
fatal("internal error " where)
}
# Convert a boolean to a "yes"/"no" string.
function yn(bool)
{
return bool ? "yes" : "no";
}
function add_test_result(result)
{
if (!test_results_index)
test_results_index = 0
test_results_list[test_results_index] = result
test_results_index += 1
test_results_seen[result] = 1;
}
# Whether the test script should be re-run by "make recheck".
function must_recheck()
{
for (k in test_results_seen)
if (k != "XFAIL" && k != "PASS" && k != "SKIP")
return 1
return 0
}
# Whether the content of the log file associated to this test should
# be copied into the "global" test-suite.log.
function copy_in_global_log()
{
for (k in test_results_seen)
if (k != "PASS")
return 1
return 0
}
# FIXME: this can certainly be improved ...
function get_global_test_result()
{
if ("ERROR" in test_results_seen)
return "ERROR"
if ("FAIL" in test_results_seen || "XPASS" in test_results_seen)
return "FAIL"
all_skipped = 1
for (k in test_results_seen)
if (k != "SKIP")
all_skipped = 0
if (all_skipped)
return "SKIP"
return "PASS";
}
function stringify_result_obj(result_obj)
{
if (result_obj["is_unplanned"] || result_obj["number"] != testno)
return "ERROR"
if (plan_seen == LATE_PLAN)
return "ERROR"
if (result_obj["directive"] == "TODO")
return result_obj["is_ok"] ? "XPASS" : "XFAIL"
if (result_obj["directive"] == "SKIP")
return result_obj["is_ok"] ? "SKIP" : COOKED_FAIL;
if (length(result_obj["directive"]))
abort("in function stringify_result_obj()")
return result_obj["is_ok"] ? COOKED_PASS : COOKED_FAIL
}
function decorate_result(result)
{
color_name = color_for_result[result]
if (color_name)
return color_map[color_name] "" result "" color_map["std"]
# If we are not using colorized output, or if we do not know how
# to colorize the given result, we should return it unchanged.
return result
}
function report(result, details)
{
if (result ~ /^(X?(PASS|FAIL)|SKIP|ERROR)/)
{
msg = ": " test_script_name
add_test_result(result)
}
else if (result == "#")
{
msg = " " test_script_name ":"
}
else
{
abort("in function report()")
}
if (length(details))
msg = msg " " details
# Output on console might be colorized.
print decorate_result(result) msg
# Log the result in the log file too, to help debugging (this is
# especially true when said result is a TAP error or "Bail out!").
print result msg | "cat >&3";
}
function testsuite_error(error_message)
{
report("ERROR", "- " error_message)
}
function handle_tap_result()
{
details = result_obj["number"];
if (length(result_obj["description"]))
details = details " " result_obj["description"]
if (plan_seen == LATE_PLAN)
{
details = details " # AFTER LATE PLAN";
}
else if (result_obj["is_unplanned"])
{
details = details " # UNPLANNED";
}
else if (result_obj["number"] != testno)
{
details = sprintf("%s # OUT-OF-ORDER (expecting %d)",
details, testno);
}
else if (result_obj["directive"])
{
details = details " # " result_obj["directive"];
if (length(result_obj["explanation"]))
details = details " " result_obj["explanation"]
}
report(stringify_result_obj(result_obj), details)
}
# `skip_reason` should be empty whenever planned > 0.
function handle_tap_plan(planned, skip_reason)
{
planned += 0 # Avoid getting confused if, say, `planned` is "00"
if (length(skip_reason) && planned > 0)
abort("in function handle_tap_plan()")
if (plan_seen)
{
# Error, only one plan per stream is acceptable.
testsuite_error("multiple test plans")
return;
}
planned_tests = planned
# The TAP plan can come before or after *all* the TAP results; we speak
# respectively of an "early" or a "late" plan. If we see the plan line
# after at least one TAP result has been seen, assume we have a late
# plan; in this case, any further test result seen after the plan will
# be flagged as an error.
plan_seen = (testno >= 1 ? LATE_PLAN : EARLY_PLAN)
# If testno > 0, we have an error ("too many tests run") that will be
# automatically dealt with later, so do not worry about it here. If
# $plan_seen is true, we have an error due to a repeated plan, and that
# has already been dealt with above. Otherwise, we have a valid "plan
# with SKIP" specification, and should report it as a particular kind
# of SKIP result.
if (planned == 0 && testno == 0)
{
if (length(skip_reason))
skip_reason = "- " skip_reason;
report("SKIP", skip_reason);
}
}
function extract_tap_comment(line)
{
if (index(line, diag_string) == 1)
{
# Strip leading `diag_string` from `line`.
line = substr(line, length(diag_string) + 1)
# And strip any leading and trailing whitespace left.
sub("^[ \t]*", "", line)
sub("[ \t]*$", "", line)
# Return what is left (if any).
return line;
}
return "";
}
# When this function is called, we know that line is a TAP result line,
# so that it matches the (perl) RE "^(not )?ok\b".
function setup_result_obj(line)
{
# Get the result, and remove it from the line.
result_obj["is_ok"] = (substr(line, 1, 2) == "ok" ? 1 : 0)
sub("^(not )?ok[ \t]*", "", line)
# If the result has an explicit number, get it and strip it; otherwise,
# automatically assing the next progresive number to it.
if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/)
{
match(line, "^[0-9]+")
# The final `+ 0` is to normalize numbers with leading zeros.
result_obj["number"] = substr(line, 1, RLENGTH) + 0
line = substr(line, RLENGTH + 1)
}
else
{
result_obj["number"] = testno
}
if (plan_seen == LATE_PLAN)
# No further test results are acceptable after a "late" TAP plan
# has been seen.
result_obj["is_unplanned"] = 1
else if (plan_seen && testno > planned_tests)
result_obj["is_unplanned"] = 1
else
result_obj["is_unplanned"] = 0
# Strip trailing and leading whitespace.
sub("^[ \t]*", "", line)
sub("[ \t]*$", "", line)
# This will have to be corrected if we have a "TODO"/"SKIP" directive.
result_obj["description"] = line
result_obj["directive"] = ""
result_obj["explanation"] = ""
if (index(line, "#") == 0)
return # No possible directive, nothing more to do.
# Directives are case-insensitive.
rx = "[ \t]*#[ \t]*([tT][oO][dD][oO]|[sS][kK][iI][pP])[ \t]*"
# See whether we have the directive, and if yes, where.
pos = match(line, rx "$")
if (!pos)
pos = match(line, rx "[^a-zA-Z0-9_]")
# If there was no TAP directive, we have nothing more to do.
if (!pos)
return
# Let`s now see if the TAP directive has been escaped. For example:
# escaped: ok \# SKIP
# not escaped: ok \\# SKIP
# escaped: ok \\\\\# SKIP
# not escaped: ok \ # SKIP
if (substr(line, pos, 1) == "#")
{
bslash_count = 0
for (i = pos; i > 1 && substr(line, i - 1, 1) == "\\"; i--)
bslash_count += 1
if (bslash_count % 2)
return # Directive was escaped.
}
# Strip the directive and its explanation (if any) from the test
# description.
result_obj["description"] = substr(line, 1, pos - 1)
# Now remove the test description from the line, that has been dealt
# with already.
line = substr(line, pos)
# Strip the directive, and save its value (normalized to upper case).
sub("^[ \t]*#[ \t]*", "", line)
result_obj["directive"] = toupper(substr(line, 1, 4))
line = substr(line, 5)
# Now get the explanation for the directive (if any), with leading
# and trailing whitespace removed.
sub("^[ \t]*", "", line)
sub("[ \t]*$", "", line)
result_obj["explanation"] = line
}
function get_test_exit_message(status)
{
if (status == 0)
return ""
if (status !~ /^[1-9][0-9]*$/)
abort("getting exit status")
if (status < 127)
exit_details = ""
else if (status == 127)
exit_details = " (command not found?)"
else if (status >= 128 && status <= 255)
exit_details = sprintf(" (terminated by signal %d?)", status - 128)
else if (status > 256 && status <= 384)
# We used to report an "abnormal termination" here, but some Korn
# shells, when a child process die due to signal number n, can leave
# in $? an exit status of 256+n instead of the more standard 128+n.
# Apparently, both behaviours are allowed by POSIX (2008), so be
# prepared to handle them both. See also Austing Group report ID
# 0000051 <http://www.austingroupbugs.net/view.php?id=51>
exit_details = sprintf(" (terminated by signal %d?)", status - 256)
else
# Never seen in practice.
exit_details = " (abnormal termination)"
return sprintf("exited with status %d%s", status, exit_details)
}
function write_test_results()
{
print ":global-test-result: " get_global_test_result() > trs_file
print ":recheck: " yn(must_recheck()) > trs_file
print ":copy-in-global-log: " yn(copy_in_global_log()) > trs_file
for (i = 0; i < test_results_index; i += 1)
print ":test-result: " test_results_list[i] > trs_file
close(trs_file);
}
BEGIN {
## ------- ##
## SETUP ##
## ------- ##
'"$init_colors"'
# Properly initialized once the TAP plan is seen.
planned_tests = 0
COOKED_PASS = expect_failure ? "XPASS": "PASS";
COOKED_FAIL = expect_failure ? "XFAIL": "FAIL";
# Enumeration-like constants to remember which kind of plan (if any)
# has been seen. It is important that NO_PLAN evaluates "false" as
# a boolean.
NO_PLAN = 0
EARLY_PLAN = 1
LATE_PLAN = 2
testno = 0 # Number of test results seen so far.
bailed_out = 0 # Whether a "Bail out!" directive has been seen.
# Whether the TAP plan has been seen or not, and if yes, which kind
# it is ("early" is seen before any test result, "late" otherwise).
plan_seen = NO_PLAN
## --------- ##
## PARSING ##
## --------- ##
is_first_read = 1
while (1)
{
# Involutions required so that we are able to read the exit status
# from the last input line.
st = getline
if (st < 0) # I/O error.
fatal("I/O error while reading from input stream")
else if (st == 0) # End-of-input
{
if (is_first_read)
abort("in input loop: only one input line")
break
}
if (is_first_read)
{
is_first_read = 0
nextline = $0
continue
}
else
{
curline = nextline
nextline = $0
$0 = curline
}
# Copy any input line verbatim into the log file.
print | "cat >&3"
# Parsing of TAP input should stop after a "Bail out!" directive.
if (bailed_out)
continue
# TAP test result.
if ($0 ~ /^(not )?ok$/ || $0 ~ /^(not )?ok[^a-zA-Z0-9_]/)
{
testno += 1
setup_result_obj($0)
handle_tap_result()
}
# TAP plan (normal or "SKIP" without explanation).
else if ($0 ~ /^1\.\.[0-9]+[ \t]*$/)
{
# The next two lines will put the number of planned tests in $0.
sub("^1\\.\\.", "")
sub("[^0-9]*$", "")
handle_tap_plan($0, "")
continue
}
# TAP "SKIP" plan, with an explanation.
else if ($0 ~ /^1\.\.0+[ \t]*#/)
{
# The next lines will put the skip explanation in $0, stripping
# any leading and trailing whitespace. This is a little more
# tricky in truth, since we want to also strip a potential leading
# "SKIP" string from the message.
sub("^[^#]*#[ \t]*(SKIP[: \t][ \t]*)?", "")
sub("[ \t]*$", "");
handle_tap_plan(0, $0)
}
# "Bail out!" magic.
# Older versions of prove and TAP::Harness (e.g., 3.17) did not
# recognize a "Bail out!" directive when preceded by leading
# whitespace, but more modern versions (e.g., 3.23) do. So we
# emulate the latter, "more modern" behaviour.
else if ($0 ~ /^[ \t]*Bail out!/)
{
bailed_out = 1
# Get the bailout message (if any), with leading and trailing
# whitespace stripped. The message remains stored in `$0`.
sub("^[ \t]*Bail out![ \t]*", "");
sub("[ \t]*$", "");
# Format the error message for the
bailout_message = "Bail out!"
if (length($0))
bailout_message = bailout_message " " $0
testsuite_error(bailout_message)
}
# Maybe we have too look for dianogtic comments too.
else if (comments != 0)
{
comment = extract_tap_comment($0);
if (length(comment))
report("#", comment);
}
}
## -------- ##
## FINISH ##
## -------- ##
# A "Bail out!" directive should cause us to ignore any following TAP
# error, as well as a non-zero exit status from the TAP producer.
if (!bailed_out)
{
if (!plan_seen)
{
testsuite_error("missing test plan")
}
else if (planned_tests != testno)
{
bad_amount = testno > planned_tests ? "many" : "few"
testsuite_error(sprintf("too %s tests run (expected %d, got %d)",
bad_amount, planned_tests, testno))
}
if (!ignore_exit)
{
# Fetch exit status from the last line.
exit_message = get_test_exit_message(nextline)
if (exit_message)
testsuite_error(exit_message)
}
}
write_test_results()
exit 0
} # End of "BEGIN" block.
'
# TODO: document that we consume the file descriptor 3 :-(
} 3>"$log_file"
test $? -eq 0 || fatal "I/O or internal error"
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,23 +0,0 @@
#! /bin/sh
# run a GTest in tap mode. The test binary is passed as $1
t="$1"; shift
if ${PKG_CONFIG:-pkg-config} --atleast-version 2.40 glib-2.0; then
exec "$t" -k --tap "$@"
else # GTest does not support tap yet
(((("$t" "$@"; echo $? >&3) | ${AM_TAP_AWK:-awk} '
{
if (/: /) {
i++
ok = /: OK/
sub(/:/, " #")
print (ok ? "ok " : "not ok ") i " " $0
} else {
print "# " $0
}
} END {
print 1 ".." i
}
' >&4) 3>&1) | (read xs; exit $xs)) 4>&1
fi