configure.ac 1.32 KB
Newer Older
Simon Morlat's avatar
Simon Morlat committed
1 2 3 4
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
5
AC_INIT([belr], [0.1.0], [simon.morlat@linphone.org])
Sylvain Berfini's avatar
Sylvain Berfini committed
6
AC_CONFIG_SRCDIR([src/])
Simon Morlat's avatar
Simon Morlat committed
7 8 9
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE
Simon Morlat's avatar
Simon Morlat committed
10
AM_SILENT_RULES(yes)
11
LT_INIT(disable-static win32-dll)
Simon Morlat's avatar
Simon Morlat committed
12 13 14 15

# Checks for programs.
AC_PROG_CXX

Simon Morlat's avatar
Simon Morlat committed
16
CXXFLAGS="$CXXFLAGS -std=c++11 -Wall -Werror"
Simon Morlat's avatar
Simon Morlat committed
17 18 19

# Checks for libraries.

Sylvain Berfini's avatar
Sylvain Berfini committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
dnl ##################################################
dnl # Check for BcToolbox
dnl ##################################################

dnl check bctoolbox
PKG_CHECK_MODULES(BCTOOLBOX, [bctoolbox],[libbctoolbox_found=yes],foo=bar)
if test "$libbctoolbox_found" != "yes" ; then
        dnl Check the lib presence in case the PKG-CONFIG version is not found
        AC_LANG_CPLUSPLUS
        AC_CHECK_LIB(bctoolbox, main, [BCTOOLBOX_LIBS+=" -lbctoolbox"; libbctoolbox_found=yes], [foo=bar])
        AC_LANG_C
fi
if test "$libbctoolbox_found" != "yes" ; then
        AC_MSG_ERROR([libbctoolbox not found. Install it and try again])
fi

AC_SUBST(BCTOOLBOX_LIBS)

Simon Morlat's avatar
Simon Morlat committed
38 39 40 41 42 43 44 45 46
# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SSIZE_T

# Checks for library functions.
AC_CONFIG_FILES(
Makefile
src/Makefile
Sylvain Berfini's avatar
Sylvain Berfini committed
47
tools/Makefile
Sylvain Berfini's avatar
Sylvain Berfini committed
48 49
include/Makefile
include/belr/Makefile
Simon Morlat's avatar
Simon Morlat committed
50 51 52
)

AC_OUTPUT