[xiph-cvs] cvs commit: libshout/src Makefile.am
Brendan
brendan at xiph.org
Thu Jul 10 17:59:56 PDT 2003
brendan 03/07/10 20:59:56
Modified: . configure.in
include/shout Makefile.am
src Makefile.am
Added: include/shout shout.h.in
Removed: include/shout shout.h
Log:
Shorten _XOPEN_SOURCE test case.
Build shout.h from shout.h.in.
Define SHOUT_THREADSAFE in shout.h at configure time.
Revision Changes Path
1.64 +11 -13 libshout/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/libshout/configure.in,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -p -u -r1.63 -r1.64
--- configure.in 9 Jul 2003 01:35:38 -0000 1.63
+++ configure.in 11 Jul 2003 00:59:56 -0000 1.64
@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
-# $Id: configure.in,v 1.63 2003/07/09 01:35:38 brendan Exp $
+# $Id: configure.in,v 1.64 2003/07/11 00:59:56 brendan Exp $
m4_define(libshout_major, 2)
m4_define(libshout_minor, 0)
@@ -41,11 +41,7 @@ dnl Set some options based on environmen
dnl openbsd headers break when _XOPEN_SOURCE is defined but without it seems
dnl to be fine
case "$ac_cv_host" in
- *openbsd*)
- ;;
- *solaris*)
- ;;
- *irix*)
+ *openbsd* | *solaris* | *irix*)
;;
*) AC_DEFINE(_XOPEN_SOURCE, 600, [Define if you have POSIX and XPG specifications])
;;
@@ -97,18 +93,19 @@ dnl Extra dependencies
AC_ARG_ENABLE([thread],
AC_HELP_STRING([--disable-thread],[do not build with thread support even if it is available]))
-have_thread="no"
+SHOUT_THREADSAFE="0"
if test "$enable_thread" != "no"
then
ACX_PTHREAD([
LIBS="$LIBS $PTHREAD_LIBS"
XIPH_CFLAGS="$XIPH_CFLAGS $PTHREAD_CFLAGS $PTHREAD_CPPFLAGS"
CC="$PTHREAD_CC"
- have_thread="yes"
+ SHOUT_THREADSAFE="1"
])
fi
-AM_CONDITIONAL([HAVE_THREAD], [test "$have_thread" = "yes"])
-if test "$have_thread" != "yes"
+AC_SUBST([SHOUT_THREADSAFE])
+AM_CONDITIONAL([HAVE_THREAD], [test "$SHOUT_THREADSAFE" = "1"])
+if test "$SHOUT_THREADSAFE" != "1"
then
AC_DEFINE([NO_THREAD], 1, [Define if you don't want to use the thread library])
fi
@@ -169,6 +166,7 @@ AC_SUBST(CFLAGS)
AC_SUBST(PROFILE)
AC_SUBST(XIPH_CFLAGS)
-AC_OUTPUT([Makefile include/Makefile include/shout/Makefile src/Makefile
- src/net/Makefile src/timing/Makefile src/thread/Makefile src/avl/Makefile
- src/httpp/Makefile doc/Makefile examples/Makefile shout-config shout.pc])
+AC_OUTPUT([Makefile include/Makefile include/shout/Makefile
+ include/shout/shout.h src/Makefile src/net/Makefile src/timing/Makefile
+ src/thread/Makefile src/avl/Makefile src/httpp/Makefile doc/Makefile
+ examples/Makefile shout-config shout.pc])
<p><p>1.3 +1 -1 libshout/include/shout/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/libshout/include/shout/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -u -r1.2 -r1.3
--- Makefile.am 12 Jan 2003 09:03:03 -0000 1.2
+++ Makefile.am 11 Jul 2003 00:59:56 -0000 1.3
@@ -3,4 +3,4 @@
AUTOMAKE_OPTIONS = foreign
includedir = $(prefix)/include/shout
-include_HEADERS = shout.h
+nodist_include_HEADERS = shout.h
<p><p>1.1 libshout/include/shout/shout.h.in
Index: shout.h.in
===================================================================
/* shout.h
**
** API for libshout, the streaming library for icecast
*/
#ifndef __LIBSHOUT_SHOUT_H__
#define __LIBSHOUT_SHOUT_H__
#include <sys/types.h>
#define SHOUTERR_SUCCESS (0)
#define SHOUTERR_INSANE (-1)
#define SHOUTERR_NOCONNECT (-2)
#define SHOUTERR_NOLOGIN (-3)
#define SHOUTERR_SOCKET (-4)
#define SHOUTERR_MALLOC (-5)
#define SHOUTERR_METADATA (-6)
#define SHOUTERR_CONNECTED (-7)
#define SHOUTERR_UNCONNECTED (-8)
#define SHOUTERR_UNSUPPORTED (-9)
#define SHOUT_FORMAT_VORBIS (0)
#define SHOUT_FORMAT_MP3 (1)
#define SHOUT_PROTOCOL_HTTP (0)
#define SHOUT_PROTOCOL_XAUDIOCAST (1)
#define SHOUT_PROTOCOL_ICY (2)
#define SHOUT_AI_BITRATE "bitrate"
#define SHOUT_AI_SAMPLERATE "samplerate"
#define SHOUT_AI_CHANNELS "channels"
#define SHOUT_AI_QUALITY "quality"
typedef struct shout shout_t;
typedef struct _util_dict shout_metadata_t;
#ifdef __cplusplus
extern "C" {
#endif
/* initializes the shout library. Must be called before anything else */
void shout_init(void);
/* shuts down the shout library, deallocating any global storage. Don't call
* anything afterwards */
void shout_shutdown(void);
/* returns a static version string. Non-null parameters will be set to the
* value of the library major, minor, and patch levels, respectively */
const char *shout_version(int *major, int *minor, int *patch);
/* Allocates and sets up a new shout_t. Returns NULL if it can't get enough
* memory. The returns shout_t must be disposed of with shout_free. */
shout_t *shout_new(void);
/* Free all memory allocated by a shout_t */
void shout_free(shout_t *self);
/* Returns a statically allocated string describing the last shout error
* to occur. Only valid until the next libshout call on this shout_t */
const char *shout_get_error(shout_t *self);
/* Return the error code (e.g. SHOUTERR_SOCKET) for this shout instance */
int shout_get_errno(shout_t *self);
/* returns SHOUTERR_CONNECTED or SHOUTERR_UNCONNECTED */
int shout_get_connected(shout_t *self);
/* Parameter manipulation functions. libshout makes copies of all parameters,
* the caller may free its copies after giving them to libshout. May return
* SHOUTERR_MALLOC */
int shout_set_host(shout_t *self, const char *host);
const char *shout_get_host(shout_t *self);
int shout_set_port(shout_t *self, unsigned short port);
unsigned short shout_get_port(shout_t *self);
int shout_set_password(shout_t *, const char *password);
const char *shout_get_password(shout_t *self);
int shout_set_mount(shout_t *self, const char *mount);
const char *shout_get_mount(shout_t *self);
int shout_set_name(shout_t *self, const char *name);
const char *shout_get_name(shout_t *self);
int shout_set_url(shout_t *self, const char *url);
const char *shout_get_url(shout_t *self);
int shout_set_genre(shout_t *self, const char *genre);
const char *shout_get_genre(shout_t *self);
int shout_set_user(shout_t *self, const char *username);
const char *shout_get_user(shout_t *self);
int shout_set_agent(shout_t *self, const char *username);
const char *shout_get_agent(shout_t *self);
int shout_set_description(shout_t *self, const char *description);
const char *shout_get_description(shout_t *self);
int shout_set_dumpfile(shout_t *self, const char *dumpfile);
const char *shout_get_dumpfile(shout_t *self);
int shout_set_audio_info(shout_t *self, const char *name, const char *value);
const char *shout_get_audio_info(shout_t *self, const char *name);
int shout_set_public(shout_t *self, unsigned int make_public);
unsigned int shout_get_public(shout_t *self);
/* takes a SHOUT_FORMAT_xxxx argument */
int shout_set_format(shout_t *self, unsigned int format);
unsigned int shout_get_format(shout_t *self);
/* takes a SHOUT_PROTOCOL_xxxxx argument */
int shout_set_protocol(shout_t *self, unsigned int protocol);
unsigned int shout_get_protocol(shout_t *self);
/* Opens a connection to the server. All parameters must already be set */
int shout_open(shout_t *self);
/* Closes a connection to the server */
int shout_close(shout_t *self);
/* Send data to the server, parsing it for format specific timing info */
int shout_send(shout_t *self, const unsigned char *data, size_t len);
/* Send unparsed data to the server. Do not use this unless you know
* what you are doing.
* Returns the number of bytes written, or < 0 on error.
*/
ssize_t shout_send_raw(shout_t *self, const unsigned char *data, size_t len);
/* Puts caller to sleep until it is time to send more data to the server */
void shout_sync(shout_t *self);
/* Amount of time in ms caller should wait before sending again */
int shout_delay(shout_t *self);
/* Sets MP3 metadata.
* Returns:
* SHOUTERR_SUCCESS
* SHOUTERR_UNSUPPORTED if format isn't MP3
* SHOUTERR_MALLOC
* SHOUTERR_INSANE
* SHOUTERR_NOCONNECT
* SHOUTERR_SOCKET
*/
int shout_set_metadata(shout_t *self, shout_metadata_t *metadata);
/* Allocates a new metadata structure. Must be freed by shout_metadata_free. */
shout_metadata_t *shout_metadata_new(void);
/* Free resources allocated by shout_metadata_t */
void shout_metadata_free(shout_metadata_t *self);
/* Add a parameter to the metadata structure.
* Returns:
* SHOUTERR_SUCCESS on success
* SHOUTERR_INSANE if self isn't a valid shout_metadata_t* or name is null
* SHOUTERR_MALLOC if memory can't be allocated */
int shout_metadata_add(shout_metadata_t *self, const char *name, const char *value);
#ifdef __cplusplus
}
#endif
/* --- Compiled features --- */
#define SHOUT_THREADSAFE @SHOUT_THREADSAFE@
#endif /* __LIBSHOUT_SHOUT_H__ */
<p>1.13 +1 -1 libshout/src/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -u -r1.12 -r1.13
--- Makefile.am 6 Jul 2003 13:25:01 -0000 1.12
+++ Makefile.am 11 Jul 2003 00:59:56 -0000 1.13
@@ -18,7 +18,7 @@ AM_CFLAGS = @XIPH_CFLAGS@
libshout_la_LIBADD = net/libicenet.la timing/libicetiming.la avl/libiceavl.la\
httpp/libicehttpp.la $(MAYBE_THREAD_LIB) $(VORBIS_LIBS)
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_builddir)/include
debug:
$(MAKE) all CFLAGS="@DEBUG@"
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list