ref: eb2474536120f5b6391c391883b4cb68880b8155
parent: 8df0891e36371b20cbdcf620bbb1385a9e4faacb
author: menno <menno>
date: Fri Jan 25 15:26:33 EST 2002
Linux MAKE stuff and Linux fix
--- /dev/null
+++ b/Makefile.am
@@ -1,0 +1,1 @@
+SUBDIRS = libfaad frontend
--- /dev/null
+++ b/bootstrap
@@ -1,0 +1,8 @@
+#! /bin/sh
+
+aclocal -I .
+autoheader
+libtoolize --automake
+automake --add-missing
+autoconf
+echo "Ready to run ./configure"
--- /dev/null
+++ b/configure.in
@@ -1,0 +1,42 @@
+AC_INIT()
+AM_INIT_AUTOMAKE(faad,2.0)
+
+AC_PROG_CC
+AM_PROG_LIBTOOL
+
+dnl Checks for programs.
+AC_PROG_CXX
+AC_PROG_AWK
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+dnl Checks for header files required for mp4.h
+AC_CHECK_HEADERS(stdint.h inttypes.h)
+
+dnl Checks for sndfile library.
+AC_CHECK_LIB(sndfile, sf_open_read, have_sndfile_lib=yes)
+AC_CHECK_HEADER(sndfile.h, have_sndfile_hdr=yes)
+
+if test x$have_sndfile_lib != xyes -o x$have_sndfile_hdr != xyes; then
+AC_MSG_ERROR([
+ *** FAAD requires libsndfile to be installed first.
+ *** A copy of it is included in common/libsndfile.
+ ])
+fi
+
+dnl Checks for mp4v2 library.
+AC_CHECK_LIB(mp4v2, MP4Create, have_mp4v2_lib=yes)
+AC_CHECK_HEADER(mp4.h, have_mp4_hdr=yes)
+
+if test x$have_mp4v2_lib != xyes -o x$have_mp4_hdr != xyes; then
+AC_MSG_ERROR([
+ *** FAAD requires libmp4v2 to be installed first.
+ *** A copy of it is included in common/mp4v2.
+])
+fi
+
+AC_OUTPUT(libfaad/Makefile frontend/Makefile Makefile)
--- /dev/null
+++ b/frontend/Makefile.am
@@ -1,0 +1,9 @@
+bin_PROGRAMS = faad
+
+faad_SOURCES = main.c audio.c
+
+CXXFLAGS = -O0
+CFLAGS = -O0
+INCLUDES = -I$(top_srcdir)/include
+LDFLAGS =
+LDADD = $(top_builddir)/libfaad/libfaad.la -lm -lsndfile -lmp4v2
--- /dev/null
+++ b/libfaad/Makefile.am
@@ -1,0 +1,12 @@
+lib_LTLIBRARIES = libfaad.la
+
+libfaad_la_SOURCES = bits.c data.c decoder.c drc.c error.c filtbank.c
+huffman.c ic_predict.c is.c lt_predict.c mdct.c mp4.c ms.c output.c pns.c
+pulse.c specrec.c syntax.c tns.c
+
+libfaad_la_INCLUDES = analysis.h bits.h data.h decoder.h drc.h error.h
+filtbank.h huffman.h ic_predict.h is.h kbd_win.h lt_predict.h mdct.h mp4.h
+ms.h output.h pns.h pulse.h specrec.h syntax.h tns.h
+
+CFLAGS = -O2
+INCLUDES = -I$(top_srcdir)/include
\ No newline at end of file
--- a/libfaad/syntax.h
+++ b/libfaad/syntax.h
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: syntax.h,v 1.3 2002/01/20 16:57:55 menno Exp $
+** $Id: syntax.h,v 1.4 2002/01/25 20:26:33 menno Exp $
**/
#ifndef __SYNTAX_H__
@@ -27,6 +27,10 @@
#endif
#include "bits.h"
+
+#ifndef min
+#define min(a,b) ((a) < (b) ? (a) : (b))
+#endif
#define MAIN 0
#define LC 1