~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.1.0/third_party/srtp/configure.in

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (4.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20140128182336-jrsv0k9u6cawc068
Tags: 1.3.0-1
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Process this file with autoconf to produce a configure script.
 
2
AC_INIT(srtp)
 
3
 
 
4
dnl Must come before AC_PROG_CC
 
5
if test -z "$CFLAGS"; then
 
6
   dnl Default value for CFLAGS if not specified.
 
7
   CFLAGS="-Wall -O4 -fexpensive-optimizations -funroll-loops"
 
8
fi
 
9
 
 
10
dnl Checks for programs.
 
11
AC_PROG_RANLIB
 
12
AC_PROG_CC
 
13
AC_PROG_INSTALL
 
14
 
 
15
 
 
16
AC_ARG_ENABLE(kernel-linux,
 
17
  [AS_HELP_STRING([--enable-kernel-linux],
 
18
                  [build library to run in Linux kernel context])],
 
19
  [], enable_kernel_linux=no)
 
20
AC_MSG_CHECKING(whether to build for Linux kernel context)
 
21
if test "$enable_kernel_linux" = "yes"; then
 
22
   AC_DEFINE(SRTP_KERNEL, 1,
 
23
        [Define to compile for kernel contexts.])
 
24
   AC_DEFINE(SRTP_KERNEL_LINUX, 1,
 
25
        [Define to compile for Linux kernel context.])
 
26
fi
 
27
AC_MSG_RESULT($enable_kernel_linux)
 
28
 
 
29
if test "$cross_compiling" != yes; then
 
30
   dnl Check for /dev/urandom
 
31
   AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom,
 
32
      [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)])
 
33
fi
 
34
 
 
35
AC_MSG_CHECKING(which random device to use)
 
36
if test "$enable_kernel_linux" = "yes"; then
 
37
   RNG_OBJS=rand_linux_kernel.o
 
38
   AC_MSG_RESULT([Linux kernel builtin])
 
39
else
 
40
   RNG_OBJS=rand_source.o
 
41
   if test -n "$DEV_URANDOM"; then
 
42
      AC_DEFINE_UNQUOTED(DEV_URANDOM, "$DEV_URANDOM",[Path to random device])
 
43
      AC_MSG_RESULT([$DEV_URANDOM])
 
44
   else
 
45
      AC_MSG_RESULT([standard rand() function...])
 
46
   fi
 
47
fi
 
48
AC_SUBST(RNG_OBJS)
 
49
 
 
50
 
 
51
dnl Checks for header files.
 
52
AC_HEADER_STDC
 
53
AC_CHECK_HEADERS(stdlib.h)
 
54
AC_CHECK_HEADERS(unistd.h)
 
55
AC_CHECK_HEADERS(byteswap.h)
 
56
AC_CHECK_HEADERS(stdint.h)
 
57
AC_CHECK_HEADERS(sys/uio.h)
 
58
AC_CHECK_HEADERS(inttypes.h)
 
59
AC_CHECK_HEADERS(sys/types.h)
 
60
AC_CHECK_HEADERS(machine/types.h)
 
61
AC_CHECK_HEADERS(sys/int_types.h)
 
62
 
 
63
dnl socket() and friends
 
64
AC_CHECK_HEADERS(sys/socket.h netinet/in.h arpa/inet.h)
 
65
AC_CHECK_HEADERS(windows.h, [AC_CHECK_HEADERS(winsock2.h)])
 
66
 
 
67
AC_CHECK_HEADERS(syslog.h)
 
68
 
 
69
AC_CHECK_TYPES([int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,uint64_t])
 
70
AC_CHECK_SIZEOF(unsigned long)
 
71
AC_CHECK_SIZEOF(unsigned long long)
 
72
 
 
73
dnl Checks for typedefs, structures, and compiler characteristics.
 
74
AC_C_CONST
 
75
AC_C_INLINE
 
76
AC_TYPE_SIZE_T
 
77
 
 
78
dnl Checks for library functions.
 
79
AC_CHECK_FUNCS(socket inet_aton usleep)
 
80
 
 
81
dnl Find socket function if not found yet.
 
82
if test "x$ac_cv_func_socket" = "xno"; then
 
83
  AC_CHECK_LIB(socket, socket)
 
84
  AC_MSG_CHECKING([for socket in -lwsock32])
 
85
  SAVELIBS="$LIBS"
 
86
  LIBS="$LIBS -lwsock32"
 
87
  AC_TRY_LINK([
 
88
#include <winsock2.h>
 
89
],[
 
90
socket(0, 0, 0);
 
91
],
 
92
    ac_cv_func_socket=yes
 
93
    AC_MSG_RESULT(yes),
 
94
    LIBS="$SAVELIBS"
 
95
    AC_MSG_RESULT(no))
 
96
fi
 
97
 
 
98
dnl Check the byte order
 
99
AC_C_BIGENDIAN
 
100
 
 
101
AC_CANONICAL_HOST
 
102
 
 
103
dnl check host_cpu type, set defines appropriately
 
104
case $host_cpu in
 
105
     i*86 )
 
106
        AC_DEFINE(CPU_CISC, 1,
 
107
           [Define if building for a CISC machine (e.g. Intel).])
 
