mirror of
https://github.com/nginx/nginx.git
synced 2025-06-08 02:02:38 +08:00
Configure: fixed --with-libatomic=DIR with recent libatomic_ops.
The build location of the resulting libatomic_ops.a was changed in v7.4.0 after converting libatomic_ops to use libtool. The fix is to use library from the install path, this allows building with both old and new versions. Initially reported here: https://mailman.nginx.org/pipermail/nginx/2018-April/056054.html
This commit is contained in:
parent
64d0795ac4
commit
e715202220
@ -7,8 +7,8 @@ if [ $NGX_LIBATOMIC != YES ]; then
|
||||
|
||||
have=NGX_HAVE_LIBATOMIC . auto/have
|
||||
CORE_INCS="$CORE_INCS $NGX_LIBATOMIC/src"
|
||||
LINK_DEPS="$LINK_DEPS $NGX_LIBATOMIC/src/libatomic_ops.a"
|
||||
CORE_LIBS="$CORE_LIBS $NGX_LIBATOMIC/src/libatomic_ops.a"
|
||||
LINK_DEPS="$LINK_DEPS $NGX_LIBATOMIC/build/lib/libatomic_ops.a"
|
||||
CORE_LIBS="$CORE_LIBS $NGX_LIBATOMIC/build/lib/libatomic_ops.a"
|
||||
|
||||
else
|
||||
|
||||
|
@ -3,14 +3,19 @@
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case $NGX_LIBATOMIC in
|
||||
/*) ngx_prefix="$NGX_LIBATOMIC/build" ;;
|
||||
*) ngx_prefix="$PWD/$NGX_LIBATOMIC/build" ;;
|
||||
esac
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$NGX_LIBATOMIC/src/libatomic_ops.a: $NGX_LIBATOMIC/Makefile
|
||||
cd $NGX_LIBATOMIC && \$(MAKE)
|
||||
$NGX_LIBATOMIC/build/lib/libatomic_ops.a: $NGX_LIBATOMIC/Makefile
|
||||
cd $NGX_LIBATOMIC && \$(MAKE) && \$(MAKE) install
|
||||
|
||||
$NGX_LIBATOMIC/Makefile: $NGX_MAKEFILE
|
||||
cd $NGX_LIBATOMIC \\
|
||||
&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
|
||||
&& ./configure
|
||||
&& ./configure --prefix=$ngx_prefix
|
||||
|
||||
END
|
||||
|
Loading…
Reference in New Issue
Block a user