2 # Process this file with autoconf to produce a configure script.
4 AC_INIT([opencore-amr], [0.1.3], [http://sourceforge.net/projects/opencore-amr/])
6 AC_CONFIG_MACRO_DIR([m4])
7 AM_INIT_AUTOMAKE([tar-ustar])
8 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9 AC_CONFIG_HEADERS([config.h])
12 # Cross compiling support
16 # Various options for configure
17 AC_ARG_ENABLE([compile-c],
18 [AS_HELP_STRING([--enable-compile-c],
19 [enable compiling as C program (default is yes)])],
20 [compile_as_c=$enableval],
22 AC_ARG_ENABLE([gcc-armv5],
23 [AS_HELP_STRING([--enable-gcc-armv5],
24 [enable GCC specific ARMv5 assembler (default is no)])],
25 [gcc_armv5=$enableval], [gcc_armv5=no])
26 AC_ARG_ENABLE([amrnb-encoder],
27 [AS_HELP_STRING([--enable-amrnb-encoder],
28 [enable AMR-NB encoder (default is yes)])],
29 [amrnb_encoder=$enableval], [amrnb_encoder=yes])
30 AC_ARG_ENABLE([amrnb-decoder],
31 [AS_HELP_STRING([--enable-amrnb-decoder],
32 [enable AMR-NB decoder (default is yes)])],
33 [amrnb_decoder=$enableval], [amrnb_decoder=yes])
34 AC_ARG_ENABLE([examples],
35 [AS_HELP_STRING([--enable-examples],
36 [enable example encoding/decoding programs (default is no)])],
37 [examples=$enableval], [examples=no])
39 # Automake conditionals to set
40 AM_CONDITIONAL(COMPILE_AS_C, test x$compile_as_c = xyes)
41 AM_CONDITIONAL(GCC_ARMV5, test x$gcc_armv5 = xyes)
42 AM_CONDITIONAL(AMRNB_ENCODER, test x$amrnb_encoder = xyes)
43 AM_CONDITIONAL(AMRNB_DECODER, test x$amrnb_decoder = xyes)
44 AM_CONDITIONAL(EXAMPLES, test x$examples = xyes)
46 # Checks for programs.
55 AC_SUBST(LIBTOOL_DEPS)
57 # Checks for libraries.
58 AC_CHECK_LIB([m], [main])
60 # Checks for header files.
61 AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
63 # Checks for typedefs, structures, and compiler characteristics.
75 # Checks for library functions.
77 AC_CHECK_FUNCS([memset])
79 # OpenCORE AMR soname version to use
80 # goes by ‘current[:revision[:age]]’ with the soname ending up as
81 # current.age.revision.
82 OPENCORE_AMRNB_VERSION=0:3:0
83 OPENCORE_AMRWB_VERSION=0:3:0
84 AC_SUBST(OPENCORE_AMRNB_VERSION)
85 AC_SUBST(OPENCORE_AMRWB_VERSION)
87 AC_CONFIG_FILES([Makefile
91 amrnb/opencore-amrnb.pc
92 amrwb/opencore-amrwb.pc])