aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2009-08-14 14:42:03 +0200
committerTobias Brunner <tobias@strongswan.org>2009-08-14 14:50:53 +0200
commit26965b4ef3758e44b90f7574c8d204afe5923ab6 (patch)
treea2a8e2f1f7a248fe31a3a5b17b8a9f7987f8817c
parent932fdc38de553b35e4afb1c03bb013881d5144a8 (diff)
downloadstrongswan-26965b4ef3758e44b90f7574c8d204afe5923ab6.tar.bz2
strongswan-26965b4ef3758e44b90f7574c8d204afe5923ab6.tar.xz
OpenSolaris needs libsocket and libnsl for socket().
-rw-r--r--configure.in9
-rw-r--r--src/charon/Makefile.am2
-rw-r--r--src/libstrongswan/Makefile.am2
-rw-r--r--src/starter/Makefile.am2
-rw-r--r--src/stroke/Makefile.am1
5 files changed, 12 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 909b7249f..9c811a5c4 100644
--- a/configure.in
+++ b/configure.in
@@ -850,7 +850,7 @@ dnl libraries needed on some platforms but not on others
dnl ====================================================
saved_LIBS=$LIBS
-dnl FreeBSD has dlopen integrated in libc, Linux needs libdl
+dnl FreeBSD and Mac OS X have dlopen integrated in libc, Linux needs libdl
LIBS=""
AC_SEARCH_LIBS(dlopen, dl, [DLLIB=$LIBS])
AC_SUBST(DLLIB)
@@ -861,6 +861,13 @@ AC_SEARCH_LIBS(backtrace, execinfo, [BTLIB=$LIBS])
AC_CHECK_FUNCS(backtrace)
AC_SUBST(BTLIB)
+dnl OpenSolaris needs libsocket and libnsl for socket()
+LIBS=""
+AC_SEARCH_LIBS(socket, socket, [SOCKLIB=$LIBS],
+ [AC_CHECK_LIB(nsl, socket, [SOCKLIB="-lsocket -lnsl"], [], [-lsocket])]
+)
+AC_SUBST(SOCKLIB)
+
LIBS=$saved_LIBS
dnl ======================
diff --git a/src/charon/Makefile.am b/src/charon/Makefile.am
index f19d11d5d..dd51555c0 100644
--- a/src/charon/Makefile.am
+++ b/src/charon/Makefile.am
@@ -108,7 +108,7 @@ AM_CFLAGS = -rdynamic \
-DIPSEC_PIDDIR=\"${piddir}\" \
-DIPSEC_PLUGINDIR=\"${plugindir}\" \
-DSTRONGSWAN_CONF=\"${strongswan_conf}\"
-charon_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lpthread -lm $(DLLIB)
+charon_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lpthread -lm $(DLLIB) $(SOCKLIB)
# compile options
#################
diff --git a/src/libstrongswan/Makefile.am b/src/libstrongswan/Makefile.am
index 294b2c7d8..ee6996558 100644
--- a/src/libstrongswan/Makefile.am
+++ b/src/libstrongswan/Makefile.am
@@ -50,7 +50,7 @@ utils/mutex.c utils/mutex.h \
utils/backtrace.c utils/backtrace.h \
plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h
-libstrongswan_la_LIBADD = -lpthread $(DLLIB) $(BTLIB)
+libstrongswan_la_LIBADD = -lpthread $(DLLIB) $(BTLIB) $(SOCKLIB)
INCLUDES = -I$(top_srcdir)/src/libstrongswan
AM_CFLAGS = \
diff --git a/src/starter/Makefile.am b/src/starter/Makefile.am
index ed5b0f10d..3355b3afb 100644
--- a/src/starter/Makefile.am
+++ b/src/starter/Makefile.am
@@ -20,7 +20,7 @@ AM_CFLAGS = \
-DIPSEC_EAPDIR=\"${eapdir}\" \
-DDEBUG
-starter_LDADD = defs.o $(top_builddir)/src/libfreeswan/libfreeswan.a $(top_builddir)/src/libstrongswan/libstrongswan.la
+starter_LDADD = defs.o $(top_builddir)/src/libfreeswan/libfreeswan.a $(top_builddir)/src/libstrongswan/libstrongswan.la $(SOCKLIB)
EXTRA_DIST = parser.l parser.y keywords.txt ipsec.conf
dist_man_MANS = ipsec.conf.5 starter.8
MAINTAINERCLEANFILES = lex.yy.c y.tab.c y.tab.h keywords.c
diff --git a/src/stroke/Makefile.am b/src/stroke/Makefile.am
index afca95fce..363cde717 100644
--- a/src/stroke/Makefile.am
+++ b/src/stroke/Makefile.am
@@ -1,6 +1,7 @@
ipsec_PROGRAMS = stroke
stroke_SOURCES = stroke.c stroke_msg.h stroke_keywords.c stroke_keywords.h
+stroke_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la $(SOCKLIB)
INCLUDES = -I$(top_srcdir)/src/libstrongswan
EXTRA_DIST = stroke_keywords.txt
BUILT_SOURCES = stroke_keywords.c