[xiph-commits] r3708 - in libsydneyaudio/trunk: . m4 src

j at svn.annodex.net j at svn.annodex.net
Tue Aug 19 05:51:02 PDT 2008


Author: j
Date: 2008-08-19 05:51:01 -0700 (Tue, 19 Aug 2008)
New Revision: 3708

Added:
   libsydneyaudio/trunk/Makefile.am
   libsydneyaudio/trunk/autogen.sh
   libsydneyaudio/trunk/configure.ac
   libsydneyaudio/trunk/m4/
   libsydneyaudio/trunk/m4/as-ac-expand.m4
   libsydneyaudio/trunk/src/Makefile.am
   libsydneyaudio/trunk/sydneyaudio-uninstalled.pc.in
   libsydneyaudio/trunk/sydneyaudio.pc.in
Modified:
   libsydneyaudio/trunk/
   libsydneyaudio/trunk/src/
Log:
add autofoo build system


Property changes on: libsydneyaudio/trunk
___________________________________________________________________
Name: svn:ignore
   + Makefile.in
Makefile
configure
config.guess
config.log
config.status
config.sub
config.h.in
autom4te.cache
aclocal.m4
depcomp
install-sh
missing
mkinstalldirs
libtool
ltmain.sh
config.h
stamp-h1
sydneyaudio.pc
sydneyaudio-uninstalled.pc
compile


Added: libsydneyaudio/trunk/Makefile.am
===================================================================
--- libsydneyaudio/trunk/Makefile.am	                        (rev 0)
+++ libsydneyaudio/trunk/Makefile.am	2008-08-19 12:51:01 UTC (rev 3708)
@@ -0,0 +1,8 @@
+
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = src
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = sydneyaudio.pc sydneyaudio-uninstalled.pc
+

