File: configure.ac

package info (click to toggle)
libccrtp 2.0.9-4.1
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 4,472 kB
  • sloc: sh: 10,900; cpp: 9,590; ansic: 2,567; makefile: 134
file content (107 lines) | stat: -rw-r--r-- 3,258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright (C) 1999-2005 Open Source Telecom Corporation.
# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

AC_INIT([ccrtp], [2.0.9])
AC_CONFIG_SRCDIR([src/ccrtp/rtp.h])

LT_VERSION="2:6:0"
REQUIRES="5.0.0"

AC_CONFIG_AUX_DIR(autoconf)
AC_CANONICAL_SYSTEM
AC_PROG_CPP
AC_PROG_CXXCPP
AC_PROG_CXX
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AM_INIT_AUTOMAKE([dist-zip])
AM_CONFIG_HEADER(ccrtp-config.h)

AC_C_RESTRICT
AC_C_VOLATILE
AC_C_INLINE

# SRTP support
AC_ARG_ENABLE(srtp,
    AS_HELP_STRING([--enable-srtp],
        [enable SRTP support (default enabled)]))
if test -z "$enable_srtp"; then
   enable_srtp="yes"
   AC_DEFINE(SRTP_SUPPORT, [], [SRTP support])
fi

# availability of gcrypt or openSSL crypto library if SRTP support is enabled
if test "${enable_srtp}" = "yes"
then
    openssl="false"
    gcrypt="false"
    AM_PATH_LIBGCRYPT([1:1.2.3],
                  [AC_CHECK_HEADERS([gcrypt.h],
                                    [], AC_MSG_ERROR([libgcrypt headers not found.]))
                   LIBS="$LIBGCRYPT_LIBS $LIBS"
                   gcrypt="true"
                  ],
                  [AC_CHECK_LIB([crypto],
                      [EVP_CipherInit_ex],
                      [AC_CHECK_HEADERS([openssl/bn.h openssl/aes.h openssl/sha.h],
                                        [], AC_MSG_ERROR([OpenSSL headers not found.]))
                       LIBS="-lcrypto $LIBS"
                       openssl="true"
                      ],
                      [AC_MSG_ERROR([Cannot find libgcrypt or OpenSSL crypto library.])]
                     )
                  ]
                 )
    AM_CONDITIONAL(SRTP_OPENSSL, test "$openssl" = "true")
    AM_CONDITIONAL(SRTP_GCRYPT, test "$gcrypt" = "true")

fi

OST_PROG_COMMON
OST_PROG_LIBVER
OST_PROG_LIBRARY(CCXX,[$LT_VERSION])
OST_AUTOMAKE_MODE
OST_MAINTAINER_MODE
PKG_CHECK_MODULES(COMMONCPP, commoncpp >= $REQUIRES)
CXXFLAGS="$CXXFLAGS $COMMONCPP_CFLAGS"
GNULIBS="$COMMONCPP_LIBS $LIBS"
AC_SUBST(GNULIBS)
# OST_CC_ENDIAN - now in Common C++
# Are we using the GNU compiler?
if test $GCC = yes ; then
    WARN_FLAGS="-fno-strict-aliasing -Wall -ansi -pedantic"
else
    WARN_FLAGS=""
fi
AC_SUBST(WARN_FLAGS)

OST_DEBUG

dnl --with-nana: check for nana, the GNU assertion checking and logging library
AC_ARG_WITH(nana,[  --with-nana             use GNU nana for asserts and logging],[
    AC_CHECK_HEADER(nana.h, [
        AC_CHECK_HEADERS(DL.h, [
            AC_CHECK_LIB(nana, main)
            ])
    ])
])

KDOC_DIR="\$(top_srcdir)/doc"
AC_SUBST(KDOC_DIR)
AC_SUBST(LT_VERSION)

AC_PATH_PROG(DOXYGEN, doxygen, no)
AC_SUBST(DOXYGEN)
AM_CONDITIONAL(DOXY, test "$DOXYGEN" != "no")

AC_OUTPUT(Makefile m4/Makefile src/Makefile src/ccrtp/Makefile
doc/Makefile phone/Makefile w32/Makefile ccrtp.spec
libccrtp.spec ccrtp.list libccrtp.pc src/ccrtp/crypto/Makefile directive)