From eb89c4bf8e8b822716bf3e41d29ee332a5deb1f5 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Mon, 4 Mar 2013 15:21:20 -0800 Subject: [PATCH] Use Libtool to enable building shared library --- configure.ac | 2 +- examples/Makefile.am | 2 +- src/Makefile.am | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 14f5f83..0577edf 100644 --- a/configure.ac +++ b/configure.ac @@ -6,10 +6,10 @@ AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_SRCDIR([src/cfu.c]) AM_INIT_AUTOMAKE([foreign -Wall silent-rules dist-bzip2]) AM_SILENT_RULES([yes]) +LT_INIT AC_PROG_CC AM_PROG_CC_C_O -AC_PROG_RANLIB # Checks for header files. AC_HEADER_STDC diff --git a/examples/Makefile.am b/examples/Makefile.am index cefc5a3..3344b5d 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -2,4 +2,4 @@ noinst_PROGRAMS = hash_usage large_hash strings conf_example \ conf_example2 opt_example AM_CFLAGS = -I$(top_srcdir)/src -LDADD = $(top_builddir)/src/libcfu.a +LDADD = $(top_builddir)/src/libcfu.la @PTHREAD_LIBS@ diff --git a/src/Makefile.am b/src/Makefile.am index 0df1796..3f5ffb7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ -lib_LIBRARIES = libcfu.a +lib_LTLIBRARIES = libcfu.la -libcfu_a_SOURCES = cfuhash.c cfutime.c cfustring.c cfulist.c cfuconf.c \ - cfu.c cfuopt.c +libcfu_la_SOURCES = cfuhash.c cfutime.c cfustring.c cfulist.c \ + cfuconf.c cfu.c cfuopt.c libcfuincdir = $(includedir)/cfu @@ -9,6 +9,6 @@ libcfuinc_HEADERS = cfu.h cfuhash.h cfutime.h cfustring.h cfulist.h \ cfuconf.h cfuopt.h if USE_PTHREADS -libcfu_a_SOURCES += cfuthread_queue.c +libcfu_la_SOURCES += cfuthread_queue.c libcfuinc_HEADERS += cfuthread_queue.h endif