ant-phone/configure.ac

113 lines
3.5 KiB
Plaintext
Raw Permalink Normal View History

2007-11-24 13:45:25 +00:00
# Process this file with autoconf to produce a configure script.
AC_INIT([ant-phone],[0.2.1. ant-phone-devel@nongnu.org])
AC_CONFIG_SRCDIR([ant-phone])
AM_INIT_AUTOMAKE
AC_PREREQ([2.71])
2007-11-24 13:45:25 +00:00
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
2007-11-24 13:45:25 +00:00
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LEX(noyywrap)
2007-11-24 13:45:25 +00:00
if test "$LEX" != flex; then
LEX="$SHELL $missing_dir/missing flex"
AC_SUBST(LEX_OUTPUT_ROOT, lex.yy)
AC_SUBST(LEXLIB, '')
fi
AC_PROG_YACC
# Checks for libraries.
AC_CHECK_LIB([m], [floor])
AC_CHECK_LIB([sndfile], [sf_open],, AC_MSG_ERROR(You need the libsndfile headers to build this package))
AC_CHECK_LIB([capi20], [capi20_register],, AC_MSG_ERROR(You need the libcapi20 headers to build this package))
2007-11-24 13:45:25 +00:00
# Checks for header files.
m4_warn([obsolete],
[The preprocessor macro `STDC_HEADERS' is obsolete.
Except in unusual embedded environments, you can safely include all
ISO C90 headers unconditionally.])dnl
# Autoupdate added the next two lines to ensure that your configure
# script's behavior did not change. They are probably safe to remove.
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP
2007-11-24 13:45:25 +00:00
AC_CHECK_HEADERS([fcntl.h limits.h math.h pwd.h stddef.h stdlib.h string.h sys/ioctl.h sys/stat.h sys/time.h sys/types.h termios.h unistd.h sndfile.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
m4_warn([obsolete],
[Update your code to rely only on HAVE_SYS_TIME_H,
then remove this warning and the obsolete code below it.
All current systems provide time.h; it need not be checked for.
Not all systems provide sys/time.h, but those that do, all allow
you to include it and time.h simultaneously.])dnl
AC_CHECK_HEADERS_ONCE([sys/time.h])
# Obsolete code to be removed.
if test $ac_cv_header_sys_time_h = yes; then
AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
and <time.h>. This macro is obsolete.])
fi
# End of obsolete code.
2007-11-24 13:45:25 +00:00
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
m4_warn([obsolete],
[your code may safely assume C89 semantics that RETSIGTYPE is void.
Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/types.h>
#include <signal.h>
],
[return *(signal (0, 0)) (0) == 1;])],
[ac_cv_type_signal=int],
[ac_cv_type_signal=void])])
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
(`int' or `void').])
2007-11-24 13:45:25 +00:00
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([floor select strdup strstr strtol mkdir strcasecmp])
# GTK+ 2.0:
PKG_CHECK_MODULES(DEPS, gtk+-2.0 glib-2.0 alsa)
2007-11-24 13:45:25 +00:00
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_LIBS)
#
# If we're running gcc, add '-Wall -W' to CFLAGS, and add
# '-D_U_="__attribute__((unused))"' as well, so we can use _U_ to
# flag unused function arguments and not get warnings about them.
#
# Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function
# argument will compile with non-GCC compilers.
#
AC_MSG_CHECKING(to see if we can add '-Wall -W' to CFLAGS)
if test x$GCC != x ; then
Version 0.2.0: CAPI 2.0, ALSA, threading, low-latency. Changes in short: * Re-work of session handling to use sound and ISDN threads, which greatly reduces latency and CPU usage * Complete re-work of ISDN subsystem to use CAPI 2.0 * Complete re-work of sound subsystem to use ALSA * Re-work of recording subsystem to produce better results * Re-work of debug and error message handling (centralized) * Added --sleep and --wakeup remote commands to facilitate release and re-acquire of CAPI connection * Code documentation (partial) Reduced latency: ---------------- We are now using separate threads to handle ISDN input (and send it to audio output) and audio input (which again sends it to ISDN). This means, we are not dependent on GTK GUI reaction time. This enables very good sound quality with low latency and low CPU consumption (normally not measurable). Tested with 3x parallel "while true; do true; done" and "find /". No sound problems, even though the threads don't run with real time priority (which can be implemented now relatively easily, though). ISDN system: ------------ We now support CAPI 2.0. This means, any card supported by CAPI 2.0 should work and also ant-phone should be able to coexist with other ISDN applications. New CAPI code was tested with Fritz!Card, both with fcpci driver and with mISDN driver. There are also remote-CAPI implementations which forward local CAPI requests to a remote host (e.g., a Fritz!Box router). They should be also usable with new CAPI subsystem (not tested). Sound system: ------------- Since we are now using ALSA, it's much easier to coexist with other sound applications. However, sound device specification has been changed. You should now type in ALSA names (normally 'default') instead of raw devices. Recording: ---------- Recording subsystem now uses ring buffers and the buffers are flushed in GTK thread on timeout. Although it would be possible to have special thread for this purpose, it doesn't really make sense, since we buffer about 2 seconds. In 2 seconds, the application better responds... Anyway, in the worst case, there will be some samples skipped. Also, recording tries to stitch together incoming samples on local as well as remote channels as it best fits based on time code. Certain jitter is compensated for automatically, bigger jitter may produce some cracks. However, in tests there was no such problem. Debug and error message handling: --------------------------------- All debug and error messages should now go through macros dbgprintf() and errprintf(). This allows for implementing of debug log viewer later. For new/rewritten code, all debug and error messages start with "COMPONENT: " prefix. This allows for easier identification in logs. Additionally, there are further debug levels, up to 4. Debug level 3 and higher prints very noisy information about each audio packet processed. Sleep and wakeup commands: -------------------------- Some ISDN card drivers need to be unloaded before suspending the machine to disk and loaded again after resume. This is not possible, as long as the application is holding the CAPI connection. Therefore, two new command-line commands have been implemented, which allow turning off and on the CAPI connection (--sleep and --wakeup, respectively). They can be integrated into suspend and resume scripts to take care of stopping and resuming CAPI. Code documentation: ------------------- Documentation for new code and for big rewritten parts has been changed to Doxygen format. Instead of plain comments, you'll see comments in form /*! ... */ with tags in form @tag, which allow Doxygen to generate pretty-printed source code reference documentation. Doxygen script file has not been actually produced. The rest of the files should be changed as well to use Doxygen format tags in documentation of functions and structures.
2007-11-24 17:55:27 +00:00
CFLAGS="$CFLAGS -D_U_=\"__attribute__((unused))\" -Wall -W -D_GNU_SOURCE"
2007-11-24 13:45:25 +00:00
AC_MSG_RESULT(yes)
else
CFLAGS="-D_U_=\"\" $CFLAGS"
AC_MSG_RESULT(no)
fi
# GNU gettext
AM_GNU_GETTEXT([external])
2007-11-24 13:45:25 +00:00
AM_GNU_GETTEXT_VERSION(0.16.1)
# directory containing configuration support files
# defaults to package root
#AC_CONFIG_AUX_DIR
AC_CONFIG_FILES([Makefile
intl/Makefile
po/Makefile.in
doc/Makefile
src/Makefile])
AC_OUTPUT