Commit 4b0ab4bc authored by Kamil Ignacak's avatar Kamil Ignacak Committed by Christoph Berg

Import Debian changes 3.0.1-1

unixcw (3.0.1-1) unstable; urgency=low

  * Prepare unixcw source package for new release: 3.0.1
  * Remove source of lintian warnings:
     - W: cw: maintainer-script-ignores-errors preinst
     - W: cwcp: maintainer-script-ignores-errors preinst
     - W: libcw3-dev: manpage-has-errors-from-man ...
     - W: xcwcp: maintainer-script-ignores-errors preinst
parents a7fd3c12 beda7ce1
# Copyright (C) 2001-2006 Simon Baldwin (simon_baldwin@yahoo.com)
# Copyright (C) 2011 Kamil Ignacak (acerion@wp.pl)
# Copyright (C) 2011-2012 Kamil Ignacak (acerion@wp.pl)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
......@@ -22,7 +22,7 @@
SHELL = /bin/sh
SUBDIRS = src
DIST = unixcw-3.0
DIST = unixcw-3.0.1
# Top level makefile - descends into subdirectories and executes the make in
# these one at a time.
......@@ -33,9 +33,13 @@ DESCEND = for subdir in $(SUBDIRS); do \
done
# Targets that do nothing other than descend.
all install install-strip uninstall clean TAGS info dvi check:
all install install-strip uninstall TAGS info dvi check:
$(DESCEND)
clean:
$(DESCEND)
rm -f Makefile.inc
# Targets that do just a little more than this.
distclean mostlyclean:
$(DESCEND)
......
# Copyright (C) 2001-2006 Simon Baldwin (simon_baldwin@yahoo.com)
# Copyright (C) 2011 Kamil Ignacak (acerion@wp.pl)
# Copyright (C) 2011-2012 Kamil Ignacak (acerion@wp.pl)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
......
version 3.0.1 / 2012.01.08
Thanks to Kamal Mostafa for providing patches that are the reason
for 3.0.1 release.
Content of upstream package unixcw-3.0.1 is approximately the same as of
Debian source package unixcw_3.0-5.
debian/:
- added proper "Section" field in control file;
- fixed library dependencies in control file;
- fixed "Replaces:"/"Conflicts:" fields in control file;
- fixed Debian bug #653411: changes in *.preinst files to remove
dangling symlinks left by old packaging (suggested by Bob Proulx);
general:
- fixed library dependencies in "configure" script;
- fixed library dependencies provided by libcw.pc file;
libcw:
- proper detection of capabilities of liboss-salsa-dev
(kfreebsd's libasound implementation); libcw now can be built
properly on Debian/kFreeBSD;
- fixing awk scripts producing man pages: the awk scripts now
work with mawk too;
cwcp:
- fixed list of libraries in Makefile;
----------------------------------------------------------------------------
version 3.0 / 2011.12.13
Thanks to Simon Baldwin for creating this software in the
......
......@@ -41,6 +41,11 @@ patching unixcw.
Version 3.0 introduces some changes in API, and there should be some
more API changes in 3.1. Hopefully things will be more stable in 3.2.
Version 3.0.1 contains small fixes that don't influence core capabilities
of any application, but are still important. Patches for this release were
provided mainly by Kamal Mostafa (thanks Kamal!).
The heart of the package is 'libcw'. This is a library which, when built,
offers the following basic CW services to a caller program:
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for UnixCW 3.0.
# Generated by GNU Autoconf 2.68 for UnixCW 3.0.1.
#
# Report bugs to <acerion@wp.pl>.
#
......@@ -560,8 +560,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='UnixCW'
PACKAGE_TARNAME='unixcw'
PACKAGE_VERSION='3.0'
PACKAGE_STRING='UnixCW 3.0'
PACKAGE_VERSION='3.0.1'
PACKAGE_STRING='UnixCW 3.0.1'
PACKAGE_BUGREPORT='acerion@wp.pl'
PACKAGE_URL=''
......@@ -1229,7 +1229,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures UnixCW 3.0 to adapt to many kinds of systems.
\`configure' configures UnixCW 3.0.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1290,7 +1290,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of UnixCW 3.0:";;
short | recursive ) echo "Configuration of UnixCW 3.0.1:";;
esac
cat <<\_ACEOF
......@@ -1372,7 +1372,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
UnixCW configure 3.0
UnixCW configure 3.0.1
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
......@@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by UnixCW $as_me 3.0, which was
It was created by UnixCW $as_me 3.0.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
......@@ -3671,6 +3671,141 @@ _ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5
$as_echo_n "checking for snd_pcm_open in -lasound... " >&6; }
if ${ac_cv_lib_asound_snd_pcm_open+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lasound $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char snd_pcm_open ();
int
main ()
{
return snd_pcm_open ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_asound_snd_pcm_open=yes
else
ac_cv_lib_asound_snd_pcm_open=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open" >&5
$as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; }
if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBASOUND 1
_ACEOF
LIBS="-lasound $LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
if ${ac_cv_lib_pthread_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char pthread_create ();
int
main ()
{
return pthread_create ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_pthread_pthread_create=yes
else
ac_cv_lib_pthread_pthread_create=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
LIBS="-lpthread $LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5
$as_echo_n "checking for floor in -lm... " >&6; }
if ${ac_cv_lib_m_floor+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char floor ();
int
main ()
{
return floor ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_m_floor=yes
else
ac_cv_lib_m_floor=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5
$as_echo "$ac_cv_lib_m_floor" >&6; }
if test "x$ac_cv_lib_m_floor" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBM 1
_ACEOF
LIBS="-lm $LIBS"
fi
# Checks for header files, and refuse to go on if no KIOCSOUND is available.
ac_ext=c
......@@ -4729,6 +4864,25 @@ _ACEOF
rm -f conftest*
# Check for certain routines which are missing from liboss-salsa-dev
# (kfreebsd's libasound implementation):
for ac_func in \
snd_pcm_hw_params_test_rate \
snd_pcm_hw_params_test_periods \
snd_pcm_hw_params_test_buffer_size \
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
# Decide on which subdirectories to build; substitute into SUBDIRS. Build
# cwcp if curses is available, and xcwcp if Qt is available.
SUBDIRS="libcw cwutils cw cwgen"
......@@ -5656,7 +5810,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by UnixCW $as_me 3.0, which was
This file was extended by UnixCW $as_me 3.0.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -5718,7 +5872,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
UnixCW config.status 3.0
UnixCW config.status 3.0.1
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
......
# Copyright (C) 2001-2006 Simon Baldwin (simon_baldwin@yahoo.com)
# Copyright (C) 2011 Kamil Ignacak (acerion@wp.pl)
# Copyright (C) 2011-2012 Kamil Ignacak (acerion@wp.pl)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
......@@ -18,7 +18,7 @@
# General initializations.
AC_PREREQ(2.57)
AC_INIT([UnixCW], 3.0, [acerion@wp.pl])
AC_INIT([UnixCW], 3.0.1, [acerion@wp.pl])
# Specify a configuration header.
AC_CONFIG_HEADERS(src/config.h)
......@@ -47,6 +47,9 @@ AC_SUBST(LDCONFIG)
# Checks for libraries.
AC_CHECK_LIB(curses, initscr)
AC_CHECK_LIB(asound, snd_pcm_open)
AC_CHECK_LIB(pthread, pthread_create)
AC_CHECK_LIB(m, floor)
# Checks for header files, and refuse to go on if no KIOCSOUND is available.
AC_HEADER_STDC
......@@ -88,6 +91,14 @@ AC_CHECK_FUNCS([floor gettimeofday memset sqrt strchr strdup strrchr \
strtoul getopt_long setlocale memmove select strerror strspn])
AC_FUNC_SELECT_ARGTYPES
# Check for certain routines which are missing from liboss-salsa-dev
# (kfreebsd's libasound implementation):
AC_CHECK_FUNCS([ \
snd_pcm_hw_params_test_rate \
snd_pcm_hw_params_test_periods \
snd_pcm_hw_params_test_buffer_size \
])
# Decide on which subdirectories to build; substitute into SUBDIRS. Build
# cwcp if curses is available, and xcwcp if Qt is available.
SUBDIRS="libcw cwutils cw cwgen"
......
unixcw (3.0.1-1) unstable; urgency=low
* Prepare unixcw source package for new release: 3.0.1
* Remove source of lintian warnings:
- W: cw: maintainer-script-ignores-errors preinst
- W: cwcp: maintainer-script-ignores-errors preinst
- W: libcw3-dev: manpage-has-errors-from-man ...
- W: xcwcp: maintainer-script-ignores-errors preinst
-- Kamil Ignacak <acerion@wp.pl> Sun, 08 Jan 2012 13:22:36 +0100
unixcw (3.0-5) unstable; urgency=high
* Remove dangling symlinks /usr/share/doc/{cw,cwcp,xcwcp}
......
......@@ -17,7 +17,7 @@ Source: http://unixcw.sourceforge.net
Files: *
Copyright: Copyright (C) 2001-2006 Simon Baldwin (simon_baldwin@yahoo.com)
Copyright (C) 2011 Kamil Ignacak (acerion@wp.pl)
Copyright (C) 2011-2012 Kamil Ignacak (acerion@wp.pl)
License: GPL-2+
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
......
......@@ -2,6 +2,8 @@
#DEBHELPER#
set -e
DOCLINK=/usr/share/doc/cw
# Previously in version 2.3-13 $DOCLINK was a symlink to /usr/share/doc/unixcw.
......
......@@ -2,6 +2,8 @@
#DEBHELPER#
set -e
DOCLINK=/usr/share/doc/cwcp
# Previously in version 2.3-13 $DOCLINK was a symlink to /usr/share/doc/unixcw.
......
usr/lib/libcw.so.3.0.0
usr/lib/libcw.so.3.0.1
usr/lib/libcw.so.3
usr/share/man/man7/cw.7.gz
Author: Petr Salinger <Petr.Salinger@seznam.cz>
Description: Fix FTBFS on GNU/kFreeBSD
From: Kamil Ignacak <acerion@users.sourceforge.net>
Date: Sat, 17 Dec 2011 14:42:26 +0100
Subject: [PATCH 1/4] Re-applying changes from
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403043.
Problems with building unixcw 3.0 were reported by
Kamal. I haven't tested this on kFreeBSD.
---
src/libcw/libcw.c | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/libcw/libcw.c b/src/libcw/libcw.c
index f5ceec2..ab06c14 100644
--- a/src/libcw/libcw.c
+++ b/src/libcw/libcw.c
@@ -2491,12 +2491,27 @@ static volatile int cw_finalization_countdown = 0;
/* Use a mutex to suppress delayed finalizations on complete resets. */
static volatile bool cw_is_finalization_locked_out = false;
+
+
+
+/* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403043 */
+#if defined(NSIG) /* Debian GNU/Linux: signal.h; Debian kFreeBSD: signal.h (libc0.1-dev_2.13-21_kfreebsd-i386.deb) */
+#define CW_SIG_MAX (NSIG)
+#elif defined(_NSIG) /* Debian GNU/Linux: asm-generic/signal.h; Debian kFreeBSD: i386-kfreebsd-gnu/bits/signum.h->signal.h (libc0.1-dev_2.13-21_kfreebsd-i386.deb) */
+#define CW_SIG_MAX (_NSIG)
+#elif defined(RTSIG_MAX) /* Debian GNU/Linux: linux/limits.h */
+#define CW_SIG_MAX ((RTSIG_MAX)+1)
+#else
+#error "unknown number of signals"
+#endif
+
+
/*
* Array of callbacks registered for convenience signal handling. They're
* initialized dynamically to SIG_DFL (if SIG_DFL is not NULL, which it
* seems that it is in most cases).
*/
-static void (*cw_signal_callbacks[RTSIG_MAX]) (int);
+static void (*cw_signal_callbacks[CW_SIG_MAX]) (int);
/**
@@ -2668,14 +2683,14 @@ int cw_register_signal_handler(int signal_number,
{
int index;
- for (index = 0; index < RTSIG_MAX; index++)
+ for (index = 0; index < CW_SIG_MAX; index++)
cw_signal_callbacks[index] = SIG_DFL;
is_initialized = true;
}
/* Reject invalid signal numbers, and SIGALRM, which we use internally. */
- if (signal_number < 0 || signal_number >= RTSIG_MAX
+ if (signal_number < 0 || signal_number >= CW_SIG_MAX
|| signal_number == SIGALRM)
{
errno = EINVAL;
@@ -2727,7 +2742,7 @@ int cw_unregister_signal_handler(int signal_number)
int status;
/* As above, reject unacceptable signal numbers. */
- if (signal_number < 0 || signal_number >= RTSIG_MAX
+ if (signal_number < 0 || signal_number >= CW_SIG_MAX
|| signal_number == SIGALRM)
{
errno = EINVAL;
--
1.7.5.4
From: Kamal Mostafa <kamal@whence.com>
Date: Thu, 22 Dec 2011 12:38:52 -0800
Subject: [PATCH 4/4] Fixed library dependencies: alsa, pthread, m
---
configure | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 3 +
src/config.h.in | 9 +++
src/libcw/libpc.awk | 4 +-
4 files changed, 149 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 8333b33..b71b6aa 100755
--- a/configure
+++ b/configure
@@ -3671,6 +3671,141 @@ _ACEOF
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5
+$as_echo_n "checking for snd_pcm_open in -lasound... " >&6; }
+if ${ac_cv_lib_asound_snd_pcm_open+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lasound $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char snd_pcm_open ();
+int
+main ()
+{
+return snd_pcm_open ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_asound_snd_pcm_open=yes
+else
+ ac_cv_lib_asound_snd_pcm_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open" >&5
+$as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; }
+if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBASOUND 1
+_ACEOF
+
+ LIBS="-lasound $LIBS"
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_create+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pthread_pthread_create=yes
+else
+ ac_cv_lib_pthread_pthread_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+ LIBS="-lpthread $LIBS"
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5
+$as_echo_n "checking for floor in -lm... " >&6; }
+if ${ac_cv_lib_m_floor+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char floor ();
+int
+main ()
+{
+return floor ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_floor=yes
+else
+ ac_cv_lib_m_floor=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5
+$as_echo "$ac_cv_lib_m_floor" >&6; }
+if test "x$ac_cv_lib_m_floor" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
# Checks for header files, and refuse to go on if no KIOCSOUND is available.
ac_ext=c
diff --git a/configure.ac b/configure.ac
index eaba293..50c487b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,9 @@ AC_SUBST(LDCONFIG)
# Checks for libraries.
AC_CHECK_LIB(curses, initscr)
+AC_CHECK_LIB(asound, snd_pcm_open)
+AC_CHECK_LIB(pthread, pthread_create)
+AC_CHECK_LIB(m, floor)
# Checks for header files, and refuse to go on if no KIOCSOUND is available.
AC_HEADER_STDC
diff --git a/src/config.h.in b/src/config.h.in
index ec2f692..abb4526 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -21,12 +21,21 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `asound' library (-lasound). */
+#undef HAVE_LIBASOUND
+
/* Define to 1 if you have the `curses' library (-lcurses). */
#undef HAVE_LIBCURSES
/* Define to 1 if you have the <libintl.h> header file. */
#undef HAVE_LIBINTL_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#undef HAVE_LIBPTHREAD
+
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
diff --git a/src/libcw/libpc.awk b/src/libcw/libpc.awk
index 931374e..5045a20 100644
--- a/src/libcw/libpc.awk
+++ b/src/libcw/libpc.awk
@@ -60,6 +60,6 @@ BEGIN {
# Print the remaining metadata.
printf ("Name: libcw\nDescription: CW (Morse code) library.\n")
- printf ("Version: %s\nRequires:\n", version())
- printf ("Libs: -L${libdir} -lcw\nCflags: -I${includedir}\n")
+ printf ("Version: %s\nRequires: alsa\n", version())
+ printf ("Libs: -L${libdir} -lcw -lpthread -lm\nCflags: -I${includedir}\n")
}
--
1.7.5.4
From 252db09f51bf208b4cdbd56b809d6bfcc91e689b Mon Sep 17 00:00:00 2001
From: Kamal Mostafa <kamal@whence.com>
Date: Thu, 22 Dec 2011 13:30:33 -0800
Subject: [PATCH 5/5] cwcp should not link with AC_LIBS
---
src/cwcp/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/cwcp/Makefile b/src/cwcp/Makefile
index c121326..76b870b 100644
--- a/src/cwcp/Makefile
+++ b/src/cwcp/Makefile
@@ -20,7 +20,7 @@ include ../../Makefile.inc
CC = $(AC_CC)
CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../libcw -I../cwutils
GZIP = $(AC_GZIP)
-LIBS = $(AC_LIBS) -L../libcw -lcw
+LIBS = -lcurses -L../libcw -lcw
SHELL = /bin/sh
--
1.7.5.4