From 7dfd1025a3ada2a771f06e8af59b35cd16a45c03 Mon Sep 17 00:00:00 2001 From: Diane Bruce Date: Tue, 10 Jan 2006 04:30:03 +0000 Subject: [PATCH] - 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 --- configure | 6 +++--- configure.ac | 2 +- start_threads.c | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 8e24295c4..ba1037222 100755 --- a/configure +++ b/configure @@ -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 diff --git a/configure.ac b/configure.ac index 568570029..6cfe929b6 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/start_threads.c b/start_threads.c index 85d2d1cd3..475935bca 100644 --- a/start_threads.c +++ b/start_threads.c @@ -11,7 +11,8 @@ #include #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 }