File osp-automake.diff of Package osp-toolkit

From: Jan Engelhardt <jengelh@inai.de>

Use a proper build system with which we also get a shared library,
etc.

---
 Makefile.am             |    4 ++++
 configure.ac            |   12 ++++++++++++
 enroll/Makefile.am      |   15 +++++++++++++++
 include/osp/Makefile.am |    4 ++++
 src/Makefile.am         |   17 +++++++++++++++++
 test/Makefile.am        |   11 +++++++++++
 6 files changed, 63 insertions(+)

Index: TK-4_11_1-20160223/Makefile.am
===================================================================
--- /dev/null
+++ TK-4_11_1-20160223/Makefile.am
@@ -0,0 +1,4 @@
+# -*- Makefile -*-
+
+SUBDIRS = include/osp src enroll test
+
Index: TK-4_11_1-20160223/configure.ac
===================================================================
--- /dev/null
+++ TK-4_11_1-20160223/configure.ac
@@ -0,0 +1,12 @@
+AC_INIT([osp], [4.13.0])
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_DISABLE_STATIC
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+LT_INIT
+PKG_CHECK_MODULES([libcrypto], [libcrypto])
+PKG_CHECK_MODULES([libssl], [libssl])
+AC_CONFIG_FILES([Makefile include/osp/Makefile src/Makefile enroll/Makefile
+	test/Makefile])
+AC_OUTPUT
Index: TK-4_11_1-20160223/enroll/Makefile.am
===================================================================
--- /dev/null
+++ TK-4_11_1-20160223/enroll/Makefile.am
@@ -0,0 +1,15 @@
+# -*- Makefile -*-
+
+GCCFLAGS = -Wall
+MFLAGS   = -DOPENSSL_NO_KRB5 -D_POSIX_THREADS -D_REENTRANT -DOSP_SDK -DSOLARIS
+
+AM_CPPFLAGS = -I${top_srcdir}/include ${libcrypto_CFLAGS} ${libssl_CFLAGS} \
+              ${MFLAGS}
+AM_CFLAGS   = ${GCCFLAGS}
+
+noinst_PROGRAMS = enroll
+enroll_SOURCES = \
+	osptnep.c osptnep.h osptnepdatatypes.h osptnepenroll.c \
+	osptnepenroll.h osptneperrno.h osptnepinit.c osptnepinit.h \
+	osptneputil.c osptneputil.h
+enroll_LDADD = ${libcrypto_LIBS} ${libssl_LIBS} ../src/libosptk.la
Index: TK-4_11_1-20160223/include/osp/Makefile.am
===================================================================
--- /dev/null
+++ TK-4_11_1-20160223/include/osp/Makefile.am
@@ -0,0 +1,4 @@
+# -*- Makefile -*-
+
+pkginclude_HEADERS = \
+osp.h ospaltinfo.h ospasn1.h ospasn1ids.h ospaudit.h ospauthcnf.h ospauthind.h ospauthreq.h ospauthrsp.h ospb64.h ospbfr.h ospcallid.h ospcapcnf.h ospcapind.h ospciscoext.h ospcode.h ospcomm.h ospconfig.h ospcrypto.h ospcryptowrap.h ospcustomdebug.h ospdatatypes.h ospdebug.h ospdest.h osperrno.h ospfail.h osphttp.h ospinit.h osplibversion.h osplist.h ospmime.h ospmsg.h ospmsgattr.h ospmsgdesc.h ospmsgelem.h ospmsginfo.h ospmsgpart.h ospmsgque.h osposincl.h ospossys.h ospostime.h osppkcs1.h osppkcs7.h osppkcs8.h ospprovider.h ospproviderapi.h ospreauthreq.h ospreauthrsp.h ospsecurity.h ospsocket.h ospssl.h ospsslsess.h ospstatistics.h ospstatus.h ospstir.h osptnaudit.h osptnlog.h osptnprobe.h osptoken.h osptokeninfo.h osptrans.h osptransapi.h osptransids.h ospusage.h ospusagecnf.h ospusageind.h osputils.h ospx500.h ospx509.h ospxml.h ospxmlattr.h ospxmldoc.h ospxmlelem.h ospxmltype.h
Index: TK-4_11_1-20160223/src/Makefile.am
===================================================================
--- /dev/null
+++ TK-4_11_1-20160223/src/Makefile.am
@@ -0,0 +1,17 @@
+# -*- Makefile -*-
+
+GCCFLAGS = -Wall -D_GNU_SOURCE -fPIC
+MFLAGS   = -DOPENSSL_NO_KRB5 -D_POSIX_THREADS -D_REENTRANT -DOSP_SDK \
+           -DOSP_ALLOW_DUP_TXN -DOSP_NO_DELETE_CHECK
+
+AM_CPPFLAGS = -I${top_srcdir}/include ${libcrypto_CFLAGS} ${libssl_CFLAGS} \
+              ${MFLAGS}
+AM_CFLAGS   = ${GCCFLAGS}
+
+lib_LTLIBRARIES = libosptk.la
+
+# minus ospnossl.c
+libosptk_la_SOURCES = \
+ospaltinfo.c ospasn1.c ospasn1ids.c ospasn1object.c ospasn1parse.c ospasn1primitives.c ospaudit.c ospauthcnf.c ospauthind.c ospauthreq.c ospauthrsp.c ospb64.c ospbfr.c ospcallid.c ospcapcnf.c ospcapind.c ospcflags.inc ospciscoext.c ospcomm.c ospcrypto.c ospcryptowrap.c ospdest.c ospfail.c osphttp.c ospinit.c osplist.c ospmime.c ospmsgattr.c ospmsgdesc.c ospmsgelem.c ospmsginfo.c ospmsgque.c ospmsgutil.c ospopenssl.c ospostime.c osppkcs1.c osppkcs7.c osppkcs8.c ospprovider.c ospproviderapi.c ospreauthreq.c ospreauthrsp.c ospsecssl.c ospsecurity.c ospsocket.c ospssl.c ospstatistics.c ospstatus.c ospstir.c osptnaudit.c osptnlog.c osptnprobe.c osptoken.c osptokeninfo.c osptrans.c osptransapi.c osptransids.c ospusage.c ospusagecnf.c ospusageind.c osputils.c ospx509.c ospxml.c ospxmlattr.c ospxmlelem.c ospxmlenc.c ospxmlparse.c ospxmltype.c ospxmlutil.c
+libosptk_la_LDFLAGS = -release ${PACKAGE_VERSION} -no-undefined
+libosptk_la_LIBADD  = -lm -lpthread ${libcrypto_LIBS} ${libssl_LIBS}
Index: TK-4_11_1-20160223/test/Makefile.am
===================================================================
--- /dev/null
+++ TK-4_11_1-20160223/test/Makefile.am
@@ -0,0 +1,11 @@
+# -*- Makefile -*-
+
+GCCFLAGS    = -Wall
+MFLAGS      = -DOPENSSL_NO_KRB5 -D_POSIX_THREADS -D_REENTRANT -DOSP_SDK
+AM_CPPFLAGS = -I${top_srcdir}/include ${MFLAGS}
+AM_CFLAGS   = ${GCCFLAGS}
+
+check_PROGRAMS = test_app
+
+test_app_SOURCES = nonblocking.c nonblocking.h syncque.c syncque.h test_app.c
+test_app_LDADD   = -lpthread ../src/libosptk.la
openSUSE Build Service is sponsored by