autotools-based build system
authorJean-Marc Valin <jean-marc.valin@octasic.com>
Thu, 8 Jul 2010 14:58:54 +0000 (10:58 -0400)
committerJean-Marc Valin <jean-marc.valin@octasic.com>
Thu, 8 Jul 2010 14:58:54 +0000 (10:58 -0400)
Makefile [deleted file]
Makefile.am [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]

diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 4bd3d69..0000000
--- a/Makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-#                                      \r
-# Makefile for Silk SDK                        \r
-#\r
-# Copyright (c) 2010, Skype Limited\r
-# All rights reserved.\r
-#\r
-\r
-#Platform detection and settings\r
-\r
-BUILD_OS := $(shell uname | sed -e 's/^.*Darwin.*/MacOS-X/ ; s/^.*CYGWIN.*/Windows/')\r
-\r
-BUILD_ARCHITECTURE := $(shell uname -m | sed -e 's/i686/i386/')\r
-\r
-EXESUFFIX = \r
-LIBPREFIX = lib\r
-LIBSUFFIX = .a\r
-OBJSUFFIX = .o\r
-\r
-CC     = $(TOOLCHAIN_PREFIX)gcc$(TOOLCHAIN_SUFFIX)\r
-AR     = $(TOOLCHAIN_PREFIX)ar\r
-RANLIB = $(TOOLCHAIN_PREFIX)ranlib\r
-CP     = $(TOOLCHAIN_PREFIX)cp\r
-\r
-cflags-from-defines    = $(addprefix -D,$(1))\r
-cflags-from-includes   = $(addprefix -I,$(1))\r
-ldflags-from-ldlibdirs = $(addprefix -L,$(1))\r
-ldlibs-from-libs       = $(addprefix -l,$(1))\r
-\r
-CFLAGS += -Wall -enable-threads -O3\r
-\r
-CFLAGS  += $(call cflags-from-defines,$(CDEFINES))\r
-CFLAGS  += $(call cflags-from-includes,$(CINCLUDES))\r
-LDFLAGS += $(call ldflags-from-ldlibdirs,$(LDLIBDIRS))\r
-LDLIBS  += $(call ldlibs-from-libs,$(LIBS))\r
-\r
-COMPILE.c.cmdline   = $(CC) -c $(CFLAGS) -o $@ $<\r
-LINK.o.cmdline      = $(LINK.o) -lm $^ $(LDLIBS) -lcelt0 -o $@$(EXESUFFIX) \r
-ARCHIVE.cmdline     = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@\r
-\r
-%$(OBJSUFFIX):%.c\r
-       $(COMPILE.c.cmdline)\r
-\r
-ifneq (,$(filter FIXED_POINT, $(CDEFINES)))\r
-\r
-# Directives\r
-\r
-CINCLUDES += ../celt/libcelt/ interface src_common src_FIX src_SigProc_FIX test\r
-\r
-# VPATH e.g. VPATH = src:../headers\r
-VPATH = ./ \\r
-        interface \\r
-         src_common \\r
-         src_FIX \\r
-         src_SigProc_FIX \\r
-        test \r
-\r
-SRCS_C = $(wildcard src_common/*.c src_FIX/*.c src_SigProc_FIX/*.c )\r
-\r
-else\r
-\r
-# Directives\r
-\r
-CINCLUDES += ../celt/libcelt interface src_common src_FLP src_FIX src_SigProc_FIX src_SigProc_FLP test\r
-\r
-# VPATH e.g. VPATH = src:../headers\r
-VPATH = ./ \\r
-        interface \\r
-         src_common \\r
-         src_FLP \\r
-         src_SigProc_FIX \\r
-         src_SigProc_FLP \\r
-        test \r
-\r
-SRCS_C = $(wildcard src_common/*.c src_FLP/*.c src_SigProc_FIX/*.c  src_SigProc_FLP/*.c )\r
-\r
-endif\r
-\r
-# Variable definitions\r
-LIB_NAME = SKP_SILK_SDK\r
-TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX)\r
-\r
-\r
-OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C))\r
-\r
-ENCODER_SRCS_C = test/Encoder.c test/SKP_debug.c\r
-ENCODER_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(ENCODER_SRCS_C))\r
-\r
-DECODER_SRCS_C = test/Decoder.c test/SKP_debug.c\r
-DECODER_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(DECODER_SRCS_C))\r
-\r
-SIGNALCMP_SRCS_C = test/signalCompare.c\r
-SIGNALCMP_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SIGNALCMP_SRCS_C))\r
-\r
-LIBS = \\r
-       $(LIB_NAME)\r
-\r
-LDLIBDIRS = ./ ../celt/libcelt/.libs/\r
-\r
-# Rules\r
-default: all\r
-\r
-all: $(TARGET) encoder decoder signalcompare\r
-\r
-lib: $(TARGET)\r
-\r
-$(TARGET): $(OBJS)\r
-       $(ARCHIVE.cmdline)\r
-\r
-encoder$(EXESUFFIX): $(ENCODER_OBJS)   \r
-       $(LINK.o.cmdline)\r
-\r
-decoder$(EXESUFFIX): $(DECODER_OBJS)   \r
-       $(LINK.o.cmdline)\r
-\r
-signalcompare$(EXESUFFIX): $(SIGNALCMP_OBJS)   \r
-       $(LINK.o.cmdline)\r
-\r
-clean:\r
-       $(RM) $(TARGET)* $(OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) \\r
-                 $(SIGNALCMP_OBJS) $(TEST_OBJS) \\r
-                 encoder$(EXESUFFIX) decoder$(EXESUFFIX) signalcompare$(EXESUFFIX)\r
-\r
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..445c647
--- /dev/null
@@ -0,0 +1,255 @@
+
+#AM_CFLAGS = -Isrc -Iinterface -fPIC -Wall -O3 
+AUTOMAKE_OPTS = gnu
+NAME = libSKP_SILK_SDK
+AM_CPPFLAGS = $(AM_CFLAGS)
+
+INCLUDES = -Isrc -Iinterface -I../celt/libcelt
+EXTRA_DIST = Silk_FLP.sln \
+Silk_FLP.sln \
+src_FIX/Silk_FIX.vcproj \
+src_FLP/Silk_FLP.vcproj \
+src_common/Silk_Common.vcproj \
+src_common/Silk_CommonFLP.vcproj \
+test/Encoder.c \
+test/Enc_SDK.vcproj \
+test/Decoder.c \
+test/Dec_SDK.vcproj \
+test/signalCompare.c \
+test/SignalCompare.vcproj \
+src_SigProc_FLP/SigProc_FLP.vcproj \
+src_SigProc_FIX/SigProc_FIX.vcproj
+
+lib_LTLIBRARIES        = libSKP_SILK_SDK.la
+libSKP_SILK_SDK_la_SOURCES = src_common/SKP_Silk_CNG.c \
+src_common/SKP_Silk_code_signs.c \
+src_common/SKP_Silk_create_init_destroy.c \
+src_common/SKP_Silk_decode_core.c \
+src_common/SKP_Silk_decode_frame.c \
+src_common/SKP_Silk_decode_indices.c \
+src_common/SKP_Silk_decode_parameters.c \
+src_common/SKP_Silk_decode_pulses.c \
+src_common/SKP_Silk_decoder_set_fs.c \
+src_common/SKP_Silk_dec_SDK_API.c \
+src_common/SKP_Silk_detect_SWB_input.c \
+src_common/SKP_Silk_enc_API.c \
+src_common/SKP_Silk_encode_parameters.c \
+src_common/SKP_Silk_encode_pulses.c \
+src_common/SKP_Silk_gain_quant.c \
+src_common/SKP_Silk_interpolate.c \
+src_common/SKP_Silk_LBRR_reset.c \
+src_common/SKP_Silk_LP_variable_cutoff.c \
+src_common/SKP_Silk_NLSF2A_stable.c \
+src_common/SKP_Silk_NLSF_MSVQ_decode.c \
+src_common/SKP_Silk_NSQ.c \
+src_common/SKP_Silk_NSQ_del_dec.c \
+src_common/SKP_Silk_PLC.c \
+src_common/SKP_Silk_pulses_to_bytes.c \
+src_common/SKP_Silk_range_coder.c \
+src_common/SKP_Silk_shell_coder.c \
+src_common/SKP_Silk_tables_gain.c \
+src_common/SKP_Silk_tables_LTP.c \
+src_common/SKP_Silk_tables_NLSF_CB0_10.c \
+src_common/SKP_Silk_tables_NLSF_CB0_16.c \
+src_common/SKP_Silk_tables_NLSF_CB1_10.c \
+src_common/SKP_Silk_tables_NLSF_CB1_16.c \
+src_common/SKP_Silk_tables_other.c \
+src_common/SKP_Silk_tables_pitch_lag.c \
+src_common/SKP_Silk_tables_pulses_per_block.c \
+src_common/SKP_Silk_tables_sign.c \
+src_common/SKP_Silk_tables_type_offset.c \
+src_common/SKP_Silk_VAD.c \
+src_FLP/SKP_Silk_apply_sine_window_FLP.c \
+src_FLP/SKP_Silk_control_codec_FLP.c \
+src_FLP/SKP_Silk_corrMatrix_FLP.c \
+src_FLP/SKP_Silk_encode_frame_FLP.c \
+src_FLP/SKP_Silk_find_LPC_FLP.c \
+src_FLP/SKP_Silk_find_LTP_FLP.c \
+src_FLP/SKP_Silk_find_pitch_lags_FLP.c \
+src_FLP/SKP_Silk_find_pred_coefs_FLP.c \
+src_FLP/SKP_Silk_HP_variable_cutoff_FLP.c \
+src_FLP/SKP_Silk_init_encoder_FLP.c \
+src_FLP/SKP_Silk_LPC_analysis_filter_FLP.c \
+src_FLP/SKP_Silk_LTP_analysis_filter_FLP.c \
+src_FLP/SKP_Silk_LTP_scale_ctrl_FLP.c \
+src_FLP/SKP_Silk_NLSF_MSVQ_decode_FLP.c \
+src_FLP/SKP_Silk_NLSF_MSVQ_encode_FLP.c \
+src_FLP/SKP_Silk_NLSF_VQ_rate_distortion_FLP.c \
+src_FLP/SKP_Silk_NLSF_VQ_sum_error_FLP.c \
+src_FLP/SKP_Silk_NLSF_VQ_weights_laroia_FLP.c \
+src_FLP/SKP_Silk_noise_shape_analysis_FLP.c \
+src_FLP/SKP_Silk_prefilter_FLP.c \
+src_FLP/SKP_Silk_process_gains_FLP.c \
+src_FLP/SKP_Silk_process_NLSFs_FLP.c \
+src_FLP/SKP_Silk_quant_LTP_gains_FLP.c \
+src_FLP/SKP_Silk_regularize_correlations_FLP.c \
+src_FLP/SKP_Silk_residual_energy_FLP.c \
+src_FLP/SKP_Silk_solve_LS_FLP.c \
+src_FLP/SKP_Silk_tables_NLSF_CB0_10_FLP.c \
+src_FLP/SKP_Silk_tables_NLSF_CB0_16_FLP.c \
+src_FLP/SKP_Silk_tables_NLSF_CB1_10_FLP.c \
+src_FLP/SKP_Silk_tables_NLSF_CB1_16_FLP.c \
+src_FLP/SKP_Silk_tables_other_FLP.c \
+src_FLP/SKP_Silk_VQ_nearest_neighbor_FLP.c \
+src_FLP/SKP_Silk_warped_autocorrelation_FLP.c \
+src_FLP/SKP_Silk_wrappers_FLP.c \
+src_SigProc_FIX/SKP_Silk_A2NLSF.c \
+src_SigProc_FIX/SKP_Silk_allpass_int.c \
+src_SigProc_FIX/SKP_Silk_ana_filt_bank_1.c \
+src_SigProc_FIX/SKP_Silk_apply_sine_window.c \
+src_SigProc_FIX/SKP_Silk_array_maxabs.c \
+src_SigProc_FIX/SKP_Silk_autocorr.c \
+src_SigProc_FIX/SKP_Silk_biquad_alt.c \
+src_SigProc_FIX/SKP_Silk_biquad.c \
+src_SigProc_FIX/SKP_Silk_burg_modified.c \
+src_SigProc_FIX/SKP_Silk_bwexpander_32.c \
+src_SigProc_FIX/SKP_Silk_bwexpander.c \
+src_SigProc_FIX/SKP_Silk_decode_pitch.c \
+src_SigProc_FIX/SKP_Silk_inner_prod_aligned.c \
+src_SigProc_FIX/SKP_Silk_k2a.c \
+src_SigProc_FIX/SKP_Silk_k2a_Q16.c \
+src_SigProc_FIX/SKP_Silk_lin2log.c \
+src_SigProc_FIX/SKP_Silk_log2lin.c \
+src_SigProc_FIX/SKP_Silk_lowpass_int.c \
+src_SigProc_FIX/SKP_Silk_lowpass_short.c \
+src_SigProc_FIX/SKP_Silk_LPC_inv_pred_gain.c \
+src_SigProc_FIX/SKP_Silk_LPC_stabilize.c \
+src_SigProc_FIX/SKP_Silk_LPC_synthesis_filter.c \
+src_SigProc_FIX/SKP_Silk_LPC_synthesis_order16.c \
+src_SigProc_FIX/SKP_Silk_LSF_cos_table.c \
+src_SigProc_FIX/SKP_Silk_MA.c \
+src_SigProc_FIX/SKP_Silk_NLSF2A.c \
+src_SigProc_FIX/SKP_Silk_NLSF_stabilize.c \
+src_SigProc_FIX/SKP_Silk_NLSF_VQ_weights_laroia.c \
+src_SigProc_FIX/SKP_Silk_pitch_analysis_core.c \
+src_SigProc_FIX/SKP_Silk_pitch_est_tables.c \
+src_SigProc_FIX/SKP_Silk_resampler.c \
+src_SigProc_FIX/SKP_Silk_resampler_down2_3.c \
+src_SigProc_FIX/SKP_Silk_resampler_down2.c \
+src_SigProc_FIX/SKP_Silk_resampler_down3.c \
+src_SigProc_FIX/SKP_Silk_resampler_private_AR2.c \
+src_SigProc_FIX/SKP_Silk_resampler_private_ARMA4.c \
+src_SigProc_FIX/SKP_Silk_resampler_private_copy.c \
+src_SigProc_FIX/SKP_Silk_resampler_private_down4.c \
+src_SigProc_FIX/SKP_Silk_resampler_private_down_FIR.c \
+src_SigProc_FIX/SKP_Silk_resampler_private_IIR_FIR.c \
+src_SigProc_FIX/SKP_Silk_resampler_private_up2_HQ.c \
+src_SigProc_FIX/SKP_Silk_resampler_private_up4.c \
+src_SigProc_FIX/SKP_Silk_resampler_rom.c \
+src_SigProc_FIX/SKP_Silk_resampler_up2.c \
+src_SigProc_FIX/SKP_Silk_scale_copy_vector16.c \
+src_SigProc_FIX/SKP_Silk_scale_vector.c \
+src_SigProc_FIX/SKP_Silk_schur64.c \
+src_SigProc_FIX/SKP_Silk_schur.c \
+src_SigProc_FIX/SKP_Silk_sigm_Q15.c \
+src_SigProc_FIX/SKP_Silk_sort.c \
+src_SigProc_FIX/SKP_Silk_sum_sqr_shift.c \
+src_SigProc_FLP/SKP_Silk_allpass_int_FLP.c \
+src_SigProc_FLP/SKP_Silk_autocorrelation_FLP.c \
+src_SigProc_FLP/SKP_Silk_burg_modified_FLP.c \
+src_SigProc_FLP/SKP_Silk_bwexpander_FLP.c \
+src_SigProc_FLP/SKP_Silk_decimate2_coarse_FLP.c \
+src_SigProc_FLP/SKP_Silk_decimate2_coarsest_FLP.c \
+src_SigProc_FLP/SKP_Silk_energy_FLP.c \
+src_SigProc_FLP/SKP_Silk_inner_product_FLP.c \
+src_SigProc_FLP/SKP_Silk_k2a_FLP.c \
+src_SigProc_FLP/SKP_Silk_levinsondurbin_FLP.c \
+src_SigProc_FLP/SKP_Silk_LPC_inv_pred_gain_FLP.c \
+src_SigProc_FLP/SKP_Silk_pitch_analysis_core_FLP.c \
+src_SigProc_FLP/SKP_Silk_scale_copy_vector_FLP.c \
+src_SigProc_FLP/SKP_Silk_scale_vector_FLP.c \
+src_SigProc_FLP/SKP_Silk_schur_FLP.c \
+src_SigProc_FLP/SKP_Silk_sort_FLP.c
+
+
+libSKP_SILK_SDK_la_CFLAGS = $(AM_CFLAGS)
+libSKP_SILK_SDK_la_LDFLAGS = $(LIBS)
+
+library_includedir = $(prefix)/include/silk
+library_include_HEADERS        = interface/SKP_debug.h \
+interface/SKP_Silk_control.h \
+interface/SKP_Silk_errors.h \
+interface/SKP_Silk_SDK_API.h \
+interface/SKP_Silk_typedef.h \
+src_common/SKP_Silk_define.h \
+src_common/SKP_Silk_main.h \
+src_common/SKP_Silk_perceptual_parameters.h \
+src_common/SKP_Silk_PLC.h \
+src_common/SKP_Silk_structs.h \
+src_common/SKP_Silk_tables.h \
+src_common/SKP_Silk_tables_NLSF_CB0_10.h \
+src_common/SKP_Silk_tables_NLSF_CB0_16.h \
+src_common/SKP_Silk_tables_NLSF_CB1_10.h \
+src_common/SKP_Silk_tables_NLSF_CB1_16.h \
+src_FIX/SKP_Silk_define_FIX.h \
+src_FIX/SKP_Silk_main_FIX.h \
+src_FIX/SKP_Silk_perceptual_parameters_FIX.h \
+src_FIX/SKP_Silk_structs_FIX.h \
+src_FLP/SKP_Silk_assembler_FLP.h \
+src_FLP/SKP_Silk_define_FLP.h \
+src_FLP/SKP_Silk_main_FLP.h \
+src_FLP/SKP_Silk_structs_FLP.h \
+src_FLP/SKP_Silk_tables_FLP.h \
+src_SigProc_FIX/SKP_Silk_common_pitch_est_defines.h \
+src_SigProc_FIX/SKP_Silk_Inlines.h \
+src_SigProc_FIX/SKP_Silk_MacroCount.h \
+src_SigProc_FIX/SKP_Silk_MacroDebug.h \
+src_SigProc_FIX/SKP_Silk_macros.h \
+src_SigProc_FIX/SKP_Silk_pitch_est_defines.h \
+src_SigProc_FIX/SKP_Silk_resampler_private.h \
+src_SigProc_FIX/SKP_Silk_resampler_rom.h \
+src_SigProc_FIX/SKP_Silk_resampler_structs.h \
+src_SigProc_FIX/SKP_Silk_SigProc_FIX.h \
+src_SigProc_FLP/SKP_Silk_pitch_est_defines_FLP.h \
+src_SigProc_FLP/SKP_Silk_SigProc_FLP.h \
+src/SKP_debug.h \
+src/SKP_Silk_assembler_FLP.h \
+src/SKP_Silk_common_pitch_est_defines.h \
+src/SKP_Silk_control.h \
+src/SKP_Silk_define_FIX.h \
+src/SKP_Silk_define_FLP.h \
+src/SKP_Silk_define.h \
+src/SKP_Silk_errors.h \
+src/SKP_Silk_Inlines.h \
+src/SKP_Silk_MacroCount.h \
+src/SKP_Silk_MacroDebug.h \
+src/SKP_Silk_macros.h \
+src/SKP_Silk_main_FIX.h \
+src/SKP_Silk_main_FLP.h \
+src/SKP_Silk_main.h \
+src/SKP_Silk_perceptual_parameters_FIX.h \
+src/SKP_Silk_perceptual_parameters.h \
+src/SKP_Silk_pitch_est_defines_FLP.h \
+src/SKP_Silk_pitch_est_defines.h \
+src/SKP_Silk_PLC.h \
+src/SKP_Silk_resampler_private.h \
+src/SKP_Silk_resampler_rom.h \
+src/SKP_Silk_resampler_structs.h \
+src/SKP_Silk_SDK_API.h \
+src/SKP_Silk_SigProc_FIX.h \
+src/SKP_Silk_SigProc_FLP.h \
+src/SKP_Silk_structs_FIX.h \
+src/SKP_Silk_structs_FLP.h \
+src/SKP_Silk_structs.h \
+src/SKP_Silk_tables_FLP.h \
+src/SKP_Silk_tables.h \
+src/SKP_Silk_tables_NLSF_CB0_10.h \
+src/SKP_Silk_tables_NLSF_CB0_16.h \
+src/SKP_Silk_tables_NLSF_CB1_10.h \
+src/SKP_Silk_tables_NLSF_CB1_16.h \
+src/SKP_Silk_typedef.h
+
+bin_PROGRAMS = Encoder Decoder signalCompare
+Encoder_SOURCES = test/Encoder.c test/SKP_debug.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
+Encoder_LDADD = $(lib_LTLIBRARIES) 
+Encoder_LDFLAGS = $(LIBS)
+
+Decoder_SOURCES = test/Decoder.c test/SKP_debug.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
+Decoder_LDADD = $(lib_LTLIBRARIES) 
+Decoder_LDFLAGS = $(LIBS)
+
+signalCompare_SOURCES = test/signalCompare.c test/SKP_debug.c $(top_builddir)/interface/SKP_Silk_SDK_API.h
+signalCompare_LDADD = $(lib_LTLIBRARIES) 
+signalCompare_LDFLAGS = $(LIBS)
+
+LIBS = ../celt/libcelt/libcelt0.la
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..40fbb2d
--- /dev/null
@@ -0,0 +1,111 @@
+#!/bin/sh
+# Run this to set up the build system: configure, makefiles, etc.
+# (based on the version in enlightenment's cvs)
+
+package="celt"
+
+olddir=`pwd`
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+cd "$srcdir"
+DIE=0
+
+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]*\).*/\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 "yes"
+    else
+      echo "no"
+      AUTOMAKE=
+    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 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 "  autoheader"
+#autoheader || exit 1
+echo "  $LIBTOOLIZE --automake"
+$LIBTOOLIZE --automake || exit 1
+echo "  $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
+$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
+echo "  autoconf"
+autoconf || exit 1
+
+cd $olddir
+#$srcdir/configure "$@" && echo
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..bd71b65
--- /dev/null
@@ -0,0 +1,26 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.59])
+AC_INIT(libSKP_SILK_SDK, 1.0.2, brian@freeswitch.org, libSKP_SILK_SDK)
+AM_INIT_AUTOMAKE(libSKP_SILK_SDK,1.0.2)
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([float.h stdint.h stdlib.h string.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_CHECK_LIB([m],[pow])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT