liboss-commit Mailing List for Apple OS X libOSS (Page 7)
Brought to you by:
thesin
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(55) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
(52) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(16) |
Feb
(9) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Justin <th...@us...> - 2002-05-10 15:05:44
|
Update of /cvsroot/liboss/liboss In directory usw-pr-cvs1:/tmp/cvs-serv1820 Modified Files: configure.in Log Message: Add a src dir and change bin program name to osscat, and now compiles and installs Index: configure.in =================================================================== RCS file: /cvsroot/liboss/liboss/configure.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- configure.in 10 May 2002 03:35:19 -0000 1.11 +++ configure.in 10 May 2002 15:05:41 -0000 1.12 @@ -151,4 +151,5 @@ AC_OUTPUT([ Makefile lib/Makefile +src/Makefile doc/Makefile]) |
|
From: Dave V. <va...@us...> - 2002-05-10 15:00:43
|
Update of /cvsroot/liboss/liboss/lib
In directory usw-pr-cvs1:/tmp/cvs-serv29774
Modified Files:
liboss.c
Log Message:
Added lots of stuff. Some sound may come soon!
Index: liboss.c
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/liboss.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- liboss.c 10 May 2002 03:32:50 -0000 1.6
+++ liboss.c 10 May 2002 14:53:29 -0000 1.7
@@ -42,15 +42,19 @@
* With some preprocessor magic it could be the same file.
*/
-#include "../config.h"
+#include "config.h"
#include <sys/param.h>
+#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
+#include <pthread.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+/* FIXME: The whole file will need CoreAudio, not just the #include */
#ifdef HAVE_COREAUDIO
# include <CoreAudio/CoreAudio.h>
#endif
@@ -62,20 +66,36 @@
#define TO_OSSVOL(x) (((x) * 100 + 127) / 255)
#define FROM_OSSVOL(x) ((((x) > 100 ? 100 : (x)) * 255 + 50) / 100)
+#define INTARG (*(int*)argp)
-static int audio_ioctl(int, unsigned long, void *);
-static int audio_open(int flags);
-static int mixer_ioctl(int, unsigned long, void *);
-
-/* Don't think we need this */
-#if 0
-static struct audiodevinfo *getdevinfo(int);
-static int opaque_to_enum(struct audiodevinfo *di, audio_mixer_name_t *label, int opq);
-static int enum_to_ord(struct audiodevinfo *di, int enm);
-static int enum_to_mask(struct audiodevinfo *di, int enm);
-#endif
+static int oss_audio_ioctl(int, unsigned long, void *);
+static int oss_audio_open(int flags);
+static int oss_init(void);
+static int oss_mixer_ioctl(int, unsigned long, void *);
+static void *oss_start_device(void *shared);
+
+#define BUF_SIZE 1024
+
+typedef enum rw_e {
+ OSS_READ = 1,
+ OSS_WRITE = 2,
+ OSS_RW = 3,
+} rw_e;
+
+typedef struct device_shared_t {
+ pthread_mutex_t client_mut;
+ pthread_mutex_t mut;
+ rw_e rw;
+ int iosock;
+ char rbuf[BUF_SIZE]; /* FIXME: use fragments */
+ char *rend;
+ pthread_cond_t full;
+} device_shared_t;
+
+static device_shared_t sh;
-#define INTARG (*(int*)argp)
+static int initialized = 0;
+static pthread_t server;
int
oss_open(const char *path, int flags, mode_t mode)
@@ -85,8 +105,8 @@
if (realpath(path, buf) == NULL)
return open(path, flags, mode);
- if (0 == strcmp("/dev/audio", buf)) {
- return audio_open(flags);
+ if (0 == strcmp("/dev/dspW", buf)) {
+ return oss_audio_open(flags);
} else {
/* FIXME: add mixer stuff */
return open(path, flags, mode);
@@ -97,22 +117,124 @@
oss_ioctl(int fd, unsigned long com, void *argp)
{
if (IOCGROUP(com) == 'P')
- return audio_ioctl(fd, com, argp);
+ return oss_audio_ioctl(fd, com, argp);
else if (IOCGROUP(com) == 'M')
- return mixer_ioctl(fd, com, argp);
+ return oss_mixer_ioctl(fd, com, argp);
else
return ioctl(fd, com, argp);
}
static int
-audio_open(int flags)
+oss_audio_open(int flags)
{
- /* FIXME: create sockets */
+ /* FIXME: Don't forget recording!
+ Set up format defaults.
+ setsockopt()
+ Close sockets (and alert Mac side) if they're open already.
+ Apparently you can't test if a socket is closed at the other end,
+ so we have to override close() too.
+ Account for multiple, different /dev/blahs (use a table).
+ Stop abusing clients.
+ */
+ int socks[2];
+ rw_e rw;
+
+ if (!initialized) {
+ if (oss_init() == -1)
+ return -1;
+ }
+
+ switch (flags & O_ACCMODE) {
+ case O_RDONLY: rw = OSS_WRITE; break; /* If they want to read, we must write */
+ case O_WRONLY: rw = OSS_READ; break;
+ case O_RDWR: rw = OSS_RW; break;
+ default:
+ return -1;
+ }
+
+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, socks) == -1) {
+ fprintf(stderr, "Liboss: Sockets could not be created.\n");
+ return -1;
+ }
+
+ pthread_mutex_lock(&sh.client_mut);
+ pthread_mutex_lock(&sh.mut);
+ if (sh.iosock != -1) {
+ fprintf(stderr, "Liboss: Trying to reopen a device! Naughty client!\n");
+ pthread_mutex_unlock(&sh.mut);
+ pthread_mutex_unlock(&sh.client_mut);
+ close(socks[0]);
+ close(socks[1]);
+ return -1;
+ }
+ sh.iosock = socks[0];
+ sh.rw = rw;
+ pthread_mutex_unlock(&sh.mut);
+ pthread_mutex_unlock(&sh.client_mut);
+ pthread_create(&server, NULL, &oss_start_device, &sh);
+
+ return socks[1];
+}
+
+static int
+oss_init(void)
+{
+ int err = 0;
+
+ err |= pthread_mutex_init(&sh.client_mut, NULL);
+ err |= pthread_mutex_init(&sh.mut, NULL);
+ err |= pthread_cond_init(&sh.full, NULL);
+ if (err)
+ return -1;
+
+ sh.rend = sh.rbuf;
+ sh.iosock = -1;
+
+ initialized = 1;
return 0;
}
+static void*
+oss_start_device(void *shared) {
+ device_shared_t *msh = (device_shared_t*)shared;
+
+ while (1) {
+ int iosock;
+
+ pthread_mutex_lock(&msh->client_mut);
+ pthread_mutex_lock(&msh->mut); /* Do the whole read/write atomically */
+ if ((iosock = msh->iosock) == -1) {
+ pthread_mutex_unlock(&msh->mut); /* We've been closed */
+ pthread_mutex_unlock(&msh->client_mut);
+ return NULL;
+ } else {
+ if (msh->rw | OSS_READ) {
+ char *buf = msh->rbuf, *end = msh->rend;
+ int nbytes;
+ while (end - buf == BUF_SIZE) {
+ /* Still don't let the client through */
+ pthread_cond_wait(&msh->full, &msh->mut);
+ }
+ /* FIXME: what if a client's write doesn't write everything, as expected? */
+ nbytes = read(msh->iosock, end, BUF_SIZE - (end - buf));
+ end += nbytes;
+
+ printf("%d bytes read\n", nbytes);
+ end = buf;
+ }
+ if (msh->rw | OSS_WRITE) {
+ /* FIXME: Implement this */
+ }
+ }
+ pthread_mutex_unlock(&msh->mut);
+ pthread_mutex_unlock(&msh->client_mut);
+ }
+
+ return NULL;
+}
+
static int
-audio_ioctl(int fd, unsigned long com, void *argp)
+oss_audio_ioctl(int fd, unsigned long com, void *argp)
{
int retval = 0;
@@ -420,187 +542,8 @@
return 0;
}
-/* I don't think we need any of this stuff */
-#if 0
-
-/* If the NetBSD mixer device should have more than NETBSD_MAXDEVS devices
- * some will not be available to Linux */
-#define NETBSD_MAXDEVS 64
-struct audiodevinfo {
- int done;
- dev_t dev;
- int16_t devmap[SOUND_MIXER_NRDEVICES],
- rdevmap[NETBSD_MAXDEVS];
- char names[NETBSD_MAXDEVS][MAX_AUDIO_DEV_LEN];
- int enum2opaque[NETBSD_MAXDEVS];
- u_long devmask, recmask, stereomask;
- u_long caps, source;
-};
-
-static int
-opaque_to_enum(struct audiodevinfo *di, audio_mixer_name_t *label, int opq)
-{
- int i, o;
-
- for (i = 0; i < NETBSD_MAXDEVS; i++) {
- o = di->enum2opaque[i];
- if (o == opq)
- break;
- if (o == -1 && label != NULL &&
- !strncmp(di->names[i], label->name, sizeof di->names[i])) {
- di->enum2opaque[i] = opq;
- break;
- }
- }
- if (i >= NETBSD_MAXDEVS)
- i = -1;
- /*printf("opq_to_enum %s %d -> %d\n", label->name, opq, i);*/
- return (i);
-}
-
-static int
-enum_to_ord(struct audiodevinfo *di, int enm)
-{
- if (enm >= NETBSD_MAXDEVS)
- return (-1);
-
- /*printf("enum_to_ord %d -> %d\n", enm, di->enum2opaque[enm]);*/
- return (di->enum2opaque[enm]);
-}
-
-static int
-enum_to_mask(struct audiodevinfo *di, int enm)
-{
- int m;
- if (enm >= NETBSD_MAXDEVS)
- return (0);
-
- m = di->enum2opaque[enm];
- if (m == -1)
- m = 0;
- /*printf("enum_to_mask %d -> %d\n", enm, di->enum2opaque[enm]);*/
- return (m);
-}
-
-/*
- * Collect the audio device information to allow faster
- * emulation of the Linux mixer ioctls. Cache the information
- * to eliminate the overhead of repeating all the ioctls needed
- * to collect the information.
- */
-static struct audiodevinfo *
-getdevinfo(int fd)
-{
- mixer_devinfo_t mi;
- int i, j, e;
- static struct {
- char *name;
- int code;
- } *dp, devs[] = {
- { AudioNmicrophone, SOUND_MIXER_MIC },
- { AudioNline, SOUND_MIXER_LINE },
- { AudioNcd, SOUND_MIXER_CD },
- { AudioNdac, SOUND_MIXER_PCM },
- { AudioNrecord, SOUND_MIXER_IMIX },
- { AudioNmaster, SOUND_MIXER_VOLUME },
- { AudioNtreble, SOUND_MIXER_TREBLE },
- { AudioNbass, SOUND_MIXER_BASS },
- { AudioNspeaker, SOUND_MIXER_SPEAKER },
-/* { AudioNheadphone, ?? },*/
- { AudioNoutput, SOUND_MIXER_OGAIN },
- { AudioNinput, SOUND_MIXER_IGAIN },
-/* { AudioNmaster, SOUND_MIXER_SPEAKER },*/
-/* { AudioNstereo, ?? },*/
-/* { AudioNmono, ?? },*/
- { AudioNfmsynth, SOUND_MIXER_SYNTH },
-/* { AudioNwave, SOUND_MIXER_PCM },*/
- { AudioNmidi, SOUND_MIXER_SYNTH },
-/* { AudioNmixerout, ?? },*/
- { 0, -1 }
- };
- static struct audiodevinfo devcache = { 0 };
- struct audiodevinfo *di = &devcache;
- struct stat sb;
-
- /* Figure out what device it is so we can check if the
- * cached data is valid.
- */
- if (fstat(fd, &sb) < 0)
- return 0;
- if (di->done && di->dev == sb.st_dev)
- return di;
-
- di->done = 1;
- di->dev = sb.st_dev;
- di->devmask = 0;
- di->recmask = 0;
- di->stereomask = 0;
- di->source = ~0;
- di->caps = 0;
- for(i = 0; i < SOUND_MIXER_NRDEVICES; i++)
- di->devmap[i] = -1;
- for(i = 0; i < NETBSD_MAXDEVS; i++) {
- di->rdevmap[i] = -1;
- di->names[i][0] = '\0';
- di->enum2opaque[i] = -1;
- }
- for(i = 0; i < NETBSD_MAXDEVS; i++) {
- mi.index = i;
- if (ioctl(fd, AUDIO_MIXER_DEVINFO, &mi) < 0)
- break;
- switch(mi.type) {
- case AUDIO_MIXER_VALUE:
- for(dp = devs; dp->name; dp++)
- if (strcmp(dp->name, mi.label.name) == 0)
- break;
- if (dp->code >= 0) {
- di->devmap[dp->code] = i;
- di->rdevmap[i] = dp->code;
- di->devmask |= 1 << dp->code;
- if (mi.un.v.num_channels == 2)
- di->stereomask |= 1 << dp->code;
- strncpy(di->names[i], mi.label.name,
- sizeof di->names[i]);
- }
- break;
- }
- }
- for(i = 0; i < NETBSD_MAXDEVS; i++) {
- mi.index = i;
- if (ioctl(fd, AUDIO_MIXER_DEVINFO, &mi) < 0)
- break;
- if (strcmp(mi.label.name, AudioNsource) != 0)
- continue;
- di->source = i;
- switch(mi.type) {
- case AUDIO_MIXER_ENUM:
- for(j = 0; j < mi.un.e.num_mem; j++) {
- e = opaque_to_enum(di,
- &mi.un.e.member[j].label,
- mi.un.e.member[j].ord);
- if (e >= 0)
- di->recmask |= 1 << di->rdevmap[e];
- }
- di->caps = SOUND_CAP_EXCL_INPUT;
- break;
- case AUDIO_MIXER_SET:
- for(j = 0; j < mi.un.s.num_mem; j++) {
- e = opaque_to_enum(di,
- &mi.un.s.member[j].label,
- mi.un.s.member[j].mask);
- if (e >= 0)
- di->recmask |= 1 << di->rdevmap[e];
- }
- break;
- }
- }
- return di;
-}
-
-#endif /* Probably not needed */
-
int
-mixer_ioctl(int fd, unsigned long com, void *argp)
+oss_mixer_ioctl(int fd, unsigned long com, void *argp)
{
/* FIXME: implement */
errno = EINVAL;
|
|
From: Justin <th...@us...> - 2002-05-10 14:38:56
|
Update of /cvsroot/liboss/liboss In directory usw-pr-cvs1:/tmp/cvs-serv24956 Modified Files: Makefile.am Log Message: Adding a dir for binaries Index: Makefile.am =================================================================== RCS file: /cvsroot/liboss/liboss/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile.am 3 May 2002 16:20:01 -0000 1.1.1.1 +++ Makefile.am 10 May 2002 14:38:54 -0000 1.2 @@ -2,7 +2,7 @@ ## Process this file with automake to produce Makefile.in ## -SUBDIRS = lib +SUBDIRS = lib src EXTRA_DIST = |
|
From: Justin <th...@us...> - 2002-05-10 14:38:02
|
Update of /cvsroot/liboss/liboss/src In directory usw-pr-cvs1:/tmp/cvs-serv24638/src Log Message: Directory /cvsroot/liboss/liboss/src added to the repository |
|
From: Dave V. <va...@us...> - 2002-05-10 10:13:00
|
Update of /cvsroot/liboss/liboss/lib
In directory usw-pr-cvs1:/tmp/cvs-serv2817
Modified Files:
libosscat.c
Log Message:
Stupid errors fixed.
Index: libosscat.c
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/libosscat.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- libosscat.c 10 May 2002 10:10:56 -0000 1.1
+++ libosscat.c 10 May 2002 10:12:57 -0000 1.2
@@ -11,18 +11,18 @@
int fd, play;
char buf[BUF_SIZE];
- if (argc != 1) {
+ if (argc != 2) {
fprintf(stderr, "Usage: libosscat file\n");
exit(1);
}
if ((fd = open(argv[1], O_RDONLY, 0)) < 0) {
- fprintf(stderr, "File %s could not be opened.", argv[1]);
+ fprintf(stderr, "File %s could not be opened.\n", argv[1]);
exit(1);
}
if ((play = open(DEVICE, O_WRONLY, 0)) < 0) {
- fprintf(stderr, "%s could not be opened.", DEVICE);
+ fprintf(stderr, "%s could not be opened.\n", DEVICE);
exit(1);
}
|
|
From: Dave V. <va...@us...> - 2002-05-10 10:11:02
|
Update of /cvsroot/liboss/liboss/lib
In directory usw-pr-cvs1:/tmp/cvs-serv2220
Added Files:
libosscat.c
Log Message:
Test case.
--- NEW FILE: libosscat.c ---
#include "soundcard.h"
#include <stdio.h>
/* FIXME: Add capability for recording with 'libosscat /dev/audio > somefile' */
#define BUF_SIZE 1024
#define DEVICE "/dev/dspW"
int main(int argc, char **argv)
{
int fd, play;
char buf[BUF_SIZE];
if (argc != 1) {
fprintf(stderr, "Usage: libosscat file\n");
exit(1);
}
if ((fd = open(argv[1], O_RDONLY, 0)) < 0) {
fprintf(stderr, "File %s could not be opened.", argv[1]);
exit(1);
}
if ((play = open(DEVICE, O_WRONLY, 0)) < 0) {
fprintf(stderr, "%s could not be opened.", DEVICE);
exit(1);
}
while (read(fd, buf, BUF_SIZE) > 0) {
write(play, buf, BUF_SIZE); /* if it errors, keep going */
}
return 0;
}
|
|
From: Justin <th...@us...> - 2002-05-10 03:35:22
|
Update of /cvsroot/liboss/liboss
In directory usw-pr-cvs1:/tmp/cvs-serv23835
Modified Files:
acconfig.h configure.in
Log Message:
Added the CoreAudio if statement
Index: acconfig.h
===================================================================
RCS file: /cvsroot/liboss/liboss/acconfig.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- acconfig.h 3 May 2002 16:19:55 -0000 1.1.1.1
+++ acconfig.h 10 May 2002 03:35:19 -0000 1.2
@@ -6,7 +6,10 @@
#undef LIBOSS_MINOR
#undef LIBOSS_SUB
-@BOTTOM@
+#undef HAVE_COREAUDIO
+
+@BOTTOM@H_TOP
+
/* Disable GCC compiler extensions, if gcc is not in use */
#ifndef __GNUC__
#define __attribute__(x) /*empty*/
Index: configure.in
===================================================================
RCS file: /cvsroot/liboss/liboss/configure.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- configure.in 9 May 2002 23:07:40 -0000 1.10
+++ configure.in 10 May 2002 03:35:19 -0000 1.11
@@ -3,11 +3,6 @@
dnl
AC_INIT(lib/liboss.c)
-dnl
-dnl Require libtool minimum version 1.4.0
-dnl
-dnl AC_PREREQ_LIBTOOL(1.4.0,,AC_MSG_ERROR(*** You should have libtool >= 1.4 installed ***))
-
dnl Making releases:
dnl LIBOSS_SUB += 1;
dnl LIBOSS_IFACE_AGE += 1;
@@ -61,11 +56,21 @@
dnl
AC_CANONICAL_SYSTEM
-dnl AC_CANONICAL_HOST
dnl
AM_INIT_AUTOMAKE("liboss", $LIBOSS_MAJOR.$LIBOSS_MINOR.$LIBOSS_SUB$LIBOSS_PRE)
+dnl
+dnl Made possible to build for another arch.
+dnl
+if test x$LIBOSS_BUILD != "x"; then
+ AC_MSG_RESULT([*** build forced to $LIBOSS_BUILD ***])
+ build=$LIBOSS_BUILD
+ host=$LIBOSS_BUILD
+else
+ check_athlon=yes
+fi
+
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
@@ -74,15 +79,31 @@
AC_PROG_RANLIB
AC_PROG_LN_S
-dnl Common flags for all platforms
-CFLAGS="$CFLAGS -I$prefix/include"
+dnl Flags not supported by all *cc* variants
+AC_TRY_CFLAGS("-Wall", wall="-Wall", wall="")
+AC_TRY_CFLAGS("-no-cpp-precomp", nocpp="-no-cpp-precomp", nocpp="")
+
+dnl
+dnl debug cflags
+dnl
+AC_SUBST(DEBUG_CFLAGS)
+DEBUG_CFLAGS="-g -DDEBUG"
+
+dnl
+dnl Some include paths ( !!! DO NOT REMOVE !!! )
+dnl
+INCLUDES='-I$(top_srcdir) -I$(top_srcdir)/include'
+AC_SUBST(INCLUDES)
+
+dnl Common cflags for all platforms
+CFLAGS="$CFLAGS $nocpp $wall -I$prefix/include"
CPPFLAGS="$CPPFLAGS $CFLAGS"
+DEBUG_CFLAGS="$CFLAGS $DEBUG_CFLAGS"
LDFLAGS="$LDFLAGS -L$prefix/lib"
dnl
dnl Libtool
dnl
-AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
@@ -104,12 +125,6 @@
AC_TYPE_SIZE_T
dnl
-dnl debug cflags
-dnl
-AC_SUBST(DEBUG_CFLAGS)
-DEBUG_CFLAGS="-g -DDEBUG"
-
-dnl
dnl Using or not using -fPIC (override default behavior - system dependent)
dnl
AC_ARG_ENABLE(fpic,
@@ -118,58 +133,20 @@
AC_CHECK_HEADERS(errno.h string.h stdlib.h\
sys/types.h sys/stat.h sys/param.h \
- CoreAudio/CoreAudio.h \
machine/endian.h)
-COREAUDIO_LDFLAGS='-framework CoreAudio'
+dnl
+dnl CoreAudio
+dnl
+AC_CHECK_HEADER(CoreAudio/CoreAudio.h,
+[ have_coreaudio="yes"
+ COREAUDIO_LDFLAGS="-framework CoreAudio"
+ COREAUDIO_CFLAGS="-F/System/Library/Frameworks/Cocoa.framework"
+ AC_DEFINE(HAVE_COREAUDIO) ])
AC_SUBST(COREAUDIO_LDFLAGS)
-
-COREAUDIO_CFLAGS='-F/System/Library/Frameworks/Cocoa.framework'
AC_SUBST(COREAUDIO_CFLAGS)
AC_SYS_LONG_FILE_NAMES
-
-dnl For the moment we will assume that all systems which have
-dnl the unixyness to run configure are unixy enough to do the
-dnl PreservePermissions stuff. I have this sinking feeling that
-dnl things won't be that simple, before long.
-dnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT)
-
-dnl Flags not supported by all *cc* variants
-AC_TRY_CFLAGS("-Wall", wall="-Wall", wall="")
-AC_TRY_CFLAGS("-no-cpp-precomp", nocpp="-no-cpp-precomp", nocpp="")
-
-dnl
-dnl Some include paths ( !!! DO NOT REMOVE !!! )
-dnl
-INCLUDES='-I$(top_srcdir) -I$(top_srcdir)/include'
-AC_SUBST(INCLUDES)
-
-dnl Common cflags for all platforms
-CFLAGS="$CFLAGS $nocpp $wall"
-CPPFLAGS="$CPPFLAGS $nocpp $wall"
-DEBUG_CFLAGS="$CFLAGS $DEBUG_CFLAGS"
-LDFLAGS="$LDFLAGS"
-
-dnl
-dnl Get where .m4 should be installed.
-dnl
-case "`id`" in
- uid=0\(* )
- AC_MSG_CHECKING(for aclocal directory)
- if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL_DIR="`eval $ACLOCAL --print-ac-dir`"
- AC_MSG_RESULT($ACLOCAL_DIR)
- else
- ACLOCAL_DIR="/usr/local/share/aclocal"
- AC_MSG_RESULT(none - will be installed in $ACLOCAL_DIR)
- fi
- escapedprefix="`echo $prefix | sed -e 's/\\//\\\\\//g'`"
- ACLOCAL_DIR="`echo $ACLOCAL_DIR|sed -e 's/^'$escapedprefix/'\${prefix}'/`"
- AC_SUBST(ACLOCAL_DIR)
- ;;
-esac
-AM_CONDITIONAL(INSTALL_M4, test x"$ACLOCAL_DIR" != "x")
AC_OUTPUT([
Makefile
|
|
From: Justin <th...@us...> - 2002-05-10 03:32:54
|
Update of /cvsroot/liboss/liboss/lib In directory usw-pr-cvs1:/tmp/cvs-serv23348 Modified Files: liboss.c Log Message: Changed CoreAudio Define Index: liboss.c =================================================================== RCS file: /cvsroot/liboss/liboss/lib/liboss.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- liboss.c 9 May 2002 23:02:29 -0000 1.5 +++ liboss.c 10 May 2002 03:32:50 -0000 1.6 @@ -51,7 +51,7 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_COREAUDIO_COREAUDIO_H +#ifdef HAVE_COREAUDIO # include <CoreAudio/CoreAudio.h> #endif |
|
From: Justin <th...@us...> - 2002-05-09 23:07:43
|
Update of /cvsroot/liboss/liboss
In directory usw-pr-cvs1:/tmp/cvs-serv30624
Modified Files:
configure.in
Log Message:
Added Coreaudio as an option for futur expansion, this is temp till I get home and add a test for coreaudio
Index: configure.in
===================================================================
RCS file: /cvsroot/liboss/liboss/configure.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- configure.in 9 May 2002 19:41:22 -0000 1.9
+++ configure.in 9 May 2002 23:07:40 -0000 1.10
@@ -121,6 +121,12 @@
CoreAudio/CoreAudio.h \
machine/endian.h)
+COREAUDIO_LDFLAGS='-framework CoreAudio'
+AC_SUBST(COREAUDIO_LDFLAGS)
+
+COREAUDIO_CFLAGS='-F/System/Library/Frameworks/Cocoa.framework'
+AC_SUBST(COREAUDIO_CFLAGS)
+
AC_SYS_LONG_FILE_NAMES
dnl For the moment we will assume that all systems which have
@@ -136,7 +142,7 @@
dnl
dnl Some include paths ( !!! DO NOT REMOVE !!! )
dnl
-INCLUDES='-I$(top_srcdir) -I$(top_srcdir)/include -F/System/Library/Frameworks/Carbon.frameworks -F/System/Library/Frameworks/Cocoa.framework'
+INCLUDES='-I$(top_srcdir) -I$(top_srcdir)/include'
AC_SUBST(INCLUDES)
dnl Common cflags for all platforms
|
|
From: Justin <th...@us...> - 2002-05-09 23:02:32
|
Update of /cvsroot/liboss/liboss/lib
In directory usw-pr-cvs1:/tmp/cvs-serv29174
Modified Files:
Makefile.am liboss.c
Log Message:
Added Coreaudio as an option for futur expansion
Index: Makefile.am
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Makefile.am 9 May 2002 19:20:06 -0000 1.8
+++ Makefile.am 9 May 2002 23:02:29 -0000 1.9
@@ -2,13 +2,13 @@
## Process this file with automake to produce Makefile.in
##
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ $(COREAUDIO_CFLAGS)
lib_LTLIBRARIES = liboss.la
liboss_la_SOURCES = liboss.c
liboss_la_DEPENDENCIES =
-liboss_la_LIBADD = $(DYNAMIC_LD_LIBS)
+liboss_la_LIBADD = $(COREAUDIO_LDFLAGS)
liboss_la_LDFLAGS = -no-undefined \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
Index: liboss.c
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/liboss.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- liboss.c 9 May 2002 14:26:11 -0000 1.4
+++ liboss.c 9 May 2002 23:02:29 -0000 1.5
@@ -42,6 +42,8 @@
* With some preprocessor magic it could be the same file.
*/
+#include "../config.h"
+
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -49,7 +51,9 @@
#include <stdlib.h>
#include <string.h>
-#include <CoreAudio/CoreAudio.h>
+#ifdef HAVE_COREAUDIO_COREAUDIO_H
+# include <CoreAudio/CoreAudio.h>
+#endif
#include "soundcard.h"
|
|
From: Justin <th...@us...> - 2002-05-09 19:41:25
|
Update of /cvsroot/liboss/liboss
In directory usw-pr-cvs1:/tmp/cvs-serv2391
Modified Files:
configure.in
Log Message:
my bad on the comment, just removed completly
Index: configure.in
===================================================================
RCS file: /cvsroot/liboss/liboss/configure.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- configure.in 9 May 2002 19:36:55 -0000 1.8
+++ configure.in 9 May 2002 19:41:22 -0000 1.9
@@ -83,7 +83,6 @@
dnl Libtool
dnl
AC_LIBTOOL_DLOPEN
-#AM_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
@@ -109,16 +108,6 @@
dnl
AC_SUBST(DEBUG_CFLAGS)
DEBUG_CFLAGS="-g -DDEBUG"
-
-#dnl
-3dnl dynamic linker
-3dnl
-#AC_CHECK_LIB(c, dlopen,
-# DYNAMIC_LD_LIBS="",
-# AC_CHECK_LIB(dl, dlopen,
-# DYNAMIC_LD_LIBS="-ldl",
-# AC_MSG_ERROR(dynamic linker needed)))
-#AC_SUBST(DYNAMIC_LD_LIBS)
dnl
dnl Using or not using -fPIC (override default behavior - system dependent)
|
|
From: Justin <th...@us...> - 2002-05-09 19:36:58
|
Update of /cvsroot/liboss/liboss
In directory usw-pr-cvs1:/tmp/cvs-serv998
Modified Files:
configure.in
Log Message:
removed -ldl check and added static default to yes
Index: configure.in
===================================================================
RCS file: /cvsroot/liboss/liboss/configure.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure.in 9 May 2002 19:20:06 -0000 1.7
+++ configure.in 9 May 2002 19:36:55 -0000 1.8
@@ -83,7 +83,7 @@
dnl Libtool
dnl
AC_LIBTOOL_DLOPEN
-AM_DISABLE_STATIC
+#AM_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
@@ -110,15 +110,15 @@
AC_SUBST(DEBUG_CFLAGS)
DEBUG_CFLAGS="-g -DDEBUG"
-dnl
-dnl dynamic linker
-dnl
-AC_CHECK_LIB(c, dlopen,
- DYNAMIC_LD_LIBS="",
- AC_CHECK_LIB(dl, dlopen,
- DYNAMIC_LD_LIBS="-ldl",
- AC_MSG_ERROR(dynamic linker needed)))
-AC_SUBST(DYNAMIC_LD_LIBS)
+#dnl
+3dnl dynamic linker
+3dnl
+#AC_CHECK_LIB(c, dlopen,
+# DYNAMIC_LD_LIBS="",
+# AC_CHECK_LIB(dl, dlopen,
+# DYNAMIC_LD_LIBS="-ldl",
+# AC_MSG_ERROR(dynamic linker needed)))
+#AC_SUBST(DYNAMIC_LD_LIBS)
dnl
dnl Using or not using -fPIC (override default behavior - system dependent)
|
|
From: Justin <th...@us...> - 2002-05-09 19:20:09
|
Update of /cvsroot/liboss/liboss In directory usw-pr-cvs1:/tmp/cvs-serv28597 Modified Files: configure.in Log Message: Fixed library versioning code Index: configure.in =================================================================== RCS file: /cvsroot/liboss/liboss/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- configure.in 9 May 2002 15:57:33 -0000 1.6 +++ configure.in 9 May 2002 19:20:06 -0000 1.7 @@ -34,9 +34,9 @@ AC_DEFINE_UNQUOTED(LIBOSS_SUB, $LIBOSS_SUB) LT_RELEASE=$LIBOSS_MAJOR.$LIBOSS_MINOR.$LIBOSS_SUB -LT_CURRENT=0 -LT_REVISION=0 -LT_AGE=0 +LT_REVISION=$LIBOSS_SUB +LT_CURRENT=`expr $LIBOSS_MAJOR + $LIBOSS_MINOR` +LT_AGE=$LIBOSS_MINOR dnl non-devel releases should not use LT_RELEASE but something like this: dnl |
|
From: Justin <th...@us...> - 2002-05-09 19:20:09
|
Update of /cvsroot/liboss/liboss/lib In directory usw-pr-cvs1:/tmp/cvs-serv28597/lib Modified Files: Makefile.am Log Message: Fixed library versioning code Index: Makefile.am =================================================================== RCS file: /cvsroot/liboss/liboss/lib/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Makefile.am 9 May 2002 18:42:12 -0000 1.7 +++ Makefile.am 9 May 2002 19:20:06 -0000 1.8 @@ -10,7 +10,8 @@ liboss_la_DEPENDENCIES = liboss_la_LIBADD = $(DYNAMIC_LD_LIBS) -liboss_la_LDFLAGS = +liboss_la_LDFLAGS = -no-undefined \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) include_HEADERS = $(top_srcdir)/include/soundcard.h |
|
From: Justin <th...@us...> - 2002-05-09 18:42:15
|
Update of /cvsroot/liboss/liboss/lib In directory usw-pr-cvs1:/tmp/cvs-serv17105 Modified Files: Makefile.am Log Message: noinstall_HEADERS works properly now Index: Makefile.am =================================================================== RCS file: /cvsroot/liboss/liboss/lib/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile.am 9 May 2002 15:57:00 -0000 1.6 +++ Makefile.am 9 May 2002 18:42:12 -0000 1.7 @@ -12,7 +12,7 @@ liboss_la_LDFLAGS = -include_HEADERS = $(srcdir)/include/soundcard.h +include_HEADERS = $(top_srcdir)/include/soundcard.h noinst_HEADERS = |
|
From: Justin <th...@us...> - 2002-05-09 18:07:53
|
Update of /cvsroot/liboss/liboss In directory usw-pr-cvs1:/tmp/cvs-serv8370 Modified Files: .cvsignore Log Message: Thanks Fingolfin forgot about these, here is an other one. Index: .cvsignore =================================================================== RCS file: /cvsroot/liboss/liboss/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .cvsignore 9 May 2002 17:51:27 -0000 1.1 +++ .cvsignore 9 May 2002 18:07:50 -0000 1.2 @@ -4,3 +4,4 @@ configure depcomp Makefile.in +stamp.h.in |
|
From: Max H. <fin...@us...> - 2002-05-09 17:51:30
|
Update of /cvsroot/liboss/liboss/lib In directory usw-pr-cvs1:/tmp/cvs-serv4115/lib Added Files: .cvsignore Log Message: added .cvsignore files, so that I am at least not completly useless --- NEW FILE: .cvsignore --- Makefile.in |
|
From: Max H. <fin...@us...> - 2002-05-09 17:51:30
|
Update of /cvsroot/liboss/liboss In directory usw-pr-cvs1:/tmp/cvs-serv4115 Added Files: .cvsignore Log Message: added .cvsignore files, so that I am at least not completly useless --- NEW FILE: .cvsignore --- aclocal.m4 autom4te.cache config.h.in configure depcomp Makefile.in |
|
From: Max H. <fin...@us...> - 2002-05-09 17:51:30
|
Update of /cvsroot/liboss/liboss/doc In directory usw-pr-cvs1:/tmp/cvs-serv4115/doc Added Files: .cvsignore Log Message: added .cvsignore files, so that I am at least not completly useless --- NEW FILE: .cvsignore --- Makefile.in |
|
From: Justin <th...@us...> - 2002-05-09 15:57:36
|
Update of /cvsroot/liboss/liboss In directory usw-pr-cvs1:/tmp/cvs-serv1731 Modified Files: configure.in Log Message: Removed SPEC portion since not needed ATM or maybe never Index: configure.in =================================================================== RCS file: /cvsroot/liboss/liboss/configure.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- configure.in 9 May 2002 15:41:20 -0000 1.5 +++ configure.in 9 May 2002 15:57:33 -0000 1.6 @@ -56,10 +56,8 @@ AC_SUBST(LT_AGE) TAR_NAME="liboss-"$LIBOSS_MAJOR.$LIBOSS_MINOR.$LIBOSS_SUB$LIBOSS_PRE -SPEC_VERSION=$LIBOSS_MAJOR.$LIBOSS_MINOR.$LIBOSS_SUB$LIBOSS_PRE AC_SUBST(TAR_NAME) -AC_SUBST(SPEC_VERSION) dnl AC_CANONICAL_SYSTEM |
|
From: Justin <th...@us...> - 2002-05-09 15:57:03
|
Update of /cvsroot/liboss/liboss/lib In directory usw-pr-cvs1:/tmp/cvs-serv1567 Modified Files: Makefile.am Log Message: Fixed header install portion and versioning of libs Index: Makefile.am =================================================================== RCS file: /cvsroot/liboss/liboss/lib/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.am 9 May 2002 15:40:28 -0000 1.5 +++ Makefile.am 9 May 2002 15:57:00 -0000 1.6 @@ -10,11 +10,9 @@ liboss_la_DEPENDENCIES = liboss_la_LIBADD = $(DYNAMIC_LD_LIBS) -liboss_la_LDFLAGS = \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -release $(LT_RELEASE) +liboss_la_LDFLAGS = -include_HEADERS = +include_HEADERS = $(srcdir)/include/soundcard.h noinst_HEADERS = @@ -27,7 +25,7 @@ ### # Install header files (default=$includedir/sys) # -install-includeHEADERS: $(include_HEADERS) +install-includeHEADERS: @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir)/sys @list='$(include_HEADERS)'; for p in $$list; do \ |
|
From: Justin <th...@us...> - 2002-05-09 15:41:23
|
Update of /cvsroot/liboss/liboss
In directory usw-pr-cvs1:/tmp/cvs-serv28203
Modified Files:
configure.in
Log Message:
now sets LDFLAGS and CPPFLAGS to enable dlcompat and uses prefix as search paths as well
Index: configure.in
===================================================================
RCS file: /cvsroot/liboss/liboss/configure.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- configure.in 9 May 2002 14:28:01 -0000 1.4
+++ configure.in 9 May 2002 15:41:20 -0000 1.5
@@ -76,6 +76,11 @@
AC_PROG_RANLIB
AC_PROG_LN_S
+dnl Common flags for all platforms
+CFLAGS="$CFLAGS -I$prefix/include"
+CPPFLAGS="$CPPFLAGS $CFLAGS"
+LDFLAGS="$LDFLAGS -L$prefix/lib"
+
dnl
dnl Libtool
dnl
@@ -105,17 +110,17 @@
dnl debug cflags
dnl
AC_SUBST(DEBUG_CFLAGS)
-DEBUG_CFLAGS="$CFLAGS -g -DDEBUG"
+DEBUG_CFLAGS="-g -DDEBUG"
-#dnl
-#dnl dynamic linker
-#dnl
-#AC_CHECK_LIB(c, dlopen,
-# DYNAMIC_LD_LIBS="",
-# AC_CHECK_LIB(dl, dlopen,
-# DYNAMIC_LD_LIBS="-ldl",
-# AC_MSG_ERROR(dynamic linker needed)))
-#AC_SUBST(DYNAMIC_LD_LIBS)
+dnl
+dnl dynamic linker
+dnl
+AC_CHECK_LIB(c, dlopen,
+ DYNAMIC_LD_LIBS="",
+ AC_CHECK_LIB(dl, dlopen,
+ DYNAMIC_LD_LIBS="-ldl",
+ AC_MSG_ERROR(dynamic linker needed)))
+AC_SUBST(DYNAMIC_LD_LIBS)
dnl
dnl Using or not using -fPIC (override default behavior - system dependent)
@@ -139,12 +144,19 @@
dnl Flags not supported by all *cc* variants
AC_TRY_CFLAGS("-Wall", wall="-Wall", wall="")
+AC_TRY_CFLAGS("-no-cpp-precomp", nocpp="-no-cpp-precomp", nocpp="")
dnl
dnl Some include paths ( !!! DO NOT REMOVE !!! )
dnl
-INCLUDES='-I$(top_srcdir) -I$(top_srcdir)/include -I/System/Library/Frameworks'
+INCLUDES='-I$(top_srcdir) -I$(top_srcdir)/include -F/System/Library/Frameworks/Carbon.frameworks -F/System/Library/Frameworks/Cocoa.framework'
AC_SUBST(INCLUDES)
+
+dnl Common cflags for all platforms
+CFLAGS="$CFLAGS $nocpp $wall"
+CPPFLAGS="$CPPFLAGS $nocpp $wall"
+DEBUG_CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+LDFLAGS="$LDFLAGS"
dnl
dnl Get where .m4 should be installed.
|
|
From: Justin <th...@us...> - 2002-05-09 15:40:32
|
Update of /cvsroot/liboss/liboss/lib In directory usw-pr-cvs1:/tmp/cvs-serv27650 Modified Files: Makefile.am Log Message: an other build fix till that portion is made Index: Makefile.am =================================================================== RCS file: /cvsroot/liboss/liboss/lib/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.am 9 May 2002 15:22:15 -0000 1.4 +++ Makefile.am 9 May 2002 15:40:28 -0000 1.5 @@ -14,7 +14,7 @@ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) -include_HEADERS = $(srcdir)/include/soundcard.h +include_HEADERS = noinst_HEADERS = |
|
From: Justin <th...@us...> - 2002-05-09 15:30:31
|
Update of /cvsroot/liboss/liboss/lib In directory usw-pr-cvs1:/tmp/cvs-serv21477 Modified Files: Makefile.am Log Message: Fixed so it doesn't include @COREAUDIO@ till i set it Index: Makefile.am =================================================================== RCS file: /cvsroot/liboss/liboss/lib/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile.am 9 May 2002 14:24:42 -0000 1.3 +++ Makefile.am 9 May 2002 15:22:15 -0000 1.4 @@ -2,13 +2,13 @@ ## Process this file with automake to produce Makefile.in ## -CFLAGS = @CFLAGS@ -L$(srcdir)/include +CFLAGS = @CFLAGS@ lib_LTLIBRARIES = liboss.la liboss_la_SOURCES = liboss.c -liboss_la_DEPENDENCIES = @COREAUDIO@ -liboss_la_LIBADD = $(DYNAMIC_LD_LIBS) @COREAUDIO@ +liboss_la_DEPENDENCIES = +liboss_la_LIBADD = $(DYNAMIC_LD_LIBS) liboss_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ |
|
From: Justin <th...@us...> - 2002-05-09 14:28:05
|
Update of /cvsroot/liboss/liboss
In directory usw-pr-cvs1:/tmp/cvs-serv1624
Modified Files:
configure.in
Log Message:
Added vasi's header changes to configure.in testing phase
Index: configure.in
===================================================================
RCS file: /cvsroot/liboss/liboss/configure.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- configure.in 8 May 2002 21:18:41 -0000 1.3
+++ configure.in 9 May 2002 14:28:01 -0000 1.4
@@ -124,8 +124,8 @@
[ --disable-fpic disable -fPIC on shared libs (default on x86)],
no_fpic=yes, no_fpic=no)
-AC_CHECK_HEADERS(errno.h string.h \
- sys/types.h sys/ioctl.h sys/stat.h \
+AC_CHECK_HEADERS(errno.h string.h stdlib.h\
+ sys/types.h sys/stat.h sys/param.h \
CoreAudio/CoreAudio.h \
machine/endian.h)
|