[xiph-commits] r7133 - in trunk/speex: . src

conrad at dactyl.lonelymoon.com conrad
Thu Jul 15 00:29:55 PDT 2004


Author: conrad
Date: Thu Jul 15 00:29:55 2004
New Revision: 7133

Modified:
trunk/speex/Makefile.am
trunk/speex/autogen.sh
trunk/speex/configure.in
trunk/speex/src/Makefile.am
Log:
Add use of autoheader:
- merge autogen.sh from theora
- require automake 1.6
- use XIPH_PATH_OGG instead of older AC_PATH_OGG


Modified: trunk/speex/Makefile.am
===================================================================
--- trunk/speex/Makefile.am	2004-07-15 05:10:37 UTC (rev 7132)
+++ trunk/speex/Makefile.am	2004-07-15 07:29:52 UTC (rev 7133)
@@ -1,7 +1,8 @@
## Process this file with automake to produce Makefile.in. -*-Makefile-*-

-# Disable automatic dependency tracking if using other tools than gcc and gmake
-#AUTOMAKE_OPTIONS = no-dependencies
+# To disable automatic dependency tracking if using other tools than
+# gcc and gmake, add the option 'no-dependencies'
+AUTOMAKE_OPTIONS = foreign 1.6 dist-zip

m4datadir = $(datadir)/aclocal
m4data_DATA = speex.m4

Modified: trunk/speex/autogen.sh
===================================================================
--- trunk/speex/autogen.sh	2004-07-15 05:10:37 UTC (rev 7132)
+++ trunk/speex/autogen.sh	2004-07-15 07:29:52 UTC (rev 7133)
@@ -20,19 +20,60 @@
DIE=1
}

-echo "checking for automake... "
-(automake --version) < /dev/null > /dev/null 2>&1 || {
+VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
+VERSIONMKINT="sed -e s/[^0-9]//"
+
+# do we need automake?
+if test -r Makefile.am; then
+  AM_NEEDED=`fgrep AUTOMAKE_OPTIONS Makefile.am | $VERSIONGREP`
+  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 "no"
+      AUTOMAKE=
+    else
+      echo "yes"
+    fi
+  else
+    echo -n "checking for automake $AM_NEEDED or later... "
+    for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do
+      ($am --version < /dev/null > /dev/null 2>&1) || continue
+      ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT`
+      verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
+      if test $ver -ge $verneeded; 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; do
+      ($ac --version < /dev/null > /dev/null 2>&1) || continue
+      ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT`
+      verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
+      if test $ver -ge $verneeded; 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 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
-}
+        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
-  (which $LIBTOOLIZE) > /dev/null 2>&1 && break
+  ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
done
if test x$LIBTOOLIZE = xnope; then
echo "nope."
@@ -60,16 +101,16 @@

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

-echo "  aclocal $ACLOCAL_FLAGS"
-aclocal $ACLOCAL_FLAGS
-#echo "  autoheader"
-#autoheader
+echo "  $ACLOCAL $ACLOCAL_FLAGS"
+$ACLOCAL $ACLOCAL_FLAGS || exit 1
+echo "  autoheader"
+autoheader || exit 1
echo "  $LIBTOOLIZE --automake"
-$LIBTOOLIZE --automake
-echo "  automake --add-missing $AUTOMAKE_FLAGS"
-automake --add-missing $AUTOMAKE_FLAGS
+$LIBTOOLIZE --automake || exit 1
+echo "  $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
+$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
echo "  autoconf"
-autoconf
+autoconf || exit 1

cd $olddir
$srcdir/configure "$@" && echo

Modified: trunk/speex/configure.in
===================================================================
--- trunk/speex/configure.in	2004-07-15 05:10:37 UTC (rev 7132)
+++ trunk/speex/configure.in	2004-07-15 07:29:52 UTC (rev 7133)
@@ -2,6 +2,8 @@

AC_INIT(libspeex/speex.c)

+AM_CONFIG_HEADER([config.h])
+
SPEEX_MAJOR_VERSION=1
SPEEX_MINOR_VERSION=1
SPEEX_MICRO_VERSION=6
@@ -35,24 +37,7 @@

AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)

-AC_ARG_ENABLE(ogg,
-      [  --enable-ogg=[yes/no]     Turn on or off the use of ogg
-libraries [default=yes]],
-      [case "${enableval}" in
-        yes) useogg=true ;;
-        no)  useogg=false ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-ogg) ;;
-      esac],[useogg=true])
-
-if test x$useogg = xtrue; then
-AC_PATH_LIBOGG
-fi
-
-if test "$have_libogg" = yes; then
-   src=src
-else
-   src=
-fi
+XIPH_PATH_OGG([src="src"], [src=""])
AC_SUBST(src)

AC_CHECK_LIB(m, sin)
@@ -68,27 +53,42 @@

AC_CHECK_LIB(winmm, main)

