Commit 06286b15 authored by Jack Moffitt's avatar Jack Moffitt

cleaned up a bit, started on teh build system

svn path=/trunk/vorbis-tools/; revision=677
parent cf808b3d
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign dist-zip
SUBDIRS = oggenc
EXTRA_DIST = README
debug:
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@"
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# (basically ripped directly from enlightenment's autogen.sh)
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 vorbis-tools."
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 vorbis-tools."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
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 vorbis-tools, please wait...."
echo " aclocal $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS
echo " autoheader"
autoheader
echo " automake --add-missing"
automake --add-missing
echo " autoconf"
autoconf
$srcdir/configure "$@" && echo
dnl Process this file with autoconf to produce a configure script
dnl ------------------------------------------------
dnl Initialization
dnl ------------------------------------------------
AC_INIT(oggenc/encode.c)
AM_INIT_AUTOMAKE(vorbis-tools,1.0.0)
dnl --------------------------------------------------
dnl Check for programs
dnl --------------------------------------------------
dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
dnl if $CFLAGS is blank
cflags_save="$CFLAGS"
AC_PROG_CC
CFLAGS="$cflags_save"
AM_PROG_LIBTOOL
dnl --------------------------------------------------
dnl Additional arguments
dnl --------------------------------------------------
AC_ARG_WITH(ogg, [ --with-ogg=DIR Set where the Ogg library is located])
AC_ARG_WITH(vorbis, [ --with-vorbis=DIR Set where the Vorbis library is located])
dnl --------------------------------------------------
dnl Set build flags based on environment
dnl --------------------------------------------------
AC_CANONICAL_HOST
dnl --------------------------------------------------
dnl Check for headers
dnl --------------------------------------------------
dnl none
dnl --------------------------------------------------
dnl Check for typedefs, structures, etc
dnl --------------------------------------------------
dnl none
dnl --------------------------------------------------
dnl Check for libraries
dnl --------------------------------------------------
dnl Check for libogg
if test -n $with_ogg; then
CFLAGS="$CFLAGS -I$with_ogg/include -L$with_ogg/lib"
fi
AC_CHECK_LIB(ogg, oggpack_read, LIBS="$LIBS -logg", AC_MSG_ERROR([You must have libogg to compile vorbis!!!]))
dnl Check for libvorbis
if test -n $with_vorbis; then
CFLAGS="$CFLAGS -I$with_vorbis/include -L$with_vorbis/lib"
fi
AC_CHECK_LIB(vorbis, vorbis_info_init, LIBS="$LIBS -lvorbis", AC_MSG_ERROR([You must have libvorbis to compile vorbis-tools!!!]))
dnl --------------------------------------------------
dnl Check for library functions
dnl --------------------------------------------------
dnl none
dnl --------------------------------------------------
dnl Do substitutions
dnl --------------------------------------------------
AC_SUBST(LIBS)
AC_SUBST(DEBUG)
AC_SUBST(PROFILE)
AC_SUBST(CC)
AC_OUTPUT(Makefile oggenc/Makefile)
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = oggenc
oggenc_SOURCES = oggenc.c audio.c encode.c oe_unix.c\
audio.h encode.h platform.h @GETOPT@
debug:
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@"
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