Commit 48d852cb authored by Josh Coalson's avatar Josh Coalson
Browse files

initial import, still more work to be done...

parent 546c9572
# libOggFLAC - Free Lossless Audio Codec + Ogg library
# Copyright (C) 2002 Josh Coalson
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
lib_LTLIBRARIES = libOggFLAC.la
if DEBUG
DEBUGCFLAGS =
endif
CFLAGS = @CFLAGS@ $(DEBUGCFLAGS)
SUBDIRS = $(ARCH_SUBDIRS) include .
m4datadir = $(datadir)/aclocal
m4data_DATA = libOggFLAC.m4
EXTRA_DIST = \
Makefile.lite \
Makefile.vc \
libOggFLAC.m4
# see 'http://www.gnu.org/software/libtool/manual.html#Versioning' for numbering convention
libOggFLAC_la_LDFLAGS = -version-info 0:0:0
libOggFLAC_la_SOURCES = \
file_decoder.c \
seekable_stream_decoder.c \
stream_decoder.c \
stream_encoder.c
# libOggFLAC - Free Lossless Audio Codec + Ogg library
# Copyright (C) 2002 Josh Coalson
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# GNU makefile
#
LIB_NAME = libOggFLAC
ifeq ($(DARWIN_BUILD),yes)
DEFINES =
else
ifeq ($(SOLARIS_BUILD),yes)
DEFINES =
else
DEFINES =
endif
endif
INCLUDES = -I./include -I../../include
DEBUG_CFLAGS =
OBJS = \
file_decoder.o \
seekable_stream_decoder.o \
stream_decoder.o \
stream_encoder.o
include ../../build/lib.mk
# DO NOT DELETE THIS LINE -- make depend depends on it.
# libOggFLAC - Free Lossless Audio Codec + Ogg library
# Copyright (C) 2002 Josh Coalson
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
!include <win32.mak>
!IFDEF DEBUG
.c.obj:
$(cc) /D "_LIB" /GX $(cdebug) $(cflags) /I ".\include" /I "..\..\include" -DSTRICT -YX /Od /D "_DEBUG" $<
!else
.c.obj:
$(cc) /D "_LIB" /O2 $(crelease) $(cflags) /I ".\include" /I "..\..\include" -DSTRICT -YX -DNODEBUG $<
!endif
C_FILES= \
file_decoder.c \
seekable_stream_decoder.c \
stream_decoder.c \
stream_encoder.c
OBJS= $(C_FILES:.c=.obj)
all: libOggFLAC.lib
libOggFLAC.lib: $(OBJS)
link.exe -lib /nodefaultlib -out:../../obj/lib/$*.lib $(OBJS)
clean:
-del *.obj ia32\*.obj *.pch
-del ..\..\obj\lib\libOggFLAC.lib ..\..\obj\lib\libOggFLAC.pdb
This diff is collapsed.
# libOggFLAC - Free Lossless Audio Codec + Ogg library
# Copyright (C) 2002 Josh Coalson
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
SUBDIRS = private
# libOggFLAC - Free Lossless Audio Codec + Ogg library
# Copyright (C) 2002 Josh Coalson
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
noinst_HEADERS = \
all.h \
file_decoder.h \
seekable_stream_decoder.h \
stream_decoder.h \
stream_encoder.h
/* libOggFLAC - Free Lossless Audio Codec + Ogg library
* Copyright (C) 2002 Josh Coalson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef OggFLAC__PROTECTED__ALL_H
#define OggFLAC__PROTECTED__ALL_H
#include "file_decoder.h"
#include "seekable_stream_decoder.h"
#include "stream_decoder.h"
#include "stream_encoder.h"
#endif
/* libOggFLAC - Free Lossless Audio Codec + Ogg library
* Copyright (C) 2002 Josh Coalson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef OggFLAC__PROTECTED__FILE_DECODER_H
#define OggFLAC__PROTECTED__FILE_DECODER_H
#include "OggFLAC/file_decoder.h"
typedef struct OggFLAC__FileDecoderProtected {
OggFLAC__FileDecoderState state;
} OggFLAC__FileDecoderProtected;
#endif
/* libOggFLAC - Free Lossless Audio Codec + Ogg library
* Copyright (C) 2002 Josh Coalson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef OggFLAC__PROTECTED__SEEKABLE_STREAM_DECODER_H
#define OggFLAC__PROTECTED__SEEKABLE_STREAM_DECODER_H
#include "OggFLAC/seekable_stream_decoder.h"
typedef struct OggFLAC__SeekableStreamDecoderProtected {
OggFLAC__SeekableStreamDecoderState state;
} OggFLAC__SeekableStreamDecoderProtected;
#endif
/* libOggFLAC - Free Lossless Audio Codec + Ogg library
* Copyright (C) 2002 Josh Coalson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef OggFLAC__PROTECTED__STREAM_DECODER_H
#define OggFLAC__PROTECTED__STREAM_DECODER_H
#include "OggFLAC/stream_decoder.h"
typedef struct OggFLAC__StreamDecoderProtected {
OggFLAC__StreamDecoderState state;
} OggFLAC__StreamDecoderProtected;
#endif
/* libOggFLAC - Free Lossless Audio Codec + Ogg library
* Copyright (C) 2002 Josh Coalson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef OggFLAC__PROTECTED__STREAM_ENCODER_H
#define OggFLAC__PROTECTED__STREAM_ENCODER_H
#include "OggFLAC/stream_encoder.h"
typedef struct OggFLAC__StreamEncoderProtected {
OggFLAC__StreamEncoderState state;
} OggFLAC__StreamEncoderProtected;
#endif
# Configure paths for libOggFLAC
# "Inspired" by ogg.m4
dnl AM_PATH_LIBOGGFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libOggFLAC, and define LIBOGGFLAC_CFLAGS and LIBOGGFLAC_LIBS
dnl
AC_DEFUN(AM_PATH_LIBOGGFLAC,
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(libOggFLAC,[ --with-libOggFLAC=PFX Prefix where libOggFLAC is installed (optional)], libOggFLAC_prefix="$withval", libOggFLAC_prefix="")
AC_ARG_WITH(libOggFLAC-libraries,[ --with-libOggFLAC-libraries=DIR Directory where libOggFLAC library is installed (optional)], libOggFLAC_libraries="$withval", libOggFLAC_libraries="")
AC_ARG_WITH(libOggFLAC-includes,[ --with-libOggFLAC-includes=DIR Directory where libOggFLAC header files are installed (optional)], libOggFLAC_includes="$withval", libOggFLAC_includes="")
AC_ARG_ENABLE(libOggFLACtest, [ --disable-libOggFLACtest Do not try to compile and run a test libOggFLAC program],, enable_libOggFLACtest=yes)
if test "x$libOggFLAC_libraries" != "x" ; then
LIBOGGFLAC_LIBS="-L$libOggFLAC_libraries"
elif test "x$libOggFLAC_prefix" != "x" ; then
LIBOGGFLAC_LIBS="-L$libOggFLAC_prefix/lib"
elif test "x$prefix" != "xNONE" ; then
LIBOGGFLAC_LIBS="-L$prefix/lib"
fi
LIBOGGFLAC_LIBS="$LIBOGGFLAC_LIBS -lOggFLAC -lFLAC -lm"
if test "x$libOggFLAC_includes" != "x" ; then
LIBOGGFLAC_CFLAGS="-I$libOggFLAC_includes"
elif test "x$libOggFLAC_prefix" != "x" ; then
LIBOGGFLAC_CFLAGS="-I$libOggFLAC_prefix/include"
elif test "$prefix" != "xNONE"; then
LIBOGGFLAC_CFLAGS="-I$prefix/include"
fi
AC_MSG_CHECKING(for libOggFLAC)
no_libOggFLAC=""
if test "x$enable_libOggFLACtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
CXXFLAGS="$CXXFLAGS $LIBOGGFLAC_CFLAGS"
LIBS="$LIBS $LIBOGGFLAC_LIBS"
dnl
dnl Now check if the installed libOggFLAC is sufficiently new.
dnl
rm -f conf.libOggFLACtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <OggFLAC/stream_decoder.h>
int main ()
{
system("touch conf.libOggFLACtest");
return 0;
}
],, no_libOggFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_libOggFLAC" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.libOggFLACtest ; then
:
else
echo "*** Could not run libOggFLAC test program, checking why..."
CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
LIBS="$LIBS $LIBOGGFLAC_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <OggFLAC/stream_decoder.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding libOggFLAC or finding the wrong"
echo "*** version of libOggFLAC. If it is not finding libOggFLAC, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means libOggFLAC was incorrectly installed"
echo "*** or that you have moved libOggFLAC since it was installed. In the latter case, you"
echo "*** may want to edit the libOggFLAC-config script: $LIBOGGFLAC_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
LIBOGGFLAC_CFLAGS=""
LIBOGGFLAC_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(LIBOGGFLAC_CFLAGS)
AC_SUBST(LIBOGGFLAC_LIBS)
rm -f conf.libOggFLACtest
])
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment