close
Import configure.ac & Makefile.am to tropicssl
TropicSSL - Embedded, easy to use cryptography/TLS/SSL library
TropicSSL is written in C, and is highly portable to bare metal and operating system hosted targets on x86, x86_64, AVR32, ARM, PPC, and MIPS. The library is loosely coupled, allowing the use of subcomponents without bringing in large functions (such as TLS support). TropicSSL is also fundemantally easier to use than OpenSSL, while having similar base functionality.
Repository
Development is tracked in git on gitorious: http://gitorious.org/tropicssl/.
1
|
$ git clone git://gitorious.org/tropicssl/tropicssl.git
|
TropicSSL is an unofficial fork of PolarSSL/XySSL, keeping the BSD-licensed code stream.
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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # # $(top_srcdir)/configure.ac AC_PREREQ([2.61]) AC_INIT([libtropicssl], [v0.1], [Jackie.CPlusPlus@gmail.com]) AC_CONFIG_SRCDIR([include/tropicssl/aes.h]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_LIBTOOL # Setup AM AM_INIT_AUTOMAKE AM_PROG_CC_C_O # Checks for libraries. # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_UINT32_T # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([alarm gethostbyname gettimeofday memset select socket strchr strstr]) # Conditionals AC_ARG_ENABLE([debug], [ --enable-debug Turn on libtropicssl extra debugging], [case "${enableval}" in no) debug=false ;; *) debug=true AC_DEFINE([WITH_DEBUG], [1], [Enable libtropicssl extra debugging]) ;; esac],[debug=false]) AM_CONDITIONAL([WANT_DEBUG], [test x$debug = xtrue]) AC_ARG_ENABLE([microblaze], [ --enable-microblaze Turn on libtropicssl extra MicroBlazeging option], [case "${enableval}" in no) microblaze=false ;; *) microblaze=true AC_DEFINE([WITH_MICROBLAZENGING], [1], [Enable libtropicssl extra MicroBlazeging option]) ;; esac],[microblaze=false]) AM_CONDITIONAL([WITH_MICROBLAZENGING], [test x$microblaze = xtrue]) # Some x86_64 systems do not insert frame pointers by default (all # i386 systems that I know of, do. I don't know about non-x86 chips). # We want to see if the current system is one of those. AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __x86_64__ == 1 ? 0 : 1])], [is_x86_64=yes], [is_x86_64=no]) AM_CONDITIONAL(X86_64_BY_DEFAULT, [test "$is_x86_64" = yes]) HostOS=`echo "$host" | sed 's/.*-//'` os_is_macosx=false os_is_bsd=false os_is_windows=false os_is_plan9=false AC_SUBST(HostOS) case ${HostOS} in darwin* | powerpc*-*-darwin*) os_is_macosx=true echo HostOS="$HostOS" echo "os_is_macosx=true ..." ;; freebsd* | netbsd* | openbsd* | bsd*) os_is_bsd=true echo HostOS="$HostOS" echo "os_is_bsd=true ..." ;; mingw|mingw32) os_is_windows=true echo HostOS="$HostOS" echo "os_is_windows=true ..." ;; Plan9|plan9) os_is_plan9=true echo HostOS="$HostOS" echo "os_is_windows=true ..." ;; *) echo host="$host" echo HostOS="$HostOS" ;; esac AM_CONDITIONAL([IS_DARWIN], [test x$os_is_macosx = xtrue]) AM_COND_IF([IS_DARWIN], [AC_DEFINE([IS_DARWIN], [1], [Get HostOS Type is Darwin])]) AM_CONDITIONAL([IS_BSD], [test x$os_is_bsd = xtrue]) AM_COND_IF([IS_BSD], [AC_DEFINE([IS_BSD], [1], [Get HostOS Type is BSD*])]) AM_CONDITIONAL([IS_PLAN9], [test x$os_is_plan9 = xtrue]) AM_COND_IF([IS_PLAN9], [AC_DEFINE([IS_PLAN9], [1], [Get HostOS Type is PLAN9])]) AM_CONDITIONAL([IS_WINDOWS], [test x$os_is_windows = xtrue]) AM_COND_IF([IS_WINDOWS], [AC_DEFINE([IS_WINDOWS], [1], [Get HostOS Type is IS_WINDOWS])]) AC_CONFIG_FILES([Makefile library/Makefile programs/Makefile]) AC_OUTPUT |
1 2 3 4 5 |
# $(top_srcdir)/Makefile.am SUBDIRS = library programs CLEANFILES = *~ |
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 |
# $(top_srcdir)/library/Makefile.am include_dir = ${top_srcdir}/include/ lib_LTLIBRARIES = libtropicssl.la libtropicssl_la_SOURCES = aes.c \ arc4.c \ base64.c \ bignum.c \ certs.c \ debug.c \ des.c \ dhm.c \ havege.c \ md2.c \ md4.c \ md5.c \ net.c \ padlock.c\ rsa.c \ sha1.c \ sha2.c \ sha4.c \ ssl_cli.c \ ssl_srv.c \ ssl_tls.c \ timing.c \ x509parse.c \ xtea.c \ camellia.c INCLUDES = -I${include_dir} if WANT_DEBUG #DFLAGS = -g -Wall -Werror -Winline -Wdisabled-optimization -DDEBUG DFLAGS = -g -Wall -Winline -Wdisabled-optimization -DDEBUG endif if WITH_MICROBLAZENGING MBFLAGS = -mno-xl-soft-mul -mxl-barrel-shift endif if IS_PLAN9 PLAN9_FLAGS = -D_BSD_EXTENSION endif AM_CFLAGS = $(DFLAGS) $(MBFLAGS) $(PLAN9_FLAGS) $(INCLUDES) -D_FILE_OFFSET_BITS=64 AM_LDFLAGS = -lc -lpthread CLEANFILES = *~ |
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 |
# $(top_srcdir)/programs/Makefile.am top_dir = ${top_srcdir} include_dir = ${top_dir}/include/ INCLUDES = -I${include_dir} LIBTROPICSSL_DIR = $(top_dir)/library/.libs LIB_TROPICSSL = $(top_dir)/library/libtropicssl.la if WANT_DEBUG DFLAGS = -g -Wall -Winline -Wdisabled-optimization -DDEBUG endif AM_CFLAGS = $(INCLUDES) -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement $(DFLAGS) AM_LDFLAGS = -L${LIBTROPICSSL_DIR} -ltropicssl noinst_PROGRAMS = aescrypt2 hello \ md5sum mpi_demo \ sha1sum sha2sum \ dh_client dh_genprime \ dh_server rsa_genkey \ rsa_sign rsa_verify \ ssl_client1 ssl_client2 \ ssl_server benchmark \ selftest ssl_test aescrypt2_SOURCES = aes/aescrypt2.c hello_SOURCES = hash/hello.c md5sum_SOURCES = hash/md5sum.c sha1sum_SOURCES = hash/sha1sum.c sha2sum_SOURCES = hash/sha2sum.c dh_client_SOURCES = pkey/dh_client.c dh_genprime_SOURCES = pkey/dh_genprime.c dh_server_SOURCES = pkey/dh_server.c mpi_demo_SOURCES = pkey/mpi_demo.c rsa_genkey_SOURCES = pkey/rsa_genkey.c rsa_sign_SOURCES = pkey/rsa_sign.c rsa_verify_SOURCES = pkey/rsa_verify.c ssl_client1_SOURCES = ssl/ssl_client1.c ssl_client2_SOURCES = ssl/ssl_client2.c ssl_server_SOURCES = ssl/ssl_server.c benchmark_SOURCES = test/benchmark.c selftest_SOURCES = test/selftest.c ssl_test_SOURCES = test/ssl_test.c aescrypt2_LDADD = ${LIB_TROPICSSL} hello_LDADD = ${LIB_TROPICSSL} md5sum_LDADD = ${LIB_TROPICSSL} sha1sum_LDADD = ${LIB_TROPICSSL} sha2sum_LDADD = ${LIB_TROPICSSL} dh_client_LDADD = ${LIB_TROPICSSL} dh_genprime_LDADD = ${LIB_TROPICSSL} mpi_demo_LDADD = ${LIB_TROPICSSL} rsa_genkey_LDADD = ${LIB_TROPICSSL} rsa_sign_LDADD = ${LIB_TROPICSSL} rsa_verify_LDADD = ${LIB_TROPICSSL} ssl_client1_LDADD = ${LIB_TROPICSSL} ssl_client2_LDADD = ${LIB_TROPICSSL} ssl_server_LDADD = ${LIB_TROPICSSL} benchmark_LDADD = ${LIB_TROPICSSL} selftest_LDADD = ${LIB_TROPICSSL} ssl_test_LDADD = ${LIB_TROPICSSL} CLEANFILES = *~ |
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 |
#! /bin/sh # $Id: autogen.sh,v 1.4 2002/12/02 01:39:49 murrayc Exp $ # # Copyright (c) 2002 Daniel Elstner <daniel.elstner@gmx.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License VERSION 2 as # published by the Free Software Foundation. You are not allowed to # use any other version of the license; unless you got the explicit # permission from the author to do so. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dir=`echo "$0" | sed 's,[^/]*$,,'` test "x${dir}" = "x" && dir='.' if test "x`cd "${dir}" 2>/dev/null && pwd`" != "x`pwd`" then echo "This script must be executed directly from the source directory." exit 1 fi rm -f config.cache acconfig.h echo "- libtoolize." && \ libtoolize --force ; \ [ ! -e configure.ac ] && \ echo "- autoscan." && \ autoscan ; \ echo "- aclocal." && \ aclocal && \ echo "- autoconf." && \ autoconf && \ echo "- autoreconf -i" && \ autoreconf -i && \ echo "- autoheader." && \ autoheader && \ echo "- automake." && \ automake --add-missing --gnu && \ echo && \ ./configure "$@" && exit 0 exit 1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#!/bin/sh # antigen.sh # An utility script to remove all generated files. # # Running autogen.sh will be required after running this script since # the 'configure' script will also be removed. # # This script is mainly useful when testing autoconf/automake changes # and as a part of their development process. # If there's a Makefile, then run the 'distclean' target first (which # will also remove the Makefile). if test -f Makefile; then make distclean fi # Remove all tar-files (assuming there are some packages). rm -f *.tar.* *.tgz # Also remove the autotools cache directory. rm -Rf autom4te.cache # Remove rest of the generated files. rm -f aclocal.m4 configure config.h.in depcomp install-sh missing ltmain.sh compile config.guess config.sub find . -name Makefile.in -exec rm -f {} \; find . -name *~ -exec rm -f {} \; |
文章標籤
全站熱搜