Added: libsydneyaudio/trunk/autogen.sh
===================================================================
--- libsydneyaudio/trunk/autogen.sh	                        (rev 0)
+++ libsydneyaudio/trunk/autogen.sh	2008-08-19 12:51:01 UTC (rev 3708)
@@ -0,0 +1,124 @@
+#!/bin/sh
+# Run this to set up the build system: configure, makefiles, etc.
+# (based on the version in enlightenment's cvs)
+
+package="libsydneyaudio"
+
+olddir=`pwd`
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+cd "$srcdir"
+DIE=0
+
+ACLOCAL_FLAGS="-I $srcdir/m4"
+
+echo "checking for autoconf... "
+(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]*\.[0-9][0-9]*\).*/\1/"
+VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
+VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//"
+
+# do we need automake?
+if test -r Makefile.am; then
+  AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am`
+  AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP`
+  if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then
+    AM_NEEDED=""
+  fi
+  if test -z $AM_NEEDED; then
+    echo -n "checking for automake... "
+    AUTOMAKE=automake
+    ACLOCAL=aclocal
+    if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
+      echo "yes"
+    else
+      echo "no"
+      AUTOMAKE=
+    fi
+  else
+    echo -n "checking for automake $AM_NEEDED or later... "
+    majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ`
+    minneeded=`echo $AM_NEEDED | $VERSIONMKMIN`
+    for am in automake-$AM_NEEDED automake$AM_NEEDED \
+	automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
+      ($am --version < /dev/null > /dev/null 2>&1) || continue
+      ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
+      maj=`echo $ver | $VERSIONMKMAJ`
+      min=`echo $ver | $VERSIONMKMIN`
+      if test $maj -eq $majneeded -a $min -ge $minneeded; then
+        AUTOMAKE=$am
+        echo $AUTOMAKE
+        break
+      fi
+    done
+    test -z $AUTOMAKE &&  echo "no"
+    echo -n "checking for aclocal $AM_NEEDED or later... "
+    for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \
+	aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
+      ($ac --version < /dev/null > /dev/null 2>&1) || continue
+      ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
+      maj=`echo $ver | $VERSIONMKMAJ`
+      min=`echo $ver | $VERSIONMKMIN`
+      if test $maj -eq $majneeded -a $min -ge $minneeded; then
+        ACLOCAL=$ac
+        echo $ACLOCAL
+        break
+      fi
+    done
+    test -z $ACLOCAL && echo "no"
+  fi
+  test -z $AUTOMAKE || test -z $ACLOCAL && {
+        echo
+        echo "You must have automake 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/"
+        exit 1
+  }
+fi
+
+echo -n "checking for libtool... "
+for LIBTOOLIZE in libtoolize glibtoolize nope; do
+  ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
+done
+if test x$LIBTOOLIZE = xnope; then
+  echo "nope."
+  LIBTOOLIZE=libtoolize
+else
+  echo $LIBTOOLIZE
+fi
+($LIBTOOLIZE --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
+
+echo "Generating configuration files for $package, please wait...."
+
+echo "  $ACLOCAL $ACLOCAL_FLAGS"
+$ACLOCAL $ACLOCAL_FLAGS || exit 1
+echo "  $LIBTOOLIZE --automake"
+$LIBTOOLIZE --automake || exit 1
+echo "  autoheader"
+autoheader || exit 1
+echo "  $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
+$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
+echo "  autoconf"
+autoconf || exit 1
+
+cd $olddir
+#$srcdir/configure --enable-maintainer-mode "$@" && echo


Property changes on: libsydneyaudio/trunk/autogen.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: libsydneyaudio/trunk/configure.ac
===================================================================
--- libsydneyaudio/trunk/configure.ac	                        (rev 0)
+++ libsydneyaudio/trunk/configure.ac	2008-08-19 12:51:01 UTC (rev 3708)
@@ -0,0 +1,195 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT(libsydneyaudio, 0.0.1.svn)
+AC_CONFIG_SRCDIR([src/sydney_audio_alsa.c])
+
+AC_PREREQ(2.53)
+
+AC_CANONICAL_TARGET
+
+AM_INIT_AUTOMAKE
+AM_CONFIG_HEADER(config.h)
+
+SHARED_VERSION_INFO="1:0:0"
+SHLIB_VERSION_ARG=""
+
+# Checks for programs
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+AC_C_CONST
+AC_C_BIGENDIAN
+
+dnl Add parameters for aclocal
+AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
+
+dnl Overall configuration success flag
+libsydneyaudio_config_ok=yes
+
+dnl
+dnl Configure for target platform
+dnl
+
+case "$target_os" in
+  linux* | solaris*)
+    SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
+    AC_SUBST(PLATFORM,"linux")
+    ;;
+  *)
+    ;;
+esac
+
+
+dnl
+dnl  Detect alsa
+dnl
+PKG_CHECK_MODULES(ALSA, alsa, HAVE_ALSA=yes, HAVE_ALSA=no)
+AC_SUBST(ALSA_CFLAGS)
+AC_SUBST(ALSA_LIBS)
+
+dnl
+dnl  Detect pulseaudio
+dnl
+PKG_CHECK_MODULES(PULSE, libpulse, HAVE_PULSE=yes, HAVE_PULSE=no)
+AC_SUBST(PULSE_CFLAGS)
+AC_SUBST(PULSE_LIBS)
+
+dnl
+dnl  alsa backend configure option
+dnl
+AC_ARG_WITH(alsa,
+[  --with-alsa   Use ALSA audio backend],
+[ case "$withval" in
+  no)
+    ;;
+  *)
+    HAVE_ALSA=yes
+    HAVE_PULSE=no
+    ;;
+  esac]
+)
+
+dnl
+dnl  oss backend configure option
+dnl
+AC_ARG_WITH(oss,
+[  --with-oss   Use OSS audio backend],
+[ case "$withval" in
+  no)
+    ;;
+  *)
+    HAVE_ALSA=no
+    HAVE_PULSE=no
+    ;;
+  esac]
+)
+
+AUDIO_BACKEND=oss
+if test "x$HAVE_ALSA" = "xyes"; then
+  AUDIO_BACKEND=alsa
+fi
+if test "x$HAVE_PULSE" = "xyes"; then
+  AUDIO_BACKEND=pulse
+fi
+
+AM_CONDITIONAL(HAVE_ALSA, test "x$AUDIO_BACKEND" = "xalsa")
+AM_CONDITIONAL(HAVE_PULSE, test "x$AUDIO_BACKEND" = "xpulse")
+
+dnl
+dnl  Detect pthreads libraries
+dnl
+
+PTHREAD_LIBS=error
+AC_CHECK_LIB(pthread, pthread_attr_init, PTHREAD_LIBS="-lpthread")
+if test "x$PTHREAD_LIBS" = xerror; then
+        AC_CHECK_LIB(pthreads, pthread_attr_init, PTHREAD_LIBS="-lpthreads")
+fi
+if test "x$PTHREAD_LIBS" = xerror; then
+        AC_CHECK_LIB(c_r, pthread_attr_init, PTHREAD_LIBS="-lc_r")
+fi
+if test "x$PTHREAD_LIBS" = xerror; then
+        AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="")
+fi
+AC_SUBST(PTHREAD_LIBS)
+
+dnl
+dnl  Configuration tests complete -- provide summary of results.
+dnl
+
+if test $libsydneyaudio_config_ok = no ; then
+
+AC_MSG_RESULT([
+**************************************************************
+
+*** $PACKAGE $VERSION: Automatic configuration FAILED.
+
+*** The file config.log has full details.
+
+*** The following required libraries are missing or
+*** misconfigured on your system:
+])
+
+if test "x$HAVE_OGGPLAY" != xyes ; then
+    AC_MSG_RESULT(
+[*** liboggplay, available from http://svn.annodex.net/liboggplay/trunk])
+fi
+
+AC_MSG_RESULT(
+[*** If you install the required libraries from source, you
+*** need to inform the dynamic linker of their location. If
+*** you install them in a system-wide directory such as
+*** /usr/local (the default), you must ensure that
+*** /usr/local/lib is listed in /etc/ld.so.conf, then run
+*** ldconfig to update the dynamic linking system.
+*** Alternatively, you can set your LD_LIBRARY_PATH environment
+*** variable to include the library installation directory.
+])
+
+
+AC_MSG_RESULT(
+[**************************************************************
+])
+
+
+AC_MSG_ERROR([
+***
+*** After fixing the above problems, you must run ./configure again.
+***
+])
+
+else
+
+AC_SUBST(SHLIB_VERSION_ARG)
+AC_SUBST(SHARED_VERSION_INFO)
+
+
+AS_AC_EXPAND(LIBDIR, ${libdir})
+AS_AC_EXPAND(INCLUDEDIR, ${includedir})
+AS_AC_EXPAND(BINDIR, ${bindir})
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+sydneyaudio.pc
+sydneyaudio-uninstalled.pc
+])
+
+AC_MSG_RESULT([
+------------------------------------------------------------------------
+  $PACKAGE $VERSION:  Automatic configuration OK.
+
+    install path : .................. ${LIBDIR}
+    audio backend: .................. ${AUDIO_BACKEND}
+
+  Building:
+
+    Type 'make' to compile $PACKAGE.
+
+    Type 'make install' to install $PACKAGE.
+
+------------------------------------------------------------------------
+])
+
+fi

Added: libsydneyaudio/trunk/m4/as-ac-expand.m4
===================================================================
--- libsydneyaudio/trunk/m4/as-ac-expand.m4	                        (rev 0)
+++ libsydneyaudio/trunk/m4/as-ac-expand.m4	2008-08-19 12:51:01 UTC (rev 3708)
@@ -0,0 +1,43 @@
+dnl as-ac-expand.m4 0.2.0
+dnl autostars m4 macro for expanding directories using configure's prefix
+dnl thomas at apestaart.org
+
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+dnl example
+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
+
+AC_DEFUN([AS_AC_EXPAND],
+[
+  EXP_VAR=[$1]
+  FROM_VAR=[$2]
+
+  dnl first expand prefix and exec_prefix if necessary
+  prefix_save=$prefix
+  exec_prefix_save=$exec_prefix
+
+  dnl if no prefix given, then use /usr/local, the default prefix
+  if test "x$prefix" = "xNONE"; then
+    prefix="$ac_default_prefix"
+  fi
+  dnl if no exec_prefix given, then use prefix
+  if test "x$exec_prefix" = "xNONE"; then
+    exec_prefix=$prefix
+  fi
+
+  full_var="$FROM_VAR"
+  dnl loop until it doesn't change anymore
+  while true; do
+    new_full_var="`eval echo $full_var`"
+    if test "x$new_full_var" = "x$full_var"; then break; fi
+    full_var=$new_full_var
+  done
+
+  dnl clean up
+  full_var=$new_full_var
+  AC_SUBST([$1], "$full_var")
+
+  dnl restore prefix and exec_prefix
+  prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+])


Property changes on: libsydneyaudio/trunk/src
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in
.libs
.deps


Added: libsydneyaudio/trunk/src/Makefile.am
===================================================================
--- libsydneyaudio/trunk/src/Makefile.am	                        (rev 0)
+++ libsydneyaudio/trunk/src/Makefile.am	2008-08-19 12:51:01 UTC (rev 3708)
@@ -0,0 +1,21 @@
+## Process this file with automake to produce Makefile.in
+
+if HAVE_PULSE
+audio_sources = sydney_audio_pulseaudio.c
+audio_libs = $(PULSE_LIBS)
+else
+if HAVE_ALSA
+audio_sources = sydney_audio_alsa.c
+
+audio_libs = $(ALSA_LIBS)
+else
+audio_sources = sydney_audio_oss.c
+endif
+endif
+
+lib_LTLIBRARIES = libsydneyaudio.la
+
+libsydneyaudio_la_SOURCES = $(audio_sources)
+
+libsydneyaudio_la_LIBADD = $(audio_libs) $(PTHREAD_LIBS)
+

Added: libsydneyaudio/trunk/sydneyaudio-uninstalled.pc.in
===================================================================
--- libsydneyaudio/trunk/sydneyaudio-uninstalled.pc.in	                        (rev 0)
+++ libsydneyaudio/trunk/sydneyaudio-uninstalled.pc.in	2008-08-19 12:51:01 UTC (rev 3708)
@@ -0,0 +1,11 @@
+prefix=
+exec_prefix=
+libdir=${pcfiledir}/src/.libs
+includedir=${pcfiledir}/include
+
+Name: sydneyaudio
+Description: Sydneyaudio abstraction library
+Requires: 
+Version: @VERSION@
+Libs: -L${libdir}
+Cflags: -I${includedir}

Added: libsydneyaudio/trunk/sydneyaudio.pc.in
===================================================================
--- libsydneyaudio/trunk/sydneyaudio.pc.in	                        (rev 0)
+++ libsydneyaudio/trunk/sydneyaudio.pc.in	2008-08-19 12:51:01 UTC (rev 3708)
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: sydneyaudio
+Description: Sydneyaudio abstraction library
+Requires: 
+Version: @VERSION@
+Libs: -L${libdir}
+Cflags: -I${includedir}



More information about the commits mailing list