File tree 3 files changed +16
-26
lines changed
3 files changed +16
-26
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ AC_DEFUN([PGAC_CHECK_LIBCURL],
316
316
[ Define to 1 if curl_global_init() is guaranteed to be thread-safe.] )
317
317
fi
318
318
319
- # Warn if a thread-friendly DNS resolver isn't built.
319
+ # Fail if a thread-friendly DNS resolver isn't built.
320
320
AC_CACHE_CHECK ( [ for curl support for asynchronous DNS] , [ pgac_cv__libcurl_async_dns] ,
321
321
[ AC_RUN_IFELSE ( [ AC_LANG_PROGRAM ( [
322
322
#include <curl/curl.h>
@@ -332,10 +332,10 @@ AC_DEFUN([PGAC_CHECK_LIBCURL],
332
332
[ pgac_cv__libcurl_async_dns=yes] ,
333
333
[ pgac_cv__libcurl_async_dns=no] ,
334
334
[ pgac_cv__libcurl_async_dns=unknown] ) ] )
335
- if test x"$pgac_cv__libcurl_async_dns" != xyes ; then
336
- AC_MSG_WARN ( [
335
+ if test x"$pgac_cv__libcurl_async_dns" = xno ; then
336
+ AC_MSG_ERROR ( [
337
337
*** The installed version of libcurl does not support asynchronous DNS
338
- *** lookups. Connection timeouts will not be honored during DNS resolution,
339
- *** which may lead to hangs in client programs .] )
338
+ *** lookups. Rebuild libcurl with the AsynchDNS feature enabled in order
339
+ *** to use it with libpq .] )
340
340
fi
341
341
] ) # PGAC_CHECK_LIBCURL
Original file line number Diff line number Diff line change @@ -12493,7 +12493,7 @@ $as_echo "#define HAVE_THREADSAFE_CURL_GLOBAL_INIT 1" >>confdefs.h
12493
12493
12494
12494
fi
12495
12495
12496
- # Warn if a thread-friendly DNS resolver isn't built.
12496
+ # Fail if a thread-friendly DNS resolver isn't built.
12497
12497
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl support for asynchronous DNS" >&5
12498
12498
$as_echo_n "checking for curl support for asynchronous DNS... " >&6; }
12499
12499
if ${pgac_cv__libcurl_async_dns+:} false; then :
@@ -12535,15 +12535,11 @@ fi
12535
12535
fi
12536
12536
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__libcurl_async_dns" >&5
12537
12537
$as_echo "$pgac_cv__libcurl_async_dns" >&6; }
12538
- if test x"$pgac_cv__libcurl_async_dns" != xyes ; then
12539
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12540
- *** The installed version of libcurl does not support asynchronous DNS
12541
- *** lookups. Connection timeouts will not be honored during DNS resolution,
12542
- *** which may lead to hangs in client programs." >&5
12543
- $as_echo "$as_me: WARNING:
12538
+ if test x"$pgac_cv__libcurl_async_dns" = xno ; then
12539
+ as_fn_error $? "
12544
12540
*** The installed version of libcurl does not support asynchronous DNS
12545
- *** lookups. Connection timeouts will not be honored during DNS resolution,
12546
- *** which may lead to hangs in client programs ." >&2;}
12541
+ *** lookups. Rebuild libcurl with the AsynchDNS feature enabled in order
12542
+ *** to use it with libpq ." "$LINENO" 5
12547
12543
fi
12548
12544
12549
12545
fi
Original file line number Diff line number Diff line change @@ -909,9 +909,7 @@ if not libcurlopt.disabled()
909
909
cdata.set(' HAVE_THREADSAFE_CURL_GLOBAL_INIT' , 1 )
910
910
endif
911
911
912
- # Warn if a thread-friendly DNS resolver isn't built.
913
- libcurl_async_dns = false
914
-
912
+ # Fail if a thread-friendly DNS resolver isn't built.
915
913
if not meson .is_cross_build()
916
914
r = cc.run('''
917
915
#include <curl/curl.h>
@@ -931,16 +929,12 @@ if not libcurlopt.disabled()
931
929
)
932
930
933
931
assert (r.compiled())
934
- if r.returncode() == 0
935
- libcurl_async_dns = true
936
- endif
937
- endif
938
-
939
- if not libcurl_async_dns
940
- warning ('''
932
+ if r.returncode() != 0
933
+ error ('''
941
934
*** The installed version of libcurl does not support asynchronous DNS
942
- *** lookups. Connection timeouts will not be honored during DNS resolution,
943
- *** which may lead to hangs in client programs.''' )
935
+ *** lookups. Rebuild libcurl with the AsynchDNS feature enabled in order
936
+ *** to use it with libpq.''' )
937
+ endif
944
938
endif
945
939
endif
946
940
You can’t perform that action at this time.
0 commit comments