diff --git a/ChangeLog b/ChangeLog index 3ddc5ac040..ff59cbfa0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-07 Jean-Marc Lasgouttes + + * configure.ac: add to SOCKET_LIBS the libraries required by + socket code (useful for solaris). + 2005-12-06 Georg Baum * configure.ac: remove dead gnome stuff diff --git a/configure.ac b/configure.ac index 807c5b75cb..4fb2b20495 100644 --- a/configure.ac +++ b/configure.ac @@ -289,7 +289,17 @@ LYX_CHECK_SPELL_ENGINES lyx_client_subdir=true AC_LANG_PUSH(C) -AC_CHECK_FUNCS(fcntl,, [lyx_client_subdir=false]) +dnl LIBS already contains some X extra libs that may interfere. +save_LIBS="$LIBS" +LIBS= +AC_CHECK_FUNCS(fcntl, + [AC_SEARCH_LIBS([gethostbyname], [nsl]) + AC_SEARCH_LIBS([socket], [socket], [], + [AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"], + [], [-lnsl])])], + [lyx_client_subdir=false]) +AC_SUBST(SOCKET_LIBS,$LIBS) +LIBS="$save_LIBS" AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir) AC_LANG_POP(C) diff --git a/src/ChangeLog b/src/ChangeLog index 534104a6a8..41742be6f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-12-07 Jean-Marc Lasgouttes + + * Makefile.am (OTHERLIBS): add SOCKET_LIBS in case we compile + without X support. + 2005-12-06 Georg Baum * exporter.C (Export): Don't try to copy a file if it does not exist diff --git a/src/Makefile.am b/src/Makefile.am index 509cd7f63b..c5aa12b6ce 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,7 +27,7 @@ LYX_POST_LIBS = frontends/controllers/libcontrollers.la \ BOOST_LIBS = $(BOOST_REGEX) $(BOOST_SIGNALS) $(BOOST_FILESYSTEM) -OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(AIKSAURUS_LIBS) @LIBS@ +OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(AIKSAURUS_LIBS) @LIBS@ $(SOCKET_LIBS) bin_PROGRAMS = lyx noinst_PROGRAMS = $(FRONTENDS_PROGS) diff --git a/src/client/ChangeLog b/src/client/ChangeLog index 091d55c6da..740b05c4e6 100644 --- a/src/client/ChangeLog +++ b/src/client/ChangeLog @@ -1,3 +1,8 @@ +2005-12-07 Jean-Marc Lasgouttes + + * Makefile.am (lyxclient_LDADD): link against SOCKET_LIBS (needed + for solaris). + 2005-07-17 Michael Schmitt * debug.C: fix typo diff --git a/src/client/Makefile.am b/src/client/Makefile.am index 4929396271..6ff899186c 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -16,7 +16,7 @@ BOOST_LIBS = $(BOOST_REGEX) $(BOOST_FILESYSTEM) lyxclient_LDADD = \ $(top_builddir)/src/support/libsupport.la \ - $(BOOST_LIBS) $(INTLLIBS) + $(BOOST_LIBS) $(INTLLIBS) $(SOCKET_LIBS) lyxclient_SOURCES = \ boost.C \