-AC_DEFINE_UNQUOTED(SPEEX_VERSION, "${SPEEX_VERSION}")
-AC_DEFINE_UNQUOTED(SPEEX_MAJOR_VERSION, ${SPEEX_MAJOR_VERSION})
-AC_DEFINE_UNQUOTED(SPEEX_MINOR_VERSION, ${SPEEX_MINOR_VERSION})
-AC_DEFINE_UNQUOTED(SPEEX_MICRO_VERSION, ${SPEEX_MICRO_VERSION})
-AC_DEFINE_UNQUOTED(SPEEX_EXTRA_VERSION, "${SPEEX_EXTRA_VERSION}")
+AC_DEFINE_UNQUOTED(SPEEX_VERSION, "${SPEEX_VERSION}", [Complete version string])
+AC_DEFINE_UNQUOTED(SPEEX_MAJOR_VERSION, ${SPEEX_MAJOR_VERSION}, [Version major])
+AC_DEFINE_UNQUOTED(SPEEX_MINOR_VERSION, ${SPEEX_MINOR_VERSION}, [Version minor])
+AC_DEFINE_UNQUOTED(SPEEX_MICRO_VERSION, ${SPEEX_MICRO_VERSION}, [Version micro])
+AC_DEFINE_UNQUOTED(SPEEX_EXTRA_VERSION, "${SPEEX_EXTRA_VERSION}", [Version extra])

-AC_ARG_ENABLE(valgrind, [  --enable-valgrind       enable valgrind extra checks], [if test "$enableval" = yes; then AC_DEFINE(ENABLE_VALGRIND) fi])
+AC_ARG_ENABLE(valgrind, [  --enable-valgrind       enable valgrind extra checks],
+[if test "$enableval" = yes; then
+  AC_DEFINE([ENABLE_VALGRIND], , [Enable valgrind extra checks])
+fi])

AC_ARG_ENABLE(sse, [  --enable-sse            enable SSE support], [if test "$enableval" = yes; then
-AC_DEFINE(_USE_SSE)
+AC_DEFINE([_USE_SSE], , [Enable SSE support])
CFLAGS="$CFLAGS -O3 -msse"
fi
])

-AC_ARG_ENABLE(fixed-point, [  --enable-fixed-point    compile as fixed-point], [if test "$enableval" = yes; then AC_DEFINE(FIXED_POINT) fi])
+AC_ARG_ENABLE(fixed-point, [  --enable-fixed-point    compile as fixed-point],
+[if test "$enableval" = yes; then
+  AC_DEFINE([FIXED_POINT], , [Compile as fixed-point])
+fi])

-AC_ARG_ENABLE(arm-asm, [  --enable-arm-asm        make use of ARM assembly instructions], [if test "$enableval" = yes; then AC_DEFINE(ARM_ASM) fi])
+AC_ARG_ENABLE(arm-asm, [  --enable-arm-asm        make use of ARM assembly instructions],
+[if test "$enableval" = yes; then
+  AC_DEFINE([ARM_ASM], , [Make use of ARM assembly instructions])
+fi])

-AC_ARG_ENABLE(fixed-point-debug, [  --enable-fixed-point-debug  Debug fixed-point implementation], [if test "$enableval" = yes; then AC_DEFINE(FIXED_DEBUG) fi])
+AC_ARG_ENABLE(fixed-point-debug, [  --enable-fixed-point-debug  Debug fixed-point implementation],
+[if test "$enableval" = yes; then
+  AC_DEFINE([FIXED_DEBUG], , [Debug fixed-point implementation])
+fi])

-AC_ARG_ENABLE(epic-48k, [  --enable-epic-48k       enable support for Epic 4.8 kbps mode], [if test "$enableval" = yes; then AC_DEFINE(EPIC_48K) fi])
+AC_ARG_ENABLE(epic-48k, [  --enable-epic-48k       enable support for Epic 4.8 kbps mode],
+[if test "$enableval" = yes; then
+  AC_DEFINE([EPIC_48K], , [Enable support for Epic 4.8 kbps mode])
+fi])

AC_ARG_ENABLE(global-pointers, [  --disable-global-pointers  disable use of writable global data], noglobals="yes", noglobals="no")
AM_CONDITIONAL(DISABLE_GLOBAL_POINTERS, [test "x$noglobals" = "xyes"])

Modified: trunk/speex/src/Makefile.am
===================================================================
--- trunk/speex/src/Makefile.am	2004-07-15 05:10:37 UTC (rev 7132)
+++ trunk/speex/src/Makefile.am	2004-07-15 07:29:52 UTC (rev 7133)
@@ -5,7 +5,7 @@
# Disable automatic dependency tracking if using other tools than gcc and gmake
#AUTOMAKE_OPTIONS = no-dependencies

-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libspeex $(OGG_INCLUDES)
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libspeex $(OGG_CFLAGS)

mandir = $(prefix)/share/man
man_MANS = speexenc.1 speexdec.1
@@ -19,8 +19,8 @@

speexenc_SOURCES = speexenc.c wav_io.c
speexenc_LDADD = $(top_builddir)/libspeex/libspeex.la \
-	$(OGG_LDFLAGS) $(OGG_LIBS)
+	$(OGG_LIBS)

speexdec_SOURCES = speexdec.c wav_io.c
speexdec_LDADD = $(top_builddir)/libspeex/libspeex.la \
-	$(OGG_LDFLAGS) $(OGG_LIBS)
+	$(OGG_LIBS)



More information about the commits mailing list