Permalink
Browse files

Build syck as a shared library too.

  • Loading branch information...
xhochy committed Mar 10, 2012
1 parent aef38f1 commit 2841bf16cabd61d544df28f107de02fa867982d7
Showing with 14 additions and 2 deletions.
  1. +1 −0 Makefile.am
  2. +1 −0 bootstrap
  3. +7 −2 configure.in
  4. +5 −0 lib/Makefile.am
View
@@ -1,5 +1,6 @@
#
# I feel like saying, "The magic happens here!" But it doesn't.
#
+ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib tests
View
@@ -4,4 +4,5 @@ set -x
aclocal
autoheader
autoconf
+libtoolize
automake --foreign --add-missing --copy
View
@@ -3,17 +3,22 @@ AC_INIT(syck, 0.70)
AC_CONFIG_AUX_DIR(config)
AC_PREREQ(2.50)
+LT_INIT
+AC_SUBST([SYCK_SO_VERSION], [0:0:0])
+
AM_INIT_AUTOMAKE(syck, 0.70)
AM_CONFIG_HEADER(config.h)
# Checks for programs.
AC_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PROG_RANLIB
+# `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
+# AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_PROG_AWK
AM_PROG_LEX
+AC_PROG_LIBTOOL
AC_CHECK_PROGS(YACC, 'bison -y')
if test "$YACC" != "bison -y"; then
@@ -33,7 +38,7 @@ AC_CHECK_SIZEOF(long, 4)
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_VPRINTF
-
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([Makefile
lib/Makefile
tests/Makefile])
View
@@ -7,6 +7,7 @@ AM_CFLAGS = -fPIC
.re.c:
$(REC) -i $< > $@.new && mv $@.new $@
+lib_LTLIBRARIES = libsyck.la
lib_LIBRARIES = libsyck.a
include_HEADERS = syck.h syck_st.h
@@ -22,3 +23,7 @@ libsyck_a_SOURCES = \
token.re \
implicit.re
+libsyck_la_CFLAGS = $(AM_CFLAGS)
+libsyck_la_LDFLAGS = -version-info $(SYCK_SO_VERSION)
+libsyck_la_SOURCES = $(libsyck_a_SOURCES)
+

0 comments on commit 2841bf1

Please sign in to comment.