configure.ac 1.45 KB
Newer Older
johan's avatar
johan committed
1 2 3 4 5 6
#   -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.



AC_INIT([bcg729],[0.1])
7
AC_CANONICAL_SYSTEM
johan's avatar
johan committed
8 9 10 11 12 13 14 15 16
AC_PREREQ(2.63)
AC_CONFIG_SRCDIR([src/encoder.c])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([tar-ustar --warnings=no-portability])
AC_PROG_LIBTOOL
AC_PROG_CC
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_ARG_ENABLE(strict,
17 18 19
	[  --enable-strict       Enable error on compilation warning [default=yes]],
	[wall_werror=$enableval],
	[wall_werror=yes]
johan's avatar
johan committed
20
)
jehan's avatar
jehan committed
21 22 23 24
# configure option to disable the tests
AC_ARG_ENABLE([tests],
	AS_HELP_STRING([--disable-tests], [Disable the tests]))
	AM_CONDITIONAL([RUN_TESTS], [test "x$enable_tests" != "xno"])
johan's avatar
johan committed
25 26 27 28 29 30 31 32

CFLAGS="$CFLAGS -Wall"

if test $GCC = yes && test $wall_werror = yes;  then
	CFLAGS="$CFLAGS -Werror "
fi

# check for libraries that have pkg-config files installed
Guillaume Beraudo's avatar
Guillaume Beraudo committed
33 34
PKG_CHECK_MODULES(ORTP, ortp >= 0.21.0,[found_ortp=true],foo=bar)
PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.8.99,[found_ms2=true],foo=bar)
35
AM_CONDITIONAL(BUILD_MSBCG729, test x${found_ms2}x${found_ortp} = xtruextrue)
johan's avatar
johan committed
36 37 38

# Create the following files from their .in counterparts
AC_CONFIG_FILES([
39 40 41 42 43 44 45 46
	Makefile
	src/Makefile 
	include/Makefile 
	include/bcg729/Makefile 
	msbcg729/Makefile 
	test/Makefile 
	test/bin/Makefile 
	libbcg729.pc
johan's avatar
johan committed
47 48
])

49
VISIBILITY_CFLAGS=
50 51 52 53 54
case "$target_os" in
	*mingw*)
		CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501"
	;;
	*)
55
		VISIBILITY_CFLAGS="-fvisibility=hidden"
56 57
	;;
esac
58
AC_SUBST(VISIBILITY_CFLAGS)
59 60


johan's avatar
johan committed
61
AC_OUTPUT