From: Markus Armbruster Date: Sat, 25 Apr 2009 10:18:32 +0000 (+0200) Subject: Fix autoconfiguration of libraries X-Git-Tag: v4.3.22~1 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=70a9a44bbc231aaf831732a6ba91430d6d7e092f Fix autoconfiguration of libraries configure checked for library functions with LIBS instead of LIBS_server, which could break detection of getaddrinfo() on systems where LIB_SOCKET isn't empty. GNUmakefile put @PTHREAD_LIBS@ only in LDLIBS, which breaks linking of server and possibly client on systems where it is not empty. Broken in commit 8b778634. --- diff --git a/GNUmakefile.in b/GNUmakefile.in index 6c58ab9e4..f7a4c9e63 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -43,9 +43,7 @@ CFLAGS := @CFLAGS@ CPPFLAGS := @CPPFLAGS@ @DEFS@ LDFLAGS := @LDFLAGS@ LIBOBJS := @LIBOBJS@ -LDLIBS := @LIBS@ -lm -LIBS_client := @LIBS_client@ -lm -LIBS_server := @LIBS_server@ -lm +LDLIBS := -lm empthread := @empthread@ ifeq ($(empthread),POSIX) CC := @PTHREAD_CC@ @@ -56,6 +54,9 @@ endif ifeq ($(empthread),Windows) CFLAGS := $(CFLAGS) -mthreads endif +LIBS_client := @LIBS_client@ $(LDLIBS) +LIBS_server := @LIBS_server@ $(LDLIBS) +LDLIBS := @LIBS@ $(LDLIBS) CCDEPMODE := @CCDEPMODE@ @am__fastdepCC_TRUE@how_to_dep := fast @am__fastdepCC_FALSE@@AMDEP_TRUE@how_to_dep := depcomp diff --git a/configure.ac b/configure.ac index dfe4ff1b6..a333e3c08 100644 --- a/configure.ac +++ b/configure.ac @@ -69,14 +69,10 @@ MY_WINDOWS_API ### Checks for libraries ACX_PTHREAD -save_LIBS="$LIBS" +LIBS_util="$LIBS" LIBS="$LIBS_SOCKETS $LIBS" LIB_SOCKET_NSL LIBS_server="$LIBS" -LIBS_client="$LIBS" -LIBS="$save_LIBS" -AC_SUBST(LIBS_server) -AC_SUBST(LIBS_client) ### Checks for header files @@ -134,15 +130,16 @@ POSIX) AC_DEFINE([EMPTH_POSIX], 1, [Define to use POSIX threads]) ;; Windows) AC_DEFINE([EMPTH_W32], 1, [Define to use Windows threads]) ;; esac -save_LIBS="$LIBS" -LIBS="$LIBS_client" MY_WITH_TERMINFO LIBS_client="$LIBS" -LIBS="$save_LIBS" ### Output +LIBS="$LIBS_util" +AC_SUBST(LIBS_client) +AC_SUBST(LIBS_server) + AC_CONFIG_FILES([GNUmakefile]) AC_CONFIG_COMMANDS([stamp-h], [case $revctrl in