about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-07-22T14·52+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-07-22T14·52+0000
commit4c20a0829304631cf7282937bd6a0789701f40a4 (patch)
treed28a8304a36c74adf3fb505a4150b6681ad7f63a
parent1a67154d416d3408ac35ddb5a197d1b76f57aab8 (diff)
* Build dynamic libraries.
-rwxr-xr-xbootstrap.sh2
-rw-r--r--configure.ac6
-rw-r--r--src/boost/format/Makefile.am4
-rw-r--r--src/libexpr/Makefile.am4
-rw-r--r--src/libmain/Makefile.am4
-rw-r--r--src/libstore/Makefile.am4
-rw-r--r--src/libutil/Makefile.am4
-rw-r--r--src/nix-env/Makefile.am6
-rw-r--r--src/nix-hash/Makefile.am4
-rw-r--r--src/nix-instantiate/Makefile.am6
-rw-r--r--src/nix-store/Makefile.am4
11 files changed, 27 insertions, 21 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index d3a9700f7673..f007c713bf54 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,4 +1,6 @@
 #! /bin/sh -e
+mkdir -p config
+libtoolize --copy
 aclocal
 autoheader
 automake --add-missing --copy
diff --git a/configure.ac b/configure.ac
index 3ec4d7195a19..a1c6287db34b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_INIT(nix, "0.9")
 AC_CONFIG_SRCDIR(README)
 AC_CONFIG_AUX_DIR(config)
 AM_INIT_AUTOMAKE([dist-bzip2])
-
+        
 # Change to `1' to produce a `stable' release (i.e., the `preREVISION'
 # suffix is not added).
 STABLE=0
@@ -48,6 +48,10 @@ AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_RANLIB
 
+# We are going to use libtool.
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
 # Check for pubsetbuf.
 AC_MSG_CHECKING([for pubsetbuf])
 AC_LANG_PUSH(C++)
diff --git a/src/boost/format/Makefile.am b/src/boost/format/Makefile.am
index d28a2b31d04c..f89656827705 100644
--- a/src/boost/format/Makefile.am
+++ b/src/boost/format/Makefile.am
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = libformat.a
+lib_LTLIBRARIES = libformat.la
 
-libformat_a_SOURCES = format_implementation.cc free_funcs.cc \
+libformat_la_SOURCES = format_implementation.cc free_funcs.cc \
  parsing.cc exceptions.hpp feed_args.hpp format_class.hpp \
  format_fwd.hpp group.hpp internals.hpp internals_fwd.hpp \
  macros_default.hpp
diff --git a/src/libexpr/Makefile.am b/src/libexpr/Makefile.am
index 9af7404bcbcc..5571179f8fb1 100644
--- a/src/libexpr/Makefile.am
+++ b/src/libexpr/Makefile.am
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = libexpr.a
+lib_LTLIBRARIES = libexpr.la
 
-libexpr_a_SOURCES = nixexpr.cc nixexpr.hh parser.cc parser.hh \
+libexpr_la_SOURCES = nixexpr.cc nixexpr.hh parser.cc parser.hh \
  eval.cc eval.hh primops.cc \
  lexer-tab.c lexer-tab.h parser-tab.c parser-tab.h \
  nixexpr-ast.hh
diff --git a/src/libmain/Makefile.am b/src/libmain/Makefile.am
index aa5f673fd2f7..505c9f686713 100644
--- a/src/libmain/Makefile.am
+++ b/src/libmain/Makefile.am
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = libmain.a
+lib_LTLIBRARIES = libmain.la
 
-libmain_a_SOURCES = shared.cc shared.hh
+libmain_la_SOURCES = shared.cc shared.hh
 
 AM_CXXFLAGS = \
  -DNIX_STORE_DIR=\"$(storedir)\" \
diff --git a/src/libstore/Makefile.am b/src/libstore/Makefile.am
index 100fd0be285d..3fa941b3bd79 100644
--- a/src/libstore/Makefile.am
+++ b/src/libstore/Makefile.am
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = libstore.a
+lib_LTLIBRARIES = libstore.la
 
