Use Libtool to enable building shared library

This commit is contained in:
Matthew Brush 2013-03-04 15:21:20 -08:00
parent 382bac9900
commit eb89c4bf8e
3 changed files with 6 additions and 6 deletions

View File

@ -6,10 +6,10 @@ AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_SRCDIR([src/cfu.c]) AC_CONFIG_SRCDIR([src/cfu.c])
AM_INIT_AUTOMAKE([foreign -Wall silent-rules dist-bzip2]) AM_INIT_AUTOMAKE([foreign -Wall silent-rules dist-bzip2])
AM_SILENT_RULES([yes]) AM_SILENT_RULES([yes])
LT_INIT
AC_PROG_CC AC_PROG_CC
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_PROG_RANLIB
# Checks for header files. # Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC

View File

@ -2,4 +2,4 @@ noinst_PROGRAMS = hash_usage large_hash strings conf_example \
conf_example2 opt_example conf_example2 opt_example
AM_CFLAGS = -I$(top_srcdir)/src AM_CFLAGS = -I$(top_srcdir)/src
LDADD = $(top_builddir)/src/libcfu.a LDADD = $(top_builddir)/src/libcfu.la @PTHREAD_LIBS@

View File

@ -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 \ libcfu_la_SOURCES = cfuhash.c cfutime.c cfustring.c cfulist.c \
cfu.c cfuopt.c cfuconf.c cfu.c cfuopt.c
libcfuincdir = $(includedir)/cfu libcfuincdir = $(includedir)/cfu
@ -9,6 +9,6 @@ libcfuinc_HEADERS = cfu.h cfuhash.h cfutime.h cfustring.h cfulist.h \
cfuconf.h cfuopt.h cfuconf.h cfuopt.h
if USE_PTHREADS if USE_PTHREADS
libcfu_a_SOURCES += cfuthread_queue.c libcfu_la_SOURCES += cfuthread_queue.c
libcfuinc_HEADERS += cfuthread_queue.h libcfuinc_HEADERS += cfuthread_queue.h
endif endif