Commit a9a7fa45 authored by Monty Montgomery's avatar Monty Montgomery

Give postfish its own CVS module


git-svn-id: https://svn.xiph.org/trunk/postfish@4129 0101bb08-14d6-0310-b084-bc0e0c8e3800
parents
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign
INCLUDES = -I$(top_srcdir)/include
LDADD = -lm -lpthread -lncurses
bin_PROGRAMS = postfish
postfish_SOURCES = postfish.c smallft.c form.c smallft.h form.h
postfish_LDADD = $(LDADD)
debug:
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@"
EXTRA_DIST = COPYING autogen.sh
\ No newline at end of file
#!/bin/sh
# Run this to set up the build system: configure, makefiles, etc.
# (based on the version in enlightenment's cvs)
package="postfish"
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
cd "$srcdir"
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $package."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $package."
echo "Download the appropriate package for your system,"
echo "or get the source from one of the GNU ftp sites"
echo "listed in http://www.gnu.org/order/ftp.html"
DIE=1
}
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile $package."
echo "Download the appropriate package for your system,"
echo "or get the source from one of the GNU ftp sites"
echo "listed in http://www.gnu.org/order/ftp.html"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
echo "Generating configuration files for $package, please wait...."
echo " aclocal $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS
#echo " autoheader"
#autoheader
echo " libtoolize --automake"
libtoolize --automake
echo " automake --add-missing $AUTOMAKE_FLAGS"
automake --add-missing $AUTOMAKE_FLAGS
echo " autoconf"
autoconf
$srcdir/configure "$@" && echo
dnl Process this file with autoconf to produce a configure script
dnl ------------------------------------------------
dnl Initialization and Versioning
dnl ------------------------------------------------
AC_INIT(postfish.c)
AM_INIT_AUTOMAKE(postfish,0.0)
dnl Library versioning
V_LIB_CURRENT=0
V_LIB_REVISION=0
V_LIB_AGE=0
AC_SUBST(V_LIB_CURRENT)
AC_SUBST(V_LIB_REVISION)
AC_SUBST(V_LIB_AGE)
dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
dnl if $CFLAGS is blank
cflags_save="$CFLAGS"
AC_PROG_CC
AC_PROG_CPP
CFLAGS="$cflags_save"
dnl --------------------------------------------------
dnl Set build flags based on environment
dnl --------------------------------------------------
AC_CANONICAL_HOST
dnl Set some target options
cflags_save="$CFLAGS"
ldflags_save="$LDFLAGS"
if test -z "$GCC"; then
case $host in
*)
DEBUG="-g"
CFLAGS="-O"
PROFILE="-g -p" ;;
esac
else
case $host in
*)
DEBUG="-g -W -D__NO_MATH_INLINES"
CFLAGS="-O2 -W -Wall"
PROFILE="-W -pg -g -O2 -fno-inline-functions";;
esac
fi
CFLAGS="$CFLAGS $cflags_save -D_REENTRANT"
LDFLAGS="$LDFLAGS $ldflags_save"
dnl --------------------------------------------------
dnl Check for headers
dnl --------------------------------------------------
AC_CHECK_HEADER(linux/soundcard.h,has_oss=yes)
if test -z "$has_oss"; then
AC_MSG_WARN([ ])
AC_MSG_WARN([*********************************************************])
AC_MSG_WARN([Playback currently requires OSS and configure didn't find])
AC_MSG_WARN([soundcard.h. For now, no OSS means Postfish can't build.])
AC_MSG_WARN([*********************************************************])
AC_MSG_ERROR([ bailing... ])
fi
dnl --------------------------------------------------
dnl Check for typedefs, structures, etc
dnl --------------------------------------------------
dnl none
dnl --------------------------------------------------
dnl Check for library functions
dnl --------------------------------------------------
AC_CHECK_LIB(pthread, pthread_mutex_lock, has_pthreads=yes)
if test -z "$has_pthreads"; then
AC_MSG_WARN([ ])
AC_MSG_WARN([*********************************************************])
AC_MSG_WARN([Postfish requires pthreads. No pthreads, no build :-( ])
AC_MSG_WARN([*********************************************************])
AC_MSG_ERROR([ bailing... ])
fi
AC_CHECK_LIB(ncurses, initscr, has_ncurses=yes)
if test -z "$has_ncurses"; then
AC_MSG_WARN([ ])
AC_MSG_WARN([*********************************************************])
AC_MSG_WARN([Postfish requires ncurses. No ncurses, no build :-( ])
AC_MSG_WARN([*********************************************************])
AC_MSG_ERROR([ bailing... ])
fi
AC_CHECK_LIB(m, cos, LIBS="-lm", LIBS="")
AC_CHECK_LIB(c, fseeko, has_fseeko="yes")
AC_CHECK_LIB(c, ftello, has_ftello="yes")
if test x"$has_fseeko$has_ftello" != "xyesyes" ; then
AC_MSG_WARN([ ])
AC_MSG_WARN([*********************************************************])
AC_MSG_WARN([Postfish requires the SysV-ish fseeko/ftello extention as])
AC_MSG_WARN([the ANSI committee helpfully defined a useless 64 bit ])
AC_MSG_WARN([standard IO file interface. ])
AC_MSG_WARN([*********************************************************])
AC_MSG_ERROR([ bailing.... ])
fi
dnl --------------------------------------------------
dnl Do substitutions
dnl --------------------------------------------------
AC_MSG_CHECKING(for sizeof off_t)
AC_TRY_RUN([
#define _GNU_SOURCE
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#define _FILE_OFFSET_BITS 64
#define _REENTRANT 1
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
int main() {if(sizeof(off_t)<64)return 0;return 1;}
],
sizeof_off_t=">= 64 bits",
sizeof_off_t="< 64 bits",
sizeof_off_t="< 64 bits"
)
AC_MSG_RESULT($sizeof_off_t)
if test "$sizeof_off_t" = "< 64 bits" ; then
AC_MSG_WARN([ ])
AC_MSG_WARN([*********************************************************])
AC_MSG_WARN([No 64 bit stdio support in this libc. File max size 2GB ])
AC_MSG_WARN([*********************************************************])
AC_MSG_WARN([ ])
fi
LIBS="$LIBS"
AC_SUBST(LIBS)
AC_SUBST(DEBUG)
AC_SUBST(PROFILE)
AC_OUTPUT(Makefile)
This diff is collapsed.
/*
*
* form.h
*
* Copyright (C) 2002 Monty
*
* Postfish is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* Postfish 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Postfish; see the file COPYING. If not, write to the
* Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
*/
enum field_type { FORM_TIME, FORM_DB, FORM_P2 };
typedef struct {
enum field_type type;
int x;
int y;
int width;
int editwidth;
int editgroup;
int min;
int max;
int dpoint;
void *var;
int *flag;
struct form *form;
int cursor;
} formfield;
typedef struct form {
formfield *fields;
int count;
int storage;
int cursor;
int editable;
} form;
extern void form_init(form *f,int maxstorage,int editable);
extern void form_clear(form *f);
extern void draw_field(formfield *f);
extern void form_redraw(form *f);
extern formfield *field_add(form *f,enum field_type type,int x,int y,
int width,int group,void *var,int *flag,
int d,int min, int max);
extern int form_handle_char(form *f,int c);
This diff is collapsed.
This diff is collapsed.
/*
*
* smallft.h
*
* Copyright (C) 2002 Monty
*
* Postfish is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* Postfish 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Postfish; see the file COPYING. If not, write to the
* Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
*/
typedef struct {
int n;
double *trigcache;
int *splitcache;
} drft_lookup;
extern void drft_forward(drft_lookup *l,double *data);
extern void drft_backward(drft_lookup *l,double *data);
extern void drft_init(drft_lookup *l,int n);
extern void drft_clear(drft_lookup *l);
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