-libstore_a_SOURCES = \
+libstore_la_SOURCES = \
  store.cc store.hh derivations.cc derivations.hh \
  build.cc misc.cc build.hh \
  globals.cc globals.hh db.cc db.hh \
diff --git a/src/libutil/Makefile.am b/src/libutil/Makefile.am
index 6e83b8555124..72abfaa11c1b 100644
--- a/src/libutil/Makefile.am
+++ b/src/libutil/Makefile.am
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = libutil.a
+lib_LTLIBRARIES = libutil.la
 
-libutil_a_SOURCES = util.cc util.hh hash.cc hash.hh \
+libutil_la_SOURCES = util.cc util.hh hash.cc hash.hh \
  archive.cc archive.hh aterm.cc aterm.hh \
  md5.c md5.h sha1.c sha1.h sha256.c sha256.h md32_common.h
 
diff --git a/src/nix-env/Makefile.am b/src/nix-env/Makefile.am
index 49282f169992..02df3057a967 100644
--- a/src/nix-env/Makefile.am
+++ b/src/nix-env/Makefile.am
@@ -2,9 +2,9 @@ bin_PROGRAMS = nix-env
 
 nix_env_SOURCES = main.cc names.cc names.hh \
  profiles.cc profiles.hh help.txt
-nix_env_LDADD = ../libmain/libmain.a ../libexpr/libexpr.a \
- ../libstore/libstore.a ../libutil/libutil.a \
- ../boost/format/libformat.a ${bdb_lib} ${aterm_lib}
+nix_env_LDADD = ../libmain/libmain.la ../libexpr/libexpr.la \
+ ../libstore/libstore.la ../libutil/libutil.la \
+ ../boost/format/libformat.la ${bdb_lib} ${aterm_lib}
 
 main.o: help.txt.hh
 
diff --git a/src/nix-hash/Makefile.am b/src/nix-hash/Makefile.am
index 7906285fe23f..571b6157c004 100644
--- a/src/nix-hash/Makefile.am
+++ b/src/nix-hash/Makefile.am
@@ -1,8 +1,8 @@
 bin_PROGRAMS = nix-hash
 
 nix_hash_SOURCES = nix-hash.cc help.txt
-nix_hash_LDADD = ../libmain/libmain.a ../libstore/libstore.a ../libutil/libutil.a \
- ../boost/format/libformat.a ${bdb_lib} ${aterm_lib}
+nix_hash_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \
+ ../boost/format/libformat.la ${bdb_lib} ${aterm_lib}
 
 nix-hash.o: help.txt.hh
 
diff --git a/src/nix-instantiate/Makefile.am b/src/nix-instantiate/Makefile.am
index 60ee09b9405e..23f4fbf567a9 100644
--- a/src/nix-instantiate/Makefile.am
+++ b/src/nix-instantiate/Makefile.am
@@ -1,9 +1,9 @@
 bin_PROGRAMS = nix-instantiate
 
 nix_instantiate_SOURCES = main.cc help.txt
-nix_instantiate_LDADD = ../libmain/libmain.a ../libexpr/libexpr.a \
- ../libstore/libstore.a ../libutil/libutil.a \
- ../boost/format/libformat.a ${bdb_lib} ${aterm_lib}
+nix_instantiate_LDADD = ../libmain/libmain.la ../libexpr/libexpr.la \
+ ../libstore/libstore.la ../libutil/libutil.la \
+ ../boost/format/libformat.la ${bdb_lib} ${aterm_lib}
 
 main.o: help.txt.hh
 
diff --git a/src/nix-store/Makefile.am b/src/nix-store/Makefile.am
index c1fda12b5753..5cfa52e5e010 100644
--- a/src/nix-store/Makefile.am
+++ b/src/nix-store/Makefile.am
@@ -1,8 +1,8 @@
 bin_PROGRAMS = nix-store
 
 nix_store_SOURCES = main.cc dotgraph.cc dotgraph.hh help.txt
-nix_store_LDADD = ../libmain/libmain.a ../libstore/libstore.a ../libutil/libutil.a \
- ../boost/format/libformat.a ${bdb_lib} ${aterm_lib}
+nix_store_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \
+ ../boost/format/libformat.la ${bdb_lib} ${aterm_lib}
 
 main.o: help.txt.hh