[xiph-cvs] cvs commit: dryice/src Makefile.am

Karl Heyes karl at xiph.org
Wed Mar 3 06:03:54 PST 2004



karl        04/03/03 09:03:53

  Added:       .        autogen.sh configure.in Makefile.am
               src      Makefile.am
  Log:
  initial build setup

Revision  Changes    Path
1.1                  dryice/autogen.sh

Index: autogen.sh
===================================================================
#!/bin/sh
# Run this to set up the build system: configure, makefiles, etc.
# (based on the version in enlightenment's cvs)

package="dryice"

olddir=`pwd`
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
}
VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
                                                                                
# do we need automake?
if test -r Makefile.am; then
    echo Checking for automake version
    options=`fgrep AUTOMAKE_OPTIONS Makefile.am`
    AM_NEEDED=`echo "$options" | $VERSIONGREP`
    AM_PROGS=automake
    AC_PROGS=aclocal
    if test -n "$AM_NEEDED" && test "x$AM_NEEDED" != "x$options"
    then
        AM_PROGS="automake-$AM_NEEDED automake$AM_NEEDED $AM_PROGS"
        AC_PROGS="aclocal-$AM_NEEDED aclocal$AM_NEEDED $AC_PROGS"
    else
        AM_NEEDED=""
    fi
    AM_PROGS="$AUTOMAKE $AM_PROGS"
    AC_PROGS="$ACLOCAL $AC_PROGS"
    for am in $AM_PROGS; do
      ($am --version > /dev/null 2>&1) 2>/dev/null || continue
      ver=`$am --version | head -1 | $VERSIONGREP`
      AWK_RES=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
      if test "$AWK_RES" = "yes"; then
        AUTOMAKE=$am
        echo "  found $AUTOMAKE"
        break
      fi
    done
    for ac in $AC_PROGS; do
      ($ac --version > /dev/null 2>&1) 2>/dev/null || continue
      ver=`$ac --version < /dev/null | head -1 | $VERSIONGREP`
      AWK_RES=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
      if test "$AWK_RES" = "yes"; then
        ACLOCAL=$ac
        echo "  found $ACLOCAL"
        break
      fi
    done
    test -z $AUTOMAKE || test -z $ACLOCAL && {
        echo
        if test -n "$AM_NEEDED"; then
            echo "You must have automake version $AM_NEEDED installed"
            echo "to compile $package."
        else
            echo "You must have automake installed to compile $package."
        fi
        echo "Download the appropriate package for your distribution,"
        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
        DIE=1
      }
fi

(libtoolize --version)  > /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

echo "Generating configuration files for $package, please wait...."

ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
if test -n "$ACLOCAL"; then
  echo "  $ACLOCAL $ACLOCAL_FLAGS"
  $ACLOCAL $ACLOCAL_FLAGS
fi

echo "  autoheader"
autoheader

echo "  libtoolize --automake"
libtoolize --automake

if test -n "$AUTOMAKE"; then
  echo "  $AUTOMAKE --add-missing"
  $AUTOMAKE --add-missing 
fi

echo "  autoconf"
autoconf

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
cd $olddir
$srcdir/configure "$@" && echo

<p><p>1.1                  dryice/configure.in

Index: configure.in
===================================================================
AC_INIT([DryIce], [0.1], [arc at xiph.org])

AC_PREREQ(2.54)
AC_CONFIG_SRCDIR(src/core.c)
dnl Process this file with autoconf to produce a configure script.

AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AC_PROG_CC
AC_CANONICAL_HOST
AC_PROG_LIBTOOL

dnl Set some options based on environment

DEBUG="-g"
if test -z "$GCC"; then
    XIPH_CPPFLAGS="-D_REENTRANT"
    case $host in 
        *-*-irix*)
                XIPH_CPPFLAGS="$XIPH_CPPFLAGS -w -signed"
                PROFILE="-p -g3 -O2 -signed -D_REENTRANT"
                ;;
        *-*-solaris*)
                XIPH_CFLAGS="-xO4 -xcg92"
                XIPH_CPPFLAGS="$XIPH_CPPFLAGS -v -w -fsimple -fast"
                PROFILE="-xpg -g -Dsuncc"
                ;;
        *)
                XIPH_CFLAGS="-O"
                PROFILE="-g -p"
                ;;
    esac

    case "$host" in
        *bsd* | *irix*)
        ;;
        *) AC_DEFINE([_XOPEN_SOURCE], 600, [Define if you have POSIX and XPG specifications])
        ;;
    esac

else
    XIPH_CPPFLAGS="-Wall -ffast-math -fsigned-char"
    PROFILE="-pg -g"
    AC_DEFINE([_GNU_SOURCE], 1, [Define to include GNU extensions to POSIX])
fi

dnl Checks for programs.

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Check for types

dnl Checks for library functions.

dnl -- configure options --

XIPH_PATH_THEORA([DRYICE_OPTIONAL="$DRYICE_OPTIONAL ../codec_modules/theora.o"],
        AC_MSG_WARN([Theora support disabled!]))
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$THEORA_CFLAGS])
XIPH_VAR_PREPEND([XIPH_LIBS],[$THEORA_LIBS])

dnl Make substitutions

AC_SUBST(XIPH_CPPFLAGS)
AC_SUBST(XIPH_CFLAGS)
AC_SUBST(XIPH_LIBS)
AC_SUBST(LIBTOOL_DEPS)
AC_SUBST(LIBS)
AC_SUBST(DEBUG)
AC_SUBST(CFLAGS)
AC_SUBST(DRYICE_OPTIONAL)

AC_OUTPUT([Makefile src/Makefile])

<p><p>1.1                  dryice/Makefile.am

Index: Makefile.am
===================================================================
## Process this file with automake to produce Makefile.in

AUTOMAKE_OPTIONS = 1.6 foreign dist-zip
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = src

EXTRA_DIST = m4/ogg.m4 m4/xiph_compiler.m4 m4/theora.m4

debug:
        $(MAKE) all CFLAGS="@DEBUG@"

profile:
        $(MAKE) all CFLAGS="@PROFILE@"

tatic:
        $(MAKE) all LDFLAGS="${LDFLAGS} -all-static"

<p><p>1.1                  dryice/src/Makefile.am

Index: Makefile.am
===================================================================
## Process this with automake to create Makefile.in

AUTOMAKE_OPTIONS = foreign

bin_PROGRAMS = dryice

dryice_SOURCES = core.c
EXTRA_dryice_SOURCES = ../codec_modules/theora.c

dryice_DEPENDENCIES = @DRYICE_OPTIONAL@
dryice_LDADD = $(dryice_DEPENDENCIES) @XIPH_LIBS@
    
AM_CFLAGS = @XIPH_CFLAGS@
AM_CPPFLAGS = @XIPH_CPPFLAGS@ -I$(top_srcdir)/include

<p>debug:
        $(MAKE) all CFLAGS="@DEBUG@"

profile:
        $(MAKE) all CFLAGS="@PROFILE@"

<p><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