For those wanting to create a Crypto++ shared object library, attached
is a configure.ac and Makefile.am that makes a shared object library
using autoconf, automake, libtool, etc.... Some of it copied from the
Debian port. It has been tested on linux and Solaris 9. To use:

mkdir crypto++52 

cd crypto++52 

unzip -a DIR/cryptopp521.zip (Don't forget the "-a" or many of the
verification tests won't pass).

cp DIR/configure.ac DIR/Makefile.am .

mv GNUmakefile GNUMakefile.old

autoreconf -i

./configure (can add CXXFLAGS=SOMETHING here to optimize)

make

./cryptest v

make install


-Craig McDaniel

# -*- autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT([Crypto++],
        [5.21],
        [EMAIL PROTECTED],
        [cryptopp])
AC_CONFIG_SRCDIR([cryptlib.h])
AC_CONFIG_HEADER([cryptopp_config.h])
AM_INIT_AUTOMAKE([foreign dist-bzip2])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

# Don't create a static object
AC_DISABLE_STATIC
AC_PROG_LIBTOOL

# This is C++ code, not C code. 
AC_LANG_CPLUSPLUS

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h netdb.h netinet/in.h 
stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])

# may need thread library
AC_CHECK_LIB(pthread, pthread_getspecific)

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_CHECK_TYPES([ptrdiff_t])
AC_C_BIGENDIAN(
        AC_DEFINE(IS_BIG_ENDIAN, [], [Big-endian architecture]),
        AC_DEFINE(IS_LITTLE_ENDIAN, [], [Little-endian architecture]),
        AC_MSG_ERROR([Can't tell endianess of platform]))

# use pipe if using gcc
if test "${GXX}" = "yes"; then
   CXXFLAGS="${CXXFLAGS} -pipe"
fi

# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(socket, recv)
AC_CHECK_FUNCS([gethostbyname gettimeofday memmove memset pow select socket 
recv])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
## Process this file with automake to produce Makefile.in
noinst_PROGRAMS = cryptest
cryptest_SOURCES = \
        bench.cpp \
        bench2.cpp \
        datatest.cpp \
        dlltest.cpp \
        test.cpp \
        validat1.cpp \
        validat2.cpp \
        validat3.cpp
cryptest_LDADD = libcrypto++5.2.la
lib_LTLIBRARIES = libcrypto++5.2.la
libcrypto__5_2_la_LDFLAGS = -version-info 0:0:0 $(libtool_flags)
libcrypto__5_2_la_SOURCES = \
        3way.cpp \
        adler32.cpp \
        algebra.cpp \
        algparam.cpp \
        arc4.cpp \
        asn.cpp \
        base32.cpp \
        base64.cpp \
        basecode.cpp \
        bfinit.cpp \
        blowfish.cpp \
        blumshub.cpp \
        camellia.cpp \
        cast.cpp \
        casts.cpp \
        cbcmac.cpp \
        channels.cpp \
        crc.cpp \
        cryptlib.cpp \
        default.cpp \
        des.cpp \
        dessp.cpp \
        dh.cpp \
        dh2.cpp \
        dll.cpp \
        dsa.cpp \
        ec2n.cpp \
        eccrypto.cpp \
        ecp.cpp \
        elgamal.cpp \
        eprecomp.cpp \
        esign.cpp \
        files.cpp \
        filters.cpp \
        fips140.cpp \
        fipsalgt.cpp \
        fipstest.cpp \
        gf256.cpp \
        gf2_32.cpp \
        gf2n.cpp \
        gfpcrypt.cpp \
        gost.cpp \
        gzip.cpp \
        haval.cpp \
        hex.cpp \
        hmac.cpp \
        hrtimer.cpp \
        ida.cpp \
        idea.cpp \
        integer.cpp \
        iterhash.cpp \
        luc.cpp \
        mars.cpp \
        marss.cpp \
        md2.cpp \
        md4.cpp \
        md5.cpp \
        md5mac.cpp \
        misc.cpp \
        modes.cpp \
        modexppc.cpp \
        mqueue.cpp \
        mqv.cpp \
        nbtheory.cpp \
        network.cpp \
        oaep.cpp \
        osrng.cpp \
        panama.cpp \
        pch.cpp \
        pkcspad.cpp \
        polynomi.cpp \
        pssr.cpp \
        pubkey.cpp \
        queue.cpp \
        rabin.cpp \
        randpool.cpp \
        rc2.cpp \
        rc5.cpp \
        rc6.cpp \
        rdtables.cpp \
        regtest.cpp \
        rijndael.cpp \
        ripemd.cpp \
        rng.cpp \
        rsa.cpp \
        rw.cpp \
        safer.cpp \
        shacal2.cpp \
        seal.cpp \
        serpent.cpp \
        sha.cpp \
        shark.cpp \
        sharkbox.cpp \
        simple.cpp \
        skipjack.cpp \
        socketft.cpp \
        square.cpp \
        squaretb.cpp \
        strciphr.cpp \
        tea.cpp \
        tftables.cpp \
        tiger.cpp \
        tigertab.cpp \
        trdlocal.cpp \
        ttmac.cpp \
        twofish.cpp \
        wait.cpp \
        wake.cpp \
        whrlpool.cpp \
        winpipes.cpp \
        xtr.cpp \
        xtrcrypt.cpp \
        zdeflate.cpp \
        zinflate.cpp \
        zlib.cpp

pkginclude_HEADERS = \
        3way.h \
        adler32.h \
        aes.h \
        algebra.h \
        algparam.h \
        arc4.h \
        argnames.h \
        asn.h \
        base32.h \
        base64.h \
        basecode.h \
        bench.h \
        blowfish.h \
        blumshub.h \
        camellia.h \
        cast.h \
        cbcmac.h \
        channels.h \
        config.h \
        crc.h \
        cryptlib.h \
        default.h \
        des.h \
        dh.h \
        dh2.h \
        dll.h \
        dmac.h \
        dsa.h \
        ec2n.h \
        eccrypto.h \
        ecp.h \
        elgamal.h \
        eprecomp.h \
        esign.h \
        factory.h \
        files.h \
        filters.h \
        fips140.h \
        fltrimpl.h \
        gf256.h \
        gf2_32.h \
        gf2n.h \
        gfpcrypt.h \
        gost.h \
        gzip.h \
        haval.h \
        hex.h \
        hmac.h \
        hrtimer.h \
        ida.h \
        idea.h \
        integer.h \
        iterhash.h \
        lubyrack.h \
        luc.h \
        mars.h \
        md2.h \
        md4.h \
        md5.h \
        md5mac.h \
        mdc.h \
        misc.h \
        modarith.h \
        modes.h  \
        modexppc.h \
        mqueue.h \
        mqv.h \
        nbtheory.h \
        network.h \
        nr.h \
        oaep.h \
        oids.h \
        osrng.h \
        panama.h \
        pch.h \
        pkcspad.h \
        polynomi.h \
        pssr.h \
        pubkey.h \
        pwdbased.h \
        queue.h \
        rabin.h \
        randpool.h \
        rc2.h \
        rc5.h \
        rc6.h \
        rijndael.h \
        ripemd.h \
        rng.h \
        rsa.h \
        rw.h \
        safer.h \
        shacal2.h \
        seal.h \
        secblock.h \
        seckey.h \
        serpent.h \
        sha.h \
        shark.h \
        simple.h \
        skipjack.h \
        smartptr.h \
        socketft.h \
        square.h \
        stdcpp.h \
        strciphr.h \
        tea.h \
        tiger.h \
        trdlocal.h \
        trunhash.h \
        ttmac.h \
        twofish.h \
        wait.h \
        wake.h \
        whrlpool.h \
        winpipes.h \
        words.h \
        xormac.h \
        xtr.h \
        xtrcrypt.h \
        zdeflate.h \
        zinflate.h \
        zlib.h

html: $(libcrypto__5_2_la_SOURCES)
        doxygen

Reply via email to