108
        AC_DEFINE(HAVE_X86, 1,
 
109
           [Define to use X86 inlined assembly code]);; 
 
110
        * )
 
111
        # CPU_RISC is only supported for big endian machines.
 
112
        if test "$ac_cv_c_bigendian" = "yes"; then
 
113
           AC_DEFINE(CPU_RISC, 1,
 
114
            [Define if building for a RISC machine (assume slow byte access).])
 
115
        else
 
116
           AC_DEFINE(CPU_CISC, 1)
 
117
        fi
 
118
        ;;
 
119
esac    
 
120
 
 
121
dnl Check if we're on a Windows platform.
 
122
case $host_os in
 
123
  *cygwin*|*mingw* ) 
 
124
              EXE=.exe;;
 
125
         * )  EXE="";;
 
126
esac
 
127
 
 
128
AC_SUBST(EXE)   # define executable suffix; this is needed for `make clean'
 
129
 
 
130
AC_MSG_CHECKING(whether to compile in debugging)
 
131
AC_ARG_ENABLE(debug,
 
132
  [AS_HELP_STRING([--disable-debug],
 
133
                  [do not compile in dynamic debugging system])],
 
134
  [], enable_debug=yes)
 
135
if test "$enable_debug" = "yes"; then
 
136
   AC_DEFINE(ENABLE_DEBUGGING, 1,
 
137
      [Define to compile in dynamic debugging system.])
 
138
fi
 
139
AC_MSG_RESULT($enable_debug)
 
140
 
 
141
AC_MSG_CHECKING(whether to use ISMAcryp code)
 
142
AC_ARG_ENABLE(generic-aesicm,
 
143
  [AS_HELP_STRING([--enable-generic-aesicm],
 
144
                  [compile in changes for ISMAcryp])],
 
145
  [], enable_generic_aesicm=no)
 
146
if test "$enable_generic_aesicm" = "yes"; then
 
147
   AC_DEFINE(GENERIC_AESICM, 1, [Define this to use ISMAcryp code.])
 
148
fi
 
149
AC_MSG_RESULT($enable_generic_aesicm)
 
150
 
 
151
AC_MSG_CHECKING(whether to use syslog for error reporting)
 
152
AC_ARG_ENABLE(syslog,
 
153
  [AS_HELP_STRING([--enable-syslog], [use syslog for error reporting])],
 
154
  [], enable_syslog=no)
 
155
if test "$enable_syslog" = "yes"; then
 
156
   AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog logging.])
 
157
fi
 
158
AC_MSG_RESULT($enable_syslog)
 
159
 
 
160
AC_MSG_CHECKING(whether to use stdout for error reporting)
 
161
AC_ARG_ENABLE(stdout,
 
162
  [AS_HELP_STRING([--disable-stdout], [don't use stdout for error reporting])],
 
163
  [], enable_stdout=yes)
 
164
if test "$enable_stdout" = "yes"; then
 
165
   AC_DEFINE(ERR_REPORTING_STDOUT, 1, [Define to use logging to stdout.])
 
166
fi
 
167
AC_MSG_RESULT($enable_stdout)
 
168
 
 
169
AC_MSG_CHECKING(whether to use /dev/console for error reporting)
 
170
AC_ARG_ENABLE(console,
 
171
  [AS_HELP_STRING([--enable-console], [use /dev/console for error reporting])],
 
172
  [], enable_console=no)
 
173
if test "$enable_console" = "yes"; then
 
174
   AC_DEFINE(USE_ERR_REPORTING_FILE, 1, [Write errors to this file])
 
175
   AC_DEFINE(ERR_REPORTING_FILE, "/dev/console", [Report errors to this file.])
 
176
fi
 
177
AC_MSG_RESULT($enable_console)
 
178
 
 
179
AC_MSG_CHECKING(whether to use GDOI key management)
 
180
AC_ARG_ENABLE(gdoi,
 
181
  [AS_HELP_STRING([--enable-gdoi], [enable GDOI key management])],
 
182
  [], enable_gdoi=no)
 
183
if test "$enable_gdoi" = "yes"; then
 
184
   AC_DEFINE(SRTP_GDOI, 1, [Define to use GDOI.])
 
185
   GDOI_OBJS=gdoi/srtp+gdoi.o
 
186
   AC_SUBST(GDOI_OBJS)                              
 
187
fi
 
188
AC_MSG_RESULT($enable_gdoi)
 
189
 
 
190
AC_CONFIG_HEADER(crypto/include/config.h:config_in.h)
 
191
 
 
192
AC_OUTPUT(Makefile crypto/Makefile doc/Makefile)
 
193
 
 
194
# This is needed when building outside the source dir.
 
195
AS_MKDIR_P(crypto/ae_xfm)
 
196
AS_MKDIR_P(crypto/cipher)
 
197
AS_MKDIR_P(crypto/hash)
 
198
AS_MKDIR_P(crypto/kernel)
 
199
AS_MKDIR_P(crypto/math)
 
200
AS_MKDIR_P(crypto/replay)
 
201
AS_MKDIR_P(crypto/rng)
 
202
AS_MKDIR_P(crypto/test)
 
203
AS_MKDIR_P(doc)
 
204
AS_MKDIR_P(srtp)
 
205
AS_MKDIR_P(tables)
 
206
AS_MKDIR_P(test)