configure: remove support for "embedded ares"
In March 2010 (commit 4259d2df7d) we removed the embedded 'ares'
directory from the curl source tree but we have since supported
especially detecting and using that build directory. The time has come
to remove that kludge and ask users to specify the c-ares dir correctly
with --enable-ares.
Closes #8397
This commit is contained in:
parent
436398bef5
commit
ff4bf6bfb5
@ -3403,7 +3403,6 @@ dnl set variable for use in automakefile(s)
|
|||||||
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
||||||
|
|
||||||
CURL_CHECK_LIB_ARES
|
CURL_CHECK_LIB_ARES
|
||||||
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
|
|
||||||
|
|
||||||
if test "x$curl_cv_native_windows" != "xyes" &&
|
if test "x$curl_cv_native_windows" != "xyes" &&
|
||||||
test "x$enable_shared" = "xyes"; then
|
test "x$enable_shared" = "xyes"; then
|
||||||
|
|||||||
@ -48,18 +48,11 @@ CFLAGS += @CURL_CFLAG_EXTRAS@
|
|||||||
# $(top_srcdir)/include is for libcurl's external include files
|
# $(top_srcdir)/include is for libcurl's external include files
|
||||||
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
||||||
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files
|
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files
|
||||||
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
|
|
||||||
# $(top_srcdir)/ares is for in-tree c-ares's external include files
|
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
||||||
-I$(top_builddir)/lib \
|
-I$(top_builddir)/lib \
|
||||||
-I$(top_srcdir)/lib
|
-I$(top_srcdir)/lib
|
||||||
|
|
||||||
if USE_EMBEDDED_ARES
|
|
||||||
AM_CPPFLAGS += -I$(top_builddir)/ares \
|
|
||||||
-I$(top_srcdir)/ares
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Prevent LIBS from being used for all link targets
|
# Prevent LIBS from being used for all link targets
|
||||||
LIBS = $(BLANK_AT_MAKETIME)
|
LIBS = $(BLANK_AT_MAKETIME)
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@ -487,9 +487,7 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
|
|||||||
clean_CPPFLAGS="$CPPFLAGS"
|
clean_CPPFLAGS="$CPPFLAGS"
|
||||||
clean_LDFLAGS="$LDFLAGS"
|
clean_LDFLAGS="$LDFLAGS"
|
||||||
clean_LIBS="$LIBS"
|
clean_LIBS="$LIBS"
|
||||||
embedded_ares="unknown"
|
|
||||||
configure_runpath=`pwd`
|
configure_runpath=`pwd`
|
||||||
embedded_ares_builddir="$configure_runpath/ares"
|
|
||||||
if test -n "$want_ares_path"; then
|
if test -n "$want_ares_path"; then
|
||||||
dnl c-ares library path has been specified
|
dnl c-ares library path has been specified
|
||||||
ARES_PCDIR="$want_ares_path/lib/pkgconfig"
|
ARES_PCDIR="$want_ares_path/lib/pkgconfig"
|
||||||
@ -511,31 +509,19 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
|
|||||||
ares_LIBS="-lcares"
|
ares_LIBS="-lcares"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
dnl c-ares library path has not been given
|
dnl c-ares path not specified, use defaults
|
||||||
if test -d "$srcdir/ares"; then
|
CURL_CHECK_PKGCONFIG(libcares)
|
||||||
dnl c-ares sources embedded in curl tree
|
if test "$PKGCONFIG" != "no" ; then
|
||||||
embedded_ares="yes"
|
ares_LIBS=`$PKGCONFIG --libs-only-l libcares`
|
||||||
AC_CONFIG_SUBDIRS(ares)
|
ares_LDFLAGS=`$PKGCONFIG --libs-only-L libcares`
|
||||||
dnl c-ares has installable configured header files, path
|
ares_CPPFLAGS=`$PKGCONFIG --cflags-only-I libcares`
|
||||||
dnl inclusion fully done in makefiles for in-tree builds.
|
AC_MSG_NOTICE([pkg-config: ares_LIBS: "$ares_LIBS"])
|
||||||
ares_CPPFLAGS=""
|
AC_MSG_NOTICE([pkg-config: ares_LDFLAGS: "$ares_LDFLAGS"])
|
||||||
ares_LDFLAGS="-L$embedded_ares_builddir"
|
AC_MSG_NOTICE([pkg-config: ares_CPPFLAGS: "$ares_CPPFLAGS"])
|
||||||
ares_LIBS="-lcares"
|
|
||||||
else
|
else
|
||||||
dnl c-ares path not specified, use defaults
|
ares_CPPFLAGS=""
|
||||||
CURL_CHECK_PKGCONFIG(libcares)
|
ares_LDFLAGS=""
|
||||||
if test "$PKGCONFIG" != "no" ; then
|
ares_LIBS="-lcares"
|
||||||
ares_LIBS=`$PKGCONFIG --libs-only-l libcares`
|
|
||||||
ares_LDFLAGS=`$PKGCONFIG --libs-only-L libcares`
|
|
||||||
ares_CPPFLAGS=`$PKGCONFIG --cflags-only-I libcares`
|
|
||||||
AC_MSG_NOTICE([pkg-config: ares_LIBS: "$ares_LIBS"])
|
|
||||||
AC_MSG_NOTICE([pkg-config: ares_LDFLAGS: "$ares_LDFLAGS"])
|
|
||||||
AC_MSG_NOTICE([pkg-config: ares_CPPFLAGS: "$ares_CPPFLAGS"])
|
|
||||||
else
|
|
||||||
ares_CPPFLAGS=""
|
|
||||||
ares_LDFLAGS=""
|
|
||||||
ares_LIBS="-lcares"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
@ -543,38 +529,37 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
|
|||||||
LDFLAGS="$clean_LDFLAGS $ares_LDFLAGS"
|
LDFLAGS="$clean_LDFLAGS $ares_LDFLAGS"
|
||||||
LIBS="$ares_LIBS $clean_LIBS"
|
LIBS="$ares_LIBS $clean_LIBS"
|
||||||
#
|
#
|
||||||
if test "$embedded_ares" != "yes"; then
|
|
||||||
dnl check if c-ares new enough when not using an embedded
|
dnl check if c-ares new enough
|
||||||
dnl source tree one which normally has not been built yet.
|
AC_MSG_CHECKING([that c-ares is good and recent enough])
|
||||||
AC_MSG_CHECKING([that c-ares is good and recent enough])
|
AC_LINK_IFELSE([
|
||||||
AC_LINK_IFELSE([
|
AC_LANG_PROGRAM([[
|
||||||
AC_LANG_PROGRAM([[
|
|
||||||
#include <ares.h>
|
#include <ares.h>
|
||||||
/* set of dummy functions in case c-ares was built with debug */
|
/* set of dummy functions in case c-ares was built with debug */
|
||||||
void curl_dofree() { }
|
void curl_dofree() { }
|
||||||
void curl_sclose() { }
|
void curl_sclose() { }
|
||||||
void curl_domalloc() { }
|
void curl_domalloc() { }
|
||||||
void curl_docalloc() { }
|
void curl_docalloc() { }
|
||||||
void curl_socket() { }
|
void curl_socket() { }
|
||||||
]],[[
|
]],[[
|
||||||
ares_channel channel;
|
ares_channel channel;
|
||||||
ares_cancel(channel); /* added in 1.2.0 */
|
ares_cancel(channel); /* added in 1.2.0 */
|
||||||
ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
|
ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
|
||||||
ares_dup(&channel, channel); /* added in 1.6.0 */
|
ares_dup(&channel, channel); /* added in 1.6.0 */
|
||||||
]])
|
]])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
AC_MSG_ERROR([c-ares library defective or too old])
|
AC_MSG_ERROR([c-ares library defective or too old])
|
||||||
dnl restore initial settings
|
dnl restore initial settings
|
||||||
CPPFLAGS="$clean_CPPFLAGS"
|
CPPFLAGS="$clean_CPPFLAGS"
|
||||||
LDFLAGS="$clean_LDFLAGS"
|
LDFLAGS="$clean_LDFLAGS"
|
||||||
LIBS="$clean_LIBS"
|
LIBS="$clean_LIBS"
|
||||||
# prevent usage
|
# prevent usage
|
||||||
want_ares="no"
|
want_ares="no"
|
||||||
])
|
])
|
||||||
fi
|
|
||||||
if test "$want_ares" = "yes"; then
|
if test "$want_ares" = "yes"; then
|
||||||
dnl finally c-ares will be used
|
dnl finally c-ares will be used
|
||||||
AC_DEFINE(USE_ARES, 1, [Define to enable c-ares support])
|
AC_DEFINE(USE_ARES, 1, [Define to enable c-ares support])
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@ -29,20 +29,10 @@ AUTOMAKE_OPTIONS = foreign nostdinc
|
|||||||
# $(top_srcdir)/include is for libcurl's external include files
|
# $(top_srcdir)/include is for libcurl's external include files
|
||||||
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
||||||
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
|
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
|
||||||
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
|
|
||||||
# $(top_srcdir)/ares is for in-tree c-ares's external include files
|
|
||||||
|
|
||||||
if USE_EMBEDDED_ARES
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
|
||||||
-I$(top_builddir)/lib \
|
|
||||||
-I$(top_srcdir)/lib \
|
|
||||||
-I$(top_builddir)/ares \
|
|
||||||
-I$(top_srcdir)/ares
|
|
||||||
else
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
||||||
-I$(top_builddir)/lib \
|
-I$(top_builddir)/lib \
|
||||||
-I$(top_srcdir)/lib
|
-I$(top_srcdir)/lib
|
||||||
endif
|
|
||||||
|
|
||||||
EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl \
|
EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl \
|
||||||
Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl .checksrc
|
Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl .checksrc
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@ -29,20 +29,10 @@ AUTOMAKE_OPTIONS = foreign nostdinc
|
|||||||
# $(top_srcdir)/include is for libcurl's external include files
|
# $(top_srcdir)/include is for libcurl's external include files
|
||||||
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
||||||
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
|
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
|
||||||
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
|
|
||||||
# $(top_srcdir)/ares is for in-tree c-ares's external include files
|
|
||||||
|
|
||||||
if USE_EMBEDDED_ARES
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
|
||||||
-I$(top_builddir)/lib \
|
|
||||||
-I$(top_srcdir)/lib \
|
|
||||||
-I$(top_builddir)/ares \
|
|
||||||
-I$(top_srcdir)/ares
|
|
||||||
else
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
||||||
-I$(top_builddir)/lib \
|
-I$(top_builddir)/lib \
|
||||||
-I$(top_srcdir)/lib
|
-I$(top_srcdir)/lib
|
||||||
endif
|
|
||||||
|
|
||||||
# Prevent LIBS from being used for all link targets
|
# Prevent LIBS from being used for all link targets
|
||||||
LIBS = $(BLANK_AT_MAKETIME)
|
LIBS = $(BLANK_AT_MAKETIME)
|
||||||
|
|||||||
@ -29,24 +29,12 @@ AUTOMAKE_OPTIONS = foreign nostdinc
|
|||||||
# $(top_srcdir)/include is for libcurl's external include files
|
# $(top_srcdir)/include is for libcurl's external include files
|
||||||
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
||||||
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
|
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
|
||||||
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
|
|
||||||
# $(top_srcdir)/ares is for in-tree c-ares's external include files
|
|
||||||
|
|
||||||
if USE_EMBEDDED_ARES
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
|
||||||
-I$(top_builddir)/lib \
|
|
||||||
-I$(top_srcdir)/lib \
|
|
||||||
-I$(top_srcdir)/src \
|
|
||||||
-I$(top_srcdir)/tests/libtest \
|
|
||||||
-I$(top_builddir)/ares \
|
|
||||||
-I$(top_srcdir)/ares
|
|
||||||
else
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
||||||
-I$(top_builddir)/lib \
|
-I$(top_builddir)/lib \
|
||||||
-I$(top_srcdir)/lib \
|
-I$(top_srcdir)/lib \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/tests/libtest
|
-I$(top_srcdir)/tests/libtest
|
||||||
endif
|
|
||||||
|
|
||||||
EXTRA_DIST = Makefile.inc CMakeLists.txt README.md
|
EXTRA_DIST = Makefile.inc CMakeLists.txt README.md
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user