tizen 2.3.1 release
[external/opencore-amr.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_INIT([opencore-amr], [0.1.3], [http://sourceforge.net/projects/opencore-amr/])
5 AC_CONFIG_AUX_DIR(.)
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])
10 AM_MAINTAINER_MODE
11
12 # Cross compiling support
13 AC_CANONICAL_BUILD
14 AC_CANONICAL_HOST
15
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],
21             [compile_as_c=yes])
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])
38
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)
45
46 # Checks for programs.
47 AC_PROG_CXX
48 AC_PROG_CC
49 AC_PROG_INSTALL
50 AC_PROG_LN_S
51 AC_PROG_MAKE_SET
52
53 # Setup for libtool
54 AC_PROG_LIBTOOL
55 AC_SUBST(LIBTOOL_DEPS)
56
57 # Checks for libraries.
58 AC_CHECK_LIB([m], [main])
59
60 # Checks for header files.
61 AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
62
63 # Checks for typedefs, structures, and compiler characteristics.
64 AC_HEADER_STDBOOL
65 AC_C_INLINE
66 AC_TYPE_INT16_T
67 AC_TYPE_INT32_T
68 AC_TYPE_INT64_T
69 AC_TYPE_INT8_T
70 AC_TYPE_UINT16_T
71 AC_TYPE_UINT32_T
72 AC_TYPE_UINT64_T
73 AC_TYPE_UINT8_T
74
75 # Checks for library functions.
76 AC_FUNC_MALLOC
77 AC_CHECK_FUNCS([memset])
78
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)
86
87 AC_CONFIG_FILES([Makefile
88                  amrnb/Makefile
89                  amrwb/Makefile
90                  test/Makefile
91                  amrnb/opencore-amrnb.pc
92                  amrwb/opencore-amrwb.pc])
93 AC_OUTPUT