From 711d885f0d8b6c0788bc62c0d58c44eaaf1391c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sat, 4 Apr 2020 17:11:52 +0800 Subject: Shared library building and installation --- .gitignore | 16 ++++++++++------ Makefile.am | 23 +++++++++++++---------- configure.ac | 15 ++++++++++++--- 3 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index bee6e50..5a5cbe9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,27 @@ *~ -*.a +*.la +*.lo *.o *.swp .deps +.libs Makefile -Makefile.am.user +Makefile.am.user* Makefile.in aclocal.m4 ar-lib autom4te.cache +autoscan-2.69.log compile -config.h -config.h.in -config.log -config.status +config.* configure +configure.scan depcomp html install-sh +libtool +ltmain.sh +m4 missing rtclienttest stamp-h1 diff --git a/Makefile.am b/Makefile.am index 03bb0a2..27cff9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,6 @@ -noinst_LIBRARIES = librtclient.a -librtclient_a_SOURCES = \ - rtclient/user.h \ - rtclient/ticket.h \ - rtclient/search.h \ - rtclient/client.h \ +ACLOCAL_AMFLAGS = -I m4 +lib_LTLIBRARIES = librtclient.la +librtclient_la_SOURCES = \ request.h \ request.c \ post.h \ @@ -13,7 +10,13 @@ librtclient_a_SOURCES = \ search.c \ client.c -bin_PROGRAMS = rtclienttest -rtclienttest_SOURCES = main.c -rtclienttest_LDADD = librtclient.a -rtclienttest_LDFLAGS = -lcurl +pkginclude_HEADERS = \ + rtclient/user.h \ + rtclient/ticket.h \ + rtclient/search.h \ + rtclient/client.h + +#bin_PROGRAMS = rtclienttest +#rtclienttest_SOURCES = main.c +#rtclienttest_LDADD = librtclient.la +#rtclienttest_LDFLAGS = -lcurl diff --git a/configure.ac b/configure.ac index 1030563..e1fdbae 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,18 @@ -AC_INIT([librtclient], [0.0], [rt@darapsa.co.id]) +AC_INIT([rtclient], [0.0], [pt@darapsa.co.id]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC -AC_PROG_RANLIB +AC_PROG_CXX AM_PROG_AR +LT_INIT AC_CONFIG_HEADERS([config.h]) -AC_CHECK_HEADER_STDBOOL AC_CONFIG_FILES([Makefile]) +AC_CONFIG_MACRO_DIRS([m4]) +AC_CHECK_FUNCS([memset]) +AC_CHECK_FUNCS([strstr]) +AC_CHECK_HEADER_STDBOOL +AC_C_INLINE +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T AC_OUTPUT -- cgit v1.2.3