Skip to content

Commit

Permalink
Make autotools a bit less whiny on modern systems
Browse files Browse the repository at this point in the history
There's lots more that could and possibly should be done here, but this
is a simple first pass.  We could probably just replace SPEEX_VERSION
with PACKAGE_VERSION everywhere, but that would tangle too many other
things into this set.

Use 'foreign' so the INSTALL file doesn't get stomped every time autogen
is run.
  • Loading branch information
Ron committed Dec 7, 2013
1 parent c23a4ea commit 8aa51a2
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 21 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Speex.kdevelop.pcs
Speex.kdevses
aclocal.m4
autom4te.cache
compile
config.guess
config.h.in
config.sub
Expand All @@ -27,9 +28,7 @@ config.h
config.log
config.status
include/speex/speex_config_types.h
*.swp
testdenoise
testecho
*.sw[lmnop]
testenc
testenc_uwb
testenc_wb
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# To disable automatic dependency tracking if using other tools than
# gcc and gmake, add the option 'no-dependencies'
AUTOMAKE_OPTIONS = 1.8
ACLOCAL_AMFLAGS = -I m4

m4datadir = $(datadir)/aclocal
m4data_DATA = speex.m4
Expand Down
3 changes: 3 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ test -n "$srcdir" && cd "$srcdir"

echo "Updating build configuration files, please wait...."

mkdir -p m4

ACLOCAL_FLAGS="-I m4"
autoreconf -if

40 changes: 24 additions & 16 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
dnl Process this file with autoconf to produce a configure script. -*-m4-*-

AC_INIT(libspeex/speex.c)
AC_INIT([speex],[1.2rc1],[[email protected]])

AC_CONFIG_SRCDIR([libspeex/speex.c])
AC_CONFIG_MACRO_DIR([m4])

dnl enable silent rules on automake 1.11 and later
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AM_CONFIG_HEADER([config.h])

SPEEX_MAJOR_VERSION=1
SPEEX_MINOR_VERSION=1
SPEEX_MICRO_VERSION=16
SPEEX_EXTRA_VERSION=
#SPEEX_VERSION=
#SPEEX_VERSION=$SPEEX_MAJOR_VERSION.$SPEEX_MINOR_VERSION.$SPEEX_MICRO_VERSION$SPEEX_EXTRA_VERSION
SPEEX_VERSION="1.2rc1"

SPEEX_LT_CURRENT=6
SPEEX_LT_REVISION=0
SPEEX_LT_AGE=5


AC_SUBST(SPEEX_LT_CURRENT)
AC_SUBST(SPEEX_LT_REVISION)
AC_SUBST(SPEEX_LT_AGE)

# For automake.
VERSION=$SPEEX_VERSION
PACKAGE=speex

AC_SUBST(SPEEX_VERSION)

AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE([foreign no-define])
AM_MAINTAINER_MODE([enable])

AC_CANONICAL_HOST
AC_LIBTOOL_WIN32_DLL
Expand Down Expand Up @@ -126,7 +123,11 @@ AC_CHECK_FUNCS([getopt_long],,
AC_LIBOBJ(getopt)
AC_LIBOBJ(getopt1)])])

AC_DEFINE_UNQUOTED(SPEEX_VERSION, "${SPEEX_VERSION}", [Complete version string])
SPEEX_VERSION=$PACKAGE_VERSION

AC_SUBST(SPEEX_VERSION)

AC_DEFINE_UNQUOTED(SPEEX_VERSION, "${PACKAGE_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])
Expand Down Expand Up @@ -282,7 +283,8 @@ fi
AC_SUBST(SIZE16)
AC_SUBST(SIZE32)

AC_OUTPUT([Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec
AC_CONFIG_FILES([
Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec
include/Makefile include/speex/Makefile speex.pc
win32/Makefile win32/libspeex/Makefile win32/speexenc/Makefile
win32/speexdec/Makefile symbian/Makefile
Expand All @@ -303,7 +305,13 @@ AC_OUTPUT([Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec
win32/VS2008/speexenc/Makefile
include/speex/speex_config_types.h ti/Makefile
ti/speex_C54_test/Makefile ti/speex_C55_test/Makefile
ti/speex_C64_test/Makefile ])
ti/speex_C64_test/Makefile
])

AC_CONFIG_HEADERS([config.h])

AC_OUTPUT


if test "x$src" = "x"; then
echo "**IMPORTANT**"
Expand Down
2 changes: 1 addition & 1 deletion libspeex/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
FFTSRC=
endif

INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@

lib_LTLIBRARIES = libspeex.la

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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_builddir)/include/speex -I$(top_builddir) @OGG_CFLAGS@ @SPEEXDSP_CFLAGS@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @OGG_CFLAGS@ @SPEEXDSP_CFLAGS@

man_MANS = speexenc.1 speexdec.1

Expand Down

0 comments on commit 8aa51a2

Please sign in to comment.