From 2634faf85a13f79fece045e37515ddd1ea48dc25 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 10 Mar 2014 14:41:30 +0100 Subject: [PATCH] Allow out-of-tree build and use config.h file. --- autogen.sh | 10 +++++++++- configure.ac | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 32b06e0..7d01c2b 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,11 @@ #!/bin/sh +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +THEDIR=`pwd` +cd $srcdir + #AM_VERSION="1.11" if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then AUTOMAKE=automake @@ -23,7 +29,9 @@ echo "Generating build scripts for G729 codec..." set -x $LIBTOOLIZE --copy --force $ACLOCAL $ACLOCAL_ARGS -#autoheader +autoheader $AUTOMAKE --force-missing --add-missing --copy autoconf +cd $THEDIR + diff --git a/configure.ac b/configure.ac index fb73661..5c1d93c 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,7 @@ AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([tar-ustar --warnings=no-portability]) AC_PROG_LIBTOOL AC_PROG_CC +AC_CONFIG_HEADERS(config.h) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_ARG_ENABLE(strict,