aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikhil Agarwal <Nikhil.Agarwal@linaro.org>2016-05-30 18:32:34 +0530
committerNikhil Agarwal <nikhil.agarwal@linaro.org>2016-06-03 22:58:19 +0530
commit4d22dd584c36b845bdd4912851f509a7aac56d8c (patch)
tree258c8cfa1e4c2ea5613531a6c1fbd1167b2bbcb3
Initial Commit for Makeflies and configure scripts.
Added Directory structure. Makeflies and configure scripts. Signed-off-by: Nikhil Agarwal <Nikhil.Agarwal@linaro.org>
-rw-r--r--.gitignore25
-rw-r--r--Makefile.am2
-rwxr-xr-xbootstrap7
-rw-r--r--configure.ac136
-rw-r--r--engine/Makefile.am5
5 files changed, 175 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1f844a8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,25 @@
+Makefile
+Makefile.in
+aclocal.m4
+ar-lib
+autom4te.cache/
+compile
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+engine/.deps/
+engine/.libs/
+engine/Makefile
+engine/Makefile.in
+engine/eng_odp.lo
+engine/eng_odp.o
+engine/libsslodp.la
+install-sh
+libtool
+ltmain.sh
+m4/
+missing
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..0536da9
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,2 @@
+ACLOCAL_AMFLAGS=-I m4
+SUBDIRS = engine
diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000..ce37658
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,7 @@
+#! /bin/sh
+set -x
+#mkdir m4
+aclocal
+libtoolize --copy
+automake --add-missing --copy --warnings=all
+autoconf
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..19249c9
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,136 @@
+AC_PREREQ([2.5])
+AC_INIT([ossl-odp], [0.1], [lng-odp@lists.linaro.org])
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_SRCDIR([engine/eng_odp.c])
+
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+AC_CONFIG_MACRO_DIR([m4])
+AM_SILENT_RULES([yes])
+
+# Checks for programs.
+AC_PROG_CC
+AM_PROG_CC_C_O
+
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+AM_PROG_AR
+#Use libtool
+LT_INIT([])
+AC_SUBST([LIBTOOL_DEPS])
+AM_PROG_LIBTOOL
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UINT8_T
+AC_TYPE_UINT16_T
+AC_TYPE_INT32_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+
+##########################################################################
+# Which architecture optimizations will we use
+##########################################################################
+AS_CASE([$host],
+ [x86*], [ARCH=x86],
+ [mips64*], [ARCH=mips64],
+ [aarch64*], [ARCH=aarch64],
+ [powerpc*], [ARCH=powerpc],
+ [ARCH=linux]
+)
+AC_SUBST([ARCH])
+
+##########################################################################
+# Save and set temporary compilation flags
+##########################################################################
+OLD_LDFLAGS=$LDFLAGS
+OLD_CPPFLAGS=$CPPFLAGS
+LDFLAGS="$AM_LDFLAGS $LDFLAGS"
+CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
+
+
+##########################################################################
+# Default include setup
+##########################################################################
+AM_CFLAGS="$AM_CFLAGS $ODP_CFLAGS"
+AM_CXXFLAGS="-std=c++11"
+
+
+
+##########################################################################
+# Set optional OpenSSL path
+##########################################################################
+AC_ARG_WITH([openssl-path],
+ AC_HELP_STRING([--with-openssl-path=DIR path to openssl libs and headers],
+ [(or in the default path if not specified).]),
+ [OPENSSL_PATH=$withval
+ AM_CPPFLAGS="$AM_CPPFLAGS -I$OPENSSL_PATH/include"
+ AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib"
+ ],[])
+
+##########################################################################
+# Set optional ODP path
+##########################################################################
+AC_ARG_WITH([odp-path],
+ AC_HELP_STRING([--with-odp-path=DIR path to odp libs and headers],
+ [(or in the default path if not specified).]),
+ [ODP_PATH=$withval
+ AM_CPPFLAGS="$AM_CPPFLAGS -I$ODP_PATH/include"
+ AM_LDFLAGS="$AM_LDFLAGS -L$ODP_PATH/lib"
+ ],[])
+
+
+##########################################################################
+# Save and set temporary compilation flags
+##########################################################################
+OLD_LDFLAGS=$LDFLAGS
+OLD_CPPFLAGS=$CPPFLAGS
+LDFLAGS="$AM_LDFLAGS $LDFLAGS"
+CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
+
+AC_CHECK_LIB([odp], [odp_init_global],[ODP_LIB=-lodp],
+ [AC_MSG_FAILURE([ODP library required])])
+
+
+AC_CONFIG_FILES([Makefile
+ engine/Makefile
+ ])
+
+AC_SUBST([ODP_PATH])
+AC_SUBST([ODP_LIB])
+AC_SUBST([OPENSSL_PATH])
+AC_SUBST([LIBS])
+AC_SUBST([AM_CPPFLAGS])
+AC_SUBST([CPPFLAGS])
+AC_SUBST([AM_CFLAGS])
+AC_SUBST([CFLAGS])
+AC_SUBST([AM_LDFLAGS])
+AC_SUBST([LDFLAGS])
+AC_SUBST([EXEEXT])
+
+AC_OUTPUT
+AC_MSG_RESULT([
+
+package $PACKAGE
+version $VERSION
+arch ${ARCH}
+openssl: ${OPENSSL_PATH}
+odp: ${ODP_PATH}
+cc: ${CC}
+cppflags: ${CPPFLAGS}
+am_cppflags: ${AM_CPPFLAGS}
+am_cxxflags: ${AM_CXXFLAGS}
+cflags: ${CFLAGS}
+am_cflags: ${AM_CFLAGS}
+ldflags: ${LDFLAGS}
+am_ldflags: ${AM_LDFLAGS}
+])
+
diff --git a/engine/Makefile.am b/engine/Makefile.am
new file mode 100644
index 0000000..adcc543
--- /dev/null
+++ b/engine/Makefile.am
@@ -0,0 +1,5 @@
+libsslodp_la_LDFLAGS = $(AM_LDFLAGS) $(ODP_LIB)
+
+libsslodp_la_SOURCES = eng_odp.c
+lib_LTLIBRARIES = libsslodp.la
+