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
.
This commit is contained in:
parent
a977bd08f6
commit
70a9a44bbc
2 changed files with 9 additions and 11 deletions
|
@ -43,9 +43,7 @@ CFLAGS := @CFLAGS@
|
||||||
CPPFLAGS := @CPPFLAGS@ @DEFS@
|
CPPFLAGS := @CPPFLAGS@ @DEFS@
|
||||||
LDFLAGS := @LDFLAGS@
|
LDFLAGS := @LDFLAGS@
|
||||||
LIBOBJS := @LIBOBJS@
|
LIBOBJS := @LIBOBJS@
|
||||||
LDLIBS := @LIBS@ -lm
|
LDLIBS := -lm
|
||||||
LIBS_client := @LIBS_client@ -lm
|
|
||||||
LIBS_server := @LIBS_server@ -lm
|
|
||||||
empthread := @empthread@
|
empthread := @empthread@
|
||||||
ifeq ($(empthread),POSIX)
|
ifeq ($(empthread),POSIX)
|
||||||
CC := @PTHREAD_CC@
|
CC := @PTHREAD_CC@
|
||||||
|
@ -56,6 +54,9 @@ endif
|
||||||
ifeq ($(empthread),Windows)
|
ifeq ($(empthread),Windows)
|
||||||
CFLAGS := $(CFLAGS) -mthreads
|
CFLAGS := $(CFLAGS) -mthreads
|
||||||
endif
|
endif
|
||||||
|
LIBS_client := @LIBS_client@ $(LDLIBS)
|
||||||
|
LIBS_server := @LIBS_server@ $(LDLIBS)
|
||||||
|
LDLIBS := @LIBS@ $(LDLIBS)
|
||||||
CCDEPMODE := @CCDEPMODE@
|
CCDEPMODE := @CCDEPMODE@
|
||||||
@am__fastdepCC_TRUE@how_to_dep := fast
|
@am__fastdepCC_TRUE@how_to_dep := fast
|
||||||
@am__fastdepCC_FALSE@@AMDEP_TRUE@how_to_dep := depcomp
|
@am__fastdepCC_FALSE@@AMDEP_TRUE@how_to_dep := depcomp
|
||||||
|
|
13
configure.ac
13
configure.ac
|
@ -69,14 +69,10 @@ MY_WINDOWS_API
|
||||||
|
|
||||||
### Checks for libraries
|
### Checks for libraries
|
||||||
ACX_PTHREAD
|
ACX_PTHREAD
|
||||||
save_LIBS="$LIBS"
|
LIBS_util="$LIBS"
|
||||||
LIBS="$LIBS_SOCKETS $LIBS"
|
LIBS="$LIBS_SOCKETS $LIBS"
|
||||||
LIB_SOCKET_NSL
|
LIB_SOCKET_NSL
|
||||||
LIBS_server="$LIBS"
|
LIBS_server="$LIBS"
|
||||||
LIBS_client="$LIBS"
|
|
||||||
LIBS="$save_LIBS"
|
|
||||||
AC_SUBST(LIBS_server)
|
|
||||||
AC_SUBST(LIBS_client)
|
|
||||||
|
|
||||||
|
|
||||||
### Checks for header files
|
### 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]) ;;
|
Windows) AC_DEFINE([EMPTH_W32], 1, [Define to use Windows threads]) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
save_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS_client"
|
|
||||||
MY_WITH_TERMINFO
|
MY_WITH_TERMINFO
|
||||||
LIBS_client="$LIBS"
|
LIBS_client="$LIBS"
|
||||||
LIBS="$save_LIBS"
|
|
||||||
|
|
||||||
|
|
||||||
### Output
|
### Output
|
||||||
|
|
||||||
|
LIBS="$LIBS_util"
|
||||||
|
AC_SUBST(LIBS_client)
|
||||||
|
AC_SUBST(LIBS_server)
|
||||||
|
|
||||||
AC_CONFIG_FILES([GNUmakefile])
|
AC_CONFIG_FILES([GNUmakefile])
|
||||||
AC_CONFIG_COMMANDS([stamp-h],
|
AC_CONFIG_COMMANDS([stamp-h],
|
||||||
[case $revctrl in
|
[case $revctrl in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue