diff --git a/configure.ac b/configure.ac index d1cfe2fbf2610762e74ee26c98e58c9d42ae145e..b5c24743449f1cbd8ac3aedb4af6df04b66c052c 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,12 @@ if test "$sys_name" = "cygwin"; then AC_DEFINE(CANNOT_DELETE_OPEN_FILES, 1, [Whether it is impossible to delete open files.]) fi +# Solaris-specific stuff. +if test "$sys_name" = "sunos"; then + # Solaris requires -lsocket -lnsl for network functions + ADDITIONAL_NETWORK_LIBS="-lsocket -lnsl" + AC_SUBST(ADDITIONAL_NETWORK_LIBS) +fi AC_PROG_CC AC_PROG_CXX diff --git a/src/libstore/Makefile.am b/src/libstore/Makefile.am index 90377878087ff29b7a84b4e229681e07b182ac2e..185bb298d701dca3f41839d16799222d729da1c7 100644 --- a/src/libstore/Makefile.am +++ b/src/libstore/Makefile.am @@ -10,7 +10,7 @@ pkginclude_HEADERS = \ globals.hh db.hh references.hh pathlocks.hh \ worker-protocol.hh -libstore_la_LIBADD = ../libutil/libutil.la ../boost/format/libformat.la +libstore_la_LIBADD = ../libutil/libutil.la ../boost/format/libformat.la @ADDITIONAL_NETWORK_LIBS@ BUILT_SOURCES = derivations-ast.cc derivations-ast.hh diff --git a/src/nix-env/Makefile.am b/src/nix-env/Makefile.am index 4720dfe8b780131ab54fbc6c7f677683919d8911..dfc10cd5d039bcc88510113f156e04a827dc2ac1 100644 --- a/src/nix-env/Makefile.am +++ b/src/nix-env/Makefile.am @@ -3,7 +3,7 @@ bin_PROGRAMS = nix-env nix_env_SOURCES = nix-env.cc profiles.cc profiles.hh help.txt nix_env_LDADD = ../libmain/libmain.la ../libexpr/libexpr.la \ ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} + ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} @ADDITIONAL_NETWORK_LIBS@ nix-env.o: help.txt.hh diff --git a/src/nix-hash/Makefile.am b/src/nix-hash/Makefile.am index 1c7eee332329f65071ff64a90834a7eb3fe3f803..d1d55ad297f52fd93712ef6ff7ce994de352ee6e 100644 --- a/src/nix-hash/Makefile.am +++ b/src/nix-hash/Makefile.am @@ -2,7 +2,7 @@ bin_PROGRAMS = nix-hash nix_hash_SOURCES = nix-hash.cc help.txt nix_hash_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} + ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} @ADDITIONAL_NETWORK_LIBS@ nix-hash.o: help.txt.hh diff --git a/src/nix-instantiate/Makefile.am b/src/nix-instantiate/Makefile.am index 6e42c4fa08c44d834507167c01ff9f8909731ef5..e0f1adbb9f41def582003972cbd5982b8a17536d 100644 --- a/src/nix-instantiate/Makefile.am +++ b/src/nix-instantiate/Makefile.am @@ -3,7 +3,7 @@ bin_PROGRAMS = nix-instantiate nix_instantiate_SOURCES = nix-instantiate.cc help.txt nix_instantiate_LDADD = ../libmain/libmain.la ../libexpr/libexpr.la \ ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} + ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} @ADDITIONAL_NETWORK_LIBS@ nix-instantiate.o: help.txt.hh diff --git a/src/nix-store/Makefile.am b/src/nix-store/Makefile.am index 1a07bcbb300e2899990bca00a40e88a5b074ccae..2b43b19b0d60757180f73adc6974ad8bf10f5218 100644 --- a/src/nix-store/Makefile.am +++ b/src/nix-store/Makefile.am @@ -2,7 +2,7 @@ bin_PROGRAMS = nix-store nix_store_SOURCES = nix-store.cc dotgraph.cc dotgraph.hh help.txt nix_store_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} + ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} @ADDITIONAL_NETWORK_LIBS@ nix-store.o: help.txt.hh diff --git a/src/nix-worker/Makefile.am b/src/nix-worker/Makefile.am index f6106450b8588e2a338c99b2af32212e6d42ba7b..456fe28af2d5f89ff30a893aa647a0d84e206097 100644 --- a/src/nix-worker/Makefile.am +++ b/src/nix-worker/Makefile.am @@ -2,7 +2,7 @@ bin_PROGRAMS = nix-worker nix_worker_SOURCES = nix-worker.cc help.txt nix_worker_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} + ../boost/format/libformat.la ${bdb_lib} ${aterm_lib} @ADDITIONAL_NETWORK_LIBS@ nix-worker.o: help.txt.hh