- clean up start_threads.c using bob's start_threads.c as template

- always define -pthread
- make sure right libs are passed along



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@74 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Diane Bruce 2006-01-10 04:30:03 +00:00
parent f504e95c03
commit 1a7eba8421
3 changed files with 8 additions and 6 deletions

6
configure vendored
View File

@ -2,7 +2,7 @@
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for wsjt 0.9.
#
# $Id: configure.ac 71 2006-01-09 21:35:25Z va3db $
# $Id: configure.ac 73 2006-01-10 02:43:23Z va3db $
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
@ -924,7 +924,7 @@ Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
$Id: configure.ac 71 2006-01-09 21:35:25Z va3db $
$Id: configure.ac 73 2006-01-10 02:43:23Z va3db $
_ACEOF
exit 0
fi
@ -5613,7 +5613,7 @@ _ACEOF
AUDIO="start_threads.c"
LDFLAGS="${LDFLAGS} -lpthread -lasound"
LDFLAGS="${LDFLAGS} -lasound"
fi
if test "$oss" = yes; then

View File

@ -219,7 +219,7 @@ AC_HELP_STRING([--enable-portaudio],[Force PORTAUDIO SOUND usage.]),
if test "$alsa" = yes; then
AC_DEFINE(USE_ALSA, 1, [Define if you want ALSA used.])
AC_SUBST(AUDIO, "start_threads.c")
LDFLAGS="${LDFLAGS} -lpthread -lasound"
LDFLAGS="${LDFLAGS} -lasound"
fi
if test "$oss" = yes; then

View File

@ -11,7 +11,8 @@
#include <time.h>
#ifdef USE_PORTAUDIO
extern a2d_();
extern void decode1_(int *iarg);
extern void a2d_(int *iarg);
#endif
#ifdef USE_ALSA
@ -551,6 +552,7 @@ int start_threads_(int *ndevin, int *ndevout, short y1[], short y2[],
//snd_pcm_start(alsa_driver_playback.audio_fd);
#else
/* snd_pcm_start */
iret2 = pthread_create(&thread2,NULL,a2d_,&iarg2);
iret1 = pthread_create(&thread1,NULL,a2d_,&iarg1);
iret2 = pthread_create(&thread2,NULL,decode1_,&iarg2);
#endif
}