solairs port, add new files, still WIP.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2955 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
804aaa5097
commit
c4b5df5315
|
@ -0,0 +1,4 @@
|
||||||
|
David A. McGrew
|
||||||
|
Cisco Systems, Inc.
|
||||||
|
mcgrew@cisco.com
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Copyright (c) 2001-2005 Cisco Systems, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
* copyright notice, this list of conditions and the following
|
||||||
|
* disclaimer in the documentation and/or other materials provided
|
||||||
|
* with the distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of the Cisco Systems, Inc. nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||||
|
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
|
@ -0,0 +1,229 @@
|
||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
|
This file is free documentation; the Free Software Foundation gives
|
||||||
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, and a
|
||||||
|
file `config.log' containing compiler output (useful mainly for
|
||||||
|
debugging `configure').
|
||||||
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. (Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.)
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If you are using the cache, and at
|
||||||
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
|
`configure' by a program called `autoconf'. You only need
|
||||||
|
`configure.ac' if you want to change it or regenerate `configure' using
|
||||||
|
a newer version of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
|
Running `configure' takes awhile. While running, it prints some
|
||||||
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
5. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
|
You can give `configure' initial values for configuration parameters
|
||||||
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
|
variable, you have to compile the package for one architecture at a
|
||||||
|
time in the source code directory. After you have installed the
|
||||||
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
|
for another architecture.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' will install the package's files in
|
||||||
|
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||||
|
installation prefix other than `/usr/local' by giving `configure' the
|
||||||
|
option `--prefix=PATH'.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||||
|
PATH as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files will still use the regular prefix.
|
||||||
|
|
||||||
|
In addition, if you use an unusual directory layout you can give
|
||||||
|
options like `--bindir=PATH' to specify different values for particular
|
||||||
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
|
you can set and what kinds of files go in them.
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' cannot figure out
|
||||||
|
automatically, but needs to determine by the type of machine the package
|
||||||
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
|
a message saying it cannot guess the machine type, give it the
|
||||||
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
|
OS KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
|
produce code for.
|
||||||
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Defining Variables
|
||||||
|
==================
|
||||||
|
|
||||||
|
Variables not defined in a site shell script can be set in the
|
||||||
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
|
will cause the specified gcc to be used as the C compiler (unless it is
|
||||||
|
overridden in the site shell script).
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
`-h'
|
||||||
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
|
`configure --help' for more details.
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
_DIST =
|
||||||
|
SUBDIRS = test
|
||||||
|
AUTOMAKE_OPTS= gnu
|
||||||
|
NAME=srtp
|
||||||
|
|
||||||
|
AM_CFLAGS = $(new_AM_CFLAGS) -I./src -Icrypto/include -I$(srcdir)/include -I$(srcdir)/crypto/include
|
||||||
|
AM_CPPFLAGS = $(AM_CFLAGS)
|
||||||
|
AM_LDFLAGS = $(new_AM_LDFLAGS) -L.
|
||||||
|
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libsrtp.la libcryptomath.la
|
||||||
|
libsrtp_la_SOURCES = srtp/srtp.c crypto/cipher/cipher.c crypto/cipher/null_cipher.c \
|
||||||
|
crypto/cipher/aes.c crypto/cipher/aes_icm.c \
|
||||||
|
crypto/cipher/aes_cbc.c \
|
||||||
|
crypto/hash/null_auth.c crypto/hash/sha1.c \
|
||||||
|
crypto/hash/hmac.c crypto/hash/auth.c \
|
||||||
|
crypto/math/datatypes.c crypto/math/stat.c \
|
||||||
|
crypto/kernel/crypto_kernel.c crypto/kernel/alloc.c \
|
||||||
|
crypto/kernel/key.c \
|
||||||
|
crypto/rng/prng.c crypto/rng/ctr_prng.c \
|
||||||
|
crypto/kernel/err.c \
|
||||||
|
crypto/replay/rdb.c crypto/replay/rdbx.c crypto/replay/ut_sim.c
|
||||||
|
libsrtp_la_LDFLAGS = -version-info 1:42:1
|
||||||
|
|
||||||
|
if RNG_OBJS_LINUX
|
||||||
|
libsrtp_la_SOURCES += crypto/rng/rand_linux_kernel.c
|
||||||
|
else
|
||||||
|
libsrtp_la_SOURCES += crypto/rng/rand_source.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
if GDOI
|
||||||
|
libsrtp_la_SOURCES += gdoi/srtp+gdoi.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
libcryptomath_la_SOURCES = crypto/math/math.c crypto/math/gf2_8.c
|
||||||
|
libcryptomath_la_LDFLAGS = -version-info 1:42:1
|
||||||
|
|
||||||
|
library_includedir = $(prefix)/include/srtp
|
||||||
|
library_include_HEADERS = include/rtp.h include/srtp.h include/ut_sim.h crypto/include/aes_cbc.h crypto/include/auth.h \
|
||||||
|
crypto/include/crypto_math.h crypto/include/datatypes.h crypto/include/integers.h crypto/include/null_cipher.h \
|
||||||
|
crypto/include/rdbx.h crypto/include/aes_icm.h crypto/include/cipher.h crypto/include/crypto_types.h \
|
||||||
|
crypto/include/err.h crypto/include/kernel_compat.h crypto/include/prng.h crypto/include/sha1.h \
|
||||||
|
crypto/include/aes.h crypto/include/config.h crypto/include/crypto.h crypto/include/gf2_8.h crypto/include/key.h \
|
||||||
|
crypto/include/rand_source.h crypto/include/stat.h crypto/include/alloc.h crypto/include/crypto_kernel.h \
|
||||||
|
crypto/include/cryptoalg.h crypto/include/hmac.h crypto/include/null_auth.h crypto/include/rdb.h crypto/include/xfm.h
|
||||||
|
|
||||||
|
noinst_PROGRAMS = aes_tables
|
||||||
|
aes_tables_SOURCES = tables/aes_tables.c
|
||||||
|
aes_tables_LDFLAGS = -lcryptomath
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = srtp-1.42.pc
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
||||||
|
m4_include([build/config/ax_compiler_vendor.m4])
|
||||||
|
m4_include([build/config/ax_cflags_warn_all_ansi.m4])
|
||||||
|
m4_include([build/config/ax_cc_maxopt.m4])
|
||||||
|
m4_include([build/config/ax_check_compiler_flags.m4])
|
||||||
|
m4_include([build/config/ac_gcc_archflag.m4])
|
||||||
|
m4_include([build/config/ac_gcc_x86_cpuid.m4])
|
|
@ -6,6 +6,9 @@
|
||||||
/* Define if building for a RISC machine (assume slow byte access). */
|
/* Define if building for a RISC machine (assume slow byte access). */
|
||||||
#undef CPU_RISC
|
#undef CPU_RISC
|
||||||
|
|
||||||
|
/* Enable extra debugging. */
|
||||||
|
#undef DEBUG
|
||||||
|
|
||||||
/* Path to random device */
|
/* Path to random device */
|
||||||
#undef DEV_URANDOM
|
#undef DEV_URANDOM
|
||||||
|
|
||||||
|
@ -27,6 +30,9 @@
|
||||||
/* Define to 1 if you have the <byteswap.h> header file. */
|
/* Define to 1 if you have the <byteswap.h> header file. */
|
||||||
#undef HAVE_BYTESWAP_H
|
#undef HAVE_BYTESWAP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `inet_aton' function. */
|
/* Define to 1 if you have the `inet_aton' function. */
|
||||||
#undef HAVE_INET_ATON
|
#undef HAVE_INET_ATON
|
||||||
|
|
||||||
|
@ -114,6 +120,12 @@
|
||||||
/* Define to use X86 inlined assembly code */
|
/* Define to use X86 inlined assembly code */
|
||||||
#undef HAVE_X86
|
#undef HAVE_X86
|
||||||
|
|
||||||
|
/* Enable Optimization. */
|
||||||
|
#undef OPTIMZER
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
#undef PACKAGE_BUGREPORT
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
@ -153,10 +165,16 @@
|
||||||
/* Define to use syslog logging. */
|
/* Define to use syslog logging. */
|
||||||
#undef USE_SYSLOG
|
#undef USE_SYSLOG
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
/* Define to 1 if your processor stores words with the most significant byte
|
/* Define to 1 if your processor stores words with the most significant byte
|
||||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||||
#undef WORDS_BIGENDIAN
|
#undef WORDS_BIGENDIAN
|
||||||
|
|
||||||
|
/* define it the right way ;) */
|
||||||
|
#undef __FUNCTION__
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
#undef const
|
#undef const
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,97 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(srtp)
|
AC_INIT(srtp, 1.4.2, mcgrew@cisco.com)
|
||||||
|
AC_CONFIG_AUX_DIR(build)
|
||||||
|
AM_INIT_AUTOMAKE(libsrtp,1.4.2)
|
||||||
|
|
||||||
dnl Must come before AC_PROG_CC
|
#Set default language
|
||||||
if test -z "$CFLAGS"; then
|
AC_LANG_C
|
||||||
dnl Default value for CFLAGS if not specified.
|
# Checks for programs.
|
||||||
CFLAGS="-Wall -O4 -fexpensive-optimizations -funroll-loops"
|
AC_PROG_CC
|
||||||
|
AC_PROG_AWK
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
AX_COMPILER_VENDOR
|
||||||
|
|
||||||
|
# Optimization
|
||||||
|
AC_ARG_ENABLE(optimization,
|
||||||
|
[AC_HELP_STRING([--enable-optimization],[Set if you want us to add max optimising compiler flags])],[enable_optimizer="$enableval"],[enable_optimizer="no"])
|
||||||
|
|
||||||
|
if test "${enable_optimizer}" = "yes" ; then
|
||||||
|
AC_DEFINE([OPTIMZER],[],[Enable Optimization.])
|
||||||
|
AX_CC_MAXOPT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Checks for programs.
|
# Enable debugging
|
||||||
AC_PROG_RANLIB
|
AC_ARG_ENABLE(debug,
|
||||||
AC_PROG_CC
|
[AC_HELP_STRING([--enable-debug],[build with debug information])],[enable_debug="$enable_debug"],[enable_debug="yes"])
|
||||||
AC_PROG_INSTALL
|
|
||||||
|
if test "${enable_debug}" = "yes"; then
|
||||||
|
AC_DEFINE([DEBUG],[],[Enable extra debugging.])
|
||||||
|
AX_CFLAGS_WARN_ALL_ANSI
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
|
||||||
|
|
||||||
|
|
||||||
|
case "$host" in
|
||||||
|
*-solaris2*)
|
||||||
|
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
|
||||||
|
SOLINK="-Bdynamic -dy -G"
|
||||||
|
new_AM_CFLAGS="-KPIC -DPIC"
|
||||||
|
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
|
||||||
|
FUNC_DEF=__func__
|
||||||
|
IN_LINE=""
|
||||||
|
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
|
||||||
|
SOLINK="-Bdynamic -dy -G"
|
||||||
|
new_AM_CFLAGS="-fPIC -Wall -O4 -fexpensive-optimizations -funroll-loops"
|
||||||
|
new_AM_LDFLAGS=""
|
||||||
|
IN_LINE=inline
|
||||||
|
fi
|
||||||
|
DYNAMIC_LIB_EXTEN="so"
|
||||||
|
;;
|
||||||
|
*-darwin*)
|
||||||
|
if test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
|
||||||
|
SOLINK="-dynamic -bundle -undefined-surpress -force-flat-namespace"
|
||||||
|
new_AM_CFLAGS="-DMACOSX"
|
||||||
|
new_AM_LDFLAGS=""
|
||||||
|
fi
|
||||||
|
DYNAMIC_LIB_EXTEN="dylib"
|
||||||
|
;;
|
||||||
|
x86_64-*-linux-gnu)
|
||||||
|
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
|
||||||
|
SOLINK="-Bdynamic -dy -G"
|
||||||
|
new_AM_CFLAGS="-KPIC -DPIC"
|
||||||
|
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
|
||||||
|
FUNC_DEF=__func__
|
||||||
|
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
|
||||||
|
SOLINK="-shared -Xlinker -x"
|
||||||
|
new_AM_CFLAGS="-fPIC -Wall -O4 -fexpensive-optimizations -funroll-loops"
|
||||||
|
new_AM_LDFLAGS=""
|
||||||
|
fi
|
||||||
|
DYNAMIC_LIB_EXTEN="so"
|
||||||
|
;;
|
||||||
|
i*6-*-linux-gnu)
|
||||||
|
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
|
||||||
|
SOLINK="-Bdynamic -dy -G"
|
||||||
|
new_AM_CFLAGS="-KPIC -DPIC"
|
||||||
|
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
|
||||||
|
FUNC_DEF=__func__
|
||||||
|
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
|
||||||
|
SOLINK="-shared -Xlinker -x"
|
||||||
|
new_AM_CFLAGS="-fpic -Wall -O4 -fexpensive-optimizations -funroll-loops"
|
||||||
|
new_AM_LDFLAGS=""
|
||||||
|
fi
|
||||||
|
DYNAMIC_LIB_EXTEN="so"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_SUBST(new_AM_CFLAGS)
|
||||||
|
AC_SUBST(new_AM_LDFLAGS)
|
||||||
|
AC_SUBST(SOLINK)
|
||||||
|
AC_SUBST(DYNAMIC_LIB_EXTEN)
|
||||||
|
AC_DEFINE_UNQUOTED([__FUNCTION__],[$FUNC_DEF],[define it the right way ;)])
|
||||||
|
AC_DEFINE_UNQUOTED([inline],[$IN_LINE],[sunpro is bad at inline])
|
||||||
|
|
||||||
AC_ARG_ENABLE(pic, [AS_HELP_STRING([--enable-pic],[build with PIC])],[CFLAGS="-fPIC $CFLAGS"])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(kernel-linux,
|
AC_ARG_ENABLE(kernel-linux,
|
||||||
[AS_HELP_STRING([--enable-kernel-linux],
|
[AS_HELP_STRING([--enable-kernel-linux],
|
||||||
|
@ -35,10 +114,10 @@ fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(which random device to use)
|
AC_MSG_CHECKING(which random device to use)
|
||||||
if test "$enable_kernel_linux" = "yes"; then
|
if test "$enable_kernel_linux" = "yes"; then
|
||||||
RNG_OBJS=rand_linux_kernel.o
|
RNG_OBJS=rand_linux_kernel.c
|
||||||
AC_MSG_RESULT([Linux kernel builtin])
|
AC_MSG_RESULT([Linux kernel builtin])
|
||||||
else
|
else
|
||||||
RNG_OBJS=rand_source.o
|
RNG_OBJS=rand_source.c
|
||||||
if test -n "$DEV_URANDOM"; then
|
if test -n "$DEV_URANDOM"; then
|
||||||
AC_DEFINE_UNQUOTED(DEV_URANDOM, "$DEV_URANDOM",[Path to random device])
|
AC_DEFINE_UNQUOTED(DEV_URANDOM, "$DEV_URANDOM",[Path to random device])
|
||||||
AC_MSG_RESULT([$DEV_URANDOM])
|
AC_MSG_RESULT([$DEV_URANDOM])
|
||||||
|
@ -47,7 +126,7 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST(RNG_OBJS)
|
AC_SUBST(RNG_OBJS)
|
||||||
|
AM_CONDITIONAL(RNG_OBJS_LINUX, test x$enable_kernel_linux = xyes)
|
||||||
|
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
@ -99,7 +178,6 @@ fi
|
||||||
dnl Check the byte order
|
dnl Check the byte order
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
|
||||||
|
|
||||||
dnl check host_cpu type, set defines appropriately
|
dnl check host_cpu type, set defines appropriately
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
|
@ -187,10 +265,11 @@ if test "$enable_gdoi" = "yes"; then
|
||||||
AC_SUBST(GDOI_OBJS)
|
AC_SUBST(GDOI_OBJS)
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($enable_gdoi)
|
AC_MSG_RESULT($enable_gdoi)
|
||||||
|
AM_CONDITIONAL([GDOI],[test "SRTP_GDOI" = "1"])
|
||||||
|
|
||||||
AC_CONFIG_HEADER(crypto/include/config.h:config_in.h)
|
AC_CONFIG_HEADER(crypto/include/config.h:config_in.h)
|
||||||
|
|
||||||
AC_OUTPUT(Makefile crypto/Makefile doc/Makefile)
|
AC_OUTPUT(Makefile crypto/Makefile doc/Makefile test/Makefile srtp-1.42.pc)
|
||||||
|
|
||||||
# This is needed when building outside the source dir.
|
# This is needed when building outside the source dir.
|
||||||
AS_MKDIR_P(crypto/ae_xfm)
|
AS_MKDIR_P(crypto/ae_xfm)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
libdir = @libdir@
|
||||||
|
includedir = @includedir@
|
||||||
|
|
||||||
|
Name: srtp
|
||||||
|
Description: Secure RTP (SRTP) and UST Reference Implementations
|
||||||
|
Version: @VERSION@
|
||||||
|
Libs: -L${libdir} -lsrtp.so
|
||||||
|
Cflags: -I${includedir}/srtp
|
|
@ -0,0 +1,35 @@
|
||||||
|
AUTOMAKE_OPTS= gnu
|
||||||
|
AM_CFLAGS = $(new_AM_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/crypto/include
|
||||||
|
AM_CPPFLAGS = $(AM_CFLAGS)
|
||||||
|
AM_LDFLAGS = $(new_AM_LDFLAGS) -L$(srcdir) -lsrtp
|
||||||
|
|
||||||
|
check_PROGRAMS = cipher_driver kernel_driver rdbx_driver srtp_driver roc_driver replay_driver \
|
||||||
|
aes_calc datatypes_driver rand_gen sha1_driver stat_driver rtpw
|
||||||
|
|
||||||
|
cipher_driver_SOURCES = crypto/cipher_driver.c
|
||||||
|
kernel_driver_SOURCES = crypto/kernel_driver.c
|
||||||
|
aes_calc_SOURCES = crypto/aes_calc.c
|
||||||
|
datatypes_driver_SOURCES = crypto/datatypes_driver.c
|
||||||
|
rand_gen_SOURCES = crypto/rand_gen.c
|
||||||
|
sha1_driver_SOURCES = crypto/sha1_driver.c
|
||||||
|
stat_driver_SOURCES = crypto/stat_driver.c
|
||||||
|
rdbx_driver_SOURCES = rdbx_driver.c
|
||||||
|
srtp_driver_SOURCES = srtp_driver.c
|
||||||
|
roc_driver_SOURCES = roc_driver.c
|
||||||
|
replay_driver_SOURCES = replay_driver.c
|
||||||
|
rtpw_SOURCES = rtpw.c rtp.c
|
||||||
|
rtpw_LDADD = -lnsl -lsocket
|
||||||
|
|
||||||
|
check-local: cipher_driver
|
||||||
|
./cipher_driver -v
|
||||||
|
./kernel_driver -v
|
||||||
|
./rdbx_driver -v
|
||||||
|
./srtp_driver -v
|
||||||
|
./roc_driver -v
|
||||||
|
./replay_driver -v
|
||||||
|
./datatypes_driver -v
|
||||||
|
./stat_driver
|
||||||
|
./sha1_driver -v
|
||||||
|
./kernel_driver -v
|
||||||
|
./rand_gen -n 256
|
||||||
|
|
Loading…
Reference in New Issue