diff options
-rw-r--r-- | AUTHORS | 21 | ||||
-rw-r--r-- | CHANGES | 3877 | ||||
-rw-r--r-- | INSTALL | 328 | ||||
-rw-r--r-- | Makefile.am | 61 | ||||
-rw-r--r-- | Makefile.in | 1388 | ||||
-rw-r--r-- | Makefile.inc | 33 | ||||
-rw-r--r-- | Makefile.m32 | 13 | ||||
-rw-r--r-- | Makefile.msvc | 12 | ||||
-rw-r--r-- | Makefile.netware | 1 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | RELEASE-NOTES | 47 | ||||
-rw-r--r-- | acinclude.m4 | 9 | ||||
-rw-r--r-- | aclocal.m4 | 536 | ||||
-rw-r--r-- | acountry.c | 13 | ||||
-rw-r--r-- | adig.c | 40 | ||||
-rw-r--r-- | ahost.c | 14 | ||||
-rw-r--r-- | ares.h | 69 | ||||
-rw-r--r-- | ares__close_sockets.c | 5 | ||||
-rw-r--r-- | ares__get_hostent.c | 12 | ||||
-rw-r--r-- | ares__read_line.c | 4 | ||||
-rw-r--r-- | ares_build.h | 8 | ||||
-rw-r--r-- | ares_cancel.3 | 4 | ||||
-rw-r--r-- | ares_cancel.c | 42 | ||||
-rw-r--r-- | ares_cancel.pdf | bin | 3782 -> 4000 bytes | |||
-rw-r--r-- | ares_config.h.in | 23 | ||||
-rw-r--r-- | ares_create_query.3 | 81 | ||||
-rw-r--r-- | ares_create_query.c | 208 | ||||
-rw-r--r-- | ares_create_query.pdf | bin | 0 -> 5080 bytes | |||
-rw-r--r-- | ares_data.c | 75 | ||||
-rw-r--r-- | ares_data.h | 15 | ||||
-rw-r--r-- | ares_destroy.3 | 3 | ||||
-rw-r--r-- | ares_destroy.c | 11 | ||||
-rw-r--r-- | ares_destroy.pdf | bin | 3909 -> 4056 bytes | |||
-rw-r--r-- | ares_destroy_options.pdf | bin | 3582 -> 3640 bytes | |||
-rw-r--r-- | ares_dns.h | 35 | ||||
-rw-r--r-- | ares_dup.pdf | bin | 3868 -> 3921 bytes | |||
-rw-r--r-- | ares_expand_name.3 | 4 | ||||
-rw-r--r-- | ares_expand_name.c | 17 | ||||
-rw-r--r-- | ares_expand_name.pdf | bin | 4337 -> 4477 bytes | |||
-rw-r--r-- | ares_expand_string.c | 5 | ||||
-rw-r--r-- | ares_expand_string.pdf | bin | 4263 -> 4314 bytes | |||
-rw-r--r-- | ares_fds.c | 4 | ||||
-rw-r--r-- | ares_fds.pdf | bin | 4132 -> 4188 bytes | |||
-rw-r--r-- | ares_free_data.3 | 8 | ||||
-rw-r--r-- | ares_free_data.pdf | bin | 4317 -> 4469 bytes | |||
-rw-r--r-- | ares_free_hostent.c | 1 | ||||
-rw-r--r-- | ares_free_hostent.pdf | bin | 3791 -> 3853 bytes | |||
-rw-r--r-- | ares_free_string.c | 2 | ||||
-rw-r--r-- | ares_free_string.pdf | bin | 3455 -> 3517 bytes | |||
-rw-r--r-- | ares_get_servers.pdf | bin | 5064 -> 5122 bytes | |||
-rw-r--r-- | ares_gethostbyaddr.3 | 3 | ||||
-rw-r--r-- | ares_gethostbyaddr.c | 9 | ||||
-rw-r--r-- | ares_gethostbyaddr.pdf | bin | 5371 -> 5459 bytes | |||
-rw-r--r-- | ares_gethostbyname.3 | 3 | ||||
-rw-r--r-- | ares_gethostbyname.c | 24 | ||||
-rw-r--r-- | ares_gethostbyname.pdf | bin | 5471 -> 5566 bytes | |||
-rw-r--r-- | ares_gethostbyname_file.pdf | bin | 5000 -> 5061 bytes | |||
-rw-r--r-- | ares_getnameinfo.3 | 3 | ||||
-rw-r--r-- | ares_getnameinfo.c | 16 | ||||
-rw-r--r-- | ares_getnameinfo.pdf | bin | 7096 -> 7220 bytes | |||
-rw-r--r-- | ares_getsock.c | 4 | ||||
-rw-r--r-- | ares_getsock.pdf | bin | 4291 -> 4349 bytes | |||
-rw-r--r-- | ares_inet_net_pton.h (renamed from inet_net_pton.h) | 8 | ||||
-rw-r--r-- | ares_inet_ntop.3 | 47 | ||||
-rw-r--r-- | ares_inet_ntop.pdf | bin | 0 -> 4268 bytes | |||
-rw-r--r-- | ares_inet_pton.3 | 43 | ||||
-rw-r--r-- | ares_inet_pton.pdf | bin | 0 -> 4011 bytes | |||
-rw-r--r-- | ares_init.c | 911 | ||||
-rw-r--r-- | ares_init.pdf | bin | 10526 -> 10647 bytes | |||
-rw-r--r-- | ares_init_options.pdf | bin | 10526 -> 10647 bytes | |||
-rw-r--r-- | ares_library_cleanup.3 | 19 | ||||
-rw-r--r-- | ares_library_cleanup.pdf | bin | 4927 -> 5600 bytes | |||
-rw-r--r-- | ares_library_init.3 | 18 | ||||
-rw-r--r-- | ares_library_init.c | 7 | ||||
-rw-r--r-- | ares_library_init.pdf | bin | 6451 -> 6828 bytes | |||
-rw-r--r-- | ares_llist.c | 23 | ||||
-rw-r--r-- | ares_llist.h | 3 | ||||
-rw-r--r-- | ares_mkquery.3 | 7 | ||||
-rw-r--r-- | ares_mkquery.c | 173 | ||||
-rw-r--r-- | ares_mkquery.pdf | bin | 4897 -> 5144 bytes | |||
-rw-r--r-- | ares_nowarn.c | 110 | ||||
-rw-r--r-- | ares_nowarn.h | 10 | ||||
-rw-r--r-- | ares_options.c | 64 | ||||
-rw-r--r-- | ares_parse_a_reply.3 | 2 | ||||
-rw-r--r-- | ares_parse_a_reply.c | 11 | ||||
-rw-r--r-- | ares_parse_a_reply.pdf | bin | 4509 -> 4559 bytes | |||
-rw-r--r-- | ares_parse_aaaa_reply.3 | 2 | ||||
-rw-r--r-- | ares_parse_aaaa_reply.c | 19 | ||||
-rw-r--r-- | ares_parse_aaaa_reply.pdf | bin | 4457 -> 4511 bytes | |||
-rw-r--r-- | ares_parse_mx_reply.c | 10 | ||||
-rw-r--r-- | ares_parse_mx_reply.pdf | bin | 4357 -> 4411 bytes | |||
-rw-r--r-- | ares_parse_naptr_reply.3 | 83 | ||||
-rw-r--r-- | ares_parse_naptr_reply.c | 188 | ||||
-rw-r--r-- | ares_parse_ns_reply.c | 11 | ||||
-rw-r--r-- | ares_parse_ns_reply.pdf | bin | 4269 -> 4324 bytes | |||
-rw-r--r-- | ares_parse_ptr_reply.c | 18 | ||||
-rw-r--r-- | ares_parse_ptr_reply.pdf | bin | 4496 -> 4542 bytes | |||
-rw-r--r-- | ares_parse_soa_reply.3 | 80 | ||||
-rw-r--r-- | ares_parse_soa_reply.c | 130 | ||||
-rw-r--r-- | ares_parse_soa_reply.pdf | bin | 0 -> 4422 bytes | |||
-rw-r--r-- | ares_parse_srv_reply.c | 10 | ||||
-rw-r--r-- | ares_parse_srv_reply.pdf | bin | 4460 -> 4513 bytes | |||
-rw-r--r-- | ares_parse_txt_reply.3 | 2 | ||||
-rw-r--r-- | ares_parse_txt_reply.c | 89 | ||||
-rw-r--r-- | ares_parse_txt_reply.pdf | bin | 4402 -> 4495 bytes | |||
-rw-r--r-- | ares_private.h | 19 | ||||
-rw-r--r-- | ares_process.c | 263 | ||||
-rw-r--r-- | ares_process.pdf | bin | 4776 -> 4838 bytes | |||
-rw-r--r-- | ares_query.3 | 3 | ||||
-rw-r--r-- | ares_query.c | 17 | ||||
-rw-r--r-- | ares_query.pdf | bin | 6935 -> 7077 bytes | |||
-rw-r--r-- | ares_save_options.pdf | bin | 4908 -> 4971 bytes | |||
-rw-r--r-- | ares_search.3 | 3 | ||||
-rw-r--r-- | ares_search.c | 5 | ||||
-rw-r--r-- | ares_search.pdf | bin | 7197 -> 7353 bytes | |||
-rw-r--r-- | ares_send.3 | 3 | ||||
-rw-r--r-- | ares_send.c | 15 | ||||
-rw-r--r-- | ares_send.pdf | bin | 5711 -> 5796 bytes | |||
-rw-r--r-- | ares_set_servers.pdf | bin | 5153 -> 5211 bytes | |||
-rw-r--r-- | ares_set_socket_callback.pdf | bin | 3940 -> 4001 bytes | |||
-rw-r--r-- | ares_setup.h | 22 | ||||
-rw-r--r-- | ares_strerror.pdf | bin | 3546 -> 3605 bytes | |||
-rw-r--r-- | ares_timeout.3 | 2 | ||||
-rw-r--r-- | ares_timeout.c | 29 | ||||
-rw-r--r-- | ares_timeout.pdf | bin | 4257 -> 4287 bytes | |||
-rw-r--r-- | ares_version.h | 8 | ||||
-rw-r--r-- | ares_version.pdf | bin | 3715 -> 3771 bytes | |||
-rw-r--r-- | bitncmp.c | 40 | ||||
-rw-r--r-- | bitncmp.h | 6 | ||||
-rwxr-xr-x | buildconf | 210 | ||||
-rwxr-xr-x | compile | 241 | ||||
-rw-r--r-- | config-dos.h | 6 | ||||
-rw-r--r-- | config-win32.h | 16 | ||||
-rwxr-xr-x | config.guess | 49 | ||||
-rwxr-xr-x | config.sub | 74 | ||||
-rwxr-xr-x | configure | 4015 | ||||
-rw-r--r-- | configure.ac | 115 | ||||
-rwxr-xr-x | depcomp | 344 | ||||
-rw-r--r-- | get_ver.awk | 40 | ||||
-rw-r--r-- | inet_net_pton.c | 17 | ||||
-rw-r--r-- | inet_ntop.c | 28 | ||||
-rw-r--r-- | inet_ntop.h | 26 | ||||
-rw-r--r-- | libcares.pc.in | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | ltmain.sh | 95 | ||||
-rw-r--r-- | m4/cares-compilers.m4 | 114 | ||||
-rw-r--r-- | m4/cares-confopts.m4 | 22 | ||||
-rw-r--r-- | m4/cares-functions.m4 | 84 | ||||
-rw-r--r-- | m4/cares-override.m4 | 37 | ||||
-rw-r--r-- | m4/cares-system.m4 | 83 | ||||
-rw-r--r-- | m4/libtool.m4 | 320 | ||||
-rw-r--r-- | m4/ltoptions.m4 | 19 | ||||
-rw-r--r-- | m4/ltversion.m4 | 10 | ||||
-rw-r--r-- | m4/xc-cc-check.m4 | 96 | ||||
-rw-r--r-- | m4/xc-lt-iface.m4 | 465 | ||||
-rw-r--r-- | m4/xc-val-flgs.m4 | 243 | ||||
-rw-r--r-- | m4/zz40-xc-ovr.m4 | 668 | ||||
-rw-r--r-- | m4/zz50-xc-ovr.m4 | 60 | ||||
-rw-r--r-- | m4/zz60-xc-ovr.m4 | 64 | ||||
-rwxr-xr-x | maketgz | 3 | ||||
-rwxr-xr-x | missing | 145 | ||||
-rw-r--r-- | nameser.h | 8 | ||||
-rw-r--r-- | setup_once.h | 84 | ||||
-rw-r--r-- | vc/cares/vc6cares.dsp | 12 |
163 files changed, 12640 insertions, 4801 deletions
@@ -1,15 +1,24 @@ c-ares is based on ares, and these are the people that have worked on it since the fork was made: +Albert Chin Alexander Lazic Alexey Simak Andreas Rieke +Andrew C. Morrow Ashish Sharma +Ben Greear +Ben Noordhuis +BogDan Vatra Brad House Brad Spencer Bram Matthys Dan Fandrich +Daniel Johnson Daniel Stenberg +David Stuart +Denis Bilenko +Dima Tisnek Dirk Manske Dominick Meglio Doug Goldstein @@ -18,19 +27,31 @@ Eino Tuominen Erik Kline George Neill Gisle Vanem +Guenter Knauf Guilherme Balena Versiani Gunter Knauf Henrik Stoerner +Jakub Hrozek James Bursa +Jérémy Lal +Marko Kreen Michael Wallner +Mike Crowe +Nick Alcock Nick Mathewson +Patrik Thunstrom +Peter Pentchev Phil Blundell +Poul Thomas Lomholt Ravi Pratap Robin Cornelius Sebastian at basti79.de Shmulik Regev +Stefan Bühler Steinar H. Gunderson Tofu Linden +Tom Hughes +Tor Arntsen Vlad Dinulescu William Ahern Yang Tse @@ -1,1218 +1,3371 @@ - Changelog for the c-ares project + Changelog for the c-ares project. Generated with git2changes.pl -Version 1.7.5 (August 16, 2011) +Version 1.10.0 (12 May 2013) -Fixed: +Daniel Stenberg (12 May 2013) +- RELEASE-NOTES: two more bug fixes - o detection of semicolon comments in resolv.conf - o avoid using system's inet_net_pton affected by the WLB-2008080064 advisory - o replacement ares_inet_net_pton affected by the WLB-2008080064 advisory - o replacement ares_inet_ntop affected by potential out of bounds write - o added install target to Makefile.msvc - o only fall back to AF_INET searches when looking for AF_UNSPEC addresses - o fixed ares_parse_*_reply memory leaks - o Use correct sizeof in ares_getnameinfo() - o IPv6-on-windows: find DNS servers correctly - o man pages: docs for the c-ares utility programs - o getservbyport replacement for Win CE - o config_sortlist: (win32) missing else - o advance_tcp_send_queue: avoid NULL ptr dereference - o configure: fix a bashism - o ares_expand_name: Fix encoded length for indirect root +- [Keith Shaw brought this change] -Version 1.7.4 (December 9, 2010) + ares_set_servers_csv: fixed IPv6 address parsing + + Fixed bug that caused the last part of an IPv6 address to be parsed as + the port number when the last part is all numeric. -Changed: +- nroff: fix two syntax mistakes + + ares_parse_a_reply and ares_parse_aaaa_reply both had two \fB instead of + \fP + + Reported-by: Alexander Klauer + Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-03/0010.shtml - o local-bind: Support binding to local interface/IPs, see - ares_set_local_ip4, ares_set_local_ip6, ares_set_local_dev +- [Alex Loukissas brought this change] -Fixed: + build: fix build on msvc11 - o memory leak in ares_getnameinfo - o add missing break that caused get_ares_servers to fail - o ares_parse_a_reply: fix CNAME response parsing - o init_by_options: don't copy an empty sortlist - o Replaced uint32_t with unsigned int to fix broken builds - on a couple of platforms - o Fix lookup with HOSTALIASES set - o adig: fix NAPTR parsing - o compiler warning cleanups - -Version 1.7.3 (June 11, 2010) +- Makefile.am: increment -version-info for 1.10.0 release -Fixed: +- README: remove unnecessary comment - o builds on Android - o now includes all files necessary to build it (1.7.2 lacked a file) - -Version 1.7.2 (June 10, 2010) - -Changed: - - o Added ares_parse_mx_reply() - -Fixed: - - o ares_init: Last, not first instance of domain or search should win - o improve alternative definition of bool - o fix VS2010 compiler warnings - - -Version 1.7.1 (Mar 23, 2010) - -* May 31, 2010 (Jakub Hrozek) -- Use the last instance of domain/search, not the first one - -* March 23, 2010 (Daniel Stenberg) -- We switched from CVS to git. See http://github.com/bagder/c-ares - -* March 5, 2010 (Daniel Stenberg) -- Daniel Johnson provided fixes for building with the clang compiler. - -* March 5, 2010 (Yang Tse) -- Added IPv6 name servers support. Implementation has been based on code, - comments and feedback provided November and December of 2008 by Daniel - Stenberg, Gregor Jasny, Phil Blundell and myself, December 2009 by Cedric - Bail, and February 2010 by Jakub Hrozek on the c-ares mailing list. On - March I reviewed all that, selected the best of each, and adjusted or - extended parts of it to make the best fit. - - The external and visible result of all this is that two new functions are - added to the external API, ares_get_servers() and ares_set_servers(), which - becomes now the preferred way of getting and setting name servers for any - ares channel as these support both IPv4 and IPv6 name servers. - - In order to not break ABI compatibility, ares_init_options() with option - mask ARES_OPT_SERVERS and ares_save_options() may still be used in code - which is intended to run on IPv4-only stacks. But remember that these - functions do not support IPv6 name servers. This implies that if the user - is capable of defining or providing an IPv6 name server, and the app is - using ares_init_options() or ares_save_options() at some point to handle - the name servers, the app will likely lose IPv6 name servers. - -* January 28, 2010 (Daniel Stenberg) -- Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't - check for broken connections like ares_process() did. Based on that, I - merged the two functions into a single generic one with two front-ends. - -* December 29, 2009 (Yang Tse) -- Laszlo Tamas Szabo adjusted Makefile.msvc compiler options so that where - run-time error checks enabling compiler option /GZ was used it is replaced - with equivalent /RTCsu for Visual Studio 2003 and newer versions. Option - /GX is replaced with equivalent /EHsc for all versions. Also fixed socket - data type for internal configure_socket function. - -* December 21, 2009 (Yang Tse) -- Ingmar Runge noticed that Windows config-win32.h configuration file - did not include a definition for HAVE_CLOSESOCKET which resulted in - function close() being inappropriately used to close sockets. - -Version 1.7.0 (Nov 30, 2009) - -* November 26, 2009 (Yang Tse) -- Larry Lansing fixed ares_parse_srv_reply to properly parse replies - which might contain non-SRV answers, skipping over potential non-SRV - ones such as CNAMEs. +- ares_version.h: copyright end range year is now 2013 -* November 23, 2009 (Yang Tse) -- Changed naming convention for c-ares libraries built with MSVC, details - and build instructions provided in README.msvc file. +- RELEASE-NOTES: synced with fb0737f3a0a1c37 -* November 22, 2009 (Yang Tse) -- Jakub Hrozek fixed more function prototypes in man pages to sync them - with the ones declared in ares.h +- [Paul Saab brought this change] + + ares_parse_aaaa_reply: Plug memory leak + + This change is similar to ares_parse_a_reply.c in commit + bffd67f16a8f42fe6dbf79ab2e39d92eea05c8a6 + +- [Patrick Valsecchi brought this change] -- Jakub Hrozek renamed addrttl and addr6ttl structs to ares_addrttl and - ares_addr6ttl in order to prevent name space pollution, along with - necessary changes to code base and man pages.This change does not break - ABI, there is no need to recompile existing applications. But existing - applications using these structs with the old name will need source code - adjustments when recompiled using c-ares 1.7.0. - -* November 21, 2009 (Yang Tse) -- Added manifest stuff to Makefile.msvc. + ares_parse_txt_reply: return a ares_txt_reply node for each sub-string + + Previously, the function would wrongly return all substrings merged into + one. -* November 20, 2009 (Yang Tse) -- Fixed several function prototypes in man pages that were out of sync - with the ones declared in ares.h. Added ares_free_data() along with - man page. Updated ares_parse_srv_reply() and ares_parse_txt_reply() - with changes from Jakub Hrozek making these now return linked lists - instead of arrays, and merging the ares_free_data() adjustments. +- [Alexander Klauer brought this change] -* November 10, 2009 (Yang Tse) -- Updated MSVC 6.0 project files to match settings from Makefile.msvc. + library init: documentation update + + This commit updates the documentation of ares_library_init() and + ares_library_cleanup() with regard to the newly introduced reference + counting of initializations and deinitializations. -* November 9, 2009 (Yang Tse) -- Makefile.msvc is now the reference method to build c-ares and sample - programs with any MSVC compiler or MS Visual Studio version. If no - option or target are specified it builds dynamic and static c-ares - libraries in debug and release flavours and also builds all sample - programs using each of the different c-ares libraries. - -* November 2, 2009 (Yang Tse) -- Renamed c-ares setup.h to ares_setup.h +- [Alexander Klauer brought this change] -* October 31, 2009 (Yang Tse) -- Symbol hiding configure options are named now --enable-symbol-hiding - and --disable-symbol-hiding in an attempt to make them less ambiguous. + library init: be recursive + + Previously, a single call to ares_library_cleanup() would deinitialise + the c-ares library, regardless of how many times ares_library_init() was + called. This behaviour may cause problems in programs linking two or + more libraries which, in turn, use c-ares. The present commit fixes this + problem, deinitializing the library only after a number of calls to + ares_library_cleanup() matching the number of calls to + ares_library_init(). -* October 30, 2009 (Yang Tse) -- Many fixes for ares_parse_txt_reply() +- [Patrick Valsecchi brought this change] -* October 29, 2009 (Daniel Stenberg) -- Jakub Hrozek added ares_parse_txt_reply() for TXT parsing + protocol parsing: check input data stricter + + ... so that bad length fields aren't blindly accepted + + Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-04/0016.shtml + +Guenter Knauf (11 Apr 2013) +- Create ares_build.h when buidling from Git. + +- Added -DCARES_STATICLIB to CFLAGS. + + Currently this static makefile does only support building the + static library libcares.a. + +Daniel Stenberg (8 Apr 2013) +- [Alexander Klauer brought this change] + + .gitignore: ignore patch files + + This commit adds a line to .gitignore to the effect that patch files + generated by 'git format-patch' are excluded from the repository. + +- [Alexander Klauer brought this change] + + ares_destroy() documentation: no new requests + + Clarify that no new requests may be added to a resolver channel that is + currently being destroyed. + +- [Alexander Klauer brought this change] + + Documentation: properly document ARES_ECANCELLED + + This commit clarifies the behaviour of ares_cancel() with respect to + callbacks and adds missing documentation of ARES_ECANCELLED to the man + pages of the affected functions. + +- [Alexander Klauer brought this change] + + ares_cancel(): cancel requests safely + + An invocation of ares_cancel() walks through the request list, calling + the callbacks of all pending requests on a channel. Previously, if such + a callback added a new request to the channel, the request list might + not end up empty, causing an abort by assertion failure. The present + commit ensures that precisely all requests present upon entry of + ares_cancel() are cancelled, and that adding new requests through + callbacks is safe. + +Yang Tse (10 Mar 2013) +- ares.h: stricter CARES_EXTERN linkage decorations logic + + No API change involved. + +- ares_build.h.dist: enhance non-configure GCC ABI detection logic + + GCC specific adjustments: + + - check __ILP32__ before 32 and 64bit processor architectures in + order to detect ILP32 programming model on 64 bit processors + which, of course, also support LP64 programming model, when using + gcc 4.7 or newer. + + - keep 32bit processor architecture checks in order to support gcc + versions older than 4.7 which don't define __ILP32__ + + - check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor + architecture checks for older versions which don't define __LP64__ + +Daniel Stenberg (9 Mar 2013) +- ares.h: there is no ares_free_soa function + +Yang Tse (9 Mar 2013) +- Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility + +- ares_inet_ntop.3: s/socklen_t/ares_socklen_t + +- configure: use XC_LIBTOOL for portability across libtool versions + +- xc-lt-iface.m4: provide XC_LIBTOOL macro + +- Makefile.am: use AM_CPPFLAGS instead of INCLUDES + +- inet_ntop.c: s/socklen_t/ares_socklen_t + +- inet_ntop.c: s/socklen_t/ares_socklen_t for portability + +Daniel Stenberg (19 Feb 2013) +- ares.h: s/socklen_t/ares_socklen_t for portability + +- ares_inet_ntop.3: 4th argument is socklen_t! + +- spell inet correctly! + +- ares_inet_pton/ntop: cleanup + + Make sure that the symbols are always exported and present in c-ares. + + Make the headers prefixed with 'ares'. + + Removed the inet_ntop.h version as it no longer features any content. + +- ares_inet_ntop/ares_inet_pton: added man pages + +Yang Tse (15 Feb 2013) +- [Gisle Vanem brought this change] + + curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s() + +- [Gisle Vanem brought this change] + + config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32 + +- [Gisle Vanem brought this change] + + config-dos.h: define strerror() to strerror_s_() for High-C + +Daniel Stenberg (13 Feb 2013) +- ares_get_datatype: removed unused function + + it was also wrongly named as internal functions require two underscores + +- ares__bitncmp: use two underscores for private functions + + It used a single one previously making it look like a public one + +- ares__generate_new_id: moved to ares_query.c + + ... and ares__rc4 is turned into a local static function. + +- ares__swap_lists: make private and static + + ... since there's only one user, make it static within ares_process.c + +Yang Tse (13 Feb 2013) +- Makefile.msvc: add four VS version strings + +Daniel Stenberg (13 Feb 2013) +- ares_expand_name.3: clarify how to free the data + +Yang Tse (30 Jan 2013) +- zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2 + + - Fix a pair of single quotes to double quotes. + + URL: http://curl.haxx.se/mail/lib-2013-01/0355.html + Reported by: Tor Arntsen + +- zz40-xc-ovr.m4: fix 'wc' detection - follow-up + + - Take into account that 'wc' may return leading spaces and/or tabs. + + - Set initial IFS to space, tab and newline. + +- zz40-xc-ovr.m4: fix 'wc' detection + + - Take into account that 'wc' may return leading spaces. + + - Set internationalization behavior variables. + + Tor Arntsen analyzed and reported the issue. + + URL: http://curl.haxx.se/mail/lib-2013-01/0351.html + +- zz40-xc-ovr.m4: check another three basic utilities + +- zz40-xc-ovr.m4: 1.0 interface stabilization + + - Stabilization results in 4 public interface m4 macros: + XC_CONFIGURE_PREAMBLE + XC_CONFIGURE_PREAMBLE_VER_MAJOR + XC_CONFIGURE_PREAMBLE_VER_MINOR + XC_CHECK_PATH_SEPARATOR + - Avoid one level of internal indirection + - Update comments + - Drop XC_OVR_ZZ40 macro + +- zz40-xc-ovr.m4: emit witness message in configure BODY + + This avoids witness message in output when running configure --help, + while sending the message to config.log for other configure runs. + +- zz40-xc-ovr.m4: truly do version conditional overriding + + - version conditional overriding + - catch unexpanded XC macros + - fix double words in comments + +- zz40-xc-ovr.m4: fix variable assignment of subshell output bashism + + Tor Arntsen analyzed and reported the issue. + + URL: http://curl.haxx.se/mail/lib-2013-01/0306.html + +- zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies + +- zz40-xc-ovr.m4: avoid double single-quote usage + +- zz40-xc-ovr.m4: parentheses balancing of 'case' statements + + m4 quadrigraph shell comment technique allows proper autoconf + parentheses balancing in shell 'case' statements. The presence + of unbalanced parentheses may otherwise trigger expansion bugs. + +- zz40-xc-ovr.m4: internals overhauling + + - Update comments + - Execute commands in subshells + - Faster path separator check + - Fix missing 'test' command + - Rename private macros + - Minimize AC_REQUIRE usage + +- zz40-xc-ovr.m4: redirect errors and warnings to stderr + +- configure: use XC_CONFIGURE_PREAMBLE early checks + + Some basic checks we make were placed early enough in generated + configure script when using autoconf 2.5X versions. Newer autoconf + versions expand these checks much further into the configure script, + rendering them useless. Using XC_CONFIGURE_PREAMBLE fixes placement + of early intended checks across all our autoconf supported versions. + +- zz40-xc-ovr.m4: provide XC_CONFIGURE_PREAMBLE macro + +- configure: autotools compatibility fixes - step I + + Fix proper macro expansion order across autotools versions for + C compiler and preprocessor program checks. + +- configure: fix automake 1.13 compatibility + + Tested with: + + buildconf: autoconf version 2.69 + buildconf: autom4te version 2.69 + buildconf: autoheader version 2.69 + buildconf: automake version 1.13.1 + buildconf: aclocal version 1.13.1 + buildconf: libtool version 2.4 + buildconf: GNU m4 version 1.4.16 + +- ares_private.h: use again memdebug.h instead of curl_memdebug.h + +- configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS + + automake 1.13 errors if AM_CONFIG_HEADER is used in configure script. + +- cares-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally + + Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using + an autoconf version that does not provide it, instead of what we were + doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for + all autoconf versions. + +- ares_private.h: use curl_memdebug.h instead of memdebug.h + +- vc6cares.dsp: add ares_create_query.c and ares_parse_soa_reply.c + +- cares-functions.m4: improve gethostname arg 2 data type check + +- setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions. + + Also reverts commit bceb40095a + +- configure: check if compiler halts on function prototype mismatch + +- cares-functions.m4: add gethostname arg 2 data type check and definition + +- cares-functions.m4: update thread-safeness detection of getaddrinfo() + + Take in account that POSIX standard Issue 7 drops h_errno support. Now, we also + consider getaddrinfo() to be thread-safe when (_POSIX_C_SOURCE >= 200809L) or + (_XOPEN_SOURCE >= 700) independently of whether h_errno exists or not. + + Take in account that h_errno might be a modifiable lvalue not defined as + a C preprocessor macro. + +- setup_once.h: HP-UX <sys/socket.h> issue workaround + + Issue: When building a 32bit target with large file support HP-UX + <sys/socket.h> header file may simultaneously provide two different + sets of declarations for sendfile and sendpath functions, one with + static and another with external linkage. Given that we do not use + mentioned functions we really don't care which linkage is the + appropriate one, but on the other hand, the double declaration emmits + warnings when using the HP-UX compiler and errors when using modern + gcc versions resulting in fatal compilation errors. + + Mentioned issue is now fixed as long as we don't use sendfile nor + sendpath functions. + +- setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h> + + Inclusion of these two header files now done in setup_once.h + +- Header inclusion clean-up + + Remove header inclusions already done in setup_once.h + +- setup_once.h: HP-UX specific TRUE and FALSE definitions + + Some HP-UX system headers require TRUE defined to 1 and FALSE to 0. + +- ares_timeout.c: fix compiler warning + +- ares_create_query.c: IRIX compilation fix + +- c-ares/nameser.h: add some T_* defines for ns_t_* values + +Daniel Stenberg (7 Nov 2012) +- Revert "ares_parse_aaaa_reply: fix memory leak" + + This reverts commit 50f25d8a4b2d16f4c5e0ef620238688b7a315c7a. + +- ares_parse_aaaa_reply: fix memory leak + + an allocated buffer was not freed in the successful case. + +- [Gisle Vanem brought this change] + + adig: perror() doesn't work for socket errors on windows + + ... so print the SOCKERRNO instead + +- get_DNS_AdaptersAddresses: fix IPv6 parsing + + Use of the wrong define made the function not parse IPv6 addresses + properly. + + Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-06/0028.shtml + Reported by: Saúl Ibarra Corretgé + +- version: bumped to 1.10.0 + + Due to the newly added function: ares_create_query() + +- AUTHORS: synced with 83093ac450 + + Added 21 authors since this document was last updated + +- ares_create_query.3: mention when this is added + +- [hpopescu@ixiacom.com brought this change] + + Added new feature (rfc2671) + +- code police: fix indents, < 80 columns, reflowed comments + +Guenter Knauf (11 Jul 2012) +- Cleaned up version awk script. + +Daniel Stenberg (30 Jun 2012) +- [Gisle Vanem brought this change] + + read_udp_packets: bail out loop on bad sockets + + I can see that recvfrom() in ares_process.c many times is called with + 'udp_socket' == ARES_SOCKET_BAD. The code takes care not to call + recv/recvfrom with ARES_SOCKET_BAD in the outer-loop. So should the + inner-loop. + +Yang Tse (29 Jun 2012) +- cares-compilers.m4: remove -Wstrict-aliasing=3 from clang + + Currently it is unknown if there is any version of clang that + actually supports -Wstrict-aliasing. What is known is that there + are several that don't support it. + +- cares-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds + +Daniel Stenberg (18 Jun 2012) +- version: work towards 1.9.2 (at least) + +Version 1.9.1 (18 Jun 2012) + +Daniel Stenberg (18 Jun 2012) +- RELEASE-NOTES: 1.9.1 coming up + +Version 1.9.0 (16 Jun 2012) + +Daniel Stenberg (16 Jun 2012) +- ares_version.h: next version is 1.9.0 + +- [Marko Kreen brought this change] + + ares_data.h: ARES_DATATYPE_SOA_REPLY is added in 1.9.0 + +- RELEASE-NOTES: synced with 979bf951d + + Next release deemed to become 1.9.0 due to the new function + +- [Marko Kreen brought this change] + + SOA parser added + + I need to do SOA queries, so here is a parser for them. + + - ares_soa_reply: new struct + - ares_malloc_data/ares_free_soa: ARES_DATATYPE_SOA_REPLY + - ares_parse_soa_reply: actual function + +Yang Tse (14 Jun 2012) +- Kill compiler warning + +- Fix libcares.pc generation for static MingW* cross builds + +Daniel Stenberg (21 May 2012) +- [Nick Alcock brought this change] + + Fix UDP and TCP port byte order in saved options. + + The UDP and TCP port are stored in network byte order in the + ares_channeldata, but are passed in to ares_init_options() in host byte + order. Thus we must return them from ares_save_options() in host byte + order too, or a duplicated channel will convert them again, leading to a + nonfunctional channel and a mysterious connection refused error from + ares_gethostbyname(). This breaks ares_dup(), thus the curl easy API + when c-ares is used by curl, and thus all the curl easy API's users. + +Yang Tse (28 Apr 2012) +- version: start working on 1.8.1-DEV + +Version 1.8.0 (27 Apr 2012) + +Daniel Stenberg (27 Apr 2012) +- RELEASE-NOTES: call next 1.8 instead + + Since we added a function, let's use a stricter bumping scheme + +Yang Tse (25 Apr 2012) +- INSTALL: some adjustments + +Daniel Stenberg (25 Apr 2012) +- GIT-INFO: mention buildconf + +Yang Tse (25 Apr 2012) +- INSTALL: remove more sections that don't apply to c-ares + +- ares_timeout.c: fix compiler warning + +Daniel Stenberg (25 Apr 2012) +- [Ben Noordhuis brought this change] + + Makefile.m32: fix mingw32 build + + * add . to include path so ares_build.h is picked up + * make ar configurable to ease cross-compiling + +- RELEASE-NOTES: added what's happened since 1.7.5 + +Guenter Knauf (22 Apr 2012) +- Updated copyright year. + +Yang Tse (21 Apr 2012) +- ares_init.c: Further refactoring of Windows system's DNS fetching code + +Guenter Knauf (20 Apr 2012) +- Android: small changes to dns property part. + + Prefix prop vars; kill var; use DNS_PROP_NAME_PREFIX macro. + +- Handle CNAME-only in ares_parse_aaaa_reply(). + + posted to the c-ares list by Peter Griess <pg@std.in>. + +- Add support for multiple DNS servers on Android. + + Before, c-ares always used the first DNS server on Android, causing + network problems if this DNS server was not available. + + Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> + +- Added INSTALL so it gets into tarballs. + +- Added some more ifdefs to silent compiler warnings. + +Yang Tse (17 Apr 2012) +- INSTALL: remove a non c-ares section + +- cares-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds + + When building a Windows target with gcc 4.5 or newer and strict compiler + warnings enabled use -Wno-pedantic-ms-format in addition to other flags. + +- setup_once.h: tighten requirements for stdbool.h header inclusion + + Include stdbool.h only when it is available and configure is capable of + detecting a proper 'bool' data type when the header is included. + +- configure: NATIVE_WINDOWS no longer defined in config file + +- cares-compilers.m4: double underscore decoration for visibility attribute + +- build adjustments: CARES_SYMBOL_HIDING no longer defined in config files + + configure script now provides conditional definitions for Makefile.am + that result in CARES_SYMBOL_HIDING being defined by resulting makefiles + when appropriate. + +- configure: Windows cross-compilation fixes + + CARES_BUILDING_LIBRARY and CARES_STATICLIB no longer defined in ares_config.h, + configure will generate appropriate conditionals so that mentioned symbols + get defined and used in Makefile derived from Makefile.am at compilation time. + +Guenter Knauf (17 Apr 2012) +- Added INSTALL file adapted from libcurl. + + Not yet ready, and needs further edits. + +Yang Tse (16 Apr 2012) +- ares_init.c: get_iphlpapi_dns_info() refactoring + +Guenter Knauf (16 Apr 2012) +- Kill some more compiler warnings. + +- Kill compiler warning about unused var. + +- Fixed my last commit: wrong preprocessor directive. + +- Check for __ANDROID__ in addition to ANDROID macro. + +- Check for __ANDROID__ in addition to ANDROID macro. + + Posted to c-ares list by Wayne. + +- Fix for Android to disable useless arpa/nameser.h. + +- Fix for Android to include sys/select.h for fd_set. + +Yang Tse (17 Mar 2012) +- ares_data.c: some NAPTR related fixes + +Daniel Stenberg (16 Mar 2012) +- port numbers: convert them to network order! + + When the config options ARES_OPT_UDP_PORT or ARES_OPT_TCP_PORT are used, + make sure to convert them to network byte order! + + Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-02/0004.shtml + +- white space cleanup + + - Keep code within 80 columns + + - Removed funny spaces after open paren and before closing paren + +- [Poul Thomas Lomholt brought this change] + + get_iphlpapi_dns_info: fix buffer overrun + + I experienced a buffer overrun exception in c-ares on Windows and + tracked it down to be an error in the calculation of the 'left' variable + in get_iphlpapi_dns_info(). + + I changed the variable type of 'left' to a _signed_ type because of the + subtraction arithmetic; not sure if a long is the best choice + +- Merge pull request #7 from saghul/naptr + + Added support for parsing NAPTR records + +saghul (23 Feb 2012) +- Added support for parsing NAPTR records + +Yang Tse (19 Jan 2012) +- ares_init.c: fix compiler warning on winsock builds + +- configure: libtool 1.5 tweaks + +Daniel Stenberg (19 Dec 2011) +- ares_timeout.3: fix the NAME section + + It was clearly a copy n' paste error + +Yang Tse (27 Sep 2011) +- [Albert Chin brought this change] + + configure - m4: make CURL_CHECK_DEF ignore leading whitespace on symbol def + + When using Sun C compiler the preprocessor somehow inserts an extra space + in front of replaced symbol, breaking CURL_CHECK_DEF macro. To workaround + this, macro CURL_CHECK_DEF now ignores all leading whitespace in front of + symbol substitution result. + +- ares_init.c: fix segfault triggered in ares_init_options() upon previous + failure of init_by_defaults() and incomplete cleanup there. + +- ares_process.c: fix compiler warning + +- fix MSVC compiler warning 'conditional expression is constant' + +- setup_once.h cleanup and sync + +- [Denis Bilenko brought this change] + + ares_getnameinfo: fix random results with c-ares 1.7.5 + + In ares_getnameinfo memcpy did not copy enough bytes, causing + it to return arbitrary memory contents as a result. + +- warnings: fix another 'conversion may lose significant bits' compiler warning + +- ares_dns.h: adjust DNS__16BIT and DNS__32BIT macro definitions + + Fixing compiler warnings existing definitions triggered on these. + +- ares_destroy.c: fix segfault in ares_destroy_options() + +Daniel Stenberg (21 Aug 2011) +- ares_parse_srv_reply: silence compiler warnings + + ... by adding ugly typecasts. + +- CHANGES: generate from script + + The CHANGES file is now generated automatically with 'git2changes.pl', + invoked by the maketgz script which is used to build release archives. + + The former human edited CHANGES file was renamed to CHANGES.0 in git. + +Yang Tse (21 Aug 2011) +- Makefile.netware: SIZEOF_SHORT definition + +- warnings: fix some 'conversion may lose significant bits' compiler warnings + +- configure: fix symbol hiding usability check + + A more thorough test is done now in order to determine visibility attribute + usability, given that some compilers don't support visibility attribute on + all configurations. + +Daniel Stenberg (16 Aug 2011) +- 1.7.6: start working... + +Version 1.7.5 (16 Aug 2011) + +Daniel Stenberg (16 Aug 2011) +- CHANGES: synced for 1.7.5 release + +- RELEASE-NOTES: synced with bb4096effef7f000 + +Jakub Hrozek (15 Aug 2011) +- Only fall back to AF_INET searches when looking for AF_UNSPEC addresses + +Yang Tse (10 Aug 2011) +- [Gisle Vanem brought this change] + + ares_iphlpapi.h: Watcom C fix + + Added "!defined(_WS2DEF_)" since Watcom doesn't have + a per type guard for the typedefs 'CSADDR_INFO' (that MingW has) or + 'SOCKET_ADDRESS' (that MSVC has). But we can use the header-guard for + <ws2def.h> instead. + +- [Gisle Vanem brought this change] + + Makefile.Watcom: + * The 'NTDDI_VERSION' needs to be raised to 0x05010000 + in order for SOCKADDR_STORAGE etc. to be typedefed. + * Replaced '-dUSE_WATT32' with '-dWATT32'. + * Added $(DEMOS) to the 'all' target and removed the 'demos' + target to be consistent with e.g. Makefile.msvc etc. + * 'ENABLE_IPV6' is no longer used. Hence removed the '%use_ipv6' construct. + * object-file order seems to be important (Watcom v.19). Hence + 'ares_getopt.obj' must be put after the .obj that references getopt(). + +- cares-compilers.m4: CARES_CONVERT_INCLUDE_TO_ISYSTEM adjustments + + Add CARES_CHECK_COMPILER as a requirement. + + Ensure macro does nothing unless GNU_C or CLANG compiler is used. + + This should allow usage of this macro in unforeseen placements. + +- config-win32.h: comments adjustments - followup + +- config-win32.h: comments adjustments + +Daniel Stenberg (5 Aug 2011) +- [Tom Hughes brought this change] + + ares_parse_a_reply: fix memleak + +Yang Tse (29 Jul 2011) +- cares-functions.m4 serial # bump + +- Revert "configure: additional flag checks for fcntl() and socket()" + + This reverts commit 5f2a3b0e48f26d24cb1fefea0dccb92d417dcbf7. + +- configure: additional flag checks for fcntl() and socket() + +- xc-translit.m4 fix quoting + +- configure: avoid direct usage of AS_TR_* macros + +- xc-translit.m4 provides transliteration macros with well defined behavior. + +Jakub Hrozek (15 Jun 2011) +- Revert "Only fall back to AF_INET searches when looking for AF_UNSPEC addresses" + + This reverts commit b5823d65706af687c0e5110af8f0cfdcd068997d. + + This patch was not reviewed properly before pushing + +- Revert "Do not use sized constants in public headers" + + This reverts commit 22c01e96f7b2ae9923e1baa50bfe3c0d22297a7d. + + This is a Red Hat specific patch that does not belong into upstream + +- Use correct sizeof in ares_getnameinfo() + +- Do not leak rr_name on failures inside ares_parse_ptr_reply + +- Do not leak rr_name on failures inside ares_parse_a_reply + +- Do not leak rr_name on failures inside ares_parse_aaaa_reply + +- Do not leak rr_name on failures inside ares_parse_ns_reply + +- Fix incorrect sizeof() in ares_save_options + +- Fix incorrect allocation in ares_parse_ptr_reply() + +- Only fall back to AF_INET searches when looking for AF_UNSPEC addresses + +- Do not use sized constants in public headers + +Daniel Stenberg (13 Jun 2011) +- [Jakub Hrozek brought this change] + + ares_free_hostent(NULL) should be a noop + +Yang Tse (8 Jun 2011) +- configure: fix recvfrom 5th arg type qualifier detection (followup) + +- configure: fix recvfrom 5th arg type qualifier detection + + Additionally remove whitespace from EOL + +Daniel Stenberg (4 Jun 2011) +- strlen: use size_t to receive the return + +Yang Tse (4 Jun 2011) +- xlc: avoid preprocessor definition usage when linking + +- ares_nowarn: icc 9.1 workaround + +- ares_nowarn: header inclusion fix + +- ares_init: make ares_private.h last included header again + +- compiler warning: fix + + Fix compiler warning: conversion may lose significant bits + +- compiler warning: fix + + Fix compiler warning: variable was set but never used + + Fix compiler warning: clobber ignored + +- ares_iphlpapi: fix compiler warnings + +- winsock: compilation fixes + + Provide winsock iphlpapi alternative definitions to prevent compilation + failures when using a variety of winsock header implementations. + +Daniel Stenberg (17 May 2011) +- [David Stuart brought this change] + + IPv6-on-windows: find DNS servers correctly + +- man pages: docs for the c-ares utility programs + +- ares_parse_ns_reply.c: remove CVSism + +Yang Tse (27 Mar 2011) +- build: fix header inclusion + +- getservbyport replacement for Win CE + +- renamed getplatform() to ares__getplatform() to avoid namespace pollution + +- configure: fix libtool warning + + Recent versions of libtool are now tracing usage of AC_CONFIG_MACRO_DIR + macro and warn heavily when not used in configure script along with + ACLOCAL_AMFLAGS in Makefile.am. So in order to make libtool happy + while keeping backwards compatibility this is added. + +- adig: RFC4034 resource record type detection + + Can be tested with: adig -s 8.8.8.8 -t ANY example.com + +- nameser.h: RFC4034 resource record type definitions + +- build: move platform stuff to ares_platform.c and ares_platform.h + +- build: find out windows platform using GetVersionEx() + +- build: use getenv() replacement function for systems which lack it + +- setup_once: system error codes for Windows CE + +- ares_search: use ERRNO macro for portability sake + +- System's errno.h inclusion cleanup follow-up. + + System's errno.h is conditionally included from setup_once.h + +- Windows CE specific adjustment + + All versions of Windows CE support Winsock 1.1 + +- System's errno.h inclusion cleanup. + + System's errno.h is conditionally included from setup_once.h + +- ares_init: fix gethostname error detection on winsock platforms + +- configure: r-enable temporarily disabled detection of system's inet_ntop() + + Detection was temporarily disabled in commit 674e044ccb21f2f63537da53565fce868f + +Daniel Stenberg (15 Mar 2011) +- configure: stop using the deprecated AM_INIT_AUTOMAKE syntax + +- [Gisle Vanem brought this change] + + Watt-32: use errno + + Make sure Watt-32 programs use 'errno' even on Win32 targets + +Guenter Knauf (18 Feb 2011) +- Removed commented CLFAGS no longer needed. + +- Fixed CFLAGS for NetWare. + + Added -m32 to enable compilation with x86_64 compilers; + added conditional to set -fpcc-struct-return only for gcc compiler. + +Daniel Stenberg (18 Feb 2011) +- [Gisle Vanem brought this change] + + Watt32: fix server init + + Somewhere in the process, programs using the Watt-32 tcp/ip stack + stopped working. + +- [Dima Tisnek brought this change] + + config_sortlist: (win32) missing else + + Without an else there, contents of "pat" that could have been + successfully set just above, may be clobbered by successive unsuccessful + calls to "xxx_pton" or "ip_addr". + +Yang Tse (17 Jan 2011) +- Makefile.msvc: add a couple of VS version strings + +- Makefile.msvc: add a couple of VS version strings + +- build: add install target to Makefile.msvc + +Daniel Stenberg (27 Dec 2010) +- ares_set_servers_csv: remove unused variables + +- init_by_resolv_conf: fix compiler warnings + + The code received the return codes in the 'status' variable without + using it. Instead we just ignore those particular errors. + +- getv4: Value stored to 'dst' is never read + +- advance_tcp_send_queue: avoid NULL ptr dereference + + If given a too large 'num_bytes' value, it would cause a NULL ptr + dereference. Instead the code will now break out of the loop at the end + of the list. + +- [Peter Pentchev brought this change] + + configure: fix a bashism + +- cleanup: avoid unsafe typecasts + + Avoid the risk of reading 16bit data from an unaligned address by using + a macro that is adapted for this. + +- [Stefan Bühler brought this change] + + ares_expand_name: Fix encoded length for indirect root + +Yang Tse (18 Dec 2010) +- build: add some explicit file references to VS project files + +- config-win32: provide HAVE_ASSERT_H definition + +- build: include ares_nowarn in sample program VS project files + +- build: include ares_nowarn among SAMPLESOURCES and SAMPLEHEADERS + +- configure: temporarily disable detection of system's inet_ntop() + + This is done to allow compilation of ares_inet_ntop() by some daily + builds picky compilers that otherwise do not need this function. + +- changes: mention last fix + +- ares_inet_ntop: remove definition and usage of macro SPRINTF + + Existing definition of SPRINTF always resulted in sprintf() being used, + and sprintf() returning 'int' is already used throughout the library. + +- ares_inet_ntop: reapply changes from previous c-ares version (III) + + - Replace 'u_char' with 'unsigned char'. + - Replace 'u_int' with 'unsigned int'. + - use macros ERRNO and SET_ERRNO() for errno handling. + +- ares_inet_ntop: reapply changes from previous c-ares version (II) + + - Remove rcsid. + - Adjust header file inclusions. + - ares_inet_ntop used only on systems without a proper inet_ntop function. + +- ares_inet_ntop: reapply changes from previous c-ares version (I) + + - Replace tabs with spaces. + - Use ANSI C style for function declarations and definitions. + - Use sizeof with parentheses. + +- ares_inet_ntop: fix off by one error triggering out of bounds write + + ares_inet_ntop would trigger an out of bounds write when the representation + of the address required 15 characters, due to not taking in account null + termination character. + + Full import of inet_ntop.c from bind-9.5.3rc1 to pull additional fixes. + +- ares_nowarn: add conditional inclusion of assert.h header + +- fix compiler warning: conversion may lose significant bits + +- ares_inet_net_pton: fix non-rejection of some malformed literals + + ares_inet_net_pton would return wrong values when excessively large, + and invalid, netmasks are used. Fixes are from bind-9.5.3rc1, + issue also described in the WLB-2008080064 advisory. + +- setup_once: provide ISASCII macro + +- configure: inet_net_pton function check adjustments + + Define HAVE_INET_NET_PTON only when system's inet_net_pton function is IPv6 + capable and is not affected by the WLB-2008080064 advisory. + + HAVE_INET_NET_PTON_IPV6 is no longer defined nor used. + +- ares_init: fix detection of semicolon comments in resolv.conf + + File resolv.conf may either use a hash '#' or a semicolon ';' character as an + indication that the rest of the line is a comment. This fixes not recognizing + the semicolon as a valid comment indicator in resolv.conf. + +- version: start working on 1.7.5 + +Version 1.7.4 (8 Dec 2010) + +Daniel Stenberg (8 Dec 2010) +- release-preps: CHANGES and RELEASE-NOTES synced + +- ares_set_local_*: added in 1.7.4, not before + +Yang Tse (3 Dec 2010) +- build: provide SIZEOF_SIZE_T definition for non-configure builds + +- build: config.dos renamed to config-dos.h + +- build: provide SIZEOF_SIZE_T netware definition + +- ares_gethostbyaddr: fix compiler warning: conversion may lose significant bits + +- configure: undo using autobuilds to temporarily verify strict aliasing warnings. + +- fix compiler warning: rounding, sign extension, or loss of accuracy may result + +Daniel Stenberg (2 Dec 2010) +- [Ben Noordhuis brought this change] + + ares_parse_a_reply: fix CNAME response parsing + + Reply to a CNAME query doesn't contain addresses, causing + ares_parse_a_reply() to bail out with ARES_ENODATA + + Bug: http://groups.google.com/group/nodejs/browse_thread/thread/a1268c9ea5e9ad9b + +Yang Tse (1 Dec 2010) +- fix compiler warning: conversion may lose significant bits + +- atoi: remove atoi usage + +- ares_init: fix compiler warning: conversion may lose significant bits + +- configure: fix autoconf warning + +- inet_pton: fix compiler warning + +- configure: use autobuilds to temporarily verify strict aliasing warnings. + + Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing + rules and warnings. Given that cross-compiled targets autobuilds do not run the + test-suite, there is no risk of running code that violates strict aliasing rules + +- ares_getnameinfo: Partially revert commit 85520d66e0ac7ac73411bc25e98769a88b2f + + Upon socket address family and length validation failure return ARES_ENOTIMP + in callback again, this is the error code documented in man page and used + mostly all over the library. + +- ares_getnameinfo: Validate socket address family and length. + + Validate socket address family and that the socket address length is appropriate + for the specified family. Failure is reported with ARES_EBADFAMILY in callback. + +- ares_getnameinfo: fix two compiler warnings + +- Added another VS10 version string + +- Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'. + +- Revert commit 494274e653936335c255a47599970de3df21e7c4 + +- configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected in body + +- Fix compiler warning: array subscript has type 'char' + +- Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'. + +- Revert following commits: + 07bc7ea79509bcc9ef6e09151e81766ed00d3392 + 3392a50ea3f8573ea4b7a9d82b9833dab60cb0e9 + 9912637d32c9987719a1ea12db591aee2941891c + + The purpose of the whole patch was to silence a compiler warning triggered + with GCC 4 on file ares_process.c The specific compiler warning was + 'dereferencing type-punned pointer might break strict-aliasing rules'. + + A simpler patch will follow to equally silence the warning. + +- ares_options: reorder header inclusions to make inclusion of + ares_private.h the last included one again. + +Daniel Stenberg (12 Nov 2010) +- [Patrik Thunstrom brought this change] + + adig: fix NAPTR parsing + + I ran across a small "issue" in your adig example. + + It is simply the last part of the NAPTR record, the replacement element, + which is not a string, as currently handled in adig, but a domain name. + +- ares_save_options: assignments instead of memcpy + +- init_by_options: don't copy an empty sortlist + + If there aren't any sort items to copy, don't bother. Without this + little precaution it would do a malloc(0) which causes undefined + behaviors and is frowned upon by curl's memdebug-system. + +Guenter Knauf (3 Oct 2010) +- Minor Watcom makefile tweaks. + +Daniel Stenberg (30 Sep 2010) +- [Mike Crowe brought this change] + + Fix lookup with HOSTALIASES set. + + ares__read_line returns ARES_EOF when it reaches the end of the + file. This will happen every time when reading to the end of the + HOSTALIASES file. Unfortunately single_domain treats this error as + being fatal. + + Signed-off-by: Mike Crowe <mac@mcrowe.com> + +Ben Greear (24 Aug 2010) +- Add missing break that caused get_ares_servers to fail. + + Reported-by: Ning Dong <flintning@163.com> + Signed-off-by: Ben Greear <greearb@candelatech.com> + +Yang Tse (11 Aug 2010) +- configure: werror related adjustments + +Guenter Knauf (8 Aug 2010) +- Added copyright string to ares_version.h and make use of it in other files. + +- Block created ares_build.h for NetWare to avoid usage from other platforms. + +- Fix to overwrite default libname. + +- Some more Watcom makefile massage ... + +- Some more Watcom makefile massage ... + +Ben Greear (4 Aug 2010) +- sock-addr-storage: Detect and deal with lack of .ss_family member. + + AIX, at least, does not have sockaddr_storage.ss_family member. + Detect this in the configure logic and use proper #ifdefs in the + ares_process logic. + + Signed-off-by: Ben Greear <greearb@candelatech.com> + Tested-by: Tor Arntsen <tor@spacetec.no> + +Guenter Knauf (3 Aug 2010) +- Added Watcom makefile based on libcurl's Makefile.Watcom. + +Ben Greear (31 Jul 2010) +- typo: Fix compile bug for platforms that don't have sockaddr_storage. + + Bug was introduced by me in previous commit. + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +- Fix aliasing warning in gcc 4.4.4 (at least). + + Should be no functional change, though the code gets a bit + ugglier. + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +Daniel Stenberg (31 Jul 2010) +- ares_set_servers_csv: use ISDIGIT + + The IS*() set of macros are preferred to the regular is*() functions as + they help us avoid the most common pitfalls. + +Ben Greear (30 Jul 2010) +- cast arg to isdigit to int + + Looks like it might silence a warning on Netware build. + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +- remove all uses of uint32_t + + Previous fix forgot a few. + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +- fix signed v/s unsigned casts warning in ares_gethostbyaddr.c + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +- local-bind-fixup: Fix inet_pton warning. + + Conditionally include <arpa/inet.h> for inet_pton + headers. + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +- build: Enable compiling with -Werror. + + This helps find compile warnings because they simply break + the build. + + To use: + ./configure --enable-warnings --enable-werror + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +- ipv6: Fix some build issues related to the local-bind feature. + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +Guenter Knauf (29 Jul 2010) +- Replaced uint32_t with unsigned int to fix broken builds on a couple of platforms. + +Daniel Stenberg (18 Jul 2010) +- [Ben Greear brought this change] + + local-bind: Support binding to local interface/IPs + + Add 3 new functions to set the local binding for the out-going + socket connection, and add ares_set_servers_csv() to set a + list of servers at once as a comma-separated string. + + Signed-off-by: Ben Greear <greearb@candelatech.com> + +- version: now start on 1.7.4 + +- [Andrew C. Morrow brought this change] + + fix memory leak in ares_getnameinfo + +Version 1.7.3 (11 Jun 2010) + +Daniel Stenberg (11 Jun 2010) +- changelogs: updated for 1.7.3 + +- [BogDan Vatra brought this change] + + init: allow c-ares to work on Android OS + +- changelog: fill in the 1.7.2 changes + +- added another pdf to ignore + +Yang Tse (11 Jun 2010) +- add ares_parse_mx_reply.c to VS dsp file + +Daniel Stenberg (10 Jun 2010) +- tarball: add $(CSOURCES) $(HHEADERS) to EXTRA_DIST + + It's not clear to me why we need this, but we apparently may + otherwise not get all files bundled in the dist tarball. + +- version: start working on 1.7.3 + +Version 1.7.2 (10 Jun 2010) + +Daniel Stenberg (10 Jun 2010) +- RELEASE-NOTES: 1.7.2 details added + +- [Jakub Hrozek brought this change] + + ares_init: Last, not first instance of domain or search should win + +- style: make code less than 80 columns wide + +Yang Tse (31 May 2010) +- [Tor Arntsen brought this change] + + improve alternative definition of bool to use enum instead of unsigned char + +- fix VS2010 compiler warnings + +Daniel Stenberg (18 Apr 2010) +- [Jérémy Lal brought this change] + + added ares_parse_mx_reply + +- repair the file mode + +- remove all $Id$ lines + +- remove all .cvsignore files + +- spell fix + + reported by Gregor Jasny on the mailing list + +- [Peter Pentchev brought this change] + + Fix a couple of typos and grammar nits. + +- ignore the GPG signature files too + +- start the journey towards 1.7.2 + +- no longer CVS tagging + +- ignore generated PDFs + +Version 1.7.1 (23 Mar 2010) + +Daniel Stenberg (23 Mar 2010) +- 1.7.1 + +- made README the primary readme file + + ... and did README.cares to contain a historic reason etc. + +- s/CVS/git + +- git now, not CVS + +- ignore lots of generated files + +- [Daniel Johnson brought this change] + + Fix warnings for clang + +Yang Tse (17 Mar 2010) +- replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing + +- update outdated serial number + +- fix compiler warning + +- watt32 compilation fix + +- Added another VS10 version string + +- fix line break + +- removed usage of 's6_addr', fixing compilation issue triggered with no + longer using 'in6_addr' but only our 'ares_in6_addr' struct + +Daniel Stenberg (5 Mar 2010) +- Daniel Johnson provided fixes for building with the clang compiler + +Yang Tse (5 Mar 2010) +- Added IPv6 name servers support + +Gisle Vanem (5 Mar 2010) +- Ops!. Readded ares_nowarn.h. + +- Added ares_nowarn.c. + +Yang Tse (28 Feb 2010) +- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems + +- Added ares_nowarn.* to VC6 project file + +- Added SIZEOF_INT definition + +- fix compiler warning + +- fix compiler warning + +- fix compiler warning + +Daniel Stenberg (17 Feb 2010) +- ares_reinit() + + - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much + like the res_init() resolver function offers + +- - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't + check for broken connections like ares_process() did. Based on that, I + merged the two functions into a single generic one with two front-ends. + +Yang Tse (30 Dec 2009) +- VMS specific preprocessor symbol checking adjustments + +- Mention last changes + +- - Fix configure_socket() to use ares_socket_t instead of int data type. + +- - Where run-time error checks enabling compiler option /GZ was used it is now + replaced with equivalent /RTCsu for Visual Studio 2003 and newer versions. + + - Compiler option /GX is now replaced with equivalent /EHsc for all versions. + +- - Ingmar Runge noticed that Windows config-win32.h configuration file + did not include a definition for HAVE_CLOSESOCKET which resulted in + function close() being inappropriately used to close sockets. + +Daniel Stenberg (30 Nov 2009) +- start working on 1.7.1 + +Version 1.7.0 (27 Nov 2009) + +Yang Tse (27 Nov 2009) +- Preserve empty line following last target + +- - Larry Lansing fixed ares_parse_srv_reply to properly parse replies + which might contain non-SRV answers, skipping over potential non-SRV + ones such as CNAMEs. + +- When using icc, compile with -fpic and link with intel dynamic libraries. + +- Added 'currently' in italics to insist on transient situation. + +- Fix language + +- Daniel wants upcoming release to be 1.7.0 + +- Mention last changes + +- - Removed from external interface preprocessor symbol definition for + CARES_HAVE_ARES_FREE_DATA. Current functionality of ares_free_data() + makes it unnecessary. + +- Added README.msvc + +- Changed c-ares naming conventions when using MSVC as described in README.msvc + +- - Mention other recent changes + +- - Jakub Hrozek renamed addrttl and addr6ttl structs to ares_addrttl and + ares_addr6ttl in order to prevent name space pollution, along with + necessary changes to code base and man pages.This change does not break + ABI, there is no need to recompile existing applications. But existing + applications using these structs with the old name will need source code + adjustments when recompiled using c-ares 1.6.1. + +- - Jakub Hrozek fixed more function prototypes in man pages to sync them + with the ones declared in ares.h + +- Make configure remove the ares_build.h file included in distribution tarballs. + +- Fix macro redefinition. + +- Fix name space pollution. + +- Allow using different extra import libraries for debug and release builds. + +- Add manifest stuff to msvc makefile + +- Sync man page with reality + +- Add missing external API decoration for ares_set_socket_callback() + +- Add ares_free_data() man page. + +- - Provide in external interface preprocessor symbol definitions for + CARES_HAVE_ARES_FREE_DATA as an indication of function availability. + +- Remove typecast + +- Fix comment + +- Add ares_data.c and ares_data.h + +- Jakub Hrozek modified ares_parse_srv_reply() and ares_parse_txt_reply() API + to return a linked lists of results. These were also modified to internally + use the ares_data memory struct and as such its result must be free'ed with + ares_free_data(). + +- Initial support for the generic ares_free_data() function that will allow + applications to free memory allocated and returned by some c-ares funtions. + +- Make usage of calloc()'s arguments consistent with rest of code base + +- workaround icc 9.1 optimizer issue + +- Add icc fvisibility bug test + +- Fix icc 9.0 compiler warning: external definition with no prior declaration + +- Fix three var names + +- Add check for assert.h header file + +- getaddrinfo is fully thread safe on solaris versions which + implement the function even when h_errno is not a macro. + + The h_errno macro test now only done on systems for which there + is no hard coded knowledge about getaddrinfo's thread safeness. + +- Remove files generated on previous buildconf/configure run + +- Remove enable-thread / disable-thread configure option. These were only placebo + options. The library is always built as thread safe as possible on every system. + +- Refactor how preprocessor symbol _THREAD_SAFE definition is done. + +- Assume that getaddrinfo is thread safe, unless hard coded + knowledge says the contrary or h_errno is not defined. + +- Related with the threadsafe capability of getaddrinfo: + + - Constantine Sapuntzakis reported that Darwin 6.0 a.k.a. MAC OS X 10.2 + and newer have a threadsafe getaddrinfo. + + - Fix Dragonfly BSD triplet detection. + + - In case the hard-coded knowledge says that getaddrinfo is threadsafe, + an additional check is done to verify that h_errno is also defined. + If h_errno isn't defined, we finally assume that it isn't threadsafe. + Jamie Lokier provided the inspiration for this extra check. + +- AIX 5.2 and newer have threadsafe getaddrinfo. + + Add some comments to better understand what the regex's pretend to achieve. + +- HP-UX 11.11 and later have threadsafe getaddrinfo + +- Check if getaddrinfo is threadsafe when function check allows it to be used + +- Renamed fpGetNetworkParams and fpSystemFunction036 to avoid namespace pollution with static library + +- Add kernel32.lib + +- Mention last changes + +- Reinstate copyright symbol lost in previous commit + +- Make some strings different in resource file for debug or release builds + +- Ignore more subdirs + +- Fix compiler warning: conditional expression is constant + +- Sync linker and resource compiler options with Makefile.msvc + +- Follow Makefile.msvc subdirectory naming scheme, and sync compiler options + +- Updated MSVC makefile that allows building dynamic and static + c-ares libraries in debug and release flavours. + + Additionally each of the three sample programs is built against + each of the four possible c-ares libraries, generating all this + a total number of 12 executables and 4 libraries. + +- Test for USE_WINSOCK since it is more restrictive than WIN32 + +- Make header inclusion depend on HAVE_*_H definition + +- Remove unneeded preprocessor directives + +- Adjust c-ares include paths for memory tracking enabled (--enable-curldebug) builds + +- source files used by sample programs + +- Renamed c-ares setup.h to ares_setup.h + +- Adjust include paths to take in account that currently: + + c-ares with --enable-curldebug uses memdebug.h from libcurl's lib subdirectory. + + memdebug.h needs access to libcurl's setup.h from libcurl's lib subdirectory + and also needs access to libcurl's generated curl_config.h + +- Undo old temporary change once used for testing purposes + +- Mention many changes + +- Mention --enable-symbol-hiding configure option + +- Symbol hiding configure options renamed to the hopefully less ambiguous + --enable-symbol-hiding and --disable-symbol-hiding as well as related + macro names and some internal variables used for them. + + Related configuration file preprocessor symbols named to + CARES_SYMBOL_HIDING and CARES_SYMBOL_SCOPE_EXTERN. + +- Header inclusion depending on HAVE_* symbol. + Fix two typos. + +- Comparison of the Initial revision of this file with ares_parse_a_reply.c + shows that this one is actually a modified copy of ares_parse_a_reply.c. + + In order to comply with ares_parse_a_reply.c's M.I.T. license, the old + 1998 M.I.T. copyright notice is now also preserved in this file the same + as it is done in other ares_parse_*.c files. + +- Add CVS Id tag. + Fix identation of some license lines. + +- Add CVS Id tag. + +- Fix comment + +- In no particular order, changed/fixed all of the following in + ares_parse_txt_reply() current version: + + - Fixed a couple of potential double free's. + + - Fixed memory leaks upon out of memory condition. + + - Fixed pointer arithmetic. + + - Setting ntxtreply to zero upon entry for all failure cases. + + - Changed data type to size_t for variables substr_len, str_len and + the length member of ares_txt_reply struct. + + - Avoided a couple of memcpy() calls. + + - Changed i data type to unsigned int to prevent compiler warnings. + + - Adjusted a comment. + + - Use ARES_SUCCESS literal for successfull completion. + + - Added CVS Id tag. + +- Add c-ares DLL resource file to distribution archive + +- ignore files + +- Empty subdir -* October 29, 2009 (Yang Tse) - Updated MSVC 6.0 workspace and project files that allows building dynamic and static c-ares libraries in debug and release flavours. + Additionally each of the three sample programs is built against each of the four possible c-ares libraries, generating all this a total number of 12 executables and 4 libraries. -* October 28, 2009 (Yang Tse) +Daniel Stenberg (29 Oct 2009) +- no need to check for NULL pointers before dereferencing, as the pointers + MUST be valid and they are dereferenced further down in the function + unconditionally! + +- shorten the descriptions somewhat + +- update to the new struct name + +- Jakub Hrozek added ares_parse_txt_reply() for TXT parsing + +- use 'ares_srv_reply' for proper name-spacing + +Yang Tse (29 Oct 2009) +- Add reference for ares_parse_srv_reply.pdf + +- Add reference for ares_parse_srv_reply docs + +- External API function linkage decoration adjustment + +- External API function linkage decoration adjustment + - Initial step towards the ability to reduce c-ares exported symbols - when built as a shared library based on the 'visibility' attribute - for GNUC and Intel compilers and based on __global for Sun compilers, - taking also in account __declspec function decoration for Win32 and - Symbian DLL's. + based on the 'visibility' attribute for GNUC and __global for Sun + compilers, taking also in account __declspec function decoration + for Win32 and Symbian DLL's. + + Introducing configure options --enable-hidden-symbols and + --disable-hidden-symbols following libcurl's naming. -* October 27, 2009 (Yang Tse) -- Fixed Pelles C Win32 target compilation issues. +- Fix comment + +- Fix spelling + +- Fix Pelles C Win32 target compilation issues -* October 23, 2009 (Yang Tse) - John Engelhart noticed an unreleased problem relative to a duplicate ARES_ECANCELLED error code value and missing error code description. -* October 7, 2009 (Yang Tse) -- Overhauled ares__get_hostent() Fixing out of bounds memory overwrite - triggered with malformed /etc/hosts file. Improving parsing of /etc/hosts - file. Validating requested address family. Ensuring that failures always - return a NULL pointer. Adjusting header inclusions. +- Fix compiler warning: local variable may be used without having been initialized + +- Use *_CHECK_PATH_SEPARATOR_REQUIRED to ensure that *_CHECK_PATH_SEPARATOR + is only expanded and included once in the configure script. + +- Our _AS_PATH_SEPARATOR_PREPARE override is now m4_defun'd instead of m4_define'd + due to autoconf 2.64 m4_require'ing it in _AS_SHELL_SANITIZE indirectly through + _AS_PATH_WALK. + +- Fix compiler warning: argument is incompatible with corresponding format string conversion -* October 6, 2009 (Yang Tse) -- Fix ssize_t redefinition errors on WIN64 reported by Alexey Simak. +- Fix potential out-of-bounds read -* September 29, 2009 (Yang Tse) -- Make configure script also check if _REENTRANT definition is required to +- Fix compiler warning: loop without body + +- Fix compiler warning + +- Fix compiler warning + +- Fix compiler warning + +- Fix compiler warning: addition result could be truncated before cast to bigger sized type + +- Overhauled ares__get_hostent() + + - Fixing out of bounds memory overwrite triggered with malformed /etc/hosts file. + - Improving parsing of /etc/hosts file. + - Validating requested address family. + - Ensuring that failures always return a NULL pointer. + - Adjusting header inclusions. + +- Fix ssize_t redefinition errors on WIN64 reported by Alexey Simak + +- more files to ignore + +- Check if _REENTRANT definition is required to make errno available as a preprocessor macro. -* September 7, 2009 (Yang Tse) -- Add T_SRV portability check to ares_parse_srv_reply.c +- Attempt to silence bogus compiler warning: "Potential null pointer dereference" + +- ignore more files + +Gisle Vanem (7 Sep 2009) +- Suppress warnings about unused prototypes in Watt32 and Win32 programs. + +- Update email address. + +- Update my email address. Add ares_config.h as dependency for 'make depend'. + +Yang Tse (6 Sep 2009) +- T_SRV portability check + +Gunter Knauf (5 Sep 2009) +- changed includes to match style how we do with all other *.c files. + +- changed u_int16_t to unsigned short because it is the only place within ares and curl where such a type would be used; + also it broke many autobuilds. We should probably introduce an ares_port_t if we want to use a type here. + +Gisle Vanem (5 Sep 2009) +- Replace 'uint16_t' with 'u_int16_t' since the latter is used in ares.h. + +- Added 'ares_parse_srv_reply.obj'. Added definition of 'u_int16_t'. This is I don't like; we should not depend on such non-universal types in a public header. But this is just a quick fix. + +Daniel Stenberg (4 Sep 2009) +- - Jakub Hrozek added ares_parse_srv_reply() for SRV parsing + +Steinar H. Gunderson (27 Aug 2009) +- Support lookup of IPv4 literals in ares_gethostbyname(), even when the address family is set to AF_INET6. + +Gisle Vanem (3 Aug 2009) +- Remove call to LoadLibrary(). (leftover from debugging). + +- Fix bad sentence. + +Daniel Stenberg (3 Aug 2009) +- - Timo Teras changed the reason code used in the resolve callback done when + ares_cancel() is used, to be ARES_ECANCELLED instead of ARES_ETIMEOUT to + better allow the callback to know what's happening. + +- - Joshua Kwan fixed the init routine to fill in the defaults for stuff that + fails to get inited by other means. This fixes a case of when the c-ares + init fails when internet access is fone. -* 4 Sep 2009 (Daniel Stenberg) -- Jakub Hrozek added ares_parse_srv_reply() for SRV parsing +Gunter Knauf (16 Jul 2009) +- test if adding ../lib to includes can fix the current break ... -* 3 Aug 2009 (Daniel Stenberg) -- Joshua Kwan fixed the init routine to fill in the defaults for stuff that - fails to get inited by other means. This fixes a case of when the c-ares - init fails when internet access is fone. +- renamed generated config.h to ares_config.h in order to avoid clashes when libcurl is used with other projects which also have a config.h. -- Timo Teras changed the reason code used in the resolve callback done when - ares_cancel() is used, to be ARES_ECANCELLED instead of ARES_ETIMEOUT to - better allow the callback to know what's happening. +Yang Tse (21 Jun 2009) +- Refactor how libraries are checked for connect() function, follow-up. -* 14 Jul 2009 (Guenter Knauf) -- renamed generated config.h to ares_config.h to avoid any future clashes - with config.h from other projects. +- Refactor how libraries are checked for connect() function, + and check for connect() as it is done for other functions. -* June 20 2009 (Yang Tse) -- Refactor how libraries are checked for connect() function in configure - script and check for connect() as it is done for other functions. +Gisle Vanem (20 Jun 2009) +- Remove unneeded defines. -* June 19 2009 (Yang Tse) -- Make sclose() function-like macro definition used to close a socket, +- Use select_s() and not select(). + +Yang Tse (19 Jun 2009) +- sclose() function-like macro definition used to close a socket, now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL - config file preprocessor definitions + config file preprocessor definitions. + +- add CloseSocket camel case function check + +- check for socket() and closesocket() as it is done for other functions + +- Remove HAVE_CONFIG_H definition from here, + CFLAGS from common.dj already defines it. + +- initial step towards decoupling c-ares from libcurl for DOS + +- don't ignore these subdirs, they must be removed first + +- Remove DEBUGBUILD symbol definition, is not required for programs using the library. + +- DEBUGBUILD symbol definition for debug builds + +- ignore some subdirs + +- fix comment + +- Try to make more clear that --enable-curldebug has nothing to do with --enable-debug for this library. + +- Revert last change, it is inappropriate. + +Gisle Vanem (12 Jun 2009) +- Replace CURLDEBUG with DEBUGBUILD. + +Yang Tse (11 Jun 2009) +- when running automake copy missing files instead of symlinking them + +- Adjusted to take in account that... + + With the curl memory tracking feature decoupled from the debug build feature, + CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows: + + CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug) + + DEBUGBUILD used for debug enabled specific code (--enable-debug) + +- c-ares' --enable-debug --enable-curldebug decoupling follow-up + +- mention last changes + +- Remove buildconf.bat from release and daily snapshot archives. + + buildconf.bat is only for CVS tree builds. + +- Ensure that buildconf.bat does nothing unless it is used with a CVS checkout. + +- CVS-INFO file only present in CVS tree, never in release nor daily snapshot + archives. Used as a sentinel file in buildconf.bat to differentiate CVS builds. + +Gisle Vanem (8 Jun 2009) +- Update comment about "ML". Removed "-D_USE_32BIT_TIME_T" (not a requirement). + +Yang Tse (8 Jun 2009) +- just comment it out -* June 18 2009 (Yang Tse) -- Add CloseSocket camel case function check for configure script. +- For debugging purposes... + + Disable the '-export-symbols-regex' to discard this as the origin + of link failures related with shared libraries and non-GNU linkers. -* June 17 2009 (Yang Tse) -- Check for socket() and closesocket() as it is done for other functions - in configure script. +- c-ares Makefile.am back to using $(top_builddir) for *_LDADD -* June 11 2009 (Yang Tse) -- Modified buildconf so that when automake runs it copies missing files - instead of symlinking them. +- c-ares' -no-undefined and --enable-curldebug adjustments -* June 8 2009 (Yang Tse) -- Removed buildconf.bat from release and daily snapshot archives. This - file is only for CVS tree checkout builds. +- Use relative path to built c-ares tree libtool library -* May 26 2009 (Yang Tse) -- Added --enable-curldebug configure option to enable and disable building - with the low-level curl debug memory tracking 'feature' to allow decoupled - setting from --enable-debug, allowing again to build c-ares independently - out of the CVS tree. +- John E. Malmberg noticed that the configure script was failing to detect the + timeval struct on VMS when building with _XOPEN_SOURCE_EXTENDED undefined due + to definition taking place in socket.h instead of time.h - For the c-ares library option --enable-debug enables debug build features - which are _not_ related with memory tracking. For the c-ares library when - --enable-debug is given it does not enable the memory tracking feature. If - you wish to enable the curl debug memory tracking you must use configure - option --enable-curldebug explicitily to do so. +- Fix compiler warning: out of bound access - Internally, definition of preprocessor symbol DEBUGBUILD restricts code - which is only compiled for debug enabled builds. And symbol CURLDEBUG is - used to differentiate code which is _only_ used for memory tracking. +- fix compilation on AIX - Make ares_init(), ares_dup() and ares_init_options() fail returning - ARES_ENOTINITIALIZED if library initialization has not been performed - calling ares_library_init(). +- c-ares' --enable-curldebug adjustments -* May 20 2009 (Yang Tse) -- Added ares_library_init() and ares_library_cleanup() man pages. +- Remove temporarily introduced memory leak. -* May 19 2009 (Yang Tse) -- Introduced ares_library_init() and ares_library_cleanup() functions. +- Temporarily introduce a memory leak to verify curl debug memory tracking works. - This is an API and ABI break for Win32/64 systems. Non-Win32/64 build targets - using c-ares 1.7.0 can still survive without calling these functions. Read all - the details on ares_library_init(3) and ares_library_cleanup(3) man pages that - are included. +- Allow curl debug memory tracking when building a shared library on + systems which support external, undefined, symbols in shared libraries. - curl/libcurl 7.19.5 is fully compatible with c-ares 1.7.0 on all systems. +Daniel Stenberg (26 May 2009) +- language fix - In order to use c-ares 1.7.0 with curl/libcurl on Win32/64 systems it is - required that curl/libcurl is 7.19.5 or newer. In other words, it is not - possible on Win32/64 to use c-ares 1.7.0 with a curl/libcurl version less - than 7.19.5 +Yang Tse (26 May 2009) +- Make ares_init(), ares_dup() and ares_init_options() return ARES_ENOTINITIALIZED + if library initialization has not been performed calling ares_library_init(). -* May 11 2009 (Daniel Stenberg) -- Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to - only expose functions starting with ares_. +- c-ares's --enable-curldebug configure option decoupled from c-ares's --enable-debug + +- Prevent copying 'sourced' manpages for build targets that don't use them. + +Daniel Stenberg (23 May 2009) +- minor edits + +Yang Tse (21 May 2009) +- Include .pdf versions of c-ares man pages in distribution tarball. + +- Allow generation of .html and .pdf versions of c-ares man pages. + +Gisle Vanem (21 May 2009) +- $(OBJ_DIR)/ares_getopt.o must be cleaned explicitly. + +Yang Tse (20 May 2009) +- Mention last changes + +- Initial ares_library_cleanup(3) man page + +- Update man page + +- Update man page + +- Initial ares_library_init(3) man page attempt + +- Force revision update, to force CVS to update the $Id date string format + +- Add same copyright notice as other c-ares files + +- Fix case + +- Remove run-time requirement for advapi32.dll since + c-ares can work even with no advapi32.dll at all. + +- Intentionally avoid checking if the address of SystemFunction036, a.k.a. + RtlGenRandom, has been located or not. This function is only available on + WinXP and later. When unavailable c-ares uses portable rand() function. + +- - Provide in external interface preprocessor symbol definitions for + CARES_HAVE_ARES_LIBRARY_INIT and CARES_HAVE_ARES_LIBRARY_CLEANUP + to ease the use of new capabilities. + + - Move ares_version() prototype to ares.h + +- Introduction of ares_library_init() and ares_library_cleanup() + +- Introduction of ares_library_init() and ares_library_cleanup() + +- remove outdated comment + +- Fix preprocessor conditional expression + +- fiX *__SOCKLEN_T definitions for remaining targets + +- *__SOCKLEN_T definitions for OS400 already fixed + +- fIX *__SOCKLEN_T definitions for SYMBIAN32 and VMS targets + +Daniel Stenberg (11 May 2009) +- - Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to + only expose functions starting with ares_. + +Yang Tse (11 May 2009) +- Remove experimental check. Currently there's no need for it. -* May 7 2009 (Yang Tse) - Fix an m4 overquoting triggering a spurious 'AS_TR_CPP' symbol definition attempt in generated config.h -* May 2 2009 (Yang Tse) -- Use a build-time configured ares_socklen_t data type instead of socklen_t. +- Proper naming for the experimental compiler test and moved to *-compilers.m4 + +- Moved *_CHECK_COMPILER_HALT_ON_ERROR and *_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE to *-compilers.m4 along with other *_CHECK_COMPILER_* + +- fIX *__SOCKLEN_T definitions for OS400 and generic GCC targets + +- fIX *__SOCKLEN_T definitions for MVS and 370 targets + +- fIX *__SOCKLEN_T definitions for several Windows target tool-chains + +- HP-UX's X/Open network library requirement check follow-up + +- HP-UX's X/Open network library requirement check follow-up + +- Use build-time configured ares_socklen_t instead of socklen_t + +- David McCreedy's "TPF-platform specific changes to various files" patch follow-up + +Daniel Stenberg (1 May 2009) +- s/libcurl/c-ares + +- version number typo fix + +Yang Tse (1 May 2009) +- David McCreedy's "TPF-platform specific changes to various files" patch + +- Check definition of _XOPEN_SOURCE_EXTENDED with the compiler + +- Check if X/Open network library is required + +- cope with ares_build.h and ares_rules.h follow-up + +- Added some notes regarding ares_build.h + +- fix EOL + +- fix EOL + +- cope with ares_build.h and ares_rules.h + +- buildconf.bat for CVS-tree c-ares + +- Use 'unsigned int' instead of size_t attempting to avoid header inclusion + +- NetWare LibC's getpeername() third argument data type is size_t + +- Remove temporary debug tracing for ares_socklen_t Windows targets + +- ares_socklen_t follow-up + +- ares_build.h Windows follow-up + +- Add temporary debug tracing for ares_socklen_t Windows targets + +- ares_build.h NetWare follow-up + +- ares_build.h NetWare attempt + +- Initial step towards a configure time ares_socklen_t definition + +- ignore stamp-h* + +- Added CARES_INCLUDES_SYS_TYPES + +- Initial step towards a configure time curl_socklen_t definition + +- avoid use of alloca() -* April 21 2009 (Yang Tse) - Moved potential inclusion of system's malloc.h and memory.h header files to setup_once.h. Inclusion of each header file is based on the definition of NEED_MALLOC_H and NEED_MEMORY_H respectively. -* March 11 2009 (Yang Tse) -- Japheth Cleaver fixed acountry.c replacing u_long with unsigned long. +- ignore + +Gisle Vanem (18 Apr 2009) +- Added '-DHAVE_LIMITS_H'. + +Yang Tse (17 Apr 2009) +- remove compiler options used while debugging the icc 9.1 optimizer issue + +- moved HAVE_LIMITS_H to common defines + +- Set HP-UX compiler warning level back to the one that exposes + the socklen_t issue on this platform. + +- HAVE_LIMITS_H definition for NetWare CLIB + +- use HAVE_LIMITS_H symbol to protect limits.h inclusion + +- fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value + +- s/u_long/unsigned long/ + +- Do not halt compilation when using VS2008 to build a Windows 2000 target + +- ignore -* February 20 2009 (Yang Tse) -- Do not halt compilation when using VS2008 to build a Windows 2000 target. +Phil Blundell (3 Feb 2009) +- * February 3 2009 (Phil Blundell) + - If the server returns garbage or nothing at all in response to an AAAA query, + go on and ask for A records anyway. -* February 3 2009 (Phil Blundell) -- If the server returns garbage or nothing at all in response to an AAAA query, - go on and ask for A records anyway. +Daniel Stenberg (31 Jan 2009) +- - ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving + either AF_INET6 or AF_INET. It works by accepting any of the looksups in the + hosts file, and it resolves the AAAA field with a fallback to A. -* January 31 2009 (Daniel Stenberg) -- ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving - either AF_INET6 or AF_INET. It works by accepting any of the looksups in the - hosts file, and it resolves the AAAA field with a fallback to A. +Gisle Vanem (18 Jan 2009) +- fopen() returns error in 'errno' even on Windows. + So don't use ERRNO (GetLastError()). Trimmed trailing + blanks. -* January 14 2009 (Daniel Stenberg) -- ares.h no longer uses the HAVE_STRUCT_IN6_ADDR define check, but instead it - now declares the private struct ares_in6_addr for all systems instead of - relying on one possibly not present in the system. +- Constified some arguments in local functions. -* January 13 2009 (Phil Blundell) -- ares__send_query() now varies the retry timeout pseudo-randomly to avoid - packet storms when several queries were started at the same time. +Daniel Stenberg (14 Jan 2009) +- - ares.h no longer uses the HAVE_STRUCT_IN6_ADDR define check, but instead it + now declares the private struct ares_in6_addr for all systems instead of + relying on one possibly not present in the system. -* January 11 2009 (Daniel Stenberg) -- Phil Blundell added the internal function ares__expand_name_for_response() - that is now used by the ares_parse_*_reply() functions instead of the - ares_expand_name() simply to easier return ARES_EBADRESP for the cases where - the name expansion fails as in responses that really isn't expected. +Phil Blundell (13 Jan 2009) +- - ares__send_query() now varies the retry timeout pseudo-randomly to avoid + packet storms when several queries were started at the same time. -Version 1.6.0 (Dec 9, 2008) +Daniel Stenberg (11 Jan 2009) +- - Phil Blundell added the internal function ares__expand_name_for_response() + that is now used by the ares_parse_*_reply() functions instead of the + ares_expand_name() simply to easier return ARES_EBADRESP for the cases where + the name expansion fails as in responses that really isn't expected. -* December 9 2008 (Gisle Vanem) +Gunter Knauf (30 Dec 2008) +- added HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID to ares Makefile.netware and sync'd with other Makefile.netware. - Fixes for Win32 targets using the Watt-32 tcp/ip stack. +Daniel Stenberg (9 Dec 2008) +- use the new URL -* Dec 4 2008 (Daniel Stenberg) +- start over on the 1.6.1 release... - Gregor Jasny provided the patch that introduces ares_set_socket_callback(), +Version 1.6.0 (9 Dec 2008) + +Daniel Stenberg (9 Dec 2008) +- add space + +Gisle Vanem (9 Dec 2008) +- Fix for Win32 targets using Watt-32. + +Dan Fandrich (9 Dec 2008) +- C89 compilers (like Minix' ACK) only need to handle 31 functions arguments + so split a long sprintf into two calls to get below that number. + +Gisle Vanem (8 Dec 2008) +- Added needed defines for Watt-32 on Windows. + +- Undefine 'optarg', 'optind' and 'opterr' when using Watt-32 + (to get correct linkage on Windows). + +- ares_writev() shall not be exported when using Watt-32 (has writev). + Added _USE_32BIT_TIME_T to avoid runtime warning. Applies to + VC-2008+ only. + +- Removed unneeded defines HAVE_SIGNAL_H, HAVE_SIG_ATOMIC_T, + RETSIGTYPE and HAVE_PROCESS_H. + +Daniel Stenberg (4 Dec 2008) +- the initial version of the ares_set_socket_callback man page + +- Gregor Jasny provided the patch that introduces ares_set_socket_callback(), and I edited it to also get duped by ares_dup(). -* Dec 3 2008 (Daniel Stenberg) +Dan Fandrich (4 Dec 2008) +- Bring the sys/include.h include test in line with curl's. - API changes: +Daniel Stenberg (3 Dec 2008) +- Let's not call ares_save_options() deprecated just yet - I made sure the public ares_config struct looks like before and yet it - supports the ROTATE option thanks to c-ares now storing the "optmask" - internally. Thus we should be ABI compatible with the past release(s) - now. My efforts mentioned below should not break backwards ABI compliance. +- Introduce ares_dup(3) and new thoughts about API/ABI and how to move forwards. + Also discussed on the ml. - Here's how I suggest we proceed with the API: +Dan Fandrich (2 Dec 2008) +- Make sure sys/socket.h is included before netinet/in.h (required by + OpenWatcom C, and condoned by SUS) - ares_init() will be primary "channel creator" function. +Daniel Stenberg (1 Dec 2008) +- minor indent fix - ares_init_options() will continue to work exactly like now and before. For - starters, it will be the (only) way to set the existing options. +- Convert the public config struct to the same binary size/construct as in the + latest releases to remain ABI compatible. - ares_save_options() will continue to work like today, but will ONLY save - options that you can set today (including ARES_OPT_ROTATE actually) but new - options that we add may not be saved with this. +Gisle Vanem (29 Nov 2008) +- Added '-DHAVE_GETHOSTNAME'. - Instead we introduce: +Dan Fandrich (29 Nov 2008) +- Make sure sys/socket.h is included before netinet/in.h (required by + OpenWatcom C) - ares_dup() that instead can make a new channel and clone the config used - from an existing channel. It will then clone all config options, including - future new things we add. +- Netware has gethostname() - ares_set_*() style functions that set (new) config options. As a start we - simply add these for new functionality, but over time we can also introduce - them for existing "struct ares_options" so that we can eventually deprecate - the two ares_*_options() functions. +- Fixed a couple of typos - ares_get_*() style functions for extracting info from a channel handle that - should be used instead of ares_save_options(). +- Don't tweak the HAVE_* macros when using autoconf -* Nov 26 2008 (Yang Tse) -- Brad Spencer provided changes to allow buildconf to work on OS X. +- Make use of gethostname() conditional on it being available + +- Only set TCP_NODELAY when it exists +Daniel Stenberg (28 Nov 2008) +- updated with changes, preparing for a release soon + +Yang Tse (26 Nov 2008) - Gerald Combs fixed a bug in ares_parse_ptr_reply() which would cause a buffer to shrink instead of expand if a reply contained 8 or more records. -* Nov 25 2008 (Yang Tse) +- Brad Spencer provided changes to allow buildconf to work on OS X. + - In preparation for the upcomming IPv6 nameservers patch, the internal ares_addr union is now changed into an internal struct which also holds the address family. -* Nov 19 2008 (Daniel Stenberg) -- Brad Spencer brought the new function ares_gethostbyname_file() which simply - resolves a host name from the given file, using the regular hosts syntax. +Dan Fandrich (20 Nov 2008) +- Make checking for struct ifreq a prerequisite for setting + HAVE_IOCTL_SIOCGIFADDR since it's needed to use SIOCGIFADDR and Watcom C + doesn't currently define it. + +Daniel Stenberg (20 Nov 2008) +- use unsigned short better intead of mixing with ints to prevent compiler + warnings + +- please the picky compilers by staying with short as the data we get is short + only + +- - Brad Spencer brought the new function ares_gethostbyname_file() which simply + resolves a host name from the given file, using the regular hosts syntax. + +Yang Tse (19 Nov 2008) +- user provided PATH_SEPARATOR always overrides auto-detected one + +- attempting to keep lines below 80 chars + +- provide a common PATH_SEPARATOR check method which is required by + upcomming work to support the broadest range of Autoconf versions + +- check for gethostbyaddr and gethostbyname as it is done for other functions + +- Make configure script check if ioctl with the SIOCGIFADDR command can be + used, and define HAVE_IOCTL_SIOCGIFADDR if appropriate. -* Nov 1 2008 (Daniel Stenberg) -- Carlo Contavalli added support for the glibc "rotate" option, as documented - in man resolv.conf: +- fix leftover from previous commit - causes round robin selection of nameservers from among those listed. This - has the effect of spreading the query load among all listed servers, rather - than having all clients try the first listed server first every time. +- fix inet_pton() runtime configure check - You can enable it with ARES_OPT_ROTATE +- trim down configure script size -* Oct 21 2008 (Yang Tse) - Charles Hardin added handling of EINPROGRESS for UDP connects. +Daniel Stenberg (15 Nov 2008) +- Fixed an OOM condition reported by Jim Meyering -* Oct 18 2008 (Daniel Stenberg) - Charles Hardin made adig support a regular numerical dotted IP address for the +Yang Tse (14 Nov 2008) +- fix typo affecting inclusion of <arpa/inet.h> in configure + checks for inet_ntoa_r() inet_ntop() and inet_pton() + +- #include <string.h> in the getaddrinfo() runtime check for the memset() prototype + +- fix symbol definition check for fcntl.h inclusion + +- Refactor configure script detection of functions used to set sockets into + non-blocking mode, and decouple function detection from function capability. + +Daniel Stenberg (1 Nov 2008) +- Added a TODO file to list things we want changed, added or fixed. + +- - Carlo Contavalli added support for the glibc "rotate" option, as documented + in man resolv.conf: + + causes round robin selection of nameservers from among those listed. This + has the effect of spreading the query load among all listed servers, rather + than having all clients try the first listed server first every time. + + You can enable it with ARES_OPT_ROTATE + +Yang Tse (1 Nov 2008) +- Adjust WIN32 freeaddrinfo, getaddrinfo and getnameinfo availability + +- WIN32 availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite + convoluted, compiler dependant and in some cases even build target dependat. + +- check for freeaddrinfo() at configuration phase + +- update aclocal file serial number + +- remove verification of the freeability of the addrinfo struct pointer members + +- fix comment + +- make CHECK_FUNC_GETADDRINFO_UNFREEABLE_AI_ADDR + and CHECK_FUNC_GETADDRINFO_UNFREEABLE_AI_CANONNAME + internal to CHECK_FUNC_GETADDRINFO + +- fix leftover + +- Initial attempt to detect at configuration time if the getaddrinfo() + function returns an addrinfo with an unfreeable ai_canonname member ptr. + +- Initial attempt to detect at configuration time if the getaddrinfo() + function returns an addrinfo with an unfreeable ai_addr member ptr. + +- icc adjustments: + + Select ANSI C89 dialect plus GNU extensions, again. + +- some more temporary magic for the icc seg-fault issue + +- icc permanent adjustment: + + Select precise floating-point model, otherwise doubles are less than 64-bit wide + + icc test adjustment: + + Select c89 dialect + +- icc adjustments: + + Enable more icc warnings. + + Optimization disabling options used only for icc 9.1 + +- #include <stdlib.h> for exit() prototype + +- some more temporary magic for the icc seg-fault issue + +- remove from configure.ac temporary magic for the icc seg-fault issue + +- some more temporary magic for the icc seg-fault issue + +- Charles Hardin patch: + + - handles the EINPROGRESS for UDP connects + - uses closesocket instead of close on some paths that were noticed + +- some more temporary magic for the icc seg-fault issue + +- messages initially intended only for debug purposes, now become permanent + since these are extremely useful when compiler rejects a set of options. + +- fix compiler warning + +- fix missing double-quotes + +Daniel Stenberg (17 Oct 2008) +- Charles Hardin made adig support a regular numerical dotted IP address for the -s option as well. -* Oct 7 2008 (Yang Tse) -- Added --enable-optimize configure option to enable and disable compiler - optimizations to allow decoupled setting from --enable-debug. +Yang Tse (16 Oct 2008) +- some more temporary magic for the icc seg-fault issue + +- Ensure that shell variable contents which have active meaning + to the shell echo command are not interpreted when trying to + remove extra whitespace from shell variable content. + +- Adjust Watcom C warnings: + + Disable warnings on structure members padding. + +- With this change Solaris target builds will now be done with _REENTRANT defined. + +- Adjust Tiny C basic options: + + Remove -b from debug-enabled configuration, as Tiny C might have + been built without the memory and bounds checker support. + +- Adjust GCC warnings: + + Better disable following warnings when cross-compiling with a gcc older + than 3.0, to avoid warnings from third party system headers: + + -Wmissing-declarations + -Wmissing-prototypes + -Wunused + -Wshadow + +- fix syntax error + +- Initial attempt to detect Watcom C compiler + +- make naming scheme more consistent across whole file + +- Adjust GCC warnings: + + Disable following warnings when cross-compiling with a gcc older + than 3.0, to avoid warnings from third party system headers: + + -Wmissing-prototypes + -Wunused + -Wshadow + +- Adjust GCC --enable-warnings: + + Do not enable -pedantic when cross-compiling with a gcc older + than 3.0, to avoid warnings from third party system headers. + +- adjust SGI MIPSpro C detection + +- LCC compiler adjustments: + + Highest warning level is double -A, next is single -A. + Due to the big number of warnings these trigger on third + party header files it is impratical for us to use any of + them here. If you want them simply define it in CPPFLAGS. + +- remove extra space + +- split SGI compiler check. One for MIPS C and another for MIPSpro C + +- LCC compiler adjustments: + + Warning level reduced from double -A to single -A + +- Initial attempt to detect Tiny C compiler + +- Initial attempt to detect LCC compiler + +- 1) fix bug in CONVERT_INCLUDE_TO_ISYSTEM + + 2) Disable SGI remark: controlling expression is constant + +- simplify SGI C compiler check + +- HP C adjustments: + + Due to the HP-UX socklen_t issue it is insane to use the +w1 warning level. + It generates more than 1100 warnings on socklen_t related statements. + + Until the issue is somehow fixed we will just use the +w2 warning level. + +- Add debug tracing for COMPILER_WORKS_IFELSE + +- configure will also warn on 'strict compiler warning' rejected options + +- convert rejected compiler options messages into a warnings + +- remove extra whitespace from string in SGI C check + +- oops + +- Initial attempt to detect SGI C compiler + +- HP C adjustments: + + Disallow run-time dereferencing of null pointers. + + Disable some remarks: + + #4227: padding struct with n bytes to align member. + + #4255: padding size of struct with n bytes to alignment boundary. + +- improve presentation of accepted/rejected debug/optimizer options + +- refactoring of COMPILER_BASIC_OPTS + +- Initial attempt to detect SUN C compiler + +- Initial attempt to detect HP C compiler + +- fix compiler warning: 'dot_4' may be used uninitialized in this function + +- adjust ICC_windows settings + +- fix VAR_STRIP + +- Sync up with reality + +- Initial attempt to support configure's --(dis|en)able-optimize + option to specify dis(activation) of compiler optimizations. + + If option is specified, it will be honored independant of the + --(dis|en)able-debug option. + +- fix comment + +- Initial attempt to support configure's --(dis|en)able-warnings + option to specify dis(activation) of picky compiler warnings. + + If option is specified, it will be honored independant of the + --(dis|en)able-debug option. + + If option is not specified, it will follow --(dis|en)able-debug + setting, whose default is disabled if not specified. + +- fix compiler warning: dereferencing type-punned pointer will break strict-aliasing rules + +- now compiler warnings are activated for all gcc builds, not only debug ones. + +- Use CFLAGS for icc linker options instead of LDFLAGS, + otherwise gethostbyname() is not detected. + +- use ac_cv_compiler and ac_cv_compiler_num to keep compiler ID and version number + +- Temporary icc adjustment: + + Disable floating point optimizations + +- HAVE_INET_PTON will only be defined when an IPv6 capable working + inet_pton function is available. + +- HAVE_INET_NTOP will only be defined when an IPv6 capable working + inet_ntop function is available. + +- ntoa() and inet_ntoa_r() no longer used + +- icc adjustments for icc 9.0 and prior versions: + + Disable remark #279: controlling expression is constant + + Remark triggered mostly on va_arg() and FD_ZERO() macros. + +- attempt to make work the gethostname function + check for winsock build target configurations + +Gisle Vanem (21 Sep 2008) +- Added HAVE_NETDB_H, HAVE_ARPA_INET_H, HAVE_STRCASECMP + and HAVE_STRNCASECMP. + +Yang Tse (19 Sep 2008) +- icc adjustments: + + Disable remark #981: operands are evaluated in unspecified order + + Function calls which are triggering this remark, today, do not depend + on the order of evaluation of its arguments. + + Disable remark #1469: "cc" clobber ignored + + Remark triggered on htons() and ntohs() due to glibc header files. + +- icc adjustments + +- fix netdb.h prerequisite inclusion + +- improve detection of getservbyport_r() + +- On Linux Intel's icc uses gcc's header files, so + we select ANSI C89 dialect plus GNU extensions. + +- improve detection of gethostname() + +- NetWare builds include "nameser.h" from the c-ares subdir + +- include <strings.h> + +- Sync up with reality + +- adjust inclusion of "nameser.h" + +- reorder some lines in file + +- code cleanup -* Oct 2 2008 (Yang Tse) -- Added --enable-warnings configure option to enable and disable strict - compiler warnings to allow decoupled setting from --enable-debug. +- NetWare seems to have writev() -* Sep 17 2008 (Yang Tse) -- Code reorganization to allow internal/private use of "nameser.h" to any - system that lacks arpa/nameser.h or arpa/nameser_compat.h header files. +- rearrange to allow internal/private use of ares_writev to any system + that lacks the writev function. -* Sep 16 2008 (Yang Tse) -- Code reorganization to allow internal/private use of ares_writev to any - system that lacks the writev function. +- NetWare CLIB target has stricmp() and strnicmp() -* Sep 15 2008 (Yang Tse) -- Code reorganization to allow internal/private use of ares_strcasecmp to any - system that lacks the strcasecmp function. +- include header file only when available -- Improve configure detection of some string functions. +- rearrange to allow internal/private use of ares_strcasecmp to any system that + lacks the strcasecmp function. -* Sep 11 2008 (Yang Tse) -- Code reorganization to allow internal/private use of ares_strdup to any - system that lacks the strdup function. +- improve detection of: + strcasecmp() + strcmpi() + stricmp() + strncasecmp() + strncmpi() + strnicmp() -Version 1.5.3 (Aug 29, 2008) +- *** empty log message *** -* Aug 25 2008 (Yang Tse) -- Improvement by Brad House: +Gisle Vanem (12 Sep 2008) +- djgpp does have strdup(). - This patch addresses an issue in which a response could be sent back to the - source port of a client from a different address than the request was made to. - This is one form of a DNS cache poisoning attack. +Yang Tse (12 Sep 2008) +- change CRLF into LF line endings - The patch simply uses recvfrom() rather than recv() and validates that the - address returned from recvfrom() matches the address of the server we have - connected to. Only necessary on UDP sockets as they are connection-less, TCP - is unaffected. +- strdup() clone for systems/configurations which lack it -- Fix by George Neill: - Fixed compilation of acountry sample application failure on some systems. +- move inclusion of ares_private.h last -* Aug 4 2008 (Daniel Stenberg) -- Fix by Tofu Linden: +- icc adjustments - The symptom: - * Users (usually, but not always) on 2-Wire routers and the Comcast service - and a wired connection to their router would find that the second and - subsequent DNS lookups from fresh processes using c-ares to resolve the same - address would cause the process to never see a reply (it keeps polling for - around 1m15s before giving up). +- icc adjustments - The repro: - * On such a machine (and yeah, it took us a lot of QA to find the systems - that reproduce such a specific problem!), do 'ahost www.secondlife.com', - then do it again. The first process's lookup will work, subsequent lookups - will time-out and fail. +- Select strict ANSI C89 conformance for icc - The cause: - * init_id_key() was calling randomize_key() *before* it initialized - key->state, meaning that the randomness generated by randomize_key() is - immediately overwritten with deterministic values. (/dev/urandom was also - being read incorrectly in the c-ares version we were using, but this was - fixed in a later version.) - * This makes the stream of generated query-IDs from any new c-ares process - be an identical and predictable sequence of IDs. - * This makes the 2-Wire's default built-in DNS server detect these queries - as probable-duplicates and (erroneously) not respond at all. +- remove unnecessary typecasting of malloc() +- remove unnecessary typecasting of realloc() -* Aug 4 2008 (Yang Tse) +Daniel Stenberg (29 Aug 2008) +- we start over working towards 1.5.4 + +Version 1.5.3 (29 Aug 2008) + +Daniel Stenberg (29 Aug 2008) +- Version 1.5.3 + +- added the three people from RELEASE-NOTES and sorted the list alphabetically + +Yang Tse (27 Aug 2008) +- Don't abort configuration if recvfrom() is not available. + +- Functionality only possible if recvfrom() is available. + +- George Neill's fix acountry sample application compilation failure. + +- Brad House's validation that DNS response address matches the request address + +- fix the output name + +- Get rid of ENABLE_64BIT symbol definition and usage. + + Improve HAVE_LONGLONG symbol description. + +- Export 'ares_process_fd' too. + +Gisle Vanem (16 Aug 2008) +- Ops, remove 'use_vc'. + +- Support Watt-32 under Win32. + +Yang Tse (10 Aug 2008) +- Fix: Remove now this SIZEOF_CURL_OFF_T symbol definition. + + This should have been done with the initial 64-bit curl_off_t patch. + +- Improve CURL_CHECK_DEF + +- Fix IBM C and DEC/Compaq C compiler detection + +- Initial support of curlbuild.h and curlrules.h which allows + to have a curl_off_t data type no longer gated to off_t. + +- The minimum autoconf version required for this file is 2.50 + + Avoid dot notation in aclocal serial file number, use a single number now. + +Daniel Stenberg (4 Aug 2008) +- - Fix by Tofu Linden: + + The symptom: + * Users (usually, but not always) on 2-Wire routers and the Comcast service + and a wired connection to their router would find that the second and + subsequent DNS lookups from fresh processes using c-ares to resolve the same + address would cause the process to never see a reply (it keeps polling for + around 1m15s before giving up). + + The repro: + * On such a machine (and yeah, it took us a lot of QA to find the systems + that reproduce such a specific problem!), do 'ahost www.secondlife.com', + then do it again. The first process's lookup will work, subsequent lookups + will time-out and fail. + + The cause: + * init_id_key() was calling randomize_key() *before* it initialized + key->state, meaning that the randomness generated by randomize_key() is + immediately overwritten with deterministic values. (/dev/urandom was also + being read incorrectly in the c-ares version we were using, but this was + fixed in a later version.) + * This makes the stream of generated query-IDs from any new c-ares process + be an identical and predictable sequence of IDs. + * This makes the 2-Wire's default built-in DNS server detect these queries + as probable-duplicates and (erroneously) not respond at all. + +Yang Tse (4 Aug 2008) - Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use. - Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. 2.62 - version of AC_AIX defines _ALL_SOURCE and other four preprocessor symbols - no matter if the system is AIX or not. To keep the traditional behaviour, - and an uniform one across autoconf versions AC_AIX is replaced with our - own internal macro CARES_CHECK_AIX_ALL_SOURCE. - -* Aug 1 2008 (Yang Tse) -- Configure process now checks if the preprocessor _REENTRANT symbol is already - defined. If it isn't currently defined a set of checks are performed to test - if its definition is required to make visible to the compiler a set of *_r - functions. Finally, if _REENTRANT is already defined or needed it takes care - of making adjustments necessary to ensure that it is defined equally for the - configure process tests and generated config file. - -* Jul 20 2008 (Yang Tse) -- When recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will - now cause the definition, as appropriate, of RECVFROM_TYPE_ARG2_IS_VOID, - RECVFROM_TYPE_ARG5_IS_VOID or RECVFROM_TYPE_ARG6_IS_VOID. - -* Jul 17 2008 (Yang Tse) -- RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined - to the data type pointed by its respective argument and not the pointer type. + Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. But, + autoconf 2.62 version of AC_AIX defines _ALL_SOURCE along with other four + preprocessor symbols no matter if the system is AIX or not. To keep the + traditional behaviour, as well as an uniform one, across autoconf versions + AC_AIX is replaced with our own internal macro. -* Jul 16 2008 (Yang Tse) -- Improved configure detection of number of arguments for getservbyport_r. - Detection is now based on compilation checks instead of linker ones. +- Adjust DEC/Compaq C compiler settings. -- Configure process now checks availability of recvfrom() socket function and - finds out its return type and the types of its arguments. Added definitions - for non-configure systems config files, and introduced macro sreadfrom which - will be used on udp sockets as a recvfrom() wrapper in the future. +- Another AC_TRY_LINK conversion to AC_LINK_IFELSE. + Proper definition of HAVE_function if function is found deeper. -* Jul 15 2008 (Yang Tse) -- Introduce definition of _REENTRANT symbol in setup.h to improve library - usability. Previously the configure process only used the AC_SYS_LARGEFILE - macro for debug builds, now it is also used for non-debug ones enabling the - use of configure options --enable-largefile and --disable-largefile which - might be needed for library compatibility. Remove checking the size of - curl_off_t, it is no longer needed. +- Sync up with reality -* Jul 3 2008 (Daniel Stenberg) -- Phil Blundell: If you ask ares_gethostbyname() to do an AF_INET6 lookup and - the target host has only A records, it automatically falls back to an - AF_INET lookup and gives you the A results. However, if the target host has - a CNAME record, this behaviour is defeated since the original query does - return some data even though ares_parse_aaa_reply() doesn't consider it - relevant. Here's a small patch to make it behave the same with and without - the CNAME. +- Rename reentrant.m4 to avoid filename clash. -* Jul 2 2008 (Yang Tse) -- Fallback to gettimeofday when monotonic clock is unavailable at run-time. +- Add file version serial number that might be used by 'aclocal' and others. + + Keep the '#' character as the first one on the line. -* Jun 30 2008 (Daniel Stenberg) +- Update copyright year. -- As was pointed out to me by Andreas Schuldei, the MAXHOSTNAMELEN define is - not posix or anything and thus c-ares failed to build on hurd (and possibly - elsewhere). The define was also somewhat artificially used in the windows - port. Now, I instead rewrote the use of gethostbyname to enlarge the host - name buffer in case of need and totally avoid the use of the MAXHOSTNAMELEN - define. I thus also removed the defien from the namser.h file where it was - once added for the windows build. +- Sync comment with reality. - I also fixed init_by_defaults() function to not leak memory in case if - error. +- Reinstate the 'aclocal -I m4' in buildconf and 'ACLOCAL_AMFLAGS = -I m4' way of + including our local m4/reentrant.m4 file. This even takes care of including the + file in the distribution tarball. -* Jun 9 2008 (Yang Tse) +- Add quoting for the AC_DEFINE arguments. -- Make libcares.pc generated file for pkg-config include information relative - to the libraries needed for the static linking of c-ares. +- Also remove the whitespace. -* May 30 2008 (Yang Tse) +- Also remove the extra quoting. -- Brad House fixed a missing header file inclusion in adig sample program. +- Replace some '@%:@' quadigraphs by its actual representation '#'. + + This quadigraph used before a C preprocessor 'define' directive could + be fooling M4, when processing this file, and make it think that the + line contains a pure M4 'define' macro. -Version 1.5.2 (May 29, 2008) +- Tests done using 'aclocal -I m4' in buildconf and 'ACLOCAL_AMFLAGS = -I m4 + in top Makefile.am triggered a problem that prevented aclocal from running + successfully on SunOS 5.10 with GNU m4 1.4.5 and GNU Autoconf 2.61 + + A tarball which reproduces mentioned problem is the one dated July-28-2008 + http://cool.haxx.se/curl-daily/curl-7.19.0-20080728.tar.gz + + We actually don't need all the bells and whistles that the above mechanism + provides. We only need to include our m4/reentrant.m4 file in acinclude.m4 + so here we go with this simpler mechanism. -* May 13 2008 (Daniel Stenberg) +- for debugging purposes show ACLOCAL_FLAGS -- Introducing millisecond resolution support for the timeout option. See - ares_init_options()'s ARES_OPT_TIMEOUTMS. +- These lines were unintentionally removed in previous commit -* May 9 2008 (Yang Tse) +- Partially undo change that prevented SED, GREP, EGREP and AR from being changed by libtool or autoconf. -- Use monotonic time source if available, for private function ares__tvnow() +- Assert that SED and GREP are set -* May 7 2008 (Daniel Stenberg) +- Require autoconf 2.57 or newer -- Sebastian made c-ares able to return all PTR-records when doing reverse - lookups. It is not common practice to have multiple PTR-Records for a single - IP, but its perfectly legal and some sites have those. +- When calling aclocal, user defined ACLOCAL_FLAGS will now precede ours. -- Doug Goldstein provided a configure patch: updates autoconf 2.13 usage to - autoconf 2.57 usage (which is the version you have specified as the minimum - version). It's a minor change but it does clean up some warnings with newer - autoconf (specifically 2.62). +- move ACLOCAL_AMFLAGS after AUTOMAKE_OPTIONS -* May 5 2008 (Yang Tse) +- setup.h handles definition of _REENTRANT based on NEED_REENTRANT + definition which might be defined in config.h or config-*.h files -- Improved parsing of resolver configuration files. +- Remove explicit inclusion of our m4 files first. It was interesting as a test, + but it breaks aclocal execution on some systems, with the following error: + + Can't locate object method "rel2abs" via package "File::Spec" at /usr/local/bin/aclocal line 256. -* April 4 2008 (Daniel Stenberg) +- Another step towards detecting if _REENTRANT is already defined or actually + needed, and being able to define it if appropriate for further configure tests + as well as for the generated config file. -- Eino Tuominen improved the code when a file is used to seed the randomizer. +- Explicitly include our m4 files first. This might minimize the impact + that other package's underquoted m4 function definitions have on ours. -- Alexey Simak made adig support NAPTR records +- Add a 3 argument check for getprotobyname_r -- Alexey Simak fixed the VC dsp file by adding the missing source file - ares_expand_string.c +- move reentrant.m4 to the m4 subdirectory to avoid infinite loop inclusion problem -* December 11 2007 (Gisle Vanem) +- add checks for strtok_r and getprotobyname_r -- Added another sample application; acountry.c which converts an - IPv4-address(es) and/or host-name(s) to country-name and country-code. - This uses the service of the DNSBL at countries.nerd.dk. +- Another step towards detecting if _REENTRANT is already defined or actually + needed, and being able to define it if appropriate for further configure tests + as well as for the generated config file. + + Introduced reentrant.m4 intended for our reentrant related autotools/m4 macros. -* December 3 2007 (Daniel Stenberg) +- reorder argument number detection for getservbyport_r to + actually verify if the test is properly working -- Brad Spencer fixed the configure script to assume that there's no - /dev/urandom when built cross-compiled as then the script cannot check for - it. +- Make sure that configure process tests are done with the same _REENTRANT + setting as the one actually used when finally building the library. -- Erik Kline cleaned up ares_gethostbyaddr.c:next_lookup() somewhat +- Change recvfrom's sixth argument data type to the 'historically standard' 'int' + data type for systems where this sixth argument is prototyped as a void pointer. + + Start of thread: http://curl.haxx.se/mail/lib-2008-07/0153.html -Version 1.5.1 (Nov 21, 2007) +- use prototypes to improve getservbyport_r detection -* November 21 2007 (Daniel Stenberg) +- Adjust recvfrom's sixth arg data type definition for NetWare (LIBC) -- Robin Cornelius pointed out that ares_llist.h was missing in the release - archive for 1.5.0 +- Use the sreadfrom() wrapper to replace recvfrom() in our code. -Version 1.5.0 (Nov 21, 2007) +- when recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will + now cause the definition of RECVFROM_TYPE_ARG2_IS_VOID, RECVFROM_TYPE_ARG5_IS_VOID + or RECVFROM_TYPE_ARG6_IS_VOID, as appropriate. -* October 2 2007 (Daniel Stenberg) +- Adjust DEC/Compaq C compiler settings -- ares_strerror() segfaulted if the input error number was out of the currently - supported range. +- Added "pointer to void" as another data type to check for the sixth argument of + function recvfrom as a result of the info additionally logged when running on a + Solaris system. + + The compiler error showed that the prototype being used on Solaris was the one + declared in line 427 of "/usr/include/sys/socket.h" as: + + function(int, + pointer to void, + unsigned int, + int, + pointer to struct sockaddr, + pointer to void) returning int -- Yang Tse: Avoid a segfault when generating a DNS "Transaction ID" in - internal function init_id_key() under low memory conditions. +- Adjust DEC/Compaq C compiler settings -* September 28 2007 (Daniel Stenberg) +- RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined + to the data type pointed by its respective argument and not the pointer type. -- Bumped version to 1.5.0 for next release and soname bumped to 2 due to ABI - and API changes in the progress callback (and possibly more coming up from - Steinar) +- Configure process now checks availability of recvfrom() socket function and + finds out its return type and the types of its arguments. Added definitions + for non-configure systems config files, and introduced macro sreadfrom which + will be used on udp sockets as a recvfrom() wrapper. -* September 28 2007 (Steinar H. Gunderson) +- Initial DEC/Compaq C compiler detection and flags -- Don't skip a server if it's the only one. (Bugfix from the Google tree.) +- Improved configure detection of number of arguments for getservbyport_r -- Made the query callbacks receive the number of timeouts that happened during - the execution of a query, and updated documentation accordingly. (Patch from - the Google tree.) +- Allow --enable-largefile and --disable-largefile configurations. + Configure process no longer needs nor checks size of curl_off_t. + Library will now be built with _REENTRANT symbol defined. -- Support a few more socket options: ARES_OPT_SOCK_SNDBUF and - ARES_OPT_SOCK_RCVBUF +- fix compiler warning -- Always register for TCP events even if there are no outstanding queries, as - the other side could always close the connection, which is a valid event - which should be responded to. +- since Jun 30 2008 MAXHOSTNAMELEN define is no longer used -* September 22 2007 (Daniel Stenberg) +- fix c-ares version reported in generated libcares.pc file when building + from CVS tree. -- Steinar H. Gunderson fixed: Correctly clear sockets from the fd_set on in - several functions (write_tcp_data, read_tcp_data, read_udp_packets) so that - if it fails and the socket is closed the following code doesn't try to use - the file descriptor. +- egrep and ar are also mandatory -- Steinar H. Gunderson modified c-ares to now also do to DNS retries even when - TCP is used since there are several edge cases where it still makes sense. +Daniel Stenberg (3 Jul 2008) +- just to clarify that c-ares actually have some ipv6 support -- Brad House provided a fix for ares_save_options(): +- ares_gethostbyname() fallback from AAA to A records with CNAME present - Apparently I overlooked something with the ares_save_options() where it - would try to do a malloc(0) when no options of that type needed to be saved. - On most platforms, this was fine because malloc(0) doesn't actually return - NULL, but on AIX it does, so ares_save_options would return ARES_ENOMEM. +- - Phil Blundell: If you ask ares_gethostbyname() to do an AF_INET6 lookup and + the target host has only A records, it automatically falls back to an + AF_INET lookup and gives you the A results. However, if the target host has + a CNAME record, this behaviour is defeated since the original query does + return some data even though ares_parse_aaa_reply() doesn't consider it + relevant. Here's a small patch to make it behave the same with and without + the CNAME. -* July 14 2007 (Daniel Stenberg) +Yang Tse (2 Jul 2008) +- The configure process will now halt when sed or grep are unavailable -- Vlad Dinulescu fixed two outstanding valgrind reports: +- fallback to gettimeofday when monotonic clock is unavailable at run-time - 1. In ares_query.c , in find_query_by_id we compare q->qid (which is a short - int variable) with qid, which is declared as an int variable. Moreover, - DNS_HEADER_SET_QID is used to set the value of qid, but DNS_HEADER_SET_QID - sets only the first two bytes of qid. I think that qid should be declared as - "unsigned short" in this function. +- IBM C/C++ compiler predefined macro check - 2. The same problem occurs in ares_process.c, process_answer() . query->qid - (an unsigned short integer variable) is compared with id, which is an - integer variable. Moreover, id is initialized from DNS_HEADER_QID which sets - only the first two bytes of id. I think that the id variable should be - declared as "unsigned short" in this function. +- set earlier in configure process IBM compilers optimization flags - Even after declaring these variables as "unsigned short", the valgrind - errors are still there. Which brings us to the third problem. +- make check message wording more precise - 3. The third problem is that Valgrind assumes that query->qid is not - initialised correctly. And it does that because query->qid is set from - DNS_HEADER_QID(qbuf); Valgrind says that qbuf has unitialised bytes. And - qbuf has uninitialised bytes because of channel->next_id . And next_id is - set by ares_init.c:ares__generate_new_id() . I found that putting short r=0 - in this function (instead of short r) makes all Valgrind warnings go away. - I have studied ares__rc4() too, and this is the offending line: +Daniel Stenberg (30 Jun 2008) +- - As was pointed out to me by Andreas Schuldei, the MAXHOSTNAMELEN define is + not posix or anything and thus c-ares failed to build on hurd (and possibly + elsewhere). The define was also somewhat artificially used in the windows + port. Now, I instead rewrote the use of gethostbyname to enlarge the host + name buffer in case of need and totally avoid the use of the MAXHOSTNAMELEN + define. I thus also removed the defien from the namser.h file where it was + once added for the windows build. + + I also fixed init_by_defaults() function to not leak memory in case if + error. - buffer_ptr[counter] ^= state[xorIndex]; (ares_query.c:62) +Yang Tse (29 Jun 2008) +- fix C style comment - This is what triggers Valgrind.. buffer_ptr is unitialised in this function, - and by applying ^= on it, it remains unitialised. +- John Lightsey filed bug report #1999181: "CLOCK_MONOTONIC always fails on + some systems" (http://curl.haxx.se/bug/view.cgi?id=1999181). The problem was + that the configure script did not use the _POSIX_MONOTONIC_CLOCK feature test + macro when checking monotonic clock availability. This is now fixed and the + monotonic clock will not be used unless the feature test macro is defined + with a value greater than zero indicating always supported. -Version 1.4.0 (June 8, 2007) +- Modified configuration script to actually verify if the compiler is good + enough at detecting compilation errors or at least it has been properly + configured to do so. Configuration heavily depends on this capability, so + if this compiler sanity check fails the configuration process will now fail. -* June 4 2007 (Daniel Stenberg) +- No longer break out of a shell "for" statement from inside + AC_FOO_IFELSE macros, otherwise temp files are not removed. + + Identation adjustment. -- James Bursa reported a major memory problem when resolving multi-IP names - and I found and fixed the problem. It was added by Ashish Sharma's patch - two days ago. +Gunter Knauf (11 Jun 2008) +- enable additional CFLAGS from commandline. - When I then tried to verify multiple entries in /etc/hosts after my fix, I - got another segfault and decided this code was not ripe for inclusion and I - reverted the patch. +Yang Tse (9 Jun 2008) +- fix pkg-config reporting of private libraries needed for static linking -* June 2 2007 +- MSVC does build Windows native targets -- Brad Spencer found and fixed three flaws in the code, found with the new - gcc 4.2.0 warning: -Waddress +- Brad House fixed a missing header file inclusion in adig sample program -- Brad House fixed VS2005 compiler warnings due to time_t being 64bit. - He also made recent Microsoft compilers use _strdup() instead of strdup(). +Daniel Stenberg (29 May 2008) +- start working on 1.5.3 -- Brad House's man pages for ares_save_options() and ares_destroy_options() - were added. +Version 1.5.2 (29 May 2008) -- Ashish Sharma provided a patch for supporting multiple entries in the - /etc/hosts file. Patch edited for coding style and functionality by me - (Daniel). +Daniel Stenberg (29 May 2008) +- 1.5.2 + +Yang Tse (26 May 2008) +- fix compiler warning: unreferenced formal parameter + +Daniel Stenberg (23 May 2008) +- list all local sources the (demo) tools need, add a few missing scripts to + the dist tarball and remove a two duplicate file names from EXTRA_DIST + (most of it pointed out by Yang Tse) + +- this is not used (anymore) + +- make sure the configure.ac file with the correct version number is shipped + in the tarball -* May 30 2007 +Yang Tse (22 May 2008) +- MSVC6+ clean-up targets must also remove acountry.exe -- Shmulik Regev brought cryptographically secure transaction IDs: +- sync with reality - The c-ares library implementation uses a DNS "Transaction ID" field that is - seeded with a pseudo random number (based on gettimeofday) which is - incremented (++) between consecutive calls and is therefore rather - predictable. In general, predictability of DNS Transaction ID is a well - known security problem (e.g. - http://bak.spc.org/dms/archive/dns_id_attack.txt) and makes a c-ares based - implementation vulnerable to DNS poisoning. Credit goes to Amit Klein - (Trusteer) for identifying this problem. +- fix: [action-if-found] part of AC_CHECK_TYPE macro cannot be quoted when empty - The patch I wrote changes the implementation to use a more secure way of - generating unique IDs. It starts by obtaining a key with reasonable entropy - which is used with an RC4 stream to generate the cryptographically secure - transaction IDs. +- fix: remove need and definition of HAVE_SOCKLEN_T symbol - Note that the key generation code (in ares_init:randomize_key) has two - versions, the Windows specific one uses a cryptographically safe function - provided (but undocumented :) by the operating system (described at - http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx). The - default implementation is a bit naive and uses the standard 'rand' - function. Surely a better way to generate random keys exists for other - platforms. +- fix: socklen_t definition comment - The patch can be tested by using the adig utility and using the '-s' option. +- update several macros using AC_TRY_LINK with AC_LINK_IFELSE -- Brad House added ares_save_options() and ares_destroy_options() that can be - used to keep options for later re-usal when ares_init_options() is used. +- fix underquoting of AC_LANG_PROGRAM arguments - Problem: Calling ares_init() for each lookup can be unnecessarily resource - intensive. On windows, it must LoadLibrary() or search the registry - on each call to ares_init(). On unix, it must read and parse - multiple files to obtain the necessary configuration information. In - a single-threaded environment, it would make sense to only - ares_init() once, but in a heavily multi-threaded environment, it is - undesirable to ares_init() and ares_destroy() for each thread created - and track that. +- if'def out private function ares__tvdiff(), it is not in use yet. - Solution: Create ares_save_options() and ares_destroy_options() functions to - retrieve and free options obtained from an initialized channel. The - options populated can be used to pass back into ares_init_options(), - it should populate all needed fields and not retrieve any information - from the system. Probably wise to destroy the cache every minute or - so to prevent the data from becoming stale. +- update several macros using AC_TRY_LINK with AC_LINK_IFELSE -- Daniel S added ares_process_fd() to allow applications to ask for processing - on specific sockets and thus avoiding select() and associated - functions/macros. This function will be used by upcoming libcurl releases - for this very reason. It also made me export the ares_socket_t type in the - public ares.h header file, since ares_process_fd() uses that type for two of - the arguments. +- fix socklen_t equivalent detection when cross compiling Windows target -* May 25 2007 +- if WINSOCK2 API is used link with 'ws2_32', else + + if WINSOCK API is used under WinCE link with 'winsock', else + + if WINSOCK API is used link with 'wsock32'. -- Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows - that could cause it to return a bad return code. +- on winsock systems linking is done using library 'ws2_32' when + winsock2.h is available, and library 'winsock' is used when only + winsock.h is available. -* April 16 2007 +- minor change for wince-cegcc and wince-mingw32ce support -- Yang Tse: Provide ares_getopt() command-line parser function as a source - code helper function, not belonging to the actual c-ares library. +- millisecond resolution support followup -* February 19 2007 +Gisle Vanem (15 May 2008) +- Replaced "-DHAVE_FIONBIO" with "-DHAVE_IOCTLSOCKET". + Added "-DHAVE_GETTIMEOFDAY". Trimmed lines. -- Vlad Dinulescu added ares_parse_ns_reply(). +Yang Tse (15 May 2008) +- sync with reality -* February 13 2007 +- remove compilation time generated files -- Yang Tse: Fix failure to get the search sequence of /etc/hosts and - DNS from /etc/nsswitch.conf, /etc/host.conf or /etc/svc.conf when - /etc/resolv.conf did not exist or was unable to read it. +- use same time source for timeout initialization and processing -* November 22 2006 +- Improve toolchain detection for WinCE cross compilation: + + When cross compiling WinCE with the arm-wince-cegcc-gcc C compiler + symbol __CEGCC__ is defined and the unix-like compatibility layer + is used. For our purposes this is not a native Windows build. + + When cross compiling WinCE with the arm-wince-mingw32ce-gcc C compiler + symbol __MINGW32CE__ is defined and the unix-like compatibility layer + is not used. For our purposes this _is_ a native Windows build. -- Install ares_dns.h too +- skip checks for Windows specific header files + when build target is not a native Windows one -- Michael Wallner fixed this problem: When I set domains in the options - struct, and there are domain/search entries in /etc/resolv.conf, the domains - of the options struct will be overridden. +- WinCE cross compilation adjustments: + + HAVE_WINSOCK2_H shall not be defined. + HAVE_WS2TCPIP_H shall not be defined. -* November 6 2006 +Daniel Stenberg (13 May 2008) +- - Introducing millisecond resolution support for the timeout option. See + ares_init_options()'s ARES_OPT_TIMEOUTMS. -- Yang Tse removed a couple of potential zero size memory allocations. +Yang Tse (13 May 2008) +- also ignore this -- Andreas Rieke fixed the line endings in the areslib.dsp file that I (Daniel) - broke in the 1.3.2 release. We should switch to a system where that file is - auto-generated. We could rip some code for that from curl... +- also ignore this -Version 1.3.2 (November 3, 2006) +- ignore this compilation time generated files -* October 12 2006 +- don't keep in CVS this compilation time generated file -- Prevent ares_getsock() to overflow if more than 16 sockets are used. +- add MSVC6 project for acountry sample program -* September 11 2006 +- update MSVC6 projects to use the multithreaded DLL runtime library -- Guilherme Balena Versiani: I noted a strange BUG in Win32 port - (ares_init.c/get_iphlpapi_dns_info() function): when I disable the network - by hand or disconnect the network cable in Windows 2000 or Windows XP, my - application gets 127.0.0.1 as the only name server. The problem comes from - 'GetNetworkParams' function, that returns the empty string "" as the only - name server in that case. Moreover, the Windows implementation of - inet_addr() returns INADDR_LOOPBACK instead of INADDR_NONE. +- add MSVC6 project for acountry sample program -* August 29 2006 +- skip libtool C++ preprocessor compiler and linker checks -- Brad Spencer did +- ignore libcares.pc - o made ares_version.h use extern "C" for c++ compilers - o fixed compiler warnings in ares_getnameinfo.c - o fixed a buffer position init for TCP reads +- configure script will now define HAVE_CLOCK_GETTIME_MONOTONIC symbol only + when function clock_gettime() is available and the monotonic timer is + also available. Otherwise, in some cases, librt or libposix4 could be used + for linking even when finally not using the clock_gettime() function due + to lack of the monotonic clock. -* August 3 2006 +- fix syntax error: missing semicolon -- Ravi Pratap fixed ares_getsock() to actually return the proper bitmap and - not always zero! +- Add library checking for clock_gettime() support -Version 1.3.1 (June 24, 2006) +- Use monotonic time source if available. -* July 23, 2006 +Daniel Stenberg (9 May 2008) +- Removed AC_PROG_CC_STDC again. It enforces C99/gnu99 stdandard which is too + liberal for me. Also, autoconf 2.61 and earlier doesn't work with icc 10.1 + for this macro. (2.62 confirmed to work though). See discusson on the mailing + list starting here: + + http://daniel.haxx.se/projects/c-ares/mail/c-ares-archive-2008-05/0001.shtml -- Gisle Vanem added getopt() to the ahost program. Currently accepts - only [-t {a|aaaa}] to specify address family in ares_gethostbyname(). +- include strings.h (if available) for the strcasecmp() proto -* June 19, 2006 +- check for strings.h in configure and use it for the strcasecmp() proto -- (wahern) Removed "big endian" DNS section and RR data integer parser - macros from ares_dns.h, which break c-ares on my Sparc64. Bit-wise - operations in C operate on logical values. And in any event the octets are - already in big-endian (aka network) byte order so they're being reversed - (thus the source of the breakage). +- adjusted to work with the updated configure.ac + +- - Sebastian made c-ares able to return all PTR-records when doing reverse + lookups. It is not common practice to have multiple PTR-Records for a single + IP, but its perfectly legal and some sites have those. + +- - Doug Goldstein provided a configure patch: updates autoconf 2.13 usage to + autoconf 2.57 usage (which is the version you have specified as the minimum + version). It's a minor change but it does clean up some warnings with newer + autoconf (specifically 2.62). + +Yang Tse (5 May 2008) +- Improved parsing of resolver configuration files + +- make previous compiler warning fix more portable + +- fix compiler warning: indirection to slightly different base types + +- fix compiler warning: local variable may be used without having been initialized + +- fix compiler warning: unreferenced formal parameter + +- fix compiler warning: assignment within conditional expression + +Daniel Stenberg (4 Apr 2008) +- - Alexey Simak fixed the VC dsp file by adding the missing source file + ares_expand_string.c + +- Alexey Simak made adig support NAPTR records -* June 18, 2006 +- Eino Tuominen improved the code when a file is used to seed the randomizer -- William Ahern handles EAGAIN/EWOULDBLOCK errors in most of the I/O calls - from area_process.c. +Yang Tse (29 Feb 2008) +- Force AIX xlc to fail and not generate object code if the source code has + compiled with errors. This behaviour is needed for autoconf macros which + rely on the ability to compile with or without errors, and is safer than + xlc's default of failing only upon severe errors. - TODO: Handle one last EAGAIN for a UDP socket send(2) in - ares__send_query(). +Gunter Knauf (27 Feb 2008) +- added get_ver.awk since c-ares is a standalone project, and should therefore also compile when cURL is absent. -* May 10, 2006 +- a couple of small fixes to the makefile: + fixed comments; fixed INSTDIR define, simplified rules; + changed to use get_ver.awk in current dir rather than the curl one. -- Bram Matthys brought my attention to a libtool peculiarity where detecting - things such as C++ compiler actually is a bad thing and since we don't need - that detection I added a work-around, much inspired by a previous patch by - Paolo Bonzini. This also shortens the configure script quite a lot. +- fixed linker def file for tools when compiled with gcc/nlmconv. -* May 3, 2006 +- added some files which were missing in release tarballs. -- Nick Mathewson added the ARES_OPT_SOCK_STATE_CB option that when set makes - c-ares call a callback on socket state changes. A better way than the - ares_getsock() to get full control over the socket state. +- updated copyright for new year. -* January 9, 2006 +Gisle Vanem (2 Jan 2008) +- Added '-d' option for Watt-32 debugging. -- Alexander Lazic improved the getservbyport_r() configure check. +Yang Tse (18 Dec 2007) +- MSVC 9.0 (VS2008) does not support Windows build targets prior to WinXP, + and makes wrong asumptions of build target when it isn't specified. So, + if no build target has been defined we will target WinXP when building + with MSVC 9.0 (VS2008). -* January 6, 2006 +Daniel Stenberg (11 Dec 2007) +- build acountry too -- Alexander Lazic pointed out that the buildconf should use the ACLOCAL_FLAGS - variable for easier controlling what it does and how it runs. +Gisle Vanem (11 Dec 2007) +- Added acountry.c. -* January 5, 2006 +- Added build of acountry.nlm. -- James Bursa fixed c-ares to find the hosts file on RISC OS, and made it - build with newer gcc versions that no longer defines "riscos". +- Added build of acountry.exe. -* December 22 +- Build acountry.exe. Added 'socklen_t' define. -- Daniel Stenberg added ares_getsock() that extracts the set of sockets to - wait for action on. Similar to ares_fds() but not restricted to using - select() for the waiting. +- Another sample application that returns country-code and + name from an IPv4-address or host-name. Using the service of + countries.nerd.dk. -* November 25 +Daniel Stenberg (10 Dec 2007) +- grrr, the previous commit was meant to properly make sure that we don't + link any executables when doing debug builds since they kind of assume + symbols provided by libcurl, but it also wrongly included acountry.c -- Yang Tse fixed some send() / recv() compiler warnings +- when building -* September 18 +- build ahost and adig by default but don't install them -- Added constants that will be used by ares_getaddrinfo +Gisle Vanem (10 Dec 2007) +- Fix for targets that do have 'struct in6_addr', but which doesn't + define 's6_addr' as a macro. -- Made ares_getnameinfo use the reentrant getservbyport (getservbyport_r) if it - is available to ensure it works properly in a threaded environment. +Yang Tse (3 Dec 2007) +- Fix three issues previous cleanup introduces. -* September 10 +Daniel Stenberg (3 Dec 2007) +- Erik Kline cleaned up ares_gethostbyaddr.c:next_lookup() somewhat -- configure fix for detecting a member in the sockaddr_in6 struct which failed - on ipv6-enabled HP-UX 11.00 +- Brad Spencer fixed the configure script to assume that there's no + /dev/urandom when built cross-compiled as then the script cannot check for + it. -Version 1.3.0 (August 29, 2005) +- the gethostbyname fix applied here as well -* August 21 +- fix next_lookup() to continue searching even if c-ares failed to load the + /etc/hosts file, pointed out by Erik Kline: + http://daniel.haxx.se/projects/c-ares/mail/c-ares-archive-2007-11/0027.shtml -- Alfredo Tupone provided a fix for the Windows code in get_iphlpapi_dns_info() - when getting the DNS server etc. +- Remove the check for libdl since that isn't actually used and it causes + warnings. Pointed out by Robin Cornelius. -* June 19 +- pkgconfig fix by Andreas Schuldei -- Added some checks for the addrinfo structure. +- spellfix -* June 2 +- and we start on 1.5.2! -- William Ahern: +Version 1.5.1 (21 Nov 2007) - Make UDP sockets non-blocking. I've confirmed that at least on Linux 2.4 a - read event can come back from poll() on a valid SOCK_DGRAM socket but - recv(2) will still block. This patch doesn't ignore EAGAIN in - read_udp_packets(), though maybe it should. (This patch was edited by Daniel - Stenberg and a new configure test was added (imported from curl's configure) - to properly detect what non-blocking socket approach to use.) +Daniel Stenberg (21 Nov 2007) +- change - I'm not quite sure how this was happening, but I've been seeing PTR queries - which seem to return empty responses. At least, they were empty when calling - ares_expand_name() on the record. Here's a patch which guarantees to - NUL-terminate the expanded name. The old behavior failed to NUL-terminate if - len was 0, and this was causing strlen() to run past the end of the buffer - after calling ares_expand_name() and getting ARES_SUCCESS as the return - value. If q is not greater than *s then it's equal and *s is always - allocated with at least one byte. +- oops -* May 16 +- start working on 1.5.1 now -- Added ares_getnameinfo which mimics the getnameinfo API (another feature - that could use testing). +Version 1.5.0 (21 Nov 2007) -* May 14 +Daniel Stenberg (21 Nov 2007) +- this is what 1.5.0 is -- Added an inet_ntop function from BIND for systems that do not have it. +- fill in missing copyrights -* April 9 +Gunter Knauf (18 Nov 2007) +- removed now obsolete defines; + updated external library versions to latest. -- Made sortlist support IPv6 (this can probably use some testing). +Steinar H. Gunderson (16 Nov 2007) +- Fix a double free. -- Made sortlist support CIDR matching for IPv4. +Yang Tse (15 Nov 2007) +- Needed now that in6_addr is referenced in ares.h -* April 8 +Steinar H. Gunderson (15 Nov 2007) +- When looking up in DNS and then in the hosts file, return the error code from DNS if both fail, instead of returning the error code from the hosts file, as today. Patch from the Google tree. -- Added preliminary IPv6 support to ares_gethostbyname. Currently, sortlist - does not work with IPv6. Also provided an implementation of bitncmp from - BIND for systems that do not supply this function. This will be used to add - IPv6 support to sortlist. +- Return TTL data from ares_parse_{a,aaaa}_reply, if the user is so inclined. Patch from the Google tree. -- Made ares_gethostbyaddr support IPv6 by specifying AF_INET6 as the family. - The function can lookup IPv6 addresses both from files (/etc/hosts) and - DNS lookups. +Yang Tse (8 Nov 2007) +- Define WIN32 when build target is Win32 API. + This also defines it for WinCE even though it is a subset of WIN32. -* April 7 +- The only libraries actually needed for sample programs adig and + ahost are ws2_32.lib and advapi32.lib -- Tupone Alfredo fixed includes of arpa/nameser_compat.h to build fine on Mac - OS X. +- MSVC versions prior to VS2005 do not complain about portable C functions -* April 5 +- Windows build targets have socklen_t definition in ws2tcpip.h but some + versions of ws2tcpip.h do not have the definition. It seems that when + the socklen_t definition is missing from ws2tcpip.h the definition for + INET_ADDRSTRLEN is also missing, and that when one definition is present + the other one also is available. -- Dominick Meglio: Provided implementations of inet_net_pton and inet_pton - from BIND for systems that do not include these functions. +Gunter Knauf (22 Oct 2007) +- removed dependency on gettimeofday() since we use only 1 sec resolution here. -* March 11, 2005 +Yang Tse (20 Oct 2007) +- Fix compiler warning: conversion from "int" to "unsigned short" may lose significant bits -- Dominick Meglio added ares_parse_aaaa_reply.c and did various - adjustments. The first little steps towards IPv6 support! +- Fix message shown when detecting icc version -* November 7 +- Avoid shadowing a global declaration -- Fixed the VC project and makefile to use ares_cancel and ares_version +- Renamed a variable to avoid shadowing a global declaration -* October 24 +- Renamed internal function to avoid a variable shadowing it -- The released ares_version.h from 1.2.1 says 1.2.0 due to a maketgz flaw. - This is now fixed. +- Fix compiler warning: feupdateenv is not implemented and will always fail. + Specifically for linux x86-64 with Intel's icc. -Version 1.2.1 (October 20, 2004) +- Sync PLATFORM_AIX_V3 detection and CURL_CC_DEBUG_OPTS() + icc warning level with libcurl's -* September 29 +- Fix compiler warning: conversion from "int" to "unsigned char" + may lose significant bits -- Henrik Stoerner fix: got a report that Tru64 Unix (the unix from Digital - when they made Alpha's) uses /etc/svc.conf for the purpose fixed below for - other OSes. He made c-ares check for and understand it if present. +- actually sync with lib/setup_once.h -- Now c-ares will use local host name lookup _before_ DNS resolving by default - if nothing else is told. +- sync with lib/setup_once.h -* September 26 +Steinar H. Gunderson (16 Oct 2007) +- Fix a bug where fallback from AF_INET6 to AF_INET would not work properly together with relative search; if you had a search path of .a.com and .b.com, and foo.a.com would return ARES_ENODATA and foo.b.com would return ARES_ENOTFOUND, the lookup would not properly retry with AF_INET as it forgot the first ARES_ENODATA. -- Henrik Stoerner: found out that c-ares does not look at the /etc/host.conf - file to determine the sequence in which to search /etc/hosts and DNS. So on - systems where this order is defined by /etc/host.conf instead of a "lookup" - entry in /etc/resolv.conf, c-ares will always default to looking in DNS - first, and /etc/hosts second. +Dan Fandrich (15 Oct 2007) +- Mention first version with CURLOPT_COPYPOSTFIELDS. + Don't confuse NUL with NULL. - c-ares now looks at +Gisle Vanem (8 Oct 2007) +- Added needed 'HAVE_*' defines. - 1) resolv.conf (for the "lookup" line); - 2) nsswitch.fon (for the "hosts:" line); - 3) host.conf (for the "order" line). +- 'FD_CLOXEC' is meaningless on MSDOS/Watt-32. - First match wins. +Steinar H. Gunderson (4 Oct 2007) +- Removed a piece of redundant code (process_answer already takes care of it). -- Dominick Meglio patched: C-ares on Windows assumed that the HOSTS file is - located in a static location. It assumed - C:\Windows\System32\Drivers\Etc. This is a poor assumption to make. In fact, - the location of the HOSTS file can be changed via a registry setting. +- Another timeout fix in ares_getnameinfo(). - There is a key called DatabasePath which specifies the path to the HOSTS - file: - http://www.microsoft.com/technet/itsolutions/network/deploy/depovg/tcpip2k.mspx +- Send the timeout count in ares_getnameinfo(). - The patch will make c-ares correctly consult the registry for the location - of this file. +- Moved the NULL check for channel upwards in ares_destroy(). -* August 29 +- Clarified the comment over ares_cancel. -- Gisle Vanem fixed the MSVC build files. +Yang Tse (2 Oct 2007) +- Avoid a segfault when generating a DNS "Transaction ID" in internal + function init_id_key() under low memory conditions. -* August 20 +- Add ares_llist.c and ares_llist.h to MSCV project file. -- Gisle Vanem made c-ares build and work with his Watt-32 TCP/IP stack. +Daniel Stenberg (2 Oct 2007) +- Fixed the problem where next_lookup would use 'status' uninitialized. Now + it gets passed the initial value as an argument. -* August 13 +Yang Tse (2 Oct 2007) +- Avoid inline C99ism, and move c-ares routines for managing doubly-linked lists. -- Harshal Pradhan made a minor syntax change in ares_init.c to make it build - fine with MSVC 7.1 +Daniel Stenberg (1 Oct 2007) +- ares_strerror() segfaulted if the input error number was out of the currently + supported range. -* July 24 +- Prevent ares_strerror() from segfaulting if an invalid error code is passed + in as argument! -- Made the lib get built static only if --enable-debug is used. +Yang Tse (30 Sep 2007) +- Fix compiler warning -- Gisle Vanem fixed: +- check availability of <netinet/tcp.h> - Basically in loops like handle_errors(), 'query->next' was assigned a local - variable and then query was referenced after the memory was freed by - next_server(). I've changed that so next_server() and end_query() returns - the next query. So callers should use this ret-value. +- improve portability, defining MAXDNAME and MAXCDNAME - The next problem was that 'server->tcp_buffer_pos' had a random value at - entry to 1st recv() (luckily causing Winsock to return ENOBUFS). +Steinar H. Gunderson (30 Sep 2007) +- Fix a memory leak that I recently inadvertedly introduced. - I've also added a ares_writev() for Windows to streamline the code a bit - more. +- Use ISDIGIT instead of isdigit; fixes a gcc warning. -* July 20 -- Fixed a few variable return types for some system calls. Made configure - check for ssize_t to make it possible to use that when receiving the send() - error code. This is necessary to prevent compiler warnings on some systems. +- Port the TCP socket fix made in ares_fds() to ares_getsock() as well. -- Made configure create config.h, and all source files now include setup.h that - might include the proper config.h (or a handicrafted alternative). +- Previously, processing a large batch of timeouts was O(n^2) in the number of + outstanding queries, and processing a DNS response packet was O(n) in the + number of outstanding queries. To speed things up in Google, we added a few circular, + doubly-linked lists of queries that are hash-bucketed based on + the attributes we care about, so most important operations are now O(1). + + It might be that the number of buckets are higher than most people would need, + but on a quick calculation it should only be 100kB or so even on a 64-bit + system, so I've let it stay as-is. -- Switched to 'ares_socket_t' type for sockets in ares, since Windows don't - use 'int' for that. +Gisle Vanem (29 Sep 2007) +- We should standarise on C comments. -- automake-ified and libool-ified c-ares. Now it builds libcares as a shared - lib on most platforms if wanted. (This bloated the size of the release - archive with another 200K!) +- Fix compiler warning in setsockopt(). -- Makefile.am now uses Makefile.inc for the c sources, h headers and man - pages, to make it easier for other makefiles to use the exact same set of - files. +Steinar H. Gunderson (29 Sep 2007) +- TCP queries can time out too, not just UDP queries. (Patch from the Google tree.) -- Adjusted 'maketgz' to use the new automake magic when building distribution - archives. +- Read and process as many packets as possible in read_udp_packets, to avoid having to run the entire event loop once per packet. (Patch from the Google tree.) -- Anyone desires HTML and/or PDF versions of the man pages in the release - archives? +- There are two different places in write_tcp_data() that advance the send_queue; however, they are slightly different and only the first one properly uses a while loop. Consolidate both into a single function that DTTR. (Patch from the Google tree.) -* July 3 -- Günter Knauf made c-ares build and run on Novell Netware. +- Reject names that are longer than 255 characters, to avoid problems with strict or buggy DNS server implementations. (Patch from the Google tree) -* July 1 -- Gisle Vanem provided Makefile.dj to build with djgpp, added a few more djgpp - fixes and made ares not use 'errno' to provide further info on Windows. +- In ares_mkquery, make sure we set buflen and buf to reasonable values if there's an error. (Patch from the Google tree) -* June 30 -- Gisle Vanem made it build with djgpp and run fine with the Watt-32 stack. +- Be stricter about what's a valid IP address in fake_hostent. (Patch from the Google tree.) -* June 10 -- Gisle Vanem's init patch for Windows: +- Handle the root of the DNS tree correctly in ares_expand_name. - The init_by_resolv_conf() function fetches the DNS-server(s) - from a series of registry branches. +Daniel Stenberg (28 Sep 2007) +- today's modifications by Steinar and me - This can be wrong in the case where DHCP has assigned nameservers, but the - user has overridden these servers with other prefered settings. Then it's - wrong to use the DHCPNAMESERVER setting in registry. +- Bumped version to 1.5.0 for next release and soname bumped to 2 due to ABI + and API changes in the progress callback (and possibly more coming up from + Steinar) - In the case of no global DHCP-assigned or fixed servers, but DNS server(s) - per adapter, one has to query the adapter branches. But how can c-ares know - which adapter is valid for use? AFAICS it can't. There could be one adapter - that is down (e.g. a VPN adapter). +Steinar H. Gunderson (28 Sep 2007) +- Unrevert previous 'missing' hunks. They were missing since the patch is still in for review :-) - So it's better to leave this to the IP Helper API (iphlapi) available in - Win-98/2000 and later. My patch falls-back to the old way if not available. +- Yet more missing hunks... Nggh. -* June 8 -- James Bursa fixed an init issue for RISC OS. +- Always register for TCP events even if there are no outstanding queries, as the other side could always close the connection, which is a valid event which should be responded to. -* May 11 -- Nico Stappenbelt reported that when processing domain and search lines in - the resolv.conf file, the first entry encountered is processed and used as - the search list. According to the manual pages for both Linux, Solaris and - Tru64, the last entry of either a domain or a search field is used. +- Forgot to include a few hunks from ares_process.c earlier. Fixing now. - This is now adjusted in the code +- Support a few more socket options, and refactor the option setting a bit. (Patch from the Google tree.) -Version 1.2.0 (April 13, 2004) +- Make the query callbacks return the number of timeouts that happened during the execution of a query, and update documentation accordingly. (Patch from the Google tree.) -* April 2, 2004 -- Updated various man pages to look nicer when converted to HTML on the web - site. +- Three fixes in one commit (sorry): a) Take care of the tcpbuf if it ends while queued for transmission, note broken servers and close them in the main loop, and store TCP socket generation number in order not to send the same query twice over the same socket. -* April 1, 2004 -- Dirk Manske provided a new function that is now named ares_cancel(). It is - used to cancel/cleanup a resolve/request made using ares functions on the - given ares channel. It does not destroy/kill the ares channel itself. +- Don't skip a server if it's the only one. (Bugfix from the Google tree.) -- Dominick Meglio cleaned up the formatting in several man pages. +Daniel Stenberg (27 Sep 2007) +- wrong, revert the previous "fix" and instead check that the fd_set pointer + is non-NULL before we FD_CLR -* March 30, 2004 -- Dominick Meglio's new ares_expand_string. A helper function when decoding - incoming DNS packages. +- eek, fix the conditions to return on either problem instead of requiring + both to occur -- Daniel Stenberg modified the Makefile.in to use a for loop for the man page - installation to improve overview and make it easier to add man pages. +- Steinar H. Gunderson fixed: Correctly clear sockets from the fd_set on in + several functions (write_tcp_data, read_tcp_data, read_udp_packets) so that + if it fails and the socket is closed the following code doesn't try to use + the file descriptor. -Version 1.1.0 (March 11, 2004) +- Steinar H. Gunderson modified c-ares to now also do to DNS retries even when + TCP is used since there are several edge cases where it still makes sense. -* March 9, 2004 -- Gisle Vanem improved build on Windows. +- Brad House provided a fix for ares_save_options(): Apparently I overlooked + something with the ares_save_options() where it would try to do a malloc(0) + when no options of that type needed to be saved. On most platforms, this was + fine because malloc(0) doesn't actually return NULL, but on AIX it does, so + ares_save_options would return ARES_ENOMEM. -* February 25, 2004 -- Dan Fandrich found a flaw in the Feb 22 fix. +- added initial pkg-config file (attempt) -- Added better configure --enable-debug logic (taken from the curl configure - script). Added acinclude.m4 to the tarball. +Gunter Knauf (20 Jul 2007) +- added curl include for debug builds. -* February 23, 2004 -- Removed ares_free_errmem(), the function, the file and the man page. It was - not used and it did nothing. +Daniel Stenberg (14 Jul 2007) +- added another SEE ALSO -- Fixed a lot of code that wasn't "64bit clean" and thus caused a lot of - compiler warnings on picky compilers. +- Brad House's fix to hish a win32 compiler warning -* February 22, 2004 -- Dominick Meglio made ares init support multiple name servers in the - NameServer key on Windows. +- added Vlad's entire description of his valgrind fix -* February 16, 2004 -- Modified ares_private.h to include libcurl's memory debug header if - CURLDEBUG is set. This makes all the ares-functions supervised properly by - the curl test suite. This also forced me to add inclusion of the - ares_private.h header in a few more files that are using some kind of - memory-related resources. +- Vlad Dinulescu fixed two outstanding valgrind reports -- Made the makefile only build ahost and adig if 'make demos' is used. +Gunter Knauf (8 Jul 2007) +- added better CodeWarrior detection. -* February 10, 2004 -- Dirk Manske made ares_version.h installed with 'make install' +- removed some obsolete include paths and defines. -* February 4, 2004 -- ares_free_errmem() is subject for removal, it is simply present for future - purposes, and since we removed the extra parameter in strerror() it won't - be used by c-ares! -- configure --enable-debug now enables picky compiler options if gcc is used -- fixed several compiler warnings --enable-debug showed and Joerg Mueller-Tolk - reported +- add test for gettimeofday() so that HAVE_GETTIMEOFDAY gets defined. -Version 1.0.0 (February 3, 2004) +- although the check for HAVE_STRUCT_TIMEVAL solved the redefine it is incorrect; lets see if a check for HAVE_GETTIMEOFDAY also works; if gettimeofday() is present then we can assume we have the timezone struct too. -* February 3, 2004 -- now we produce the libcares.a library instead of the previous libares.a - since we are no longer compatible +- added check for sys/param.h. -* February 2, 2004 +- trial to catch problem with Daniels cross-mingw ares builds. -- ares_strerror() has one argument less. This is the first official - modification of the existing provided ares API. +- added NetWare CLIB-own header to solve gcc warnings. -* January 29, 2004 +- few minor changes to make ares compile for NetWare CLIB architecture. -- Dirk Manske fixed how the socket is set non-blocking. +- changed to build for CLIB / LIBC. -* January 4, 2004 +- sync'd with lib makefile changes: use var for awk; fixed RECV* / SEND* defines; debug var can be overwritten; added better compiler path handling. -- Dominick Meglio made the private gettimeofday() become ares_gettimeofday() - instead in order to not pollute the name space and risk colliding with - other libraries' versions of this function. +Daniel Stenberg (8 Jun 2007) +- start working on 1.4.1 -* October 24, 2003. Daniel Stenberg +Version 1.4.0 (8 Jun 2007) - Added ares_version(). +Daniel Stenberg (8 Jun 2007) +- 1.4.0 preps -Version 1.0-pre1 (8 October 2003) +- the revert -- James Bursa made it run on RISC OS +- Revered Ashish Sharma's multiple entries patch, as it caused memory madness -- Dominick Meglio made it run fine on NT4 +- minor edit since getting an ID seems pointless when failure happens -- Duncan Wilcox made it work fine on Mac OS X +- fix the bad bad bad mess this caused on name resolves returning more than + one name... Reported by James Bursa -- Daniel Stenberg adjusted the windows port +- Brad Spencer found and fixed three flaws in the code, found with the new + gcc 4.2.0 warning: -Waddress -- liren at vivisimo.com made the initial windows port +- Brad House fixed VS2005 compiler warnings due to time_t being 64bit. + He also made recent Microsoft compilers use _strdup() instead of strdup(). -* Imported the sources from ares 1.1.1 +- Ashish Sharma provided a patch for supporting multiple entries in the + /etc/hosts file. Patch edited for coding style and functionality by me + (Daniel). @@ -0,0 +1,328 @@ +** This file is adapted from libcurl and not yet fully rewritten for c-ares! ** + + ___ __ _ _ __ ___ ___ + / __| ___ / _` | '__/ _ \/ __| + | (_ |___| (_| | | | __/\__ \ + \___| \__,_|_| \___||___/ + + How To Compile + +Installing Binary Packages +========================== + + Lots of people download binary distributions of c-ares. This document + does not describe how to install c-ares using such a binary package. + This document describes how to compile, build and install c-ares from + source code. + +Building from git +================= + + If you get your code off a git repository, see the GIT-INFO file in the + root directory for specific instructions on how to proceed. + +UNIX +==== + A normal unix installation is made in three or four steps (after you've + unpacked the source archive): + + ./configure + make + make ahost adig acountry (optional) + make install + + You probably need to be root when doing the last command. + + If you have checked out the sources from the git repository, read the + GIT-INFO on how to proceed. + + Get a full listing of all available configure options by invoking it like: + + ./configure --help + + If you want to install c-ares in a different file hierarchy than /usr/local, + you need to specify that already when running configure: + + ./configure --prefix=/path/to/c-ares/tree + + If you happen to have write permission in that directory, you can do 'make + install' without being root. An example of this would be to make a local + install in your own home directory: + + ./configure --prefix=$HOME + make + make install + + MORE OPTIONS + ------------ + + To force configure to use the standard cc compiler if both cc and gcc are + present, run configure like + + CC=cc ./configure + or + env CC=cc ./configure + + To force a static library compile, disable the shared library creation + by running configure like: + + ./configure --disable-shared + + If you're a c-ares developer and use gcc, you might want to enable more + debug options with the --enable-debug option. + + SPECIAL CASES + ------------- + Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1 + to get correct large file support. + + The Open Watcom C compiler on Linux requires configuring with the variables: + + ./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \ + RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra + + +Win32 +===== + + Building Windows DLLs and C run-time (CRT) linkage issues + --------------------------------------------------------- + + As a general rule, building a DLL with static CRT linkage is highly + discouraged, and intermixing CRTs in the same app is something to + avoid at any cost. + + Reading and comprehension of Microsoft Knowledge Base articles + KB94248 and KB140584 is a must for any Windows developer. Especially + important is full understanding if you are not going to follow the + advice given above. + + KB94248 - How To Use the C Run-Time + http://support.microsoft.com/kb/94248/en-us + + KB140584 - How to link with the correct C Run-Time (CRT) library + http://support.microsoft.com/kb/140584/en-us + + KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries + http://msdn.microsoft.com/en-us/library/ms235460 + + If your app is misbehaving in some strange way, or it is suffering + from memory corruption, before asking for further help, please try + first to rebuild every single library your app uses as well as your + app using the debug multithreaded dynamic C runtime. + + MingW32 + ------- + + Make sure that MinGW32's bin dir is in the search path, for example: + + set PATH=c:\mingw32\bin;%PATH% + + then run 'make -f Makefile.m32' in the root dir. + + Cygwin + ------ + + Almost identical to the unix installation. Run the configure script in the + c-ares root with 'sh configure'. Make sure you have the sh executable in + /bin/ or you'll see the configure fail toward the end. + + Run 'make' + + Dev-Cpp + ------- + + See the separate INSTALL.devcpp file for details. + + MSVC 6 caveats + -------------- + + If you use MSVC 6 it is required that you use the February 2003 edition PSDK: + http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm + + MSVC from command line + ---------------------- + + Run the 'vcvars32.bat' file to get a proper environment. The + vcvars32.bat file is part of the Microsoft development environment and + you may find it in 'C:\Program Files\Microsoft Visual Studio\vc98\bin' + provided that you installed Visual C/C++ 6 in the default directory. + + Further details in README.msvc + + MSVC IDES + --------- + + Details in README.msvc + + Important static c-ares usage note + ---------------------------------- + + When building an application that uses the static c-ares library, you must + add '-DCARES_STATICLIB' to your CFLAGS. Otherwise the linker will look for + dynamic import symbols. + + +IBM OS/2 +======== + Building under OS/2 is not much different from building under unix. + You need: + + - emx 0.9d + - GNU make + - GNU patch + - ksh + - GNU bison + - GNU file utilities + - GNU sed + - autoconf 2.13 + + If during the linking you get an error about _errno being an undefined + symbol referenced from the text segment, you need to add -D__ST_MT_ERRNO__ + in your definitions. + + If you're getting huge binaries, probably your makefiles have the -g in + CFLAGS. + + +QNX +=== + (This section was graciously brought to us by David Bentham) + + As QNX is targeted for resource constrained environments, the QNX headers + set conservative limits. This includes the FD_SETSIZE macro, set by default + to 32. Socket descriptors returned within the c-ares library may exceed this, + resulting in memory faults/SIGSEGV crashes when passed into select(..) + calls using fd_set macros. + + A good all-round solution to this is to override the default when building + c-ares, by overriding CFLAGS during configure, example + # configure CFLAGS='-DFD_SETSIZE=64 -g -O2' + + +RISC OS +======= + The library can be cross-compiled using gccsdk as follows: + + CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \ + --host=arm-riscos-aof --without-random --disable-shared + make + + where riscos-gcc and riscos-ar are links to the gccsdk tools. + You can then link your program with c-ares/lib/.libs/libcares.a + + +NetWare +======= + To compile libcares.a / libcares.lib you need: + - either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later. + - gnu make and awk running on the platform you compile on; + native Win32 versions can be downloaded from: + http://www.gknw.net/development/prgtools/ + - recent Novell LibC SDK available from: + http://developer.novell.com/ndk/libc.htm + - or recent Novell CLib SDK available from: + http://developer.novell.com/ndk/clib.htm + + Set a search path to your compiler, linker and tools; on Linux make + sure that the var OSTYPE contains the string 'linux'; set the var + NDKBASE to point to the base of your Novell NDK; and then type + 'make -f Makefile.netware' from the top source directory; + + +Android +======= + Method using a configure cross-compile (tested with Android NDK r7b): + - prepare the toolchain of the Android NDK for standalone use; this can + be done by invoking the script: + ./tools/make-standalone-toolchain.sh + which creates a usual cross-compile toolchain. Lets assume that you put + this toolchain below /opt then invoke configure with something like: + export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH + ./configure --host=arm-linux-androideabi [more configure options] + make + - if you want to compile directly from our GIT repo you might run into + this issue with older automake stuff: + checking host system type... + Invalid configuration `arm-linux-androideabi': + system `androideabi' not recognized + configure: error: /bin/sh ./config.sub arm-linux-androideabi failed + this issue can be fixed with using more recent versions of config.sub + and config.guess which can be obtained here: + http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree + you need to replace your system-own versions which usually can be + found in your automake folder: + find /usr -name config.sub + + +CROSS COMPILE +============= + (This section was graciously brought to us by Jim Duey, with additions by + Dan Fandrich) + + Download and unpack the c-ares package. + + 'cd' to the new directory. (e.g. cd c-ares-1.7.6) + + Set environment variables to point to the cross-compile toolchain and call + configure with any options you need. Be sure and specify the '--host' and + '--build' parameters at configuration time. The following script is an + example of cross-compiling for the IBM 405GP PowerPC processor using the + toolchain from MonteVista for Hardhat Linux. + + (begin script) + + #! /bin/sh + + export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin + export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include" + export AR=ppc_405-ar + export AS=ppc_405-as + export LD=ppc_405-ld + export RANLIB=ppc_405-ranlib + export CC=ppc_405-gcc + export NM=ppc_405-nm + + ./configure --target=powerpc-hardhat-linux \ + --host=powerpc-hardhat-linux \ + --build=i586-pc-linux-gnu \ + --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \ + --exec-prefix=/usr/local + + (end script) + + You may also need to provide a parameter like '--with-random=/dev/urandom' + to configure as it cannot detect the presence of a random number + generating device for a target system. The '--prefix' parameter + specifies where c-ares will be installed. If 'configure' completes + successfully, do 'make' and 'make install' as usual. + + In some cases, you may be able to simplify the above commands to as + little as: + + ./configure --host=ARCH-OS + + +PORTS +===== + This is a probably incomplete list of known hardware and operating systems + that c-ares has been compiled for. If you know a system c-ares compiles and + runs on, that isn't listed, please let us know! + + - Alpha Tru64 v5.0 5.1 + - ARM Android 1.5, 2.1, 2.3 + - MIPS IRIX 6.2, 6.5 + - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2 + - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6 + - i386 Novell NetWare + - i386 Windows 95, 98, ME, NT, 2000, XP, 2003 + - x86_64 Linux + +Useful URLs +=========== + +c-ares http://c-ares.haxx.se/ + +MingW http://www.mingw.org/ +MinGW-w64 http://mingw-w64.sourceforge.net/ +OpenWatcom http://www.openwatcom.org/ diff --git a/Makefile.am b/Makefile.am index 8969403..23059a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,16 +22,16 @@ ACLOCAL_AMFLAGS = -I m4 # $(top_srcdir) is for c-ares's ares_setup.h and other "c-ares-private" files if CURLDEBUG -INCLUDES = -I$(top_builddir)/../include/curl \ - -I$(top_builddir)/../include \ - -I$(top_srcdir)/../include \ - -I$(top_builddir)/../lib \ - -I$(top_srcdir)/../lib \ - -I$(top_builddir) \ - -I$(top_srcdir) +AM_CPPFLAGS = -I$(top_builddir)/../include/curl \ + -I$(top_builddir)/../include \ + -I$(top_srcdir)/../include \ + -I$(top_builddir)/../lib \ + -I$(top_srcdir)/../lib \ + -I$(top_builddir) \ + -I$(top_srcdir) else -INCLUDES = -I$(top_builddir) \ - -I$(top_srcdir) +AM_CPPFLAGS = -I$(top_builddir) \ + -I$(top_srcdir) endif lib_LTLIBRARIES = libcares.la @@ -55,7 +55,7 @@ EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \ Makefile.m32 Makefile.netware Makefile.msvc Makefile.Watcom $(man_MANS) \ config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \ TODO ares_build.h.in $(PDFPAGES) cares.rc README.msvc $(MSVCFILES) \ - $(CSOURCES) $(HHEADERS) config-dos.h acountry.1 adig.1 ahost.1 + $(CSOURCES) $(HHEADERS) config-dos.h acountry.1 adig.1 ahost.1 INSTALL CLEANFILES = $(PDFPAGES) $(HTMLPAGES) @@ -64,7 +64,7 @@ DISTCLEANFILES = ares_build.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcares.pc -VER=-version-info 2:0:0 +CARES_VERSION_INFO = -version-info 3:0:1 # This flag accepts an argument of the form current[:revision[:age]]. So, # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to # 1. @@ -93,16 +93,44 @@ VER=-version-info 2:0:0 # set age to 0. (c:r:a=0) # -if NO_UNDEFINED -# The -no-undefined flag is crucial for this to build fine on some platforms -UNDEF = -no-undefined +AM_LDFLAGS = + +libcares_la_LDFLAGS_EXTRA = + +if CARES_LT_SHLIB_USE_VERSION_INFO +libcares_la_LDFLAGS_EXTRA += $(CARES_VERSION_INFO) endif -libcares_la_LDFLAGS = $(UNDEF) $(VER) +if CARES_LT_SHLIB_USE_NO_UNDEFINED +libcares_la_LDFLAGS_EXTRA += -no-undefined +endif + +if CARES_LT_SHLIB_USE_MIMPURE_TEXT +libcares_la_LDFLAGS_EXTRA += -mimpure-text +endif + +libcares_la_LDFLAGS = $(AM_LDFLAGS) $(libcares_la_LDFLAGS_EXTRA) # Add -Werror if defined CFLAGS += @CARES_CFLAG_EXTRAS@ +if USE_CPPFLAG_CARES_STATICLIB +AM_CPPFLAGS += $(CPPFLAG_CARES_STATICLIB) +endif + +libcares_la_CFLAGS_EXTRA = + +libcares_la_CPPFLAGS_EXTRA = -DCARES_BUILDING_LIBRARY + +if DOING_CARES_SYMBOL_HIDING +libcares_la_CFLAGS_EXTRA += $(CFLAG_CARES_SYMBOL_HIDING) +libcares_la_CPPFLAGS_EXTRA += -DCARES_SYMBOL_HIDING +endif + +libcares_la_CFLAGS = $(AM_CFLAGS) $(libcares_la_CFLAGS_EXTRA) + +libcares_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcares_la_CPPFLAGS_EXTRA) + # Makefile.inc provides the CSOURCES and HHEADERS defines include Makefile.inc @@ -117,14 +145,17 @@ libcares_la_HEADERS = ares.h ares_version.h ares_dns.h \ ahost_SOURCES = ahost.c $(SAMPLESOURCES) $(SAMPLEHEADERS) ahost_LDADD = $(top_builddir)/libcares.la ahost_CFLAGS = $(AM_CFLAGS) +ahost_CPPFLAGS = $(AM_CPPFLAGS) adig_SOURCES = adig.c $(SAMPLESOURCES) $(SAMPLEHEADERS) adig_LDADD = $(top_builddir)/libcares.la adig_CFLAGS = $(AM_CFLAGS) +adig_CPPFLAGS = $(AM_CPPFLAGS) acountry_SOURCES = acountry.c $(SAMPLESOURCES) $(SAMPLEHEADERS) acountry_LDADD = $(top_builddir)/libcares.la acountry_CFLAGS = $(AM_CFLAGS) +acountry_CPPFLAGS = $(AM_CPPFLAGS) SOURCEDMANDIR = man3 SOURCEDMANPAGES = ares_init.3 diff --git a/Makefile.in b/Makefile.in index 1b8b556..f7f9321 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,15 +18,29 @@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -40,12 +55,19 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = $(am__EXEEXT_1) +@CARES_LT_SHLIB_USE_VERSION_INFO_TRUE@am__append_1 = $(CARES_VERSION_INFO) +@CARES_LT_SHLIB_USE_NO_UNDEFINED_TRUE@am__append_2 = -no-undefined +@CARES_LT_SHLIB_USE_MIMPURE_TEXT_TRUE@am__append_3 = -mimpure-text +@USE_CPPFLAG_CARES_STATICLIB_TRUE@am__append_4 = $(CPPFLAG_CARES_STATICLIB) +@DOING_CARES_SYMBOL_HIDING_TRUE@am__append_5 = $(CFLAG_CARES_SYMBOL_HIDING) +@DOING_CARES_SYMBOL_HIDING_TRUE@am__append_6 = -DCARES_SYMBOL_HIDING DIST_COMMON = README $(am__configure_deps) $(libcares_la_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.inc $(srcdir)/ares_build.h.in \ $(srcdir)/ares_config.h.in $(srcdir)/libcares.pc.in \ - $(top_srcdir)/configure AUTHORS NEWS TODO compile config.guess \ - config.sub depcomp install-sh ltmain.sh missing mkinstalldirs + $(top_srcdir)/configure AUTHORS INSTALL NEWS TODO compile \ + config.guess config.sub depcomp install-sh ltmain.sh missing \ + mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/cares-compilers.m4 \ @@ -53,94 +75,150 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/cares-compilers.m4 \ $(top_srcdir)/m4/cares-functions.m4 \ $(top_srcdir)/m4/cares-override.m4 \ $(top_srcdir)/m4/cares-reentrant.m4 \ - $(top_srcdir)/m4/cares-system.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/xc-translit.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/xc-cc-check.m4 \ + $(top_srcdir)/m4/xc-lt-iface.m4 \ + $(top_srcdir)/m4/xc-translit.m4 \ + $(top_srcdir)/m4/xc-val-flgs.m4 \ + $(top_srcdir)/m4/zz40-xc-ovr.m4 \ + $(top_srcdir)/m4/zz50-xc-ovr.m4 \ + $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ares_config.h ares_build.h CONFIG_CLEAN_FILES = libcares.pc +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libcares_ladir)" -libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libcares_la_LIBADD = -am__objects_1 = ares__close_sockets.lo ares__get_hostent.lo \ - ares__read_line.lo ares__timeval.lo ares_cancel.lo \ - ares_data.lo ares_destroy.lo ares_expand_name.lo \ - ares_expand_string.lo ares_fds.lo ares_free_hostent.lo \ - ares_free_string.lo ares_getenv.lo ares_gethostbyaddr.lo \ - ares_gethostbyname.lo ares_getnameinfo.lo ares_getsock.lo \ - ares_init.lo ares_library_init.lo ares_llist.lo \ - ares_mkquery.lo ares_nowarn.lo ares_options.lo \ - ares_parse_a_reply.lo ares_parse_aaaa_reply.lo \ - ares_parse_mx_reply.lo ares_parse_ns_reply.lo \ - ares_parse_ptr_reply.lo ares_parse_srv_reply.lo \ - ares_parse_txt_reply.lo ares_platform.lo ares_process.lo \ - ares_query.lo ares_search.lo ares_send.lo ares_strcasecmp.lo \ - ares_strdup.lo ares_strerror.lo ares_timeout.lo \ - ares_version.lo ares_writev.lo bitncmp.lo inet_net_pton.lo \ - inet_ntop.lo windows_port.lo +am__objects_1 = libcares_la-ares__close_sockets.lo \ + libcares_la-ares__get_hostent.lo \ + libcares_la-ares__read_line.lo libcares_la-ares__timeval.lo \ + libcares_la-ares_cancel.lo libcares_la-ares_data.lo \ + libcares_la-ares_destroy.lo libcares_la-ares_expand_name.lo \ + libcares_la-ares_expand_string.lo libcares_la-ares_fds.lo \ + libcares_la-ares_free_hostent.lo \ + libcares_la-ares_free_string.lo libcares_la-ares_getenv.lo \ + libcares_la-ares_gethostbyaddr.lo \ + libcares_la-ares_gethostbyname.lo \ + libcares_la-ares_getnameinfo.lo libcares_la-ares_getsock.lo \ + libcares_la-ares_init.lo libcares_la-ares_library_init.lo \ + libcares_la-ares_llist.lo libcares_la-ares_mkquery.lo \ + libcares_la-ares_create_query.lo libcares_la-ares_nowarn.lo \ + libcares_la-ares_options.lo libcares_la-ares_parse_a_reply.lo \ + libcares_la-ares_parse_aaaa_reply.lo \ + libcares_la-ares_parse_mx_reply.lo \ + libcares_la-ares_parse_naptr_reply.lo \ + libcares_la-ares_parse_ns_reply.lo \ + libcares_la-ares_parse_ptr_reply.lo \ + libcares_la-ares_parse_soa_reply.lo \ + libcares_la-ares_parse_srv_reply.lo \ + libcares_la-ares_parse_txt_reply.lo \ + libcares_la-ares_platform.lo libcares_la-ares_process.lo \ + libcares_la-ares_query.lo libcares_la-ares_search.lo \ + libcares_la-ares_send.lo libcares_la-ares_strcasecmp.lo \ + libcares_la-ares_strdup.lo libcares_la-ares_strerror.lo \ + libcares_la-ares_timeout.lo libcares_la-ares_version.lo \ + libcares_la-ares_writev.lo libcares_la-bitncmp.lo \ + libcares_la-inet_net_pton.lo libcares_la-inet_ntop.lo \ + libcares_la-windows_port.lo am__objects_2 = am_libcares_la_OBJECTS = $(am__objects_1) $(am__objects_2) libcares_la_OBJECTS = $(am_libcares_la_OBJECTS) +libcares_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcares_la_CFLAGS) \ + $(CFLAGS) $(libcares_la_LDFLAGS) $(LDFLAGS) -o $@ @CURLDEBUG_FALSE@am__EXEEXT_1 = ahost$(EXEEXT) adig$(EXEEXT) \ @CURLDEBUG_FALSE@ acountry$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am__objects_3 = acountry-ares_getopt.$(OBJEXT) \ acountry-ares_nowarn.$(OBJEXT) \ - acountry-ares_strcasecmp.$(OBJEXT) \ - acountry-inet_net_pton.$(OBJEXT) acountry-inet_ntop.$(OBJEXT) + acountry-ares_strcasecmp.$(OBJEXT) am_acountry_OBJECTS = acountry-acountry.$(OBJEXT) $(am__objects_3) \ $(am__objects_2) acountry_OBJECTS = $(am_acountry_OBJECTS) acountry_DEPENDENCIES = $(top_builddir)/libcares.la +acountry_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(acountry_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ am__objects_4 = adig-ares_getopt.$(OBJEXT) adig-ares_nowarn.$(OBJEXT) \ - adig-ares_strcasecmp.$(OBJEXT) adig-inet_net_pton.$(OBJEXT) \ - adig-inet_ntop.$(OBJEXT) + adig-ares_strcasecmp.$(OBJEXT) am_adig_OBJECTS = adig-adig.$(OBJEXT) $(am__objects_4) \ $(am__objects_2) adig_OBJECTS = $(am_adig_OBJECTS) adig_DEPENDENCIES = $(top_builddir)/libcares.la +adig_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(adig_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ am__objects_5 = ahost-ares_getopt.$(OBJEXT) \ - ahost-ares_nowarn.$(OBJEXT) ahost-ares_strcasecmp.$(OBJEXT) \ - ahost-inet_net_pton.$(OBJEXT) ahost-inet_ntop.$(OBJEXT) + ahost-ares_nowarn.$(OBJEXT) ahost-ares_strcasecmp.$(OBJEXT) am_ahost_OBJECTS = ahost-ahost.$(OBJEXT) $(am__objects_5) \ $(am__objects_2) ahost_OBJECTS = $(am_ahost_OBJECTS) ahost_DEPENDENCIES = $(top_builddir)/libcares.la +ahost_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(ahost_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(libcares_la_SOURCES) $(acountry_SOURCES) $(adig_SOURCES) \ $(ahost_SOURCES) DIST_SOURCES = $(libcares_la_SOURCES) $(acountry_SOURCES) \ $(adig_SOURCES) $(ahost_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgconfig_DATA) -libcares_laHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libcares_la_HEADERS) ETAGS = etags CTAGS = ctags @@ -148,16 +226,18 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ @@ -172,10 +252,10 @@ CCDEPMODE = @CCDEPMODE@ # Add -Werror if defined CFLAGS = @CFLAGS@ @CARES_CFLAG_EXTRAS@ +CFLAG_CARES_SYMBOL_HIDING = @CFLAG_CARES_SYMBOL_HIDING@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CURLDEBUG_FALSE = @CURLDEBUG_FALSE@ -CURLDEBUG_TRUE = @CURLDEBUG_TRUE@ +CPPFLAG_CARES_STATICLIB = @CPPFLAG_CARES_STATICLIB@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -189,6 +269,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -202,14 +283,11 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ -NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@ -NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ @@ -221,7 +299,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH = @PATH@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANDOM_FILE = @RANDOM_FILE@ RANLIB = @RANLIB@ @@ -230,11 +307,13 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -246,6 +325,7 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -273,13 +353,16 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign nostdinc ACLOCAL_AMFLAGS = -I m4 -@CURLDEBUG_FALSE@INCLUDES = -I$(top_builddir) \ -@CURLDEBUG_FALSE@ -I$(top_srcdir) - +@CURLDEBUG_FALSE@AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \ +@CURLDEBUG_FALSE@ $(am__append_4) # Specify our include paths here, and do it relative to $(top_srcdir) and # $(top_builddir), to ensure that these paths which belong to the library @@ -299,14 +382,12 @@ ACLOCAL_AMFLAGS = -I m4 # $(top_srcdir)/../lib is for libcurl's lib/setup.h and other "private" files # $(top_builddir) is for c-ares's generated ares_config.h file # $(top_srcdir) is for c-ares's ares_setup.h and other "c-ares-private" files -@CURLDEBUG_TRUE@INCLUDES = -I$(top_builddir)/../include/curl \ -@CURLDEBUG_TRUE@ -I$(top_builddir)/../include \ -@CURLDEBUG_TRUE@ -I$(top_srcdir)/../include \ -@CURLDEBUG_TRUE@ -I$(top_builddir)/../lib \ -@CURLDEBUG_TRUE@ -I$(top_srcdir)/../lib \ -@CURLDEBUG_TRUE@ -I$(top_builddir) \ -@CURLDEBUG_TRUE@ -I$(top_srcdir) - +@CURLDEBUG_TRUE@AM_CPPFLAGS = -I$(top_builddir)/../include/curl \ +@CURLDEBUG_TRUE@ -I$(top_builddir)/../include \ +@CURLDEBUG_TRUE@ -I$(top_srcdir)/../include \ +@CURLDEBUG_TRUE@ -I$(top_builddir)/../lib \ +@CURLDEBUG_TRUE@ -I$(top_srcdir)/../lib -I$(top_builddir) \ +@CURLDEBUG_TRUE@ -I$(top_srcdir) $(am__append_4) lib_LTLIBRARIES = libcares.la man_MANS = $(MANPAGES) MSVCFILES = vc/vc6aws.dsw vc/acountry/vc6acountry.dsp vc/adig/vc6adig.dsp \ @@ -321,13 +402,13 @@ EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \ Makefile.m32 Makefile.netware Makefile.msvc Makefile.Watcom $(man_MANS) \ config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \ TODO ares_build.h.in $(PDFPAGES) cares.rc README.msvc $(MSVCFILES) \ - $(CSOURCES) $(HHEADERS) config-dos.h acountry.1 adig.1 ahost.1 + $(CSOURCES) $(HHEADERS) config-dos.h acountry.1 adig.1 ahost.1 INSTALL CLEANFILES = $(PDFPAGES) $(HTMLPAGES) DISTCLEANFILES = ares_build.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcares.pc -VER = -version-info 2:0:0 +CARES_VERSION_INFO = -version-info 3:0:1 # This flag accepts an argument of the form current[:revision[:age]]. So, # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to # 1. @@ -355,10 +436,14 @@ VER = -version-info 2:0:0 # 6.If any interfaces have been removed since the last public release, then # set age to 0. (c:r:a=0) # - -# The -no-undefined flag is crucial for this to build fine on some platforms -@NO_UNDEFINED_TRUE@UNDEF = -no-undefined -libcares_la_LDFLAGS = $(UNDEF) $(VER) +AM_LDFLAGS = +libcares_la_LDFLAGS_EXTRA = $(am__append_1) $(am__append_2) \ + $(am__append_3) +libcares_la_LDFLAGS = $(AM_LDFLAGS) $(libcares_la_LDFLAGS_EXTRA) +libcares_la_CFLAGS_EXTRA = $(am__append_5) +libcares_la_CPPFLAGS_EXTRA = -DCARES_BUILDING_LIBRARY $(am__append_6) +libcares_la_CFLAGS = $(AM_CFLAGS) $(libcares_la_CFLAGS_EXTRA) +libcares_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcares_la_CPPFLAGS_EXTRA) CSOURCES = ares__close_sockets.c \ ares__get_hostent.c \ ares__read_line.c \ @@ -380,13 +465,16 @@ CSOURCES = ares__close_sockets.c \ ares_library_init.c \ ares_llist.c \ ares_mkquery.c \ + ares_create_query.c \ ares_nowarn.c \ ares_options.c \ ares_parse_a_reply.c \ ares_parse_aaaa_reply.c \ ares_parse_mx_reply.c \ + ares_parse_naptr_reply.c \ ares_parse_ns_reply.c \ ares_parse_ptr_reply.c \ + ares_parse_soa_reply.c \ ares_parse_srv_reply.c \ ares_parse_txt_reply.c \ ares_platform.c \ @@ -410,6 +498,7 @@ HHEADERS = ares.h \ ares_data.h \ ares_dns.h \ ares_getenv.h \ + ares_inet_net_pton.h \ ares_iphlpapi.h \ ares_ipv6.h \ ares_library_init.h \ @@ -423,8 +512,6 @@ HHEADERS = ares.h \ ares_version.h \ ares_writev.h \ bitncmp.h \ - inet_net_pton.h \ - inet_ntop.h \ nameser.h \ ares_setup.h \ setup_once.h @@ -450,11 +537,14 @@ MANPAGES = ares_cancel.3 \ ares_library_cleanup.3 \ ares_library_init.3 \ ares_mkquery.3 \ + ares_create_query.3 \ ares_parse_a_reply.3 \ ares_parse_aaaa_reply.3 \ ares_parse_mx_reply.3 \ + ares_parse_naptr_reply.3 \ ares_parse_ns_reply.3 \ ares_parse_ptr_reply.3 \ + ares_parse_soa_reply.3 \ ares_parse_srv_reply.3 \ ares_parse_txt_reply.3 \ ares_process.3 \ @@ -466,7 +556,9 @@ MANPAGES = ares_cancel.3 \ ares_set_socket_callback.3 \ ares_strerror.3 \ ares_timeout.3 \ - ares_version.3 + ares_version.3 \ + ares_inet_pton.3 \ + ares_inet_ntop.3 HTMLPAGES = ares_cancel.html \ ares_destroy.html \ @@ -489,11 +581,13 @@ HTMLPAGES = ares_cancel.html \ ares_library_cleanup.html \ ares_library_init.html \ ares_mkquery.html \ + ares_create_query.html \ ares_parse_a_reply.html \ ares_parse_aaaa_reply.html \ ares_parse_mx_reply.html \ ares_parse_ns_reply.html \ ares_parse_ptr_reply.html \ + ares_parse_soa_reply.html \ ares_parse_srv_reply.html \ ares_parse_txt_reply.html \ ares_process.html \ @@ -505,7 +599,9 @@ HTMLPAGES = ares_cancel.html \ ares_set_socket_callback.html \ ares_strerror.html \ ares_timeout.html \ - ares_version.html + ares_version.html \ + ares_inet_pton.html \ + ares_inet_ntop.html PDFPAGES = ares_cancel.pdf \ ares_destroy.pdf \ @@ -528,11 +624,13 @@ PDFPAGES = ares_cancel.pdf \ ares_library_cleanup.pdf \ ares_library_init.pdf \ ares_mkquery.pdf \ + ares_create_query.pdf \ ares_parse_a_reply.pdf \ ares_parse_aaaa_reply.pdf \ ares_parse_mx_reply.pdf \ ares_parse_ns_reply.pdf \ ares_parse_ptr_reply.pdf \ + ares_parse_soa_reply.pdf \ ares_parse_srv_reply.pdf \ ares_parse_txt_reply.pdf \ ares_process.pdf \ @@ -544,19 +642,17 @@ PDFPAGES = ares_cancel.pdf \ ares_set_socket_callback.pdf \ ares_strerror.pdf \ ares_timeout.pdf \ - ares_version.pdf + ares_version.pdf \ + ares_inet_pton.pdf \ + ares_inet_ntop.pdf SAMPLESOURCES = ares_getopt.c \ ares_nowarn.c \ - ares_strcasecmp.c \ - inet_net_pton.c \ - inet_ntop.c + ares_strcasecmp.c SAMPLEHEADERS = ares_getopt.h \ ares_nowarn.h \ - ares_strcasecmp.h \ - inet_net_pton.h \ - inet_ntop.h + ares_strcasecmp.h # Makefile.inc provides the CSOURCES and HHEADERS defines @@ -571,12 +667,15 @@ libcares_la_HEADERS = ares.h ares_version.h ares_dns.h \ ahost_SOURCES = ahost.c $(SAMPLESOURCES) $(SAMPLEHEADERS) ahost_LDADD = $(top_builddir)/libcares.la ahost_CFLAGS = $(AM_CFLAGS) +ahost_CPPFLAGS = $(AM_CPPFLAGS) adig_SOURCES = adig.c $(SAMPLESOURCES) $(SAMPLEHEADERS) adig_LDADD = $(top_builddir)/libcares.la adig_CFLAGS = $(AM_CFLAGS) +adig_CPPFLAGS = $(AM_CPPFLAGS) acountry_SOURCES = acountry.c $(SAMPLESOURCES) $(SAMPLEHEADERS) acountry_LDADD = $(top_builddir)/libcares.la acountry_CFLAGS = $(AM_CFLAGS) +acountry_CPPFLAGS = $(AM_CPPFLAGS) SOURCEDMANDIR = man3 SOURCEDMANPAGES = ares_init.3 MAN2HTML = roffit --mandir=. < $< >$@ @@ -586,21 +685,21 @@ all: ares_config.h ares_build.h .SUFFIXES: .SUFFIXES: .3 .html .c .lo .o .obj .pdf -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -611,34 +710,32 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; +$(srcdir)/Makefile.inc: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): ares_config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/ares_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status ares_config.h $(srcdir)/ares_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ ares_build.h: stamp-h2 - @if test ! -f $@; then \ - rm -f stamp-h2; \ - $(MAKE) stamp-h2; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h2; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi stamp-h2: $(srcdir)/ares_build.h.in $(top_builddir)/config.status @rm -f stamp-h2 @@ -650,21 +747,26 @@ libcares.pc: $(top_builddir)/config.status $(srcdir)/libcares.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: @@ -675,24 +777,26 @@ clean-libLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libcares.la: $(libcares_la_OBJECTS) $(libcares_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libcares_la_LDFLAGS) $(libcares_la_OBJECTS) $(libcares_la_LIBADD) $(LIBS) +libcares.la: $(libcares_la_OBJECTS) $(libcares_la_DEPENDENCIES) $(EXTRA_libcares_la_DEPENDENCIES) + $(libcares_la_LINK) -rpath $(libdir) $(libcares_la_OBJECTS) $(libcares_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -acountry$(EXEEXT): $(acountry_OBJECTS) $(acountry_DEPENDENCIES) + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +acountry$(EXEEXT): $(acountry_OBJECTS) $(acountry_DEPENDENCIES) $(EXTRA_acountry_DEPENDENCIES) @rm -f acountry$(EXEEXT) - $(LINK) $(acountry_LDFLAGS) $(acountry_OBJECTS) $(acountry_LDADD) $(LIBS) -adig$(EXEEXT): $(adig_OBJECTS) $(adig_DEPENDENCIES) + $(acountry_LINK) $(acountry_OBJECTS) $(acountry_LDADD) $(LIBS) +adig$(EXEEXT): $(adig_OBJECTS) $(adig_DEPENDENCIES) $(EXTRA_adig_DEPENDENCIES) @rm -f adig$(EXEEXT) - $(LINK) $(adig_LDFLAGS) $(adig_OBJECTS) $(adig_LDADD) $(LIBS) -ahost$(EXEEXT): $(ahost_OBJECTS) $(ahost_DEPENDENCIES) + $(adig_LINK) $(adig_OBJECTS) $(adig_LDADD) $(LIBS) +ahost$(EXEEXT): $(ahost_OBJECTS) $(ahost_DEPENDENCIES) $(EXTRA_ahost_DEPENDENCIES) @rm -f ahost$(EXEEXT) - $(LINK) $(ahost_LDFLAGS) $(ahost_OBJECTS) $(ahost_LDADD) $(LIBS) + $(ahost_LINK) $(ahost_OBJECTS) $(ahost_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -704,338 +808,587 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acountry-ares_getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acountry-ares_nowarn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acountry-ares_strcasecmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acountry-inet_net_pton.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acountry-inet_ntop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adig-adig.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adig-ares_getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adig-ares_nowarn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adig-ares_strcasecmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adig-inet_net_pton.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adig-inet_ntop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ahost-ahost.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ahost-ares_getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ahost-ares_nowarn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ahost-ares_strcasecmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ahost-inet_net_pton.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ahost-inet_ntop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares__close_sockets.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares__get_hostent.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares__read_line.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares__timeval.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_cancel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_data.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_destroy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_expand_name.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_expand_string.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_fds.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_free_hostent.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_free_string.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_getenv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_gethostbyaddr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_gethostbyname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_getnameinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_getsock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_init.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_library_init.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_llist.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_mkquery.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_nowarn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_options.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_parse_a_reply.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_parse_aaaa_reply.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_parse_mx_reply.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_parse_ns_reply.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_parse_ptr_reply.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_parse_srv_reply.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_parse_txt_reply.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_platform.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_process.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_query.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_search.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_send.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_strcasecmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_strdup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_strerror.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_timeout.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ares_writev.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitncmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_net_pton.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows_port.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares__close_sockets.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares__get_hostent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares__read_line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares__timeval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_cancel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_create_query.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_destroy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_expand_name.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_expand_string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_fds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_free_hostent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_free_string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_getenv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_gethostbyaddr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_gethostbyname.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_getnameinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_getsock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_library_init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_llist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_mkquery.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_nowarn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_options.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_a_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_aaaa_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_mx_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_naptr_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_ns_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_ptr_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_soa_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_srv_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_parse_txt_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_platform.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_process.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_query.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_search.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_send.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_strcasecmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_strdup.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_timeout.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_writev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-bitncmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-inet_net_pton.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-inet_ntop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-windows_port.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +libcares_la-ares__close_sockets.lo: ares__close_sockets.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares__close_sockets.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares__close_sockets.Tpo -c -o libcares_la-ares__close_sockets.lo `test -f 'ares__close_sockets.c' || echo '$(srcdir)/'`ares__close_sockets.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares__close_sockets.Tpo $(DEPDIR)/libcares_la-ares__close_sockets.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares__close_sockets.c' object='libcares_la-ares__close_sockets.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares__close_sockets.lo `test -f 'ares__close_sockets.c' || echo '$(srcdir)/'`ares__close_sockets.c + +libcares_la-ares__get_hostent.lo: ares__get_hostent.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares__get_hostent.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares__get_hostent.Tpo -c -o libcares_la-ares__get_hostent.lo `test -f 'ares__get_hostent.c' || echo '$(srcdir)/'`ares__get_hostent.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares__get_hostent.Tpo $(DEPDIR)/libcares_la-ares__get_hostent.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares__get_hostent.c' object='libcares_la-ares__get_hostent.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares__get_hostent.lo `test -f 'ares__get_hostent.c' || echo '$(srcdir)/'`ares__get_hostent.c + +libcares_la-ares__read_line.lo: ares__read_line.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares__read_line.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares__read_line.Tpo -c -o libcares_la-ares__read_line.lo `test -f 'ares__read_line.c' || echo '$(srcdir)/'`ares__read_line.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares__read_line.Tpo $(DEPDIR)/libcares_la-ares__read_line.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares__read_line.c' object='libcares_la-ares__read_line.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares__read_line.lo `test -f 'ares__read_line.c' || echo '$(srcdir)/'`ares__read_line.c + +libcares_la-ares__timeval.lo: ares__timeval.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares__timeval.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares__timeval.Tpo -c -o libcares_la-ares__timeval.lo `test -f 'ares__timeval.c' || echo '$(srcdir)/'`ares__timeval.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares__timeval.Tpo $(DEPDIR)/libcares_la-ares__timeval.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares__timeval.c' object='libcares_la-ares__timeval.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares__timeval.lo `test -f 'ares__timeval.c' || echo '$(srcdir)/'`ares__timeval.c + +libcares_la-ares_cancel.lo: ares_cancel.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_cancel.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_cancel.Tpo -c -o libcares_la-ares_cancel.lo `test -f 'ares_cancel.c' || echo '$(srcdir)/'`ares_cancel.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_cancel.Tpo $(DEPDIR)/libcares_la-ares_cancel.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_cancel.c' object='libcares_la-ares_cancel.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_cancel.lo `test -f 'ares_cancel.c' || echo '$(srcdir)/'`ares_cancel.c + +libcares_la-ares_data.lo: ares_data.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_data.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_data.Tpo -c -o libcares_la-ares_data.lo `test -f 'ares_data.c' || echo '$(srcdir)/'`ares_data.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_data.Tpo $(DEPDIR)/libcares_la-ares_data.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_data.c' object='libcares_la-ares_data.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_data.lo `test -f 'ares_data.c' || echo '$(srcdir)/'`ares_data.c + +libcares_la-ares_destroy.lo: ares_destroy.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_destroy.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_destroy.Tpo -c -o libcares_la-ares_destroy.lo `test -f 'ares_destroy.c' || echo '$(srcdir)/'`ares_destroy.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_destroy.Tpo $(DEPDIR)/libcares_la-ares_destroy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_destroy.c' object='libcares_la-ares_destroy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_destroy.lo `test -f 'ares_destroy.c' || echo '$(srcdir)/'`ares_destroy.c + +libcares_la-ares_expand_name.lo: ares_expand_name.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_expand_name.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_expand_name.Tpo -c -o libcares_la-ares_expand_name.lo `test -f 'ares_expand_name.c' || echo '$(srcdir)/'`ares_expand_name.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_expand_name.Tpo $(DEPDIR)/libcares_la-ares_expand_name.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_expand_name.c' object='libcares_la-ares_expand_name.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_expand_name.lo `test -f 'ares_expand_name.c' || echo '$(srcdir)/'`ares_expand_name.c + +libcares_la-ares_expand_string.lo: ares_expand_string.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_expand_string.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_expand_string.Tpo -c -o libcares_la-ares_expand_string.lo `test -f 'ares_expand_string.c' || echo '$(srcdir)/'`ares_expand_string.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_expand_string.Tpo $(DEPDIR)/libcares_la-ares_expand_string.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_expand_string.c' object='libcares_la-ares_expand_string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_expand_string.lo `test -f 'ares_expand_string.c' || echo '$(srcdir)/'`ares_expand_string.c + +libcares_la-ares_fds.lo: ares_fds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_fds.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_fds.Tpo -c -o libcares_la-ares_fds.lo `test -f 'ares_fds.c' || echo '$(srcdir)/'`ares_fds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_fds.Tpo $(DEPDIR)/libcares_la-ares_fds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_fds.c' object='libcares_la-ares_fds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_fds.lo `test -f 'ares_fds.c' || echo '$(srcdir)/'`ares_fds.c + +libcares_la-ares_free_hostent.lo: ares_free_hostent.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_free_hostent.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_free_hostent.Tpo -c -o libcares_la-ares_free_hostent.lo `test -f 'ares_free_hostent.c' || echo '$(srcdir)/'`ares_free_hostent.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_free_hostent.Tpo $(DEPDIR)/libcares_la-ares_free_hostent.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_free_hostent.c' object='libcares_la-ares_free_hostent.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_free_hostent.lo `test -f 'ares_free_hostent.c' || echo '$(srcdir)/'`ares_free_hostent.c + +libcares_la-ares_free_string.lo: ares_free_string.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_free_string.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_free_string.Tpo -c -o libcares_la-ares_free_string.lo `test -f 'ares_free_string.c' || echo '$(srcdir)/'`ares_free_string.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_free_string.Tpo $(DEPDIR)/libcares_la-ares_free_string.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_free_string.c' object='libcares_la-ares_free_string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_free_string.lo `test -f 'ares_free_string.c' || echo '$(srcdir)/'`ares_free_string.c + +libcares_la-ares_getenv.lo: ares_getenv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_getenv.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_getenv.Tpo -c -o libcares_la-ares_getenv.lo `test -f 'ares_getenv.c' || echo '$(srcdir)/'`ares_getenv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_getenv.Tpo $(DEPDIR)/libcares_la-ares_getenv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getenv.c' object='libcares_la-ares_getenv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_getenv.lo `test -f 'ares_getenv.c' || echo '$(srcdir)/'`ares_getenv.c + +libcares_la-ares_gethostbyaddr.lo: ares_gethostbyaddr.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_gethostbyaddr.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_gethostbyaddr.Tpo -c -o libcares_la-ares_gethostbyaddr.lo `test -f 'ares_gethostbyaddr.c' || echo '$(srcdir)/'`ares_gethostbyaddr.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_gethostbyaddr.Tpo $(DEPDIR)/libcares_la-ares_gethostbyaddr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_gethostbyaddr.c' object='libcares_la-ares_gethostbyaddr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_gethostbyaddr.lo `test -f 'ares_gethostbyaddr.c' || echo '$(srcdir)/'`ares_gethostbyaddr.c + +libcares_la-ares_gethostbyname.lo: ares_gethostbyname.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_gethostbyname.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_gethostbyname.Tpo -c -o libcares_la-ares_gethostbyname.lo `test -f 'ares_gethostbyname.c' || echo '$(srcdir)/'`ares_gethostbyname.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_gethostbyname.Tpo $(DEPDIR)/libcares_la-ares_gethostbyname.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_gethostbyname.c' object='libcares_la-ares_gethostbyname.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_gethostbyname.lo `test -f 'ares_gethostbyname.c' || echo '$(srcdir)/'`ares_gethostbyname.c + +libcares_la-ares_getnameinfo.lo: ares_getnameinfo.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_getnameinfo.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_getnameinfo.Tpo -c -o libcares_la-ares_getnameinfo.lo `test -f 'ares_getnameinfo.c' || echo '$(srcdir)/'`ares_getnameinfo.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_getnameinfo.Tpo $(DEPDIR)/libcares_la-ares_getnameinfo.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getnameinfo.c' object='libcares_la-ares_getnameinfo.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_getnameinfo.lo `test -f 'ares_getnameinfo.c' || echo '$(srcdir)/'`ares_getnameinfo.c + +libcares_la-ares_getsock.lo: ares_getsock.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_getsock.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_getsock.Tpo -c -o libcares_la-ares_getsock.lo `test -f 'ares_getsock.c' || echo '$(srcdir)/'`ares_getsock.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_getsock.Tpo $(DEPDIR)/libcares_la-ares_getsock.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getsock.c' object='libcares_la-ares_getsock.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_getsock.lo `test -f 'ares_getsock.c' || echo '$(srcdir)/'`ares_getsock.c + +libcares_la-ares_init.lo: ares_init.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_init.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_init.Tpo -c -o libcares_la-ares_init.lo `test -f 'ares_init.c' || echo '$(srcdir)/'`ares_init.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_init.Tpo $(DEPDIR)/libcares_la-ares_init.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_init.c' object='libcares_la-ares_init.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_init.lo `test -f 'ares_init.c' || echo '$(srcdir)/'`ares_init.c + +libcares_la-ares_library_init.lo: ares_library_init.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_library_init.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_library_init.Tpo -c -o libcares_la-ares_library_init.lo `test -f 'ares_library_init.c' || echo '$(srcdir)/'`ares_library_init.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_library_init.Tpo $(DEPDIR)/libcares_la-ares_library_init.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_library_init.c' object='libcares_la-ares_library_init.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_library_init.lo `test -f 'ares_library_init.c' || echo '$(srcdir)/'`ares_library_init.c + +libcares_la-ares_llist.lo: ares_llist.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_llist.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_llist.Tpo -c -o libcares_la-ares_llist.lo `test -f 'ares_llist.c' || echo '$(srcdir)/'`ares_llist.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_llist.Tpo $(DEPDIR)/libcares_la-ares_llist.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_llist.c' object='libcares_la-ares_llist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_llist.lo `test -f 'ares_llist.c' || echo '$(srcdir)/'`ares_llist.c + +libcares_la-ares_mkquery.lo: ares_mkquery.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_mkquery.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_mkquery.Tpo -c -o libcares_la-ares_mkquery.lo `test -f 'ares_mkquery.c' || echo '$(srcdir)/'`ares_mkquery.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_mkquery.Tpo $(DEPDIR)/libcares_la-ares_mkquery.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_mkquery.c' object='libcares_la-ares_mkquery.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_mkquery.lo `test -f 'ares_mkquery.c' || echo '$(srcdir)/'`ares_mkquery.c + +libcares_la-ares_create_query.lo: ares_create_query.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_create_query.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_create_query.Tpo -c -o libcares_la-ares_create_query.lo `test -f 'ares_create_query.c' || echo '$(srcdir)/'`ares_create_query.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_create_query.Tpo $(DEPDIR)/libcares_la-ares_create_query.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_create_query.c' object='libcares_la-ares_create_query.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_create_query.lo `test -f 'ares_create_query.c' || echo '$(srcdir)/'`ares_create_query.c + +libcares_la-ares_nowarn.lo: ares_nowarn.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_nowarn.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_nowarn.Tpo -c -o libcares_la-ares_nowarn.lo `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_nowarn.Tpo $(DEPDIR)/libcares_la-ares_nowarn.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_nowarn.c' object='libcares_la-ares_nowarn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_nowarn.lo `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c + +libcares_la-ares_options.lo: ares_options.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_options.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_options.Tpo -c -o libcares_la-ares_options.lo `test -f 'ares_options.c' || echo '$(srcdir)/'`ares_options.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_options.Tpo $(DEPDIR)/libcares_la-ares_options.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_options.c' object='libcares_la-ares_options.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_options.lo `test -f 'ares_options.c' || echo '$(srcdir)/'`ares_options.c + +libcares_la-ares_parse_a_reply.lo: ares_parse_a_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_a_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_a_reply.Tpo -c -o libcares_la-ares_parse_a_reply.lo `test -f 'ares_parse_a_reply.c' || echo '$(srcdir)/'`ares_parse_a_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_a_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_a_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_a_reply.c' object='libcares_la-ares_parse_a_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_a_reply.lo `test -f 'ares_parse_a_reply.c' || echo '$(srcdir)/'`ares_parse_a_reply.c + +libcares_la-ares_parse_aaaa_reply.lo: ares_parse_aaaa_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_aaaa_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_aaaa_reply.Tpo -c -o libcares_la-ares_parse_aaaa_reply.lo `test -f 'ares_parse_aaaa_reply.c' || echo '$(srcdir)/'`ares_parse_aaaa_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_aaaa_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_aaaa_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_aaaa_reply.c' object='libcares_la-ares_parse_aaaa_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_aaaa_reply.lo `test -f 'ares_parse_aaaa_reply.c' || echo '$(srcdir)/'`ares_parse_aaaa_reply.c + +libcares_la-ares_parse_mx_reply.lo: ares_parse_mx_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_mx_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_mx_reply.Tpo -c -o libcares_la-ares_parse_mx_reply.lo `test -f 'ares_parse_mx_reply.c' || echo '$(srcdir)/'`ares_parse_mx_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_mx_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_mx_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_mx_reply.c' object='libcares_la-ares_parse_mx_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_mx_reply.lo `test -f 'ares_parse_mx_reply.c' || echo '$(srcdir)/'`ares_parse_mx_reply.c + +libcares_la-ares_parse_naptr_reply.lo: ares_parse_naptr_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_naptr_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_naptr_reply.Tpo -c -o libcares_la-ares_parse_naptr_reply.lo `test -f 'ares_parse_naptr_reply.c' || echo '$(srcdir)/'`ares_parse_naptr_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_naptr_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_naptr_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_naptr_reply.c' object='libcares_la-ares_parse_naptr_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_naptr_reply.lo `test -f 'ares_parse_naptr_reply.c' || echo '$(srcdir)/'`ares_parse_naptr_reply.c + +libcares_la-ares_parse_ns_reply.lo: ares_parse_ns_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_ns_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_ns_reply.Tpo -c -o libcares_la-ares_parse_ns_reply.lo `test -f 'ares_parse_ns_reply.c' || echo '$(srcdir)/'`ares_parse_ns_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_ns_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_ns_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_ns_reply.c' object='libcares_la-ares_parse_ns_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_ns_reply.lo `test -f 'ares_parse_ns_reply.c' || echo '$(srcdir)/'`ares_parse_ns_reply.c + +libcares_la-ares_parse_ptr_reply.lo: ares_parse_ptr_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_ptr_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_ptr_reply.Tpo -c -o libcares_la-ares_parse_ptr_reply.lo `test -f 'ares_parse_ptr_reply.c' || echo '$(srcdir)/'`ares_parse_ptr_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_ptr_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_ptr_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_ptr_reply.c' object='libcares_la-ares_parse_ptr_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_ptr_reply.lo `test -f 'ares_parse_ptr_reply.c' || echo '$(srcdir)/'`ares_parse_ptr_reply.c + +libcares_la-ares_parse_soa_reply.lo: ares_parse_soa_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_soa_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_soa_reply.Tpo -c -o libcares_la-ares_parse_soa_reply.lo `test -f 'ares_parse_soa_reply.c' || echo '$(srcdir)/'`ares_parse_soa_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_soa_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_soa_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_soa_reply.c' object='libcares_la-ares_parse_soa_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_soa_reply.lo `test -f 'ares_parse_soa_reply.c' || echo '$(srcdir)/'`ares_parse_soa_reply.c + +libcares_la-ares_parse_srv_reply.lo: ares_parse_srv_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_srv_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_srv_reply.Tpo -c -o libcares_la-ares_parse_srv_reply.lo `test -f 'ares_parse_srv_reply.c' || echo '$(srcdir)/'`ares_parse_srv_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_srv_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_srv_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_srv_reply.c' object='libcares_la-ares_parse_srv_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_srv_reply.lo `test -f 'ares_parse_srv_reply.c' || echo '$(srcdir)/'`ares_parse_srv_reply.c + +libcares_la-ares_parse_txt_reply.lo: ares_parse_txt_reply.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_parse_txt_reply.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_parse_txt_reply.Tpo -c -o libcares_la-ares_parse_txt_reply.lo `test -f 'ares_parse_txt_reply.c' || echo '$(srcdir)/'`ares_parse_txt_reply.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_parse_txt_reply.Tpo $(DEPDIR)/libcares_la-ares_parse_txt_reply.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_parse_txt_reply.c' object='libcares_la-ares_parse_txt_reply.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_parse_txt_reply.lo `test -f 'ares_parse_txt_reply.c' || echo '$(srcdir)/'`ares_parse_txt_reply.c + +libcares_la-ares_platform.lo: ares_platform.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_platform.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_platform.Tpo -c -o libcares_la-ares_platform.lo `test -f 'ares_platform.c' || echo '$(srcdir)/'`ares_platform.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_platform.Tpo $(DEPDIR)/libcares_la-ares_platform.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_platform.c' object='libcares_la-ares_platform.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_platform.lo `test -f 'ares_platform.c' || echo '$(srcdir)/'`ares_platform.c + +libcares_la-ares_process.lo: ares_process.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_process.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_process.Tpo -c -o libcares_la-ares_process.lo `test -f 'ares_process.c' || echo '$(srcdir)/'`ares_process.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_process.Tpo $(DEPDIR)/libcares_la-ares_process.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_process.c' object='libcares_la-ares_process.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_process.lo `test -f 'ares_process.c' || echo '$(srcdir)/'`ares_process.c + +libcares_la-ares_query.lo: ares_query.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_query.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_query.Tpo -c -o libcares_la-ares_query.lo `test -f 'ares_query.c' || echo '$(srcdir)/'`ares_query.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_query.Tpo $(DEPDIR)/libcares_la-ares_query.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_query.c' object='libcares_la-ares_query.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_query.lo `test -f 'ares_query.c' || echo '$(srcdir)/'`ares_query.c + +libcares_la-ares_search.lo: ares_search.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_search.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_search.Tpo -c -o libcares_la-ares_search.lo `test -f 'ares_search.c' || echo '$(srcdir)/'`ares_search.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_search.Tpo $(DEPDIR)/libcares_la-ares_search.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_search.c' object='libcares_la-ares_search.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_search.lo `test -f 'ares_search.c' || echo '$(srcdir)/'`ares_search.c + +libcares_la-ares_send.lo: ares_send.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_send.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_send.Tpo -c -o libcares_la-ares_send.lo `test -f 'ares_send.c' || echo '$(srcdir)/'`ares_send.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_send.Tpo $(DEPDIR)/libcares_la-ares_send.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_send.c' object='libcares_la-ares_send.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_send.lo `test -f 'ares_send.c' || echo '$(srcdir)/'`ares_send.c + +libcares_la-ares_strcasecmp.lo: ares_strcasecmp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_strcasecmp.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_strcasecmp.Tpo -c -o libcares_la-ares_strcasecmp.lo `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_strcasecmp.Tpo $(DEPDIR)/libcares_la-ares_strcasecmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strcasecmp.c' object='libcares_la-ares_strcasecmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_strcasecmp.lo `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c + +libcares_la-ares_strdup.lo: ares_strdup.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_strdup.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_strdup.Tpo -c -o libcares_la-ares_strdup.lo `test -f 'ares_strdup.c' || echo '$(srcdir)/'`ares_strdup.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_strdup.Tpo $(DEPDIR)/libcares_la-ares_strdup.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strdup.c' object='libcares_la-ares_strdup.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_strdup.lo `test -f 'ares_strdup.c' || echo '$(srcdir)/'`ares_strdup.c + +libcares_la-ares_strerror.lo: ares_strerror.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_strerror.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_strerror.Tpo -c -o libcares_la-ares_strerror.lo `test -f 'ares_strerror.c' || echo '$(srcdir)/'`ares_strerror.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_strerror.Tpo $(DEPDIR)/libcares_la-ares_strerror.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strerror.c' object='libcares_la-ares_strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_strerror.lo `test -f 'ares_strerror.c' || echo '$(srcdir)/'`ares_strerror.c + +libcares_la-ares_timeout.lo: ares_timeout.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_timeout.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_timeout.Tpo -c -o libcares_la-ares_timeout.lo `test -f 'ares_timeout.c' || echo '$(srcdir)/'`ares_timeout.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_timeout.Tpo $(DEPDIR)/libcares_la-ares_timeout.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_timeout.c' object='libcares_la-ares_timeout.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_timeout.lo `test -f 'ares_timeout.c' || echo '$(srcdir)/'`ares_timeout.c + +libcares_la-ares_version.lo: ares_version.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_version.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_version.Tpo -c -o libcares_la-ares_version.lo `test -f 'ares_version.c' || echo '$(srcdir)/'`ares_version.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_version.Tpo $(DEPDIR)/libcares_la-ares_version.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_version.c' object='libcares_la-ares_version.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_version.lo `test -f 'ares_version.c' || echo '$(srcdir)/'`ares_version.c + +libcares_la-ares_writev.lo: ares_writev.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_writev.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_writev.Tpo -c -o libcares_la-ares_writev.lo `test -f 'ares_writev.c' || echo '$(srcdir)/'`ares_writev.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-ares_writev.Tpo $(DEPDIR)/libcares_la-ares_writev.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_writev.c' object='libcares_la-ares_writev.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_writev.lo `test -f 'ares_writev.c' || echo '$(srcdir)/'`ares_writev.c + +libcares_la-bitncmp.lo: bitncmp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-bitncmp.lo -MD -MP -MF $(DEPDIR)/libcares_la-bitncmp.Tpo -c -o libcares_la-bitncmp.lo `test -f 'bitncmp.c' || echo '$(srcdir)/'`bitncmp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-bitncmp.Tpo $(DEPDIR)/libcares_la-bitncmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bitncmp.c' object='libcares_la-bitncmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-bitncmp.lo `test -f 'bitncmp.c' || echo '$(srcdir)/'`bitncmp.c + +libcares_la-inet_net_pton.lo: inet_net_pton.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-inet_net_pton.lo -MD -MP -MF $(DEPDIR)/libcares_la-inet_net_pton.Tpo -c -o libcares_la-inet_net_pton.lo `test -f 'inet_net_pton.c' || echo '$(srcdir)/'`inet_net_pton.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-inet_net_pton.Tpo $(DEPDIR)/libcares_la-inet_net_pton.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_net_pton.c' object='libcares_la-inet_net_pton.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-inet_net_pton.lo `test -f 'inet_net_pton.c' || echo '$(srcdir)/'`inet_net_pton.c + +libcares_la-inet_ntop.lo: inet_ntop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-inet_ntop.lo -MD -MP -MF $(DEPDIR)/libcares_la-inet_ntop.Tpo -c -o libcares_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-inet_ntop.Tpo $(DEPDIR)/libcares_la-inet_ntop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop.c' object='libcares_la-inet_ntop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c + +libcares_la-windows_port.lo: windows_port.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-windows_port.lo -MD -MP -MF $(DEPDIR)/libcares_la-windows_port.Tpo -c -o libcares_la-windows_port.lo `test -f 'windows_port.c' || echo '$(srcdir)/'`windows_port.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcares_la-windows_port.Tpo $(DEPDIR)/libcares_la-windows_port.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='windows_port.c' object='libcares_la-windows_port.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-windows_port.lo `test -f 'windows_port.c' || echo '$(srcdir)/'`windows_port.c + acountry-acountry.o: acountry.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-acountry.o -MD -MP -MF "$(DEPDIR)/acountry-acountry.Tpo" -c -o acountry-acountry.o `test -f 'acountry.c' || echo '$(srcdir)/'`acountry.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-acountry.Tpo" "$(DEPDIR)/acountry-acountry.Po"; else rm -f "$(DEPDIR)/acountry-acountry.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-acountry.o -MD -MP -MF $(DEPDIR)/acountry-acountry.Tpo -c -o acountry-acountry.o `test -f 'acountry.c' || echo '$(srcdir)/'`acountry.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/acountry-acountry.Tpo $(DEPDIR)/acountry-acountry.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='acountry.c' object='acountry-acountry.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-acountry.o `test -f 'acountry.c' || echo '$(srcdir)/'`acountry.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-acountry.o `test -f 'acountry.c' || echo '$(srcdir)/'`acountry.c acountry-acountry.obj: acountry.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-acountry.obj -MD -MP -MF "$(DEPDIR)/acountry-acountry.Tpo" -c -o acountry-acountry.obj `if test -f 'acountry.c'; then $(CYGPATH_W) 'acountry.c'; else $(CYGPATH_W) '$(srcdir)/acountry.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-acountry.Tpo" "$(DEPDIR)/acountry-acountry.Po"; else rm -f "$(DEPDIR)/acountry-acountry.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-acountry.obj -MD -MP -MF $(DEPDIR)/acountry-acountry.Tpo -c -o acountry-acountry.obj `if test -f 'acountry.c'; then $(CYGPATH_W) 'acountry.c'; else $(CYGPATH_W) '$(srcdir)/acountry.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/acountry-acountry.Tpo $(DEPDIR)/acountry-acountry.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='acountry.c' object='acountry-acountry.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-acountry.obj `if test -f 'acountry.c'; then $(CYGPATH_W) 'acountry.c'; else $(CYGPATH_W) '$(srcdir)/acountry.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-acountry.obj `if test -f 'acountry.c'; then $(CYGPATH_W) 'acountry.c'; else $(CYGPATH_W) '$(srcdir)/acountry.c'; fi` acountry-ares_getopt.o: ares_getopt.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_getopt.o -MD -MP -MF "$(DEPDIR)/acountry-ares_getopt.Tpo" -c -o acountry-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-ares_getopt.Tpo" "$(DEPDIR)/acountry-ares_getopt.Po"; else rm -f "$(DEPDIR)/acountry-ares_getopt.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_getopt.o -MD -MP -MF $(DEPDIR)/acountry-ares_getopt.Tpo -c -o acountry-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/acountry-ares_getopt.Tpo $(DEPDIR)/acountry-ares_getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getopt.c' object='acountry-ares_getopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c acountry-ares_getopt.obj: ares_getopt.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_getopt.obj -MD -MP -MF "$(DEPDIR)/acountry-ares_getopt.Tpo" -c -o acountry-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-ares_getopt.Tpo" "$(DEPDIR)/acountry-ares_getopt.Po"; else rm -f "$(DEPDIR)/acountry-ares_getopt.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_getopt.obj -MD -MP -MF $(DEPDIR)/acountry-ares_getopt.Tpo -c -o acountry-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/acountry-ares_getopt.Tpo $(DEPDIR)/acountry-ares_getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getopt.c' object='acountry-ares_getopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` acountry-ares_nowarn.o: ares_nowarn.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_nowarn.o -MD -MP -MF "$(DEPDIR)/acountry-ares_nowarn.Tpo" -c -o acountry-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-ares_nowarn.Tpo" "$(DEPDIR)/acountry-ares_nowarn.Po"; else rm -f "$(DEPDIR)/acountry-ares_nowarn.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_nowarn.o -MD -MP -MF $(DEPDIR)/acountry-ares_nowarn.Tpo -c -o acountry-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/acountry-ares_nowarn.Tpo $(DEPDIR)/acountry-ares_nowarn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_nowarn.c' object='acountry-ares_nowarn.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c acountry-ares_nowarn.obj: ares_nowarn.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_nowarn.obj -MD -MP -MF "$(DEPDIR)/acountry-ares_nowarn.Tpo" -c -o acountry-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-ares_nowarn.Tpo" "$(DEPDIR)/acountry-ares_nowarn.Po"; else rm -f "$(DEPDIR)/acountry-ares_nowarn.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_nowarn.obj -MD -MP -MF $(DEPDIR)/acountry-ares_nowarn.Tpo -c -o acountry-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/acountry-ares_nowarn.Tpo $(DEPDIR)/acountry-ares_nowarn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_nowarn.c' object='acountry-ares_nowarn.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` acountry-ares_strcasecmp.o: ares_strcasecmp.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_strcasecmp.o -MD -MP -MF "$(DEPDIR)/acountry-ares_strcasecmp.Tpo" -c -o acountry-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-ares_strcasecmp.Tpo" "$(DEPDIR)/acountry-ares_strcasecmp.Po"; else rm -f "$(DEPDIR)/acountry-ares_strcasecmp.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_strcasecmp.o -MD -MP -MF $(DEPDIR)/acountry-ares_strcasecmp.Tpo -c -o acountry-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/acountry-ares_strcasecmp.Tpo $(DEPDIR)/acountry-ares_strcasecmp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strcasecmp.c' object='acountry-ares_strcasecmp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c acountry-ares_strcasecmp.obj: ares_strcasecmp.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_strcasecmp.obj -MD -MP -MF "$(DEPDIR)/acountry-ares_strcasecmp.Tpo" -c -o acountry-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-ares_strcasecmp.Tpo" "$(DEPDIR)/acountry-ares_strcasecmp.Po"; else rm -f "$(DEPDIR)/acountry-ares_strcasecmp.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-ares_strcasecmp.obj -MD -MP -MF $(DEPDIR)/acountry-ares_strcasecmp.Tpo -c -o acountry-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/acountry-ares_strcasecmp.Tpo $(DEPDIR)/acountry-ares_strcasecmp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strcasecmp.c' object='acountry-ares_strcasecmp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` - -acountry-inet_net_pton.o: inet_net_pton.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-inet_net_pton.o -MD -MP -MF "$(DEPDIR)/acountry-inet_net_pton.Tpo" -c -o acountry-inet_net_pton.o `test -f 'inet_net_pton.c' || echo '$(srcdir)/'`inet_net_pton.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-inet_net_pton.Tpo" "$(DEPDIR)/acountry-inet_net_pton.Po"; else rm -f "$(DEPDIR)/acountry-inet_net_pton.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_net_pton.c' object='acountry-inet_net_pton.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-inet_net_pton.o `test -f 'inet_net_pton.c' || echo '$(srcdir)/'`inet_net_pton.c - -acountry-inet_net_pton.obj: inet_net_pton.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-inet_net_pton.obj -MD -MP -MF "$(DEPDIR)/acountry-inet_net_pton.Tpo" -c -o acountry-inet_net_pton.obj `if test -f 'inet_net_pton.c'; then $(CYGPATH_W) 'inet_net_pton.c'; else $(CYGPATH_W) '$(srcdir)/inet_net_pton.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-inet_net_pton.Tpo" "$(DEPDIR)/acountry-inet_net_pton.Po"; else rm -f "$(DEPDIR)/acountry-inet_net_pton.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_net_pton.c' object='acountry-inet_net_pton.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-inet_net_pton.obj `if test -f 'inet_net_pton.c'; then $(CYGPATH_W) 'inet_net_pton.c'; else $(CYGPATH_W) '$(srcdir)/inet_net_pton.c'; fi` - -acountry-inet_ntop.o: inet_ntop.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-inet_ntop.o -MD -MP -MF "$(DEPDIR)/acountry-inet_ntop.Tpo" -c -o acountry-inet_ntop.o `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-inet_ntop.Tpo" "$(DEPDIR)/acountry-inet_ntop.Po"; else rm -f "$(DEPDIR)/acountry-inet_ntop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop.c' object='acountry-inet_ntop.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-inet_ntop.o `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c - -acountry-inet_ntop.obj: inet_ntop.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -MT acountry-inet_ntop.obj -MD -MP -MF "$(DEPDIR)/acountry-inet_ntop.Tpo" -c -o acountry-inet_ntop.obj `if test -f 'inet_ntop.c'; then $(CYGPATH_W) 'inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/inet_ntop.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/acountry-inet_ntop.Tpo" "$(DEPDIR)/acountry-inet_ntop.Po"; else rm -f "$(DEPDIR)/acountry-inet_ntop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop.c' object='acountry-inet_ntop.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-inet_ntop.obj `if test -f 'inet_ntop.c'; then $(CYGPATH_W) 'inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/inet_ntop.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acountry_CPPFLAGS) $(CPPFLAGS) $(acountry_CFLAGS) $(CFLAGS) -c -o acountry-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` adig-adig.o: adig.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-adig.o -MD -MP -MF "$(DEPDIR)/adig-adig.Tpo" -c -o adig-adig.o `test -f 'adig.c' || echo '$(srcdir)/'`adig.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-adig.Tpo" "$(DEPDIR)/adig-adig.Po"; else rm -f "$(DEPDIR)/adig-adig.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-adig.o -MD -MP -MF $(DEPDIR)/adig-adig.Tpo -c -o adig-adig.o `test -f 'adig.c' || echo '$(srcdir)/'`adig.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/adig-adig.Tpo $(DEPDIR)/adig-adig.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='adig.c' object='adig-adig.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-adig.o `test -f 'adig.c' || echo '$(srcdir)/'`adig.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-adig.o `test -f 'adig.c' || echo '$(srcdir)/'`adig.c adig-adig.obj: adig.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-adig.obj -MD -MP -MF "$(DEPDIR)/adig-adig.Tpo" -c -o adig-adig.obj `if test -f 'adig.c'; then $(CYGPATH_W) 'adig.c'; else $(CYGPATH_W) '$(srcdir)/adig.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-adig.Tpo" "$(DEPDIR)/adig-adig.Po"; else rm -f "$(DEPDIR)/adig-adig.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-adig.obj -MD -MP -MF $(DEPDIR)/adig-adig.Tpo -c -o adig-adig.obj `if test -f 'adig.c'; then $(CYGPATH_W) 'adig.c'; else $(CYGPATH_W) '$(srcdir)/adig.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/adig-adig.Tpo $(DEPDIR)/adig-adig.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='adig.c' object='adig-adig.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-adig.obj `if test -f 'adig.c'; then $(CYGPATH_W) 'adig.c'; else $(CYGPATH_W) '$(srcdir)/adig.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-adig.obj `if test -f 'adig.c'; then $(CYGPATH_W) 'adig.c'; else $(CYGPATH_W) '$(srcdir)/adig.c'; fi` adig-ares_getopt.o: ares_getopt.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_getopt.o -MD -MP -MF "$(DEPDIR)/adig-ares_getopt.Tpo" -c -o adig-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-ares_getopt.Tpo" "$(DEPDIR)/adig-ares_getopt.Po"; else rm -f "$(DEPDIR)/adig-ares_getopt.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_getopt.o -MD -MP -MF $(DEPDIR)/adig-ares_getopt.Tpo -c -o adig-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/adig-ares_getopt.Tpo $(DEPDIR)/adig-ares_getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getopt.c' object='adig-ares_getopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c adig-ares_getopt.obj: ares_getopt.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_getopt.obj -MD -MP -MF "$(DEPDIR)/adig-ares_getopt.Tpo" -c -o adig-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-ares_getopt.Tpo" "$(DEPDIR)/adig-ares_getopt.Po"; else rm -f "$(DEPDIR)/adig-ares_getopt.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_getopt.obj -MD -MP -MF $(DEPDIR)/adig-ares_getopt.Tpo -c -o adig-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/adig-ares_getopt.Tpo $(DEPDIR)/adig-ares_getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getopt.c' object='adig-ares_getopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` adig-ares_nowarn.o: ares_nowarn.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_nowarn.o -MD -MP -MF "$(DEPDIR)/adig-ares_nowarn.Tpo" -c -o adig-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-ares_nowarn.Tpo" "$(DEPDIR)/adig-ares_nowarn.Po"; else rm -f "$(DEPDIR)/adig-ares_nowarn.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_nowarn.o -MD -MP -MF $(DEPDIR)/adig-ares_nowarn.Tpo -c -o adig-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/adig-ares_nowarn.Tpo $(DEPDIR)/adig-ares_nowarn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_nowarn.c' object='adig-ares_nowarn.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c adig-ares_nowarn.obj: ares_nowarn.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_nowarn.obj -MD -MP -MF "$(DEPDIR)/adig-ares_nowarn.Tpo" -c -o adig-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-ares_nowarn.Tpo" "$(DEPDIR)/adig-ares_nowarn.Po"; else rm -f "$(DEPDIR)/adig-ares_nowarn.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_nowarn.obj -MD -MP -MF $(DEPDIR)/adig-ares_nowarn.Tpo -c -o adig-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/adig-ares_nowarn.Tpo $(DEPDIR)/adig-ares_nowarn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_nowarn.c' object='adig-ares_nowarn.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` adig-ares_strcasecmp.o: ares_strcasecmp.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_strcasecmp.o -MD -MP -MF "$(DEPDIR)/adig-ares_strcasecmp.Tpo" -c -o adig-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-ares_strcasecmp.Tpo" "$(DEPDIR)/adig-ares_strcasecmp.Po"; else rm -f "$(DEPDIR)/adig-ares_strcasecmp.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_strcasecmp.o -MD -MP -MF $(DEPDIR)/adig-ares_strcasecmp.Tpo -c -o adig-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/adig-ares_strcasecmp.Tpo $(DEPDIR)/adig-ares_strcasecmp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strcasecmp.c' object='adig-ares_strcasecmp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c adig-ares_strcasecmp.obj: ares_strcasecmp.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_strcasecmp.obj -MD -MP -MF "$(DEPDIR)/adig-ares_strcasecmp.Tpo" -c -o adig-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-ares_strcasecmp.Tpo" "$(DEPDIR)/adig-ares_strcasecmp.Po"; else rm -f "$(DEPDIR)/adig-ares_strcasecmp.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-ares_strcasecmp.obj -MD -MP -MF $(DEPDIR)/adig-ares_strcasecmp.Tpo -c -o adig-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/adig-ares_strcasecmp.Tpo $(DEPDIR)/adig-ares_strcasecmp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strcasecmp.c' object='adig-ares_strcasecmp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` - -adig-inet_net_pton.o: inet_net_pton.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-inet_net_pton.o -MD -MP -MF "$(DEPDIR)/adig-inet_net_pton.Tpo" -c -o adig-inet_net_pton.o `test -f 'inet_net_pton.c' || echo '$(srcdir)/'`inet_net_pton.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-inet_net_pton.Tpo" "$(DEPDIR)/adig-inet_net_pton.Po"; else rm -f "$(DEPDIR)/adig-inet_net_pton.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_net_pton.c' object='adig-inet_net_pton.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-inet_net_pton.o `test -f 'inet_net_pton.c' || echo '$(srcdir)/'`inet_net_pton.c - -adig-inet_net_pton.obj: inet_net_pton.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-inet_net_pton.obj -MD -MP -MF "$(DEPDIR)/adig-inet_net_pton.Tpo" -c -o adig-inet_net_pton.obj `if test -f 'inet_net_pton.c'; then $(CYGPATH_W) 'inet_net_pton.c'; else $(CYGPATH_W) '$(srcdir)/inet_net_pton.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-inet_net_pton.Tpo" "$(DEPDIR)/adig-inet_net_pton.Po"; else rm -f "$(DEPDIR)/adig-inet_net_pton.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_net_pton.c' object='adig-inet_net_pton.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-inet_net_pton.obj `if test -f 'inet_net_pton.c'; then $(CYGPATH_W) 'inet_net_pton.c'; else $(CYGPATH_W) '$(srcdir)/inet_net_pton.c'; fi` - -adig-inet_ntop.o: inet_ntop.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-inet_ntop.o -MD -MP -MF "$(DEPDIR)/adig-inet_ntop.Tpo" -c -o adig-inet_ntop.o `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-inet_ntop.Tpo" "$(DEPDIR)/adig-inet_ntop.Po"; else rm -f "$(DEPDIR)/adig-inet_ntop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop.c' object='adig-inet_ntop.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-inet_ntop.o `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c - -adig-inet_ntop.obj: inet_ntop.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -MT adig-inet_ntop.obj -MD -MP -MF "$(DEPDIR)/adig-inet_ntop.Tpo" -c -o adig-inet_ntop.obj `if test -f 'inet_ntop.c'; then $(CYGPATH_W) 'inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/inet_ntop.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/adig-inet_ntop.Tpo" "$(DEPDIR)/adig-inet_ntop.Po"; else rm -f "$(DEPDIR)/adig-inet_ntop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop.c' object='adig-inet_ntop.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-inet_ntop.obj `if test -f 'inet_ntop.c'; then $(CYGPATH_W) 'inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/inet_ntop.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adig_CPPFLAGS) $(CPPFLAGS) $(adig_CFLAGS) $(CFLAGS) -c -o adig-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` ahost-ahost.o: ahost.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ahost.o -MD -MP -MF "$(DEPDIR)/ahost-ahost.Tpo" -c -o ahost-ahost.o `test -f 'ahost.c' || echo '$(srcdir)/'`ahost.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-ahost.Tpo" "$(DEPDIR)/ahost-ahost.Po"; else rm -f "$(DEPDIR)/ahost-ahost.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ahost.o -MD -MP -MF $(DEPDIR)/ahost-ahost.Tpo -c -o ahost-ahost.o `test -f 'ahost.c' || echo '$(srcdir)/'`ahost.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ahost-ahost.Tpo $(DEPDIR)/ahost-ahost.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ahost.c' object='ahost-ahost.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ahost.o `test -f 'ahost.c' || echo '$(srcdir)/'`ahost.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ahost.o `test -f 'ahost.c' || echo '$(srcdir)/'`ahost.c ahost-ahost.obj: ahost.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ahost.obj -MD -MP -MF "$(DEPDIR)/ahost-ahost.Tpo" -c -o ahost-ahost.obj `if test -f 'ahost.c'; then $(CYGPATH_W) 'ahost.c'; else $(CYGPATH_W) '$(srcdir)/ahost.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-ahost.Tpo" "$(DEPDIR)/ahost-ahost.Po"; else rm -f "$(DEPDIR)/ahost-ahost.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ahost.obj -MD -MP -MF $(DEPDIR)/ahost-ahost.Tpo -c -o ahost-ahost.obj `if test -f 'ahost.c'; then $(CYGPATH_W) 'ahost.c'; else $(CYGPATH_W) '$(srcdir)/ahost.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ahost-ahost.Tpo $(DEPDIR)/ahost-ahost.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ahost.c' object='ahost-ahost.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ahost.obj `if test -f 'ahost.c'; then $(CYGPATH_W) 'ahost.c'; else $(CYGPATH_W) '$(srcdir)/ahost.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ahost.obj `if test -f 'ahost.c'; then $(CYGPATH_W) 'ahost.c'; else $(CYGPATH_W) '$(srcdir)/ahost.c'; fi` ahost-ares_getopt.o: ares_getopt.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_getopt.o -MD -MP -MF "$(DEPDIR)/ahost-ares_getopt.Tpo" -c -o ahost-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-ares_getopt.Tpo" "$(DEPDIR)/ahost-ares_getopt.Po"; else rm -f "$(DEPDIR)/ahost-ares_getopt.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_getopt.o -MD -MP -MF $(DEPDIR)/ahost-ares_getopt.Tpo -c -o ahost-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ahost-ares_getopt.Tpo $(DEPDIR)/ahost-ares_getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getopt.c' object='ahost-ares_getopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_getopt.o `test -f 'ares_getopt.c' || echo '$(srcdir)/'`ares_getopt.c ahost-ares_getopt.obj: ares_getopt.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_getopt.obj -MD -MP -MF "$(DEPDIR)/ahost-ares_getopt.Tpo" -c -o ahost-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-ares_getopt.Tpo" "$(DEPDIR)/ahost-ares_getopt.Po"; else rm -f "$(DEPDIR)/ahost-ares_getopt.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_getopt.obj -MD -MP -MF $(DEPDIR)/ahost-ares_getopt.Tpo -c -o ahost-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ahost-ares_getopt.Tpo $(DEPDIR)/ahost-ares_getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_getopt.c' object='ahost-ares_getopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_getopt.obj `if test -f 'ares_getopt.c'; then $(CYGPATH_W) 'ares_getopt.c'; else $(CYGPATH_W) '$(srcdir)/ares_getopt.c'; fi` ahost-ares_nowarn.o: ares_nowarn.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_nowarn.o -MD -MP -MF "$(DEPDIR)/ahost-ares_nowarn.Tpo" -c -o ahost-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-ares_nowarn.Tpo" "$(DEPDIR)/ahost-ares_nowarn.Po"; else rm -f "$(DEPDIR)/ahost-ares_nowarn.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_nowarn.o -MD -MP -MF $(DEPDIR)/ahost-ares_nowarn.Tpo -c -o ahost-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ahost-ares_nowarn.Tpo $(DEPDIR)/ahost-ares_nowarn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_nowarn.c' object='ahost-ares_nowarn.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_nowarn.o `test -f 'ares_nowarn.c' || echo '$(srcdir)/'`ares_nowarn.c ahost-ares_nowarn.obj: ares_nowarn.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_nowarn.obj -MD -MP -MF "$(DEPDIR)/ahost-ares_nowarn.Tpo" -c -o ahost-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-ares_nowarn.Tpo" "$(DEPDIR)/ahost-ares_nowarn.Po"; else rm -f "$(DEPDIR)/ahost-ares_nowarn.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_nowarn.obj -MD -MP -MF $(DEPDIR)/ahost-ares_nowarn.Tpo -c -o ahost-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ahost-ares_nowarn.Tpo $(DEPDIR)/ahost-ares_nowarn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_nowarn.c' object='ahost-ares_nowarn.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_nowarn.obj `if test -f 'ares_nowarn.c'; then $(CYGPATH_W) 'ares_nowarn.c'; else $(CYGPATH_W) '$(srcdir)/ares_nowarn.c'; fi` ahost-ares_strcasecmp.o: ares_strcasecmp.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_strcasecmp.o -MD -MP -MF "$(DEPDIR)/ahost-ares_strcasecmp.Tpo" -c -o ahost-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-ares_strcasecmp.Tpo" "$(DEPDIR)/ahost-ares_strcasecmp.Po"; else rm -f "$(DEPDIR)/ahost-ares_strcasecmp.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_strcasecmp.o -MD -MP -MF $(DEPDIR)/ahost-ares_strcasecmp.Tpo -c -o ahost-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ahost-ares_strcasecmp.Tpo $(DEPDIR)/ahost-ares_strcasecmp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strcasecmp.c' object='ahost-ares_strcasecmp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_strcasecmp.o `test -f 'ares_strcasecmp.c' || echo '$(srcdir)/'`ares_strcasecmp.c ahost-ares_strcasecmp.obj: ares_strcasecmp.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_strcasecmp.obj -MD -MP -MF "$(DEPDIR)/ahost-ares_strcasecmp.Tpo" -c -o ahost-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-ares_strcasecmp.Tpo" "$(DEPDIR)/ahost-ares_strcasecmp.Po"; else rm -f "$(DEPDIR)/ahost-ares_strcasecmp.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-ares_strcasecmp.obj -MD -MP -MF $(DEPDIR)/ahost-ares_strcasecmp.Tpo -c -o ahost-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ahost-ares_strcasecmp.Tpo $(DEPDIR)/ahost-ares_strcasecmp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ares_strcasecmp.c' object='ahost-ares_strcasecmp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` - -ahost-inet_net_pton.o: inet_net_pton.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-inet_net_pton.o -MD -MP -MF "$(DEPDIR)/ahost-inet_net_pton.Tpo" -c -o ahost-inet_net_pton.o `test -f 'inet_net_pton.c' || echo '$(srcdir)/'`inet_net_pton.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-inet_net_pton.Tpo" "$(DEPDIR)/ahost-inet_net_pton.Po"; else rm -f "$(DEPDIR)/ahost-inet_net_pton.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_net_pton.c' object='ahost-inet_net_pton.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-inet_net_pton.o `test -f 'inet_net_pton.c' || echo '$(srcdir)/'`inet_net_pton.c - -ahost-inet_net_pton.obj: inet_net_pton.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-inet_net_pton.obj -MD -MP -MF "$(DEPDIR)/ahost-inet_net_pton.Tpo" -c -o ahost-inet_net_pton.obj `if test -f 'inet_net_pton.c'; then $(CYGPATH_W) 'inet_net_pton.c'; else $(CYGPATH_W) '$(srcdir)/inet_net_pton.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-inet_net_pton.Tpo" "$(DEPDIR)/ahost-inet_net_pton.Po"; else rm -f "$(DEPDIR)/ahost-inet_net_pton.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_net_pton.c' object='ahost-inet_net_pton.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-inet_net_pton.obj `if test -f 'inet_net_pton.c'; then $(CYGPATH_W) 'inet_net_pton.c'; else $(CYGPATH_W) '$(srcdir)/inet_net_pton.c'; fi` - -ahost-inet_ntop.o: inet_ntop.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-inet_ntop.o -MD -MP -MF "$(DEPDIR)/ahost-inet_ntop.Tpo" -c -o ahost-inet_ntop.o `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-inet_ntop.Tpo" "$(DEPDIR)/ahost-inet_ntop.Po"; else rm -f "$(DEPDIR)/ahost-inet_ntop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop.c' object='ahost-inet_ntop.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-inet_ntop.o `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c - -ahost-inet_ntop.obj: inet_ntop.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -MT ahost-inet_ntop.obj -MD -MP -MF "$(DEPDIR)/ahost-inet_ntop.Tpo" -c -o ahost-inet_ntop.obj `if test -f 'inet_ntop.c'; then $(CYGPATH_W) 'inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/inet_ntop.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ahost-inet_ntop.Tpo" "$(DEPDIR)/ahost-inet_ntop.Po"; else rm -f "$(DEPDIR)/ahost-inet_ntop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop.c' object='ahost-inet_ntop.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-inet_ntop.obj `if test -f 'inet_ntop.c'; then $(CYGPATH_W) 'inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/inet_ntop.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ahost_CPPFLAGS) $(CPPFLAGS) $(ahost_CFLAGS) $(CFLAGS) -c -o ahost-ares_strcasecmp.obj `if test -f 'ares_strcasecmp.c'; then $(CYGPATH_W) 'ares_strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/ares_strcasecmp.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -1044,181 +1397,218 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-man3: $(man3_MANS) $(man_MANS) + -rm -f libtool config.lt +install-man3: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)" - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man3dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.3[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ + done; } + uninstall-man3: @$(NORMAL_UNINSTALL) - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ - done + @list=''; test -n "$(man3dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-libcares_laHEADERS: $(libcares_la_HEADERS) @$(NORMAL_INSTALL) - test -z "$(libcares_ladir)" || $(mkdir_p) "$(DESTDIR)$(libcares_ladir)" - @list='$(libcares_la_HEADERS)'; for p in $$list; do \ + @list='$(libcares_la_HEADERS)'; test -n "$(libcares_ladir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libcares_ladir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libcares_ladir)" || exit 1; \ + fi; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libcares_laHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libcares_ladir)/$$f'"; \ - $(libcares_laHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libcares_ladir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcares_ladir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libcares_ladir)" || exit $$?; \ done uninstall-libcares_laHEADERS: @$(NORMAL_UNINSTALL) - @list='$(libcares_la_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libcares_ladir)/$$f'"; \ - rm -f "$(DESTDIR)$(libcares_ladir)/$$f"; \ - done + @list='$(libcares_la_HEADERS)'; test -n "$(libcares_ladir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libcares_ladir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) ares_config.h.in ares_build.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) ares_config.h.in ares_build.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) ares_config.h.in ares_build.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) ares_config.h.in ares_build.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/m4 $(distdir)/vc $(distdir)/vc/acountry $(distdir)/vc/adig $(distdir)/vc/ahost $(distdir)/vc/cares - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook - -find "$(distdir)" -type d ! -perm -755 \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -1244,24 +1634,33 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -1282,14 +1681,24 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -1311,7 +1720,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \ ares_config.h ares_build.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libcares_ladir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -1323,10 +1732,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1334,6 +1748,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -1355,6 +1770,8 @@ dvi: dvi-am dvi-am: +html-am: + info: info-am info-am: @@ -1362,12 +1779,30 @@ info-am: install-data-am: install-libcares_laHEADERS install-man \ install-pkgconfigDATA +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-libLTLIBRARIES +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-man3 +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -1388,29 +1823,33 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ - uninstall-libcares_laHEADERS uninstall-man \ - uninstall-pkgconfigDATA +uninstall-am: uninstall-libLTLIBRARIES uninstall-libcares_laHEADERS \ + uninstall-man uninstall-pkgconfigDATA uninstall-man: uninstall-man3 +.MAKE: all install-am install-strip + .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstPROGRAMS ctags dist dist-all dist-bzip2 dist-gzip \ - dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ - install-libLTLIBRARIES install-libcares_laHEADERS install-man \ - install-man3 install-pkgconfigDATA install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-libLTLIBRARIES uninstall-libcares_laHEADERS \ - uninstall-man uninstall-man3 uninstall-pkgconfigDATA + dist-hook dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-libcares_laHEADERS install-man install-man3 \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-libLTLIBRARIES \ + uninstall-libcares_laHEADERS uninstall-man uninstall-man3 \ + uninstall-pkgconfigDATA clean-local: clean-sourced-manpages @@ -1453,6 +1892,7 @@ dist-hook: strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \ cp $$file $(distdir)$$strip; \ done) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Makefile.inc b/Makefile.inc index d6d4851..c38c921 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -20,13 +20,16 @@ CSOURCES = ares__close_sockets.c \ ares_library_init.c \ ares_llist.c \ ares_mkquery.c \ + ares_create_query.c \ ares_nowarn.c \ ares_options.c \ ares_parse_a_reply.c \ ares_parse_aaaa_reply.c \ ares_parse_mx_reply.c \ + ares_parse_naptr_reply.c \ ares_parse_ns_reply.c \ ares_parse_ptr_reply.c \ + ares_parse_soa_reply.c \ ares_parse_srv_reply.c \ ares_parse_txt_reply.c \ ares_platform.c \ @@ -50,6 +53,7 @@ HHEADERS = ares.h \ ares_data.h \ ares_dns.h \ ares_getenv.h \ + ares_inet_net_pton.h \ ares_iphlpapi.h \ ares_ipv6.h \ ares_library_init.h \ @@ -63,8 +67,6 @@ HHEADERS = ares.h \ ares_version.h \ ares_writev.h \ bitncmp.h \ - inet_net_pton.h \ - inet_ntop.h \ nameser.h \ ares_setup.h \ setup_once.h @@ -90,11 +92,14 @@ MANPAGES = ares_cancel.3 \ ares_library_cleanup.3 \ ares_library_init.3 \ ares_mkquery.3 \ + ares_create_query.3 \ ares_parse_a_reply.3 \ ares_parse_aaaa_reply.3 \ ares_parse_mx_reply.3 \ + ares_parse_naptr_reply.3 \ ares_parse_ns_reply.3 \ ares_parse_ptr_reply.3 \ + ares_parse_soa_reply.3 \ ares_parse_srv_reply.3 \ ares_parse_txt_reply.3 \ ares_process.3 \ @@ -106,7 +111,9 @@ MANPAGES = ares_cancel.3 \ ares_set_socket_callback.3 \ ares_strerror.3 \ ares_timeout.3 \ - ares_version.3 + ares_version.3 \ + ares_inet_pton.3 \ + ares_inet_ntop.3 HTMLPAGES = ares_cancel.html \ ares_destroy.html \ @@ -129,11 +136,13 @@ HTMLPAGES = ares_cancel.html \ ares_library_cleanup.html \ ares_library_init.html \ ares_mkquery.html \ + ares_create_query.html \ ares_parse_a_reply.html \ ares_parse_aaaa_reply.html \ ares_parse_mx_reply.html \ ares_parse_ns_reply.html \ ares_parse_ptr_reply.html \ + ares_parse_soa_reply.html \ ares_parse_srv_reply.html \ ares_parse_txt_reply.html \ ares_process.html \ @@ -145,7 +154,9 @@ HTMLPAGES = ares_cancel.html \ ares_set_socket_callback.html \ ares_strerror.html \ ares_timeout.html \ - ares_version.html + ares_version.html \ + ares_inet_pton.html \ + ares_inet_ntop.html PDFPAGES = ares_cancel.pdf \ ares_destroy.pdf \ @@ -168,11 +179,13 @@ PDFPAGES = ares_cancel.pdf \ ares_library_cleanup.pdf \ ares_library_init.pdf \ ares_mkquery.pdf \ + ares_create_query.pdf \ ares_parse_a_reply.pdf \ ares_parse_aaaa_reply.pdf \ ares_parse_mx_reply.pdf \ ares_parse_ns_reply.pdf \ ares_parse_ptr_reply.pdf \ + ares_parse_soa_reply.pdf \ ares_parse_srv_reply.pdf \ ares_parse_txt_reply.pdf \ ares_process.pdf \ @@ -184,16 +197,14 @@ PDFPAGES = ares_cancel.pdf \ ares_set_socket_callback.pdf \ ares_strerror.pdf \ ares_timeout.pdf \ - ares_version.pdf + ares_version.pdf \ + ares_inet_pton.pdf \ + ares_inet_ntop.pdf SAMPLESOURCES = ares_getopt.c \ ares_nowarn.c \ - ares_strcasecmp.c \ - inet_net_pton.c \ - inet_ntop.c + ares_strcasecmp.c SAMPLEHEADERS = ares_getopt.h \ ares_nowarn.h \ - ares_strcasecmp.h \ - inet_net_pton.h \ - inet_ntop.h + ares_strcasecmp.h diff --git a/Makefile.m32 b/Makefile.m32 index 52d9310..42149f5 100644 --- a/Makefile.m32 +++ b/Makefile.m32 @@ -10,12 +10,15 @@ LIB = libcares.a +AR = ar CC = gcc LD = gcc RANLIB = ranlib #RM = rm -f +CP = cp -afv -CFLAGS = -O2 -Wall +CFLAGS = -O2 -Wall -I. +CFLAGS += -DCARES_STATICLIB LDFLAGS = -s LIBS = -lwsock32 @@ -26,7 +29,7 @@ OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES))) $(LIB): $(OBJLIB) - ar cru $@ $^ + $(AR) cru $@ $^ $(RANLIB) $@ all: $(LIB) demos @@ -44,6 +47,9 @@ $(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h .c.o: $(CC) $(CFLAGS) -c $< +ares_build.h: + $(CP) ares_build.h.dist ares_build.h + check: install: @@ -65,4 +71,7 @@ clean: distclean: clean $(RM) config.cache config.log config.status Makefile +ifeq "$(wildcard ares_build.h.dist)" "ares_build.h.dist" + $(RM) ares_build.h +endif diff --git a/Makefile.msvc b/Makefile.msvc index 64af1c1..c83dd91 100644 --- a/Makefile.msvc +++ b/Makefile.msvc @@ -1,5 +1,5 @@ -# Copyright (C) 2009-2010 by Daniel Stenberg +# Copyright (C) 2009-2013 by Daniel Stenberg # # Permission to use, copy, modify, and distribute this # software and its documentation for any purpose and without @@ -115,6 +115,16 @@ CC_VERS_NUM = 100 CC_VERS_NUM = 100 !ELSEIF "$(_NMAKE_VER)" == "10.00.30319.01" CC_VERS_NUM = 100 +!ELSEIF "$(_NMAKE_VER)" == "10.00.40219.01" +CC_VERS_NUM = 100 +!ELSEIF "$(_NMAKE_VER)" == "11.00.50522.1" +CC_VERS_NUM = 110 +!ELSEIF "$(_NMAKE_VER)" == "11.00.50727.1" +CC_VERS_NUM = 110 +!ELSEIF "$(_NMAKE_VER)" == "11.00.51106.1" +CC_VERS_NUM = 110 +!ELSEIF "$(_NMAKE_VER)" == "11.00.60315.1" +CC_VERS_NUM = 110 !ELSE ! MESSAGE Unknown value for _NMAKE_VER macro: "$(_NMAKE_VER)" ! MESSAGE Please, report this condition on the c-ares development diff --git a/Makefile.netware b/Makefile.netware index 0cb1530..653efb0 100644 --- a/Makefile.netware +++ b/Makefile.netware @@ -398,6 +398,7 @@ endif @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@ @echo $(DL)#define RETSIGTYPE void$(DL) >> $@ @echo $(DL)#define SIZEOF_INT 4$(DL) >> $@ + @echo $(DL)#define SIZEOF_SHORT 2$(DL) >> $@ @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@ @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@ @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@ @@ -24,8 +24,6 @@ You'll find all c-ares details and news here: NOTES FOR C-ARES HACKERS -The following notes apply to c-ares version 1.7.0 and later. - * The distributed ares_build.h file is only intended to be used on systems which can not run the also distributed configure script. diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 06d7856..1f3f0ef 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,26 +1,35 @@ -c-ares version 1.7.5 +c-ares version 1.10.0 -Fixed: +Changes: - o detection of semicolon comments in resolv.conf - o avoid using system's inet_net_pton affected by the WLB-2008080064 advisory - o replacement ares_inet_net_pton affected by the WLB-2008080064 advisory - o replacement ares_inet_ntop affected by potential out of bounds write - o added install target to Makefile.msvc - o only fall back to AF_INET searches when looking for AF_UNSPEC addresses - o fixed ares_parse_*_reply memory leaks - o Use correct sizeof in ares_getnameinfo() - o IPv6-on-windows: find DNS servers correctly - o man pages: docs for the c-ares utility programs - o getservbyport replacement for Win CE - o config_sortlist: (win32) missing else - o advance_tcp_send_queue: avoid NULL ptr dereference - o configure: fix a bashism - o ares_expand_name: Fix encoded length for indirect root + o Added ares_create_query(), to be used instead of ares_mkquery() + o ares_inet_ntop() and ares_inet_pton() are now recognized c-ares functions +Bug fixes: + + o include the ares_parse_soa_reply.* files in the tarball + o read_udp_packets: bail out loop on bad sockets + o get_DNS_AdaptersAddresses: fix IPv6 parsing + o adig: perror() doesn't work for socket errors on windows + o ares_parse_aaaa_reply: fix memory leak + o setup_once.h: HP-UX <sys/socket.h> issue workaround + o configure: several fixes + o config-dos.h: define strerror() to strerror_s_() for High-C + o config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32 + o ares_build.h.dist: enhance non-configure GCC ABI detection logic + o ares.h: stricter CARES_EXTERN linkage decorations logic + o ares_cancel(): cancel requests safely + o protocol parsing: check input data stricter + o library init: be recursive, reference count inits/cleanups + o ares_parse_txt_reply: return a ares_txt_reply node for each sub-string + o ares_set_servers_csv: fixed IPv6 address parsing + o build: fix build on msvc11 + Thanks go to these friendly people for their efforts and contributions: - Yang Tse, Jakub Hrozek, Gisle Vanem, Tom Hughes, David Stuart, Dima Tisnek, - Peter Pentchev, Stefan Buhler + Eugeny Gladkih, Yang Tse, Gisle Vanem, Guenter Knauf, Horatiu Popescu, + Alexander Klauer, Patrick Valsecchi, Paul Saab, Keith Shaw, + Alex Loukissas + Have fun! diff --git a/acinclude.m4 b/acinclude.m4 index 9606131..ec7b0b2 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -30,7 +30,7 @@ CURL_DEF_TOKEN $1 ],[ tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[[ ]]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[[ ]][[ ]]*//' 2>/dev/null | \ "$SED" 's/[["]][[ ]]*[["]]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "$1"; then tmp_exp="" @@ -207,12 +207,7 @@ AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [ ]) fi ]) - case "$ac_cv_native_windows" in - yes) - AC_DEFINE_UNQUOTED(NATIVE_WINDOWS, 1, - [Define to 1 if you are building a native Windows target.]) - ;; - esac + AM_CONDITIONAL(DOING_NATIVE_WINDOWS, test "x$ac_cv_native_windows" = xyes) ]) @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,33 +12,63 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -85,14 +116,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -101,8 +132,11 @@ AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -116,15 +150,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -152,6 +185,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -163,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -180,6 +215,16 @@ AC_CACHE_CHECK([dependency style of $depcc], if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -197,7 +242,17 @@ AC_CACHE_CHECK([dependency style of $depcc], done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -207,18 +262,23 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -267,63 +327,79 @@ AC_DEFUN([AM_DEP_TRACK], if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 +#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -340,28 +416,16 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -378,16 +442,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -407,6 +475,9 @@ m4_ifval([$2], AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -422,8 +493,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -431,20 +502,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -455,29 +543,40 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -504,27 +603,38 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl + AC_SUBST([MAINT])dnl ] ) @@ -532,13 +642,13 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_MAKE_INCLUDE() # ----------------- @@ -547,7 +657,7 @@ AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -557,24 +667,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -582,13 +692,14 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 6 # AM_PROG_CC_C_O # -------------- @@ -596,11 +707,13 @@ rm -f confinc confmf AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC -ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then +am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. @@ -608,18 +721,22 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi +dnl Make sure AC_PROG_CC is never called again, or it will override our +dnl setting of CC. +m4_define([AC_PROG_CC], + [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -635,7 +752,15 @@ AC_SUBST($1)]) # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " @@ -645,78 +770,45 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -724,16 +816,16 @@ AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -743,14 +835,14 @@ AC_DEFUN([_AM_IF_OPTION], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_SANITY_CHECK # --------------- @@ -759,16 +851,29 @@ AC_DEFUN([AM_SANITY_CHECK], # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ @@ -793,12 +898,14 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -818,12 +925,31 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -845,10 +971,11 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) @@ -922,11 +1049,16 @@ m4_include([m4/cares-confopts.m4]) m4_include([m4/cares-functions.m4]) m4_include([m4/cares-override.m4]) m4_include([m4/cares-reentrant.m4]) -m4_include([m4/cares-system.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/xc-cc-check.m4]) +m4_include([m4/xc-lt-iface.m4]) m4_include([m4/xc-translit.m4]) +m4_include([m4/xc-val-flgs.m4]) +m4_include([m4/zz40-xc-ovr.m4]) +m4_include([m4/zz50-xc-ovr.m4]) +m4_include([m4/zz60-xc-ovr.m4]) m4_include([acinclude.m4]) @@ -34,14 +34,6 @@ #include "ares_setup.h" -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <ctype.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif #ifdef HAVE_STRINGS_H #include <strings.h> #endif @@ -49,7 +41,6 @@ #if defined(WIN32) && !defined(WATT32) #include <winsock.h> #else - #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> #include <netdb.h> @@ -57,8 +48,6 @@ #include "ares.h" #include "ares_getopt.h" -#include "inet_net_pton.h" -#include "inet_ntop.h" #include "ares_nowarn.h" #ifndef HAVE_STRDUP @@ -89,7 +78,7 @@ static int verbose = 0; #define TRACE(fmt) do { \ if (verbose > 0) \ printf fmt ; \ - } while (0) + } WHILE_FALSE static void wait_ares(ares_channel channel); static void callback(void *arg, int status, int timeouts, struct hostent *host); @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -37,25 +34,12 @@ # include <arpa/nameser_compat.h> #endif -#ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -#endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif #ifdef HAVE_STRINGS_H # include <strings.h> #endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> - #include "ares.h" #include "ares_dns.h" -#include "inet_ntop.h" -#include "inet_net_pton.h" #include "ares_getopt.h" #include "ares_nowarn.h" @@ -390,9 +374,9 @@ int main(int argc, char **argv) break; tvp = ares_timeout(channel, NULL, &tv); count = select(nfds, &read_fds, &write_fds, NULL, tvp); - if (count < 0 && SOCKERRNO != EINVAL) + if (count < 0 && (status = SOCKERRNO) != EINVAL) { - perror("select"); + printf("select fail: %d", status); return 1; } ares_process(channel, &read_fds, &write_fds); @@ -649,7 +633,7 @@ static const unsigned char *display_rr(const unsigned char *aptr, */ if (dlen < 2) return NULL; - printf("\t%d", DNS__16BIT(aptr)); + printf("\t%d", (int)DNS__16BIT(aptr)); status = ares_expand_name(aptr + 2, abuf, alen, &name.as_char, &len); if (status != ARES_SUCCESS) return NULL; @@ -676,10 +660,10 @@ static const unsigned char *display_rr(const unsigned char *aptr, p += len; if (p + 20 > aptr + dlen) return NULL; - printf("\t\t\t\t\t\t( %lu %lu %lu %lu %lu )", - (unsigned long)DNS__32BIT(p), (unsigned long)DNS__32BIT(p+4), - (unsigned long)DNS__32BIT(p+8), (unsigned long)DNS__32BIT(p+12), - (unsigned long)DNS__32BIT(p+16)); + printf("\t\t\t\t\t\t( %u %u %u %u %u )", + DNS__32BIT(p), DNS__32BIT(p+4), + DNS__32BIT(p+8), DNS__32BIT(p+12), + DNS__32BIT(p+16)); break; case T_TXT: @@ -723,9 +707,9 @@ static const unsigned char *display_rr(const unsigned char *aptr, * priority, weight, and port, followed by a domain name. */ - printf("\t%d", DNS__16BIT(aptr)); - printf(" %d", DNS__16BIT(aptr + 2)); - printf(" %d", DNS__16BIT(aptr + 4)); + printf("\t%d", (int)DNS__16BIT(aptr)); + printf(" %d", (int)DNS__16BIT(aptr + 2)); + printf(" %d", (int)DNS__16BIT(aptr + 4)); status = ares_expand_name(aptr + 6, abuf, alen, &name.as_char, &len); if (status != ARES_SUCCESS) @@ -736,8 +720,8 @@ static const unsigned char *display_rr(const unsigned char *aptr, case T_NAPTR: - printf("\t%d", DNS__16BIT(aptr)); /* order */ - printf(" %d\n", DNS__16BIT(aptr + 2)); /* preference */ + printf("\t%d", (int)DNS__16BIT(aptr)); /* order */ + printf(" %d\n", (int)DNS__16BIT(aptr + 2)); /* preference */ p = aptr + 4; status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); @@ -17,29 +17,17 @@ #include "ares_setup.h" #if !defined(WIN32) || defined(WATT32) -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif #endif + #ifdef HAVE_STRINGS_H #include <strings.h> #endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "ares.h" #include "ares_dns.h" -#include "inet_ntop.h" -#include "inet_net_pton.h" #include "ares_getopt.h" #include "ares_ipv6.h" #include "ares_nowarn.h" @@ -1,6 +1,6 @@ -/* Copyright 1998, 2009 by the Massachusetts Institute of Technology. - * Copyright (C) 2007-2011 by Daniel Stenberg +/* Copyright 1998 by the Massachusetts Institute of Technology. + * Copyright (C) 2007-2013 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -37,7 +37,8 @@ libc5-based Linux systems. Only include it on system that are known to require it! */ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ - defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ + defined(ANDROID) || defined(__ANDROID__) #include <sys/select.h> #endif #if (defined(NETWARE) && !defined(__NOVELL_LIBC__)) @@ -74,22 +75,18 @@ extern "C" { ** c-ares external API function linkage decorations. */ -#if !defined(CARES_STATICLIB) && \ - (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) - /* __declspec function decoration for Win32 and Symbian DLL's */ +#ifdef CARES_STATICLIB +# define CARES_EXTERN +#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) # if defined(CARES_BUILDING_LIBRARY) # define CARES_EXTERN __declspec(dllexport) # else # define CARES_EXTERN __declspec(dllimport) # endif +#elif defined(CARES_BUILDING_LIBRARY) && defined(CARES_SYMBOL_HIDING) +# define CARES_EXTERN CARES_SYMBOL_SCOPE_EXTERN #else - /* visibility function decoration for other cases */ -# if !defined(CARES_SYMBOL_HIDING) || \ - defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) -# define CARES_EXTERN -# else -# define CARES_EXTERN CARES_SYMBOL_SCOPE_EXTERN -# endif +# define CARES_EXTERN #endif @@ -142,6 +139,7 @@ extern "C" { #define ARES_FLAG_NOSEARCH (1 << 5) #define ARES_FLAG_NOALIASES (1 << 6) #define ARES_FLAG_NOCHECKRESP (1 << 7) +#define ARES_FLAG_EDNS (1 << 8) /* Option mask values */ #define ARES_OPT_FLAGS (1 << 0) @@ -159,6 +157,7 @@ extern "C" { #define ARES_OPT_SOCK_RCVBUF (1 << 12) #define ARES_OPT_TIMEOUTMS (1 << 13) #define ARES_OPT_ROTATE (1 << 14) +#define ARES_OPT_EDNSPSZ (1 << 15) /* Nameinfo flag values */ #define ARES_NI_NOFQDN (1 << 0) @@ -264,6 +263,7 @@ struct ares_options { void *sock_state_cb_data; struct apattern *sortlist; int nsort; + int ednspsz; }; struct hostent; @@ -402,6 +402,15 @@ CARES_EXTERN void ares_process_fd(ares_channel channel, ares_socket_t read_fd, ares_socket_t write_fd); +CARES_EXTERN int ares_create_query(const char *name, + int dnsclass, + int type, + unsigned short id, + int rd, + unsigned char **buf, + int *buflen, + int max_udp_size); + CARES_EXTERN int ares_mkquery(const char *name, int dnsclass, int type, @@ -465,6 +474,26 @@ struct ares_txt_reply { size_t length; /* length excludes null termination */ }; +struct ares_naptr_reply { + struct ares_naptr_reply *next; + unsigned char *flags; + unsigned char *service; + unsigned char *regexp; + char *replacement; + unsigned short order; + unsigned short preference; +}; + +struct ares_soa_reply { + char *nsname; + char *hostmaster; + unsigned int serial; + unsigned int refresh; + unsigned int retry; + unsigned int expire; + unsigned int minttl; +}; + /* ** Parse the buffer, starting at *abuf and of length alen bytes, previously ** obtained from an ares_search call. Put the results in *host, if nonnull. @@ -508,6 +537,14 @@ CARES_EXTERN int ares_parse_txt_reply(const unsigned char* abuf, int alen, struct ares_txt_reply** txt_out); +CARES_EXTERN int ares_parse_naptr_reply(const unsigned char* abuf, + int alen, + struct ares_naptr_reply** naptr_out); + +CARES_EXTERN int ares_parse_soa_reply(const unsigned char* abuf, + int alen, + struct ares_soa_reply** soa_out); + CARES_EXTERN void ares_free_string(void *str); CARES_EXTERN void ares_free_hostent(struct hostent *host); @@ -536,6 +573,12 @@ CARES_EXTERN int ares_set_servers_csv(ares_channel channel, CARES_EXTERN int ares_get_servers(ares_channel channel, struct ares_addr_node **servers); +CARES_EXTERN const char *ares_inet_ntop(int af, const void *src, char *dst, + ares_socklen_t size); + +CARES_EXTERN int ares_inet_pton(int af, const char *src, void *dst); + + #ifdef __cplusplus } #endif diff --git a/ares__close_sockets.c b/ares__close_sockets.c index 5d391a9..d3d85ff 100644 --- a/ares__close_sockets.c +++ b/ares__close_sockets.c @@ -16,11 +16,6 @@ #include "ares_setup.h" -#include <stdlib.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - #include "ares.h" #include "ares_private.h" diff --git a/ares__get_hostent.c b/ares__get_hostent.c index 298df09..4497d60 100644 --- a/ares__get_hostent.c +++ b/ares__get_hostent.c @@ -1,5 +1,5 @@ -/* Copyright 1998, 2010 by the Massachusetts Institute of Technology. +/* Copyright 1998, 2011 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -30,7 +27,8 @@ #endif #include "ares.h" -#include "inet_net_pton.h" +#include "ares_inet_net_pton.h" +#include "ares_nowarn.h" #include "ares_private.h" int ares__get_hostent(FILE *fp, int family, struct hostent **host) @@ -219,8 +217,8 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host) break; /* Copy actual network address family and length. */ - hostent->h_addrtype = addr.family; - hostent->h_length = (int)addrlen; + hostent->h_addrtype = aresx_sitoss(addr.family); + hostent->h_length = aresx_uztoss(addrlen); /* Free line buffer. */ free(line); diff --git a/ares__read_line.c b/ares__read_line.c index ca01803..bd9504f 100644 --- a/ares__read_line.c +++ b/ares__read_line.c @@ -15,9 +15,7 @@ */ #include "ares_setup.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> + #include "ares.h" #include "ares_nowarn.h" #include "ares_private.h" diff --git a/ares_build.h b/ares_build.h index 2736cff..afcb75a 100644 --- a/ares_build.h +++ b/ares_build.h @@ -2,7 +2,7 @@ #define __CARES_BUILD_H -/* Copyright (C) 2009 - 2010 by Daniel Stenberg et al +/* Copyright (C) 2009 - 2013 by Daniel Stenberg et al * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided @@ -216,9 +216,11 @@ /* ===================================== */ #elif defined(__GNUC__) -# if defined(__i386__) || defined(__ppc__) +# if defined(__ILP32__) || \ + defined(__i386__) || defined(__ppc__) || defined(__arm__) # define CARES_SIZEOF_LONG 4 -# elif defined(__x86_64__) || defined(__ppc64__) +# elif defined(__LP64__) || \ + defined(__x86_64__) || defined(__ppc64__) # define CARES_SIZEOF_LONG 8 # endif # define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t diff --git a/ares_cancel.3 b/ares_cancel.3 index ef10ec5..0bf6281 100644 --- a/ares_cancel.3 +++ b/ares_cancel.3 @@ -28,7 +28,9 @@ name service channel identified by \fIchannel\fP. \fBares_cancel\fP invokes the callbacks for each pending query on the channel, passing a status of .BR ARES_ECANCELLED . These calls give the callbacks a chance to clean up any state which -might have been stored in their arguments. +might have been stored in their arguments. If such a callback invocation adds +a new request to the channel, that request will \fInot\fP be cancelled by the +current invocation of \fBares_cancel\fP. .SH SEE ALSO .BR ares_init (3) .BR ares_destroy (3) diff --git a/ares_cancel.c b/ares_cancel.c index eb790ae..465cc9e 100644 --- a/ares_cancel.c +++ b/ares_cancel.c @@ -14,7 +14,7 @@ #include "ares_setup.h" #include <assert.h> -#include <stdlib.h> + #include "ares.h" #include "ares_private.h" @@ -26,33 +26,33 @@ void ares_cancel(ares_channel channel) { struct query *query; + struct list_node list_head_copy; struct list_node* list_head; struct list_node* list_node; int i; - list_head = &(channel->all_queries); - for (list_node = list_head->next; list_node != list_head; ) + if (!ares__is_list_empty(&(channel->all_queries))) { - query = list_node->data; - list_node = list_node->next; /* since we're deleting the query */ - query->callback(query->arg, ARES_ECANCELLED, 0, NULL, 0); - ares__free_query(query); - } -#ifndef NDEBUG - /* Freeing the query should remove it from all the lists in which it sits, - * so all query lists should be empty now. - */ - assert(ares__is_list_empty(&(channel->all_queries))); - for (i = 0; i < ARES_QID_TABLE_SIZE; i++) + /* Swap list heads, so that only those queries which were present on entry + * into this function are cancelled. New queries added by callbacks of + * queries being cancelled will not be cancelled themselves. + */ + list_head = &(channel->all_queries); + list_head_copy.prev = list_head->prev; + list_head_copy.next = list_head->next; + list_head_copy.prev->next = &list_head_copy; + list_head_copy.next->prev = &list_head_copy; + list_head->prev = list_head; + list_head->next = list_head; + for (list_node = list_head_copy.next; list_node != &list_head_copy; ) { - assert(ares__is_list_empty(&(channel->queries_by_qid[i]))); + query = list_node->data; + list_node = list_node->next; /* since we're deleting the query */ + query->callback(query->arg, ARES_ECANCELLED, 0, NULL, 0); + ares__free_query(query); } - for (i = 0; i < ARES_TIMEOUT_TABLE_SIZE; i++) - { - assert(ares__is_list_empty(&(channel->queries_by_timeout[i]))); - } -#endif - if (!(channel->flags & ARES_FLAG_STAYOPEN)) + } + if (!(channel->flags & ARES_FLAG_STAYOPEN) && ares__is_list_empty(&(channel->all_queries))) { if (channel->servers) { diff --git a/ares_cancel.pdf b/ares_cancel.pdf Binary files differindex 61ce6a3..6c7a441 100644 --- a/ares_cancel.pdf +++ b/ares_cancel.pdf diff --git a/ares_config.h.in b/ares_config.h.in index c6c527f..70c60dc 100644 --- a/ares_config.h.in +++ b/ares_config.h.in @@ -9,21 +9,15 @@ /* when building as static part of libcurl */ #undef BUILDING_LIBCURL -/* when building c-ares library */ -#undef CARES_BUILDING_LIBRARY - -/* when not building a shared library */ -#undef CARES_STATICLIB - -/* Define to 1 to enable hiding of library internal symbols. */ -#undef CARES_SYMBOL_HIDING - /* Definition to make a library symbol externally visible. */ #undef CARES_SYMBOL_SCOPE_EXTERN /* if a /etc/inet dir is being used */ #undef ETC_INET +/* Define to the type of arg 2 for gethostname. */ +#undef GETHOSTNAME_TYPE_ARG2 + /* Define to the type qualifier of arg 1 for getnameinfo. */ #undef GETNAMEINFO_QUAL_ARG1 @@ -332,9 +326,6 @@ */ #undef LT_OBJDIR -/* Define to 1 if you are building a native Windows target. */ -#undef NATIVE_WINDOWS - /* Define to 1 if you need the malloc.h header file even with stdlib.h */ #undef NEED_MALLOC_H @@ -452,6 +443,9 @@ /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG +/* The size of `short', as computed by sizeof. */ +#undef SIZEOF_SHORT + /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T @@ -496,6 +490,11 @@ # undef _ALL_SOURCE #endif +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff --git a/ares_create_query.3 b/ares_create_query.3 new file mode 100644 index 0000000..5fd94fc --- /dev/null +++ b/ares_create_query.3 @@ -0,0 +1,81 @@ +.\" +.\" Copyright 1998 by the Massachusetts Institute of Technology. +.\" +.\" Permission to use, copy, modify, and distribute this +.\" software and its documentation for any purpose and without +.\" fee is hereby granted, provided that the above copyright +.\" notice appear in all copies and that both that copyright +.\" notice and this permission notice appear in supporting +.\" documentation, and that the name of M.I.T. not be used in +.\" advertising or publicity pertaining to distribution of the +.\" software without specific, written prior permission. +.\" M.I.T. makes no representations about the suitability of +.\" this software for any purpose. It is provided "as is" +.\" without express or implied warranty. +.\" +.TH ARES_CREATE_QUERY 3 "17 Aug 2012" +.SH NAME +ares_create_query \- Compose a single-question DNS query buffer +.SH SYNOPSIS +.nf +.B #include <ares.h> +.PP +.B int ares_create_query(const char *\fIname\fP, int \fIdnsclass\fP,\ + int \fItype\fP, +.B unsigned short \fIid\fP, int \fIrd\fP,\ + unsigned char **\fIbuf\fP, +.B int *\fIbuflen\fP, int \fImax_udp_size\fP) +.fi +.SH DESCRIPTION +The +.B ares_create_query +function composes a DNS query with a single question. +The parameter +.I name +gives the query name as a NUL-terminated C string of period-separated +labels optionally ending with a period; periods and backslashes within +a label must be escaped with a backlash. The parameters +.I dnsclass +and +.I type +give the class and type of the query using the values defined in +.BR <arpa/nameser.h> . +The parameter +.I id +gives a 16-bit identifier for the query. The parameter +.I rd +should be nonzero if recursion is desired, zero if not. The query +will be placed in an allocated buffer, a pointer to which will be +stored in the variable pointed to by +.IR buf , +and the length of which will be stored in the variable pointed to by +.IR buflen . +It is the caller's responsibility to free this buffer using +\fIares_free_string(3)\fP when it is no longer needed. +The parameter +.I max_udp_size +should be nonzero to activate EDNS. Usage of \fIares_create_query(3)\fP\ with +.I max_udp_size +set to zero is equivalent to \fIares_mkquery(3)\fP. +.SH RETURN VALUES +.B ares_create_query +can return any of the following values: +.TP 15 +.B ARES_SUCCESS +Construction of the DNS query succeeded. +.TP 15 +.B ARES_EBADNAME +The query name +.I name +could not be encoded as a domain name, either because it contained a +zero-length label or because it contained a label of more than 63 +characters. +.TP 15 +.B ARES_ENOMEM +Memory was exhausted. +.SH AVAILABILITY +Added in c-ares 1.10.0 +.SH SEE ALSO +.BR ares_expand_name (3), +.BR ares_free_string (3) +.SH AUTHOR diff --git a/ares_create_query.c b/ares_create_query.c new file mode 100644 index 0000000..8624e2f --- /dev/null +++ b/ares_create_query.c @@ -0,0 +1,208 @@ + +/* Copyright 1998 by the Massachusetts Institute of Technology. + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in + * advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" + * without express or implied warranty. + */ + +#include "ares_setup.h" + +#ifdef HAVE_NETINET_IN_H +# include <netinet/in.h> +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include <arpa/nameser.h> +#else +# include "nameser.h" +#endif +#ifdef HAVE_ARPA_NAMESER_COMPAT_H +# include <arpa/nameser_compat.h> +#endif + +#include "ares.h" +#include "ares_dns.h" +#include "ares_private.h" + +#ifndef T_OPT +# define T_OPT 41 /* EDNS0 option (meta-RR) */ +#endif + +/* Header format, from RFC 1035: + * 1 1 1 1 1 1 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ID | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * |QR| Opcode |AA|TC|RD|RA| Z | RCODE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QDCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ANCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | NSCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ARCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * AA, TC, RA, and RCODE are only set in responses. Brief description + * of the remaining fields: + * ID Identifier to match responses with queries + * QR Query (0) or response (1) + * Opcode For our purposes, always QUERY + * RD Recursion desired + * Z Reserved (zero) + * QDCOUNT Number of queries + * ANCOUNT Number of answers + * NSCOUNT Number of name server records + * ARCOUNT Number of additional records + * + * Question format, from RFC 1035: + * 1 1 1 1 1 1 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | | + * / QNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QTYPE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QCLASS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * The query name is encoded as a series of labels, each represented + * as a one-byte length (maximum 63) followed by the text of the + * label. The list is terminated by a label of length zero (which can + * be thought of as the root domain). + */ + +int ares_create_query(const char *name, int dnsclass, int type, + unsigned short id, int rd, unsigned char **buf, + int *buflen, int max_udp_size) +{ + int len; + unsigned char *q; + const char *p; + + /* Set our results early, in case we bail out early with an error. */ + *buflen = 0; + *buf = NULL; + + /* Compute the length of the encoded name so we can check buflen. + * Start counting at 1 for the zero-length label at the end. */ + len = 1; + for (p = name; *p; p++) + { + if (*p == '\\' && *(p + 1) != 0) + p++; + len++; + } + /* If there are n periods in the name, there are n + 1 labels, and + * thus n + 1 length fields, unless the name is empty or ends with a + * period. So add 1 unless name is empty or ends with a period. + */ + if (*name && *(p - 1) != '.') + len++; + + /* Immediately reject names that are longer than the maximum of 255 + * bytes that's specified in RFC 1035 ("To simplify implementations, + * the total length of a domain name (i.e., label octets and label + * length octets) is restricted to 255 octets or less."). We aren't + * doing this just to be a stickler about RFCs. For names that are + * too long, 'dnscache' closes its TCP connection to us immediately + * (when using TCP) and ignores the request when using UDP, and + * BIND's named returns ServFail (TCP or UDP). Sending a request + * that we know will cause 'dnscache' to close the TCP connection is + * painful, since that makes any other outstanding requests on that + * connection fail. And sending a UDP request that we know + * 'dnscache' will ignore is bad because resources will be tied up + * until we time-out the request. + */ + if (len > MAXCDNAME) + return ARES_EBADNAME; + + *buflen = len + HFIXEDSZ + QFIXEDSZ + (max_udp_size ? EDNSFIXEDSZ : 0); + *buf = malloc(*buflen); + if (!*buf) + return ARES_ENOMEM; + + /* Set up the header. */ + q = *buf; + memset(q, 0, HFIXEDSZ); + DNS_HEADER_SET_QID(q, id); + DNS_HEADER_SET_OPCODE(q, QUERY); + if (rd) { + DNS_HEADER_SET_RD(q, 1); + } + else { + DNS_HEADER_SET_RD(q, 0); + } + DNS_HEADER_SET_QDCOUNT(q, 1); + + if (max_udp_size) { + DNS_HEADER_SET_ARCOUNT(q, 1); + } + + /* A name of "." is a screw case for the loop below, so adjust it. */ + if (strcmp(name, ".") == 0) + name++; + + /* Start writing out the name after the header. */ + q += HFIXEDSZ; + while (*name) + { + if (*name == '.') + return ARES_EBADNAME; + + /* Count the number of bytes in this label. */ + len = 0; + for (p = name; *p && *p != '.'; p++) + { + if (*p == '\\' && *(p + 1) != 0) + p++; + len++; + } + if (len > MAXLABEL) + return ARES_EBADNAME; + + /* Encode the length and copy the data. */ + *q++ = (unsigned char)len; + for (p = name; *p && *p != '.'; p++) + { + if (*p == '\\' && *(p + 1) != 0) + p++; + *q++ = *p; + } + + /* Go to the next label and repeat, unless we hit the end. */ + if (!*p) + break; + name = p + 1; + } + + /* Add the zero-length label at the end. */ + *q++ = 0; + + /* Finish off the question with the type and class. */ + DNS_QUESTION_SET_TYPE(q, type); + DNS_QUESTION_SET_CLASS(q, dnsclass); + + if (max_udp_size) + { + q += QFIXEDSZ; + memset(q, 0, EDNSFIXEDSZ); + q++; + DNS_RR_SET_TYPE(q, T_OPT); + DNS_RR_SET_CLASS(q, max_udp_size); + } + + return ARES_SUCCESS; +} diff --git a/ares_create_query.pdf b/ares_create_query.pdf Binary files differnew file mode 100644 index 0000000..e923d48 --- /dev/null +++ b/ares_create_query.pdf diff --git a/ares_data.c b/ares_data.c index a2477be..b86ca90 100644 --- a/ares_data.c +++ b/ares_data.c @@ -1,5 +1,5 @@ -/* Copyright (C) 2009-2010 by Daniel Stenberg +/* Copyright (C) 2009-2013 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -92,6 +92,27 @@ void ares_free_data(void *dataptr) ares_free_data(ptr->data.addr_node.next); break; + case ARES_DATATYPE_NAPTR_REPLY: + + if (ptr->data.naptr_reply.next) + ares_free_data(ptr->data.naptr_reply.next); + if (ptr->data.naptr_reply.flags) + free(ptr->data.naptr_reply.flags); + if (ptr->data.naptr_reply.service) + free(ptr->data.naptr_reply.service); + if (ptr->data.naptr_reply.regexp) + free(ptr->data.naptr_reply.regexp); + if (ptr->data.naptr_reply.replacement) + free(ptr->data.naptr_reply.replacement); + break; + + case ARES_DATATYPE_SOA_REPLY: + if (ptr->data.soa_reply.nsname) + free(ptr->data.soa_reply.nsname); + if (ptr->data.soa_reply.hostmaster) + free(ptr->data.soa_reply.hostmaster); + break; + default: return; } @@ -138,7 +159,7 @@ void *ares_malloc_data(ares_datatype type) case ARES_DATATYPE_TXT_REPLY: ptr->data.txt_reply.next = NULL; ptr->data.txt_reply.txt = NULL; - ptr->data.txt_reply.length = 0; + ptr->data.txt_reply.length = 0; break; case ARES_DATATYPE_ADDR_NODE: @@ -148,6 +169,26 @@ void *ares_malloc_data(ares_datatype type) sizeof(ptr->data.addr_node.addrV6)); break; + case ARES_DATATYPE_NAPTR_REPLY: + ptr->data.naptr_reply.next = NULL; + ptr->data.naptr_reply.flags = NULL; + ptr->data.naptr_reply.service = NULL; + ptr->data.naptr_reply.regexp = NULL; + ptr->data.naptr_reply.replacement = NULL; + ptr->data.naptr_reply.order = 0; + ptr->data.naptr_reply.preference = 0; + break; + + case ARES_DATATYPE_SOA_REPLY: + ptr->data.soa_reply.nsname = NULL; + ptr->data.soa_reply.hostmaster = NULL; + ptr->data.soa_reply.serial = 0; + ptr->data.soa_reply.refresh = 0; + ptr->data.soa_reply.retry = 0; + ptr->data.soa_reply.expire = 0; + ptr->data.soa_reply.minttl = 0; + break; + default: free(ptr); return NULL; @@ -158,33 +199,3 @@ void *ares_malloc_data(ares_datatype type) return &ptr->data; } - - -/* -** ares_get_datatype() - c-ares internal helper function. -** -** This function returns the ares_datatype of the data stored in a -** private ares_data struct when given the public API pointer. -*/ - -ares_datatype ares_get_datatype(void * dataptr) -{ - struct ares_data *ptr; - -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:1684) - /* 1684: conversion from pointer to same-sized integral type */ -#endif - - ptr = (void *)((char *)dataptr - offsetof(struct ares_data, data)); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif - - if (ptr->mark == ARES_DATATYPE_MARK) - return ptr->type; - - return ARES_DATATYPE_UNKNOWN; -} diff --git a/ares_data.h b/ares_data.h index de1608b..12e3b67 100644 --- a/ares_data.h +++ b/ares_data.h @@ -1,5 +1,5 @@ -/* Copyright (C) 2009-2010 by Daniel Stenberg +/* Copyright (C) 2009-2013 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -20,6 +20,8 @@ typedef enum { ARES_DATATYPE_TXT_REPLY, /* struct ares_txt_reply - introduced in 1.7.0 */ ARES_DATATYPE_ADDR_NODE, /* struct ares_addr_node - introduced in 1.7.1 */ ARES_DATATYPE_MX_REPLY, /* struct ares_mx_reply - introduced in 1.7.2 */ + ARES_DATATYPE_NAPTR_REPLY,/* struct ares_naptr_reply - introduced in 1.7.6 */ + ARES_DATATYPE_SOA_REPLY, /* struct ares_soa_reply - introduced in 1.9.0 */ #if 0 ARES_DATATYPE_ADDR6TTL, /* struct ares_addrttl */ ARES_DATATYPE_ADDRTTL, /* struct ares_addr6ttl */ @@ -53,13 +55,14 @@ struct ares_data { ares_datatype type; /* Actual data type identifier. */ unsigned int mark; /* Private ares_data signature. */ union { - struct ares_txt_reply txt_reply; - struct ares_srv_reply srv_reply; - struct ares_addr_node addr_node; - struct ares_mx_reply mx_reply; + struct ares_txt_reply txt_reply; + struct ares_srv_reply srv_reply; + struct ares_addr_node addr_node; + struct ares_mx_reply mx_reply; + struct ares_naptr_reply naptr_reply; + struct ares_soa_reply soa_reply; } data; }; void *ares_malloc_data(ares_datatype type); -ares_datatype ares_get_datatype(void * dataptr); diff --git a/ares_destroy.3 b/ares_destroy.3 index 79171ec..3724df1 100644 --- a/ares_destroy.3 +++ b/ares_destroy.3 @@ -33,7 +33,8 @@ invokes the callbacks for each pending query on the channel, passing a status of .BR ARES_EDESTRUCTION . These calls give the callbacks a chance to clean up any state which -might have been stored in their arguments. +might have been stored in their arguments. A callback must not add new +requests to a channel being destroyed. .SH SEE ALSO .BR ares_init (3), .BR ares_cancel (3) diff --git a/ares_destroy.c b/ares_destroy.c index 5e274da..6c1f324 100644 --- a/ares_destroy.c +++ b/ares_destroy.c @@ -1,6 +1,6 @@ /* Copyright 1998 by the Massachusetts Institute of Technology. - * Copyright (C) 2004-2010 by Daniel Stenberg + * Copyright (C) 2004-2011 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -16,8 +16,9 @@ */ #include "ares_setup.h" + #include <assert.h> -#include <stdlib.h> + #include "ares.h" #include "ares_private.h" @@ -29,10 +30,12 @@ void ares_destroy_options(struct ares_options *options) free(options->servers); for (i = 0; i < options->ndomains; i++) free(options->domains[i]); - free(options->domains); + if(options->domains) + free(options->domains); if(options->sortlist) free(options->sortlist); - free(options->lookups); + if(options->lookups) + free(options->lookups); } void ares_destroy(ares_channel channel) diff --git a/ares_destroy.pdf b/ares_destroy.pdf Binary files differindex f9092d5..ae343eb 100644 --- a/ares_destroy.pdf +++ b/ares_destroy.pdf diff --git a/ares_destroy_options.pdf b/ares_destroy_options.pdf Binary files differindex b86f1cc..2a8bb7e 100644 --- a/ares_destroy_options.pdf +++ b/ares_destroy_options.pdf @@ -1,5 +1,7 @@ +#ifndef HEADER_CARES_DNS_H +#define HEADER_CARES_DNS_H -/* Copyright 1998 by the Massachusetts Institute of Technology. +/* Copyright 1998, 2011 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -14,12 +16,23 @@ * without express or implied warranty. */ -#ifndef ARES__DNS_H -#define ARES__DNS_H +/* + * Macro DNS__16BIT reads a network short (16 bit) given in network + * byte order, and returns its value as an unsigned short. + */ +#define DNS__16BIT(p) ((unsigned short)((unsigned int) 0xffff & \ + (((unsigned int)((unsigned char)(p)[0]) << 8U) | \ + ((unsigned int)((unsigned char)(p)[1]))))) -#define DNS__16BIT(p) (((p)[0] << 8) | (p)[1]) -#define DNS__32BIT(p) (((p)[0] << 24) | ((p)[1] << 16) | \ - ((p)[2] << 8) | (p)[3]) +/* + * Macro DNS__32BIT reads a network long (32 bit) given in network + * byte order, and returns its value as an unsigned int. + */ +#define DNS__32BIT(p) ((unsigned int) \ + (((unsigned int)((unsigned char)(p)[0]) << 24U) | \ + ((unsigned int)((unsigned char)(p)[1]) << 16U) | \ + ((unsigned int)((unsigned char)(p)[2]) << 8U) | \ + ((unsigned int)((unsigned char)(p)[3])))) #define DNS__SET16BIT(p, v) (((p)[0] = (unsigned char)(((v) >> 8) & 0xff)), \ ((p)[1] = (unsigned char)((v) & 0xff))) @@ -82,9 +95,9 @@ #define DNS_RR_LEN(r) DNS__16BIT((r) + 8) /* Macros for constructing the fixed part of a DNS resource record */ -#define DNS_RR_SET_TYPE(r) DNS__SET16BIT(r, v) -#define DNS_RR_SET_CLASS(r) DNS__SET16BIT((r) + 2, v) -#define DNS_RR_SET_TTL(r) DNS__SET32BIT((r) + 4, v) -#define DNS_RR_SET_LEN(r) DNS__SET16BIT((r) + 8, v) +#define DNS_RR_SET_TYPE(r, v) DNS__SET16BIT(r, v) +#define DNS_RR_SET_CLASS(r, v) DNS__SET16BIT((r) + 2, v) +#define DNS_RR_SET_TTL(r, v) DNS__SET32BIT((r) + 4, v) +#define DNS_RR_SET_LEN(r, v) DNS__SET16BIT((r) + 8, v) -#endif /* ARES__DNS_H */ +#endif /* HEADER_CARES_DNS_H */ diff --git a/ares_dup.pdf b/ares_dup.pdf Binary files differindex f03eee3..8dbadea 100644 --- a/ares_dup.pdf +++ b/ares_dup.pdf diff --git a/ares_expand_name.3 b/ares_expand_name.3 index 1761a9a..fc18df3 100644 --- a/ares_expand_name.3 +++ b/ares_expand_name.3 @@ -43,6 +43,8 @@ The length of the encoded name is stored in the variable pointed to by .I enclen so that the caller can advance past the encoded domain name to read further data in the message. + +Use \fIares_free_string(3)\fP to free the allocated hostname. .SH RETURN VALUES .B ares_expand_name can return any of the following values: @@ -56,7 +58,7 @@ The encoded domain name was malformed and could not be expanded. .B ARES_ENOMEM Memory was exhausted. .SH SEE ALSO -.BR ares_mkquery (3) +.BR ares_mkquery (3), ares_free_string (3) .SH AUTHOR Greg Hudson, MIT Information Systems .br diff --git a/ares_expand_name.c b/ares_expand_name.c index e3eccd2..2aa12bc 100644 --- a/ares_expand_name.c +++ b/ares_expand_name.c @@ -1,5 +1,5 @@ -/* Copyright 1998 by the Massachusetts Institute of Technology. +/* Copyright 1998, 2011 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -31,8 +28,8 @@ # include <arpa/nameser_compat.h> #endif -#include <stdlib.h> #include "ares.h" +#include "ares_nowarn.h" #include "ares_private.h" /* for the memdebug */ static int name_length(const unsigned char *encoded, const unsigned char *abuf, @@ -91,9 +88,9 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, /* indirect root label (like 0xc0 0x0c) is 2 bytes long (stupid, but valid) */ if ((*encoded & INDIR_MASK) == INDIR_MASK) - *enclen = 2; + *enclen = 2L; else - *enclen = 1; /* the caller should move one byte to get past this */ + *enclen = 1L; /* the caller should move one byte to get past this */ return ARES_SUCCESS; } @@ -106,7 +103,7 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, { if (!indir) { - *enclen = p + 2 - encoded; + *enclen = aresx_uztosl(p + 2U - encoded); indir = 1; } p = abuf + ((*p & ~INDIR_MASK) << 8 | *(p + 1)); @@ -126,7 +123,7 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, } } if (!indir) - *enclen = p + 1 - encoded; + *enclen = aresx_uztosl(p + 1U - encoded); /* Nuke the trailing period if we wrote one. */ if (q > *s) @@ -146,7 +143,7 @@ static int name_length(const unsigned char *encoded, const unsigned char *abuf, int n = 0, offset, indir = 0; /* Allow the caller to pass us abuf + alen and have us check for it. */ - if (encoded == abuf + alen) + if (encoded >= abuf + alen) return -1; while (*encoded) diff --git a/ares_expand_name.pdf b/ares_expand_name.pdf Binary files differindex a32c101..4de3913 100644 --- a/ares_expand_name.pdf +++ b/ares_expand_name.pdf diff --git a/ares_expand_string.c b/ares_expand_string.c index f24cccf..96d1be3 100644 --- a/ares_expand_string.c +++ b/ares_expand_string.c @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -28,8 +25,6 @@ # include "nameser.h" #endif -#include <string.h> -#include <stdlib.h> #include "ares.h" #include "ares_private.h" /* for the memdebug */ diff --git a/ares_expand_string.pdf b/ares_expand_string.pdf Binary files differindex 37f5f20..443b962 100644 --- a/ares_expand_string.pdf +++ b/ares_expand_string.pdf @@ -16,10 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif - #include "ares.h" #include "ares_nowarn.h" #include "ares_private.h" diff --git a/ares_fds.pdf b/ares_fds.pdf Binary files differindex a3e6af0..5708015 100644 --- a/ares_fds.pdf +++ b/ares_fds.pdf diff --git a/ares_free_data.3 b/ares_free_data.3 index c6cadd5..f8a65b9 100644 --- a/ares_free_data.3 +++ b/ares_free_data.3 @@ -55,6 +55,11 @@ When used to free the data returned by ares_parse_txt_reply(3) this will free the whole linked list of ares_txt_reply structures returned by ares_parse_txt_reply(3), along with any additional storage associated with those structures. +.TP +.B ares_parse_soa_reply(3) +When used to free the data returned by ares_parse_soa_reply(3) this +will free the ares_soa_reply structure, along with any additional storage +associated with those structure. .SH RETURN VALUE The ares_free_data() function does not return a value. .SH AVAILABILITY @@ -63,7 +68,8 @@ This function was first introduced in c-ares version 1.7.0. .BR ares_get_servers(3), .BR ares_parse_srv_reply(3), .BR ares_parse_mx_reply(3), -.BR ares_parse_txt_reply(3) +.BR ares_parse_txt_reply(3), +.BR ares_parse_soa_reply(3) .SH AUTHOR Yang Tse .PP diff --git a/ares_free_data.pdf b/ares_free_data.pdf Binary files differindex 8a3f3d8..87e22f4 100644 --- a/ares_free_data.pdf +++ b/ares_free_data.pdf diff --git a/ares_free_hostent.c b/ares_free_hostent.c index 349d379..7f44882 100644 --- a/ares_free_hostent.c +++ b/ares_free_hostent.c @@ -15,7 +15,6 @@ */ #include "ares_setup.h" -#include <stdlib.h> #ifdef HAVE_NETDB_H #include <netdb.h> diff --git a/ares_free_hostent.pdf b/ares_free_hostent.pdf Binary files differindex 824c3ca..ed61c57 100644 --- a/ares_free_hostent.pdf +++ b/ares_free_hostent.pdf diff --git a/ares_free_string.c b/ares_free_string.c index e0545c1..9441089 100644 --- a/ares_free_string.c +++ b/ares_free_string.c @@ -15,7 +15,7 @@ */ #include "ares_setup.h" -#include <stdlib.h> + #include "ares.h" #include "ares_private.h" diff --git a/ares_free_string.pdf b/ares_free_string.pdf Binary files differindex 807039b..f4b8da0 100644 --- a/ares_free_string.pdf +++ b/ares_free_string.pdf diff --git a/ares_get_servers.pdf b/ares_get_servers.pdf Binary files differindex 20253f7..7f703e4 100644 --- a/ares_get_servers.pdf +++ b/ares_get_servers.pdf diff --git a/ares_gethostbyaddr.3 b/ares_gethostbyaddr.3 index f589868..7727307 100644 --- a/ares_gethostbyaddr.3 +++ b/ares_gethostbyaddr.3 @@ -70,6 +70,9 @@ was not found. .B ARES_ENOMEM Memory was exhausted. .TP 19 +.B ARES_ECANCELLED +The query was cancelled. +.TP 19 .B ARES_EDESTRUCTION The name service channel .I channel diff --git a/ares_gethostbyaddr.c b/ares_gethostbyaddr.c index 4b4c8a7..85862e2 100644 --- a/ares_gethostbyaddr.c +++ b/ares_gethostbyaddr.c @@ -15,9 +15,6 @@ */ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -36,12 +33,8 @@ # include <arpa/nameser_compat.h> #endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "ares.h" -#include "inet_net_pton.h" +#include "ares_inet_net_pton.h" #include "ares_platform.h" #include "ares_private.h" diff --git a/ares_gethostbyaddr.pdf b/ares_gethostbyaddr.pdf Binary files differindex 3c8e60b..7251ae7 100644 --- a/ares_gethostbyaddr.pdf +++ b/ares_gethostbyaddr.pdf diff --git a/ares_gethostbyname.3 b/ares_gethostbyname.3 index a578a53..6b24ea4 100644 --- a/ares_gethostbyname.3 +++ b/ares_gethostbyname.3 @@ -74,6 +74,9 @@ was not found. .B ARES_ENOMEM Memory was exhausted. .TP 19 +.B ARES_ECANCELLED +The query was cancelled. +.TP 19 .B ARES_EDESTRUCTION The name service channel .I channel diff --git a/ares_gethostbyname.c b/ares_gethostbyname.c index ad89dc2..2b27b2e 100644 --- a/ares_gethostbyname.c +++ b/ares_gethostbyname.c @@ -1,5 +1,5 @@ -/* Copyright 1998 by the Massachusetts Institute of Technology. +/* Copyright 1998, 2011, 2013 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -37,18 +34,15 @@ # include <arpa/nameser_compat.h> #endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> #ifdef HAVE_STRINGS_H #include <strings.h> #endif #include "ares.h" -#include "inet_net_pton.h" +#include "ares_inet_net_pton.h" #include "bitncmp.h" #include "ares_platform.h" +#include "ares_nowarn.h" #include "ares_private.h" #ifdef WATT32 @@ -300,7 +294,7 @@ static int fake_hostent(const char *name, int family, /* Fill in the rest of the host structure and terminate the query. */ addrs[1] = NULL; hostent.h_aliases = aliases; - hostent.h_addrtype = family; + hostent.h_addrtype = aresx_sitoss(family); hostent.h_addr_list = addrs; callback(arg, ARES_SUCCESS, 0, &hostent); @@ -466,8 +460,8 @@ static int get_address_index(const struct in_addr *addr, } else { - if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addrV4.s_addr, - sortlist[i].mask.bits)) + if (!ares__bitncmp(&addr->s_addr, &sortlist[i].addrV4.s_addr, + sortlist[i].mask.bits)) break; } } @@ -514,10 +508,8 @@ static int get6_address_index(const struct ares_in6_addr *addr, { if (sortlist[i].family != AF_INET6) continue; - if (!ares_bitncmp(addr, - &sortlist[i].addrV6, - sortlist[i].mask.bits)) - break; + if (!ares__bitncmp(addr, &sortlist[i].addrV6, sortlist[i].mask.bits)) + break; } return i; } diff --git a/ares_gethostbyname.pdf b/ares_gethostbyname.pdf Binary files differindex 1172e2f..cd23361 100644 --- a/ares_gethostbyname.pdf +++ b/ares_gethostbyname.pdf diff --git a/ares_gethostbyname_file.pdf b/ares_gethostbyname_file.pdf Binary files differindex b8f15aa..e8f6563 100644 --- a/ares_gethostbyname_file.pdf +++ b/ares_gethostbyname_file.pdf diff --git a/ares_getnameinfo.3 b/ares_getnameinfo.3 index 7e4990c..d227606 100644 --- a/ares_getnameinfo.3 +++ b/ares_getnameinfo.3 @@ -109,6 +109,9 @@ was not found. .B ARES_ENOMEM Memory was exhausted. .TP 19 +.B ARES_ECANCELLED +The query was cancelled. +.TP 19 .B ARES_EDESTRUCTION The name service channel .I channel diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c index 82e261d..5b9f638 100644 --- a/ares_getnameinfo.c +++ b/ares_getnameinfo.c @@ -22,9 +22,6 @@ # endif #endif -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -47,17 +44,8 @@ #include <net/if.h> #endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "ares.h" #include "ares_ipv6.h" -#include "inet_ntop.h" #include "ares_nowarn.h" #include "ares_private.h" @@ -188,7 +176,7 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, if (sa->sa_family == AF_INET) { niquery->family = AF_INET; - memcpy(&niquery->addr.addr4, addr, sizeof(struct in_addr)); + memcpy(&niquery->addr.addr4, addr, sizeof(niquery->addr.addr4)); ares_gethostbyaddr(channel, &addr->sin_addr, sizeof(struct in_addr), AF_INET, nameinfo_callback, niquery); @@ -196,7 +184,7 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, else { niquery->family = AF_INET6; - memcpy(&niquery->addr.addr6, addr6, sizeof(struct ares_in6_addr)); + memcpy(&niquery->addr.addr6, addr6, sizeof(niquery->addr.addr6)); ares_gethostbyaddr(channel, &addr6->sin6_addr, sizeof(struct ares_in6_addr), AF_INET6, nameinfo_callback, niquery); diff --git a/ares_getnameinfo.pdf b/ares_getnameinfo.pdf Binary files differindex 1633a21..f1e1f4e 100644 --- a/ares_getnameinfo.pdf +++ b/ares_getnameinfo.pdf diff --git a/ares_getsock.c b/ares_getsock.c index 72e467f..07d2854 100644 --- a/ares_getsock.c +++ b/ares_getsock.c @@ -14,10 +14,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif - #include "ares.h" #include "ares_private.h" diff --git a/ares_getsock.pdf b/ares_getsock.pdf Binary files differindex 2154246..6bbb021 100644 --- a/ares_getsock.pdf +++ b/ares_getsock.pdf diff --git a/inet_net_pton.h b/ares_inet_net_pton.h index 5396a7f..90da2cc 100644 --- a/inet_net_pton.h +++ b/ares_inet_net_pton.h @@ -1,7 +1,7 @@ #ifndef HEADER_CARES_INET_NET_PTON_H #define HEADER_CARES_INET_NET_PTON_H -/* Copyright (C) 2005-2010 by Daniel Stenberg et al +/* Copyright (C) 2005-2013 by Daniel Stenberg et al * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -16,12 +16,6 @@ * without express or implied warranty. */ -#ifdef HAVE_INET_PTON -#define ares_inet_pton(x,y,z) inet_pton(x,y,z) -#else -int ares_inet_pton(int af, const char *src, void *dst); -#endif - #ifdef HAVE_INET_NET_PTON #define ares_inet_net_pton(w,x,y,z) inet_net_pton(w,x,y,z) #else diff --git a/ares_inet_ntop.3 b/ares_inet_ntop.3 new file mode 100644 index 0000000..93ee09c --- /dev/null +++ b/ares_inet_ntop.3 @@ -0,0 +1,47 @@ +.\" +.\" Copyright (C) 2013 by Daniel Stenberg +.\" +.\" Permission to use, copy, modify, and distribute this +.\" software and its documentation for any purpose and without +.\" fee is hereby granted, provided that the above copyright +.\" notice appear in all copies and that both that copyright +.\" notice and this permission notice appear in supporting +.\" documentation, and that the name of M.I.T. not be used in +.\" advertising or publicity pertaining to distribution of the +.\" software without specific, written prior permission. +.\" M.I.T. makes no representations about the suitability of +.\" this software for any purpose. It is provided "as is" +.\" without express or implied warranty. +.\" +.TH ARES_INET_NTOP 3 "17 Feb 2013" +.SH NAME +ares_inet_ntop \- convert a network format address to presentation format +.SH SYNOPSIS +.nf +.B #include <ares.h> +.PP +.B const char * +.B ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size); +.fi +.SH DESCRIPTION +This is a portable version with the identical functionality of the commonly +available \fIinet_ntop\fP. + +The ares_inet_ntop() function converts a numeric address into a text string +suitable for presentation. The \fBaf\fP argument shall specify the family of +the address. This can be AF_INET or AF_INET6. The \fBsrc\fP argument points +to a buffer holding an IPv4 address if the af argument is AF_INET, or an IPv6 +address if the af argument is AF_INET6; the address must be in network byte +order. The \fBdst\fP argument points to a buffer where the function stores the +resulting text string; it shall not be NULL. The \fBsize\fP argument specifies +the size of this buffer, which shall be large enough to hold the text string +(INET_ADDRSTRLEN (16) characters for IPv4, INET6_ADDRSTRLEN (46) characters +for IPv6). +.SH SEE ALSO +.BR ares_init(3), +.BR ares_inet_pton(3) +.SH AVAILABILITY +made properly publicly available in c-ares for real in version 1.10.0 +.SH AUTHOR +Daniel Stenberg + diff --git a/ares_inet_ntop.pdf b/ares_inet_ntop.pdf Binary files differnew file mode 100644 index 0000000..e9d823c --- /dev/null +++ b/ares_inet_ntop.pdf diff --git a/ares_inet_pton.3 b/ares_inet_pton.3 new file mode 100644 index 0000000..b7d86bb --- /dev/null +++ b/ares_inet_pton.3 @@ -0,0 +1,43 @@ +.\" +.\" Copyright (C) 2013 by Daniel Stenberg +.\" +.\" Permission to use, copy, modify, and distribute this +.\" software and its documentation for any purpose and without +.\" fee is hereby granted, provided that the above copyright +.\" notice appear in all copies and that both that copyright +.\" notice and this permission notice appear in supporting +.\" documentation, and that the name of M.I.T. not be used in +.\" advertising or publicity pertaining to distribution of the +.\" software without specific, written prior permission. +.\" M.I.T. makes no representations about the suitability of +.\" this software for any purpose. It is provided "as is" +.\" without express or implied warranty. +.\" +.TH ARES_INET_PTON 3 "17 Feb 2013" +.SH NAME +ares_inet_pton \- convert an IPv4 or IPv6 address from text to binary form +.SH SYNOPSIS +.nf +.B #include <ares.h> +.PP +.B const char *ares_inet_pton(int af, const char *src, void *dst); +.fi +.SH DESCRIPTION +This is a portable version with the identical functionality of the commonly +available \fIinet_pton\fP. + +The ares_inet_pton() function converts the address in its standard text +presentation form into its numeric binary form. The \fBaf\fP argument shall +specify the family of the address. The AF_INET and AF_INET6 address families +shall be supported. The \fBsrc\fP argument points to the string being passed +in. The \fBdst\fP argument points to a buffer into which the function stores +the numeric address; this shall be large enough to hold the numeric address +(32 bits for AF_INET, 128 bits for AF_INET6). +.SH SEE ALSO +.BR ares_init(3), +.BR ares_inet_ntop(3) +.SH AVAILABILITY +made properly publicly available in c-ares for real in version 1.10.0 +.SH AUTHOR +Daniel Stenberg + diff --git a/ares_inet_pton.pdf b/ares_inet_pton.pdf Binary files differnew file mode 100644 index 0000000..0e1fde9 --- /dev/null +++ b/ares_inet_pton.pdf diff --git a/ares_init.c b/ares_init.c index 44d4cf9..d23c1b0 100644 --- a/ares_init.c +++ b/ares_init.c @@ -1,6 +1,6 @@ /* Copyright 1998 by the Massachusetts Institute of Technology. - * Copyright (C) 2007-2011 by Daniel Stenberg + * Copyright (C) 2007-2013 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -21,14 +21,6 @@ #include <sys/param.h> #endif -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif - #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif @@ -50,33 +42,26 @@ # include <arpa/nameser_compat.h> #endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <time.h> - -#ifdef ANDROID +#if defined(ANDROID) || defined(__ANDROID__) #include <sys/system_properties.h> +/* From the Bionic sources */ +#define DNS_PROP_NAME_PREFIX "net.dns" +#define MAX_DNS_PROPERTIES 8 #endif #include "ares.h" -#include "inet_net_pton.h" +#include "ares_inet_net_pton.h" #include "ares_library_init.h" #include "ares_nowarn.h" #include "ares_platform.h" -#include "inet_ntop.h" #include "ares_private.h" #ifdef WATT32 #undef WIN32 /* Redefined in MingW/MSVC headers */ #endif -static int init_by_options(ares_channel channel, const struct ares_options *options, +static int init_by_options(ares_channel channel, + const struct ares_options *options, int optmask); static int init_by_environment(ares_channel channel); static int init_by_resolv_conf(ares_channel channel); @@ -91,8 +76,10 @@ static int set_options(ares_channel channel, const char *str); static const char *try_option(const char *p, const char *q, const char *opt); static int init_id_key(rc4_key* key,int key_data_len); -#if !defined(WIN32) && !defined(WATT32) -static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat); +#if !defined(WIN32) && !defined(WATT32) && \ + !defined(ANDROID) && !defined(__ANDROID__) +static int sortlist_alloc(struct apattern **sortlist, int *nsort, + struct apattern *pat); static int ip_addr(const char *s, ssize_t len, struct in_addr *addr); static void natural_mask(struct apattern *pat); static int config_domain(ares_channel channel, char *str); @@ -157,6 +144,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, channel->rotate = -1; channel->udp_port = -1; channel->tcp_port = -1; + channel->ednspsz = -1; channel->socket_send_buffer_size = -1; channel->socket_receive_buffer_size = -1; channel->nservers = -1; @@ -293,7 +281,8 @@ int ares_dup(ares_channel *dest, ares_channel src) (*dest)->sock_create_cb = src->sock_create_cb; (*dest)->sock_create_cb_data = src->sock_create_cb_data; - strncpy((*dest)->local_dev_name, src->local_dev_name, sizeof(src->local_dev_name)); + strncpy((*dest)->local_dev_name, src->local_dev_name, + sizeof(src->local_dev_name)); (*dest)->local_ip4 = src->local_ip4; memcpy((*dest)->local_ip6, src->local_ip6, sizeof(src->local_ip6)); @@ -348,8 +337,8 @@ int ares_save_options(ares_channel channel, struct ares_options *options, options->timeout = channel->timeout; options->tries = channel->tries; options->ndots = channel->ndots; - options->udp_port = (unsigned short)channel->udp_port; - options->tcp_port = (unsigned short)channel->tcp_port; + options->udp_port = ntohs(aresx_sitous(channel->udp_port)); + options->tcp_port = ntohs(aresx_sitous(channel->tcp_port)); options->sock_state_cb = channel->sock_state_cb; options->sock_state_cb_data = channel->sock_state_cb_data; @@ -431,9 +420,9 @@ static int init_by_options(ares_channel channel, if ((optmask & ARES_OPT_ROTATE) && channel->rotate == -1) channel->rotate = 1; if ((optmask & ARES_OPT_UDP_PORT) && channel->udp_port == -1) - channel->udp_port = options->udp_port; + channel->udp_port = htons(options->udp_port); if ((optmask & ARES_OPT_TCP_PORT) && channel->tcp_port == -1) - channel->tcp_port = options->tcp_port; + channel->tcp_port = htons(options->tcp_port); if ((optmask & ARES_OPT_SOCK_STATE_CB) && channel->sock_state_cb == NULL) { channel->sock_state_cb = options->sock_state_cb; @@ -446,6 +435,9 @@ static int init_by_options(ares_channel channel, && channel->socket_receive_buffer_size == -1) channel->socket_receive_buffer_size = options->socket_receive_buffer_size; + if ((optmask & ARES_OPT_EDNSPSZ) && channel->ednspsz == -1) + channel->ednspsz = options->ednspsz; + /* Copy the IPv4 servers, if given. */ if ((optmask & ARES_OPT_SERVERS) && channel->nservers == -1) { @@ -539,255 +531,531 @@ static int init_by_environment(ares_channel channel) #ifdef WIN32 /* - * Warning: returns a dynamically allocated buffer, the user MUST - * use free() if the function returns 1 + * get_REG_SZ() + * + * Given a 'hKey' handle to an open registry key and a 'leafKeyName' pointer + * to the name of the registry leaf key to be queried, fetch it's string + * value and return a pointer in *outptr to a newly allocated memory area + * holding it as a null-terminated string. + * + * Returns 0 and nullifies *outptr upon inability to return a string value. + * + * Returns 1 and sets *outptr when returning a dynamically allocated string. + * + * Supported on Windows NT 3.5 and newer. */ -static int get_res_nt(HKEY hKey, const char *subkey, char **obuf) +static int get_REG_SZ(HKEY hKey, const char *leafKeyName, char **outptr) { - /* Test for the size we need */ DWORD size = 0; - int result; + int res; + + *outptr = NULL; - result = RegQueryValueEx(hKey, subkey, 0, NULL, NULL, &size); - if ((result != ERROR_SUCCESS && result != ERROR_MORE_DATA) || !size) + /* Find out size of string stored in registry */ + res = RegQueryValueEx(hKey, leafKeyName, 0, NULL, NULL, &size); + if ((res != ERROR_SUCCESS && res != ERROR_MORE_DATA) || !size) return 0; - *obuf = malloc(size+1); - if (!*obuf) + + /* Allocate buffer of indicated size plus one given that string + might have been stored without null termination */ + *outptr = malloc(size+1); + if (!*outptr) return 0; - if (RegQueryValueEx(hKey, subkey, 0, NULL, - (LPBYTE)*obuf, &size) != ERROR_SUCCESS) + /* Get the value for real */ + res = RegQueryValueEx(hKey, leafKeyName, 0, NULL, + (unsigned char *)*outptr, &size); + if ((res != ERROR_SUCCESS) || (size == 1)) { - free(*obuf); + free(*outptr); + *outptr = NULL; return 0; } - if (size == 1) + + /* Null terminate buffer allways */ + *(*outptr + size) = '\0'; + + return 1; +} + +/* + * get_REG_SZ_9X() + * + * Functionally identical to get_REG_SZ() + * + * Supported on Windows 95, 98 and ME. + */ +static int get_REG_SZ_9X(HKEY hKey, const char *leafKeyName, char **outptr) +{ + DWORD dataType = 0; + DWORD size = 0; + int res; + + *outptr = NULL; + + /* Find out size of string stored in registry */ + res = RegQueryValueEx(hKey, leafKeyName, 0, &dataType, NULL, &size); + if ((res != ERROR_SUCCESS && res != ERROR_MORE_DATA) || !size) + return 0; + + /* Allocate buffer of indicated size plus one given that string + might have been stored without null termination */ + *outptr = malloc(size+1); + if (!*outptr) + return 0; + + /* Get the value for real */ + res = RegQueryValueEx(hKey, leafKeyName, 0, &dataType, + (unsigned char *)*outptr, &size); + if ((res != ERROR_SUCCESS) || (size == 1)) { - free(*obuf); + free(*outptr); + *outptr = NULL; return 0; } + + /* Null terminate buffer allways */ + *(*outptr + size) = '\0'; + return 1; } -static int get_res_interfaces_nt(HKEY hKey, const char *subkey, char **obuf) +/* + * get_enum_REG_SZ() + * + * Given a 'hKeyParent' handle to an open registry key and a 'leafKeyName' + * pointer to the name of the registry leaf key to be queried, parent key + * is enumerated searching in child keys for given leaf key name and its + * associated string value. When located, this returns a pointer in *outptr + * to a newly allocated memory area holding it as a null-terminated string. + * + * Returns 0 and nullifies *outptr upon inability to return a string value. + * + * Returns 1 and sets *outptr when returning a dynamically allocated string. + * + * Supported on Windows NT 3.5 and newer. + */ +static int get_enum_REG_SZ(HKEY hKeyParent, const char *leafKeyName, + char **outptr) { - char enumbuf[39]; /* GUIDs are 38 chars + 1 for NULL */ - DWORD enum_size = 39; - int idx = 0; - HKEY hVal; + char enumKeyName[256]; + DWORD enumKeyNameBuffSize; + DWORD enumKeyIdx = 0; + HKEY hKeyEnum; + int gotString; + int res; - while (RegEnumKeyEx(hKey, idx++, enumbuf, &enum_size, 0, - NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS) - { - int rc; + *outptr = NULL; - enum_size = 39; - if (RegOpenKeyEx(hKey, enumbuf, 0, KEY_QUERY_VALUE, &hVal) != - ERROR_SUCCESS) + for(;;) + { + enumKeyNameBuffSize = sizeof(enumKeyName); + res = RegEnumKeyEx(hKeyParent, enumKeyIdx++, enumKeyName, + &enumKeyNameBuffSize, 0, NULL, NULL, NULL); + if (res != ERROR_SUCCESS) + break; + res = RegOpenKeyEx(hKeyParent, enumKeyName, 0, KEY_QUERY_VALUE, + &hKeyEnum); + if (res != ERROR_SUCCESS) continue; - rc = get_res_nt(hVal, subkey, obuf); - RegCloseKey(hVal); - if (rc) - return 1; - } - return 0; + gotString = get_REG_SZ(hKeyEnum, leafKeyName, outptr); + RegCloseKey(hKeyEnum); + if (gotString) + break; + } + + if (!*outptr) + return 0; + + return 1; } -/** - * The desired output for this method is that we set "ret_buf" to - * something like: +/* + * get_DNS_Registry_9X() + * + * Functionally identical to get_DNS_Registry() * - * 192.168.0.1,dns01.my.domain,fe80::200:f8ff:fe21:67cf + * Implementation supports Windows 95, 98 and ME. + */ +static int get_DNS_Registry_9X(char **outptr) +{ + HKEY hKey_VxD_MStcp; + int gotString; + int res; + + *outptr = NULL; + + res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_9X, 0, KEY_READ, + &hKey_VxD_MStcp); + if (res != ERROR_SUCCESS) + return 0; + + gotString = get_REG_SZ_9X(hKey_VxD_MStcp, NAMESERVER, outptr); + RegCloseKey(hKey_VxD_MStcp); + + if (!gotString || !*outptr) + return 0; + + return 1; +} + +/* + * get_DNS_Registry_NT() * - * The only ordering requirement is that primary servers are listed - * before secondary. There is no requirement that IPv4 addresses should - * necessarily be before IPv6. + * Functionally identical to get_DNS_Registry() * - * Note that ret_size should ideally be big enough to hold around - * 2-3 IPv4 and 2-3 IPv6 addresses. + * Refs: Microsoft Knowledge Base articles KB120642 and KB314053. * - * Finally, we need to return the total number of DNS servers located. + * Implementation supports Windows NT 3.5 and newer. */ -static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size) +static int get_DNS_Registry_NT(char **outptr) { - const size_t ipv4_size = INET_ADDRSTRLEN + 1; /* +1 for ',' at end */ - const size_t ipv6_size = INET6_ADDRSTRLEN + 12; /* +12 for "%0123456789," at end */ - size_t left = ret_size; - char *ret = ret_buf; - int count = 0; - - /* Use the GetAdaptersAddresses method if it's available, otherwise - fall back to GetNetworkParams. */ - if (ares_fpGetAdaptersAddresses != ZERO_NULL) + HKEY hKey_Interfaces = NULL; + HKEY hKey_Tcpip_Parameters; + int gotString; + int res; + + *outptr = NULL; + + res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, + &hKey_Tcpip_Parameters); + if (res != ERROR_SUCCESS) + return 0; + + /* + ** Global DNS settings override adapter specific parameters when both + ** are set. Additionally static DNS settings override DHCP-configured + ** parameters when both are set. + */ + + /* Global DNS static parameters */ + gotString = get_REG_SZ(hKey_Tcpip_Parameters, NAMESERVER, outptr); + if (gotString) + goto done; + + /* Global DNS DHCP-configured parameters */ + gotString = get_REG_SZ(hKey_Tcpip_Parameters, DHCPNAMESERVER, outptr); + if (gotString) + goto done; + + /* Try adapter specific parameters */ + res = RegOpenKeyEx(hKey_Tcpip_Parameters, "Interfaces", 0, + KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, + &hKey_Interfaces); + if (res != ERROR_SUCCESS) { - const ULONG working_buf_size = 15000; - IP_ADAPTER_ADDRESSES *pFirstEntry = NULL; - IP_ADAPTER_ADDRESSES *pEntry = NULL; - ULONG bufSize = 0; - ULONG result = 0; - - /* According to MSDN, the recommended way to do this is to use a temporary - buffer of 15K, to "dramatically reduce the chance that the GetAdaptersAddresses - method returns ERROR_BUFFER_OVERFLOW" */ - pFirstEntry = ( IP_ADAPTER_ADDRESSES * ) malloc( working_buf_size ); - bufSize = working_buf_size; - if( !pFirstEntry ) - return 0; - - /* Call the method one time */ - result = ( *ares_fpGetAdaptersAddresses )( AF_UNSPEC, 0, 0, pFirstEntry, &bufSize ); - if( result == ERROR_BUFFER_OVERFLOW ) - { - /* Reallocate, bufSize should now be set to the required size */ - pFirstEntry = ( IP_ADAPTER_ADDRESSES * ) realloc( pFirstEntry, bufSize ); - if( !pFirstEntry ) - return 0; - - /* Call the method a second time */ - result = ( *ares_fpGetAdaptersAddresses )( AF_UNSPEC, 0, 0, pFirstEntry, &bufSize ); - if( result == ERROR_BUFFER_OVERFLOW ) - { - /* Reallocate, bufSize should now be set to the required size */ - pFirstEntry = ( IP_ADAPTER_ADDRESSES * ) realloc( pFirstEntry, bufSize ); - if( !pFirstEntry ) - return 0; - - /* Call the method a third time. The maximum number of times we're going to do - this is 3. Three shall be the number thou shalt count, and the number of the - counting shall be three. Five is right out. */ - result = ( *ares_fpGetAdaptersAddresses )( AF_UNSPEC, 0, 0, pFirstEntry, &bufSize ); - } - } + hKey_Interfaces = NULL; + goto done; + } - /* Check the current result for failure */ - if( result != ERROR_SUCCESS ) - { - free( pFirstEntry ); - return 0; - } + /* Adapter specific DNS static parameters */ + gotString = get_enum_REG_SZ(hKey_Interfaces, NAMESERVER, outptr); + if (gotString) + goto done; - /* process the results */ - for( pEntry = pFirstEntry ; pEntry != NULL ; pEntry = pEntry->Next ) - { - IP_ADAPTER_DNS_SERVER_ADDRESS* pDNSAddr = pEntry->FirstDnsServerAddress; - for( ; pDNSAddr != NULL ; pDNSAddr = pDNSAddr->Next ) - { - struct sockaddr *pGenericAddr = pDNSAddr->Address.lpSockaddr; - size_t stringlen = 0; + /* Adapter specific DNS DHCP-configured parameters */ + gotString = get_enum_REG_SZ(hKey_Interfaces, DHCPNAMESERVER, outptr); - if( pGenericAddr->sa_family == AF_INET && left > ipv4_size ) - { - /* Handle the v4 case */ - struct sockaddr_in *pIPv4Addr = ( struct sockaddr_in * ) pGenericAddr; - ares_inet_ntop( AF_INET, &pIPv4Addr->sin_addr, ret, ipv4_size - 1 ); /* -1 for comma */ - - /* Append a comma to the end, THEN NULL. Should be OK because we - already tested the size at the top of the if statement. */ - stringlen = strlen( ret ); - ret[ stringlen ] = ','; - ret[ stringlen + 1 ] = '\0'; - ret += stringlen + 1; - left -= ret - ret_buf; - ++count; - } - else if( pGenericAddr->sa_family == AF_INET6 && left > ipv6_size ) - { - /* Handle the v6 case */ - struct sockaddr_in6 *pIPv6Addr = ( struct sockaddr_in6 * ) pGenericAddr; - ares_inet_ntop( AF_INET6, &pIPv6Addr->sin6_addr, ret, ipv6_size - 1 ); /* -1 for comma */ - - /* Append a comma to the end, THEN NULL. Should be OK because we - already tested the size at the top of the if statement. */ - stringlen = strlen( ret ); - ret[ stringlen ] = ','; - ret[ stringlen + 1 ] = '\0'; - ret += stringlen + 1; - left -= ret - ret_buf; - ++count; - - /* NB on Windows this also returns stuff in the fec0::/10 range, - seems to be hard-coded somehow. Do we need to ignore them? */ - } - } - } +done: + if (hKey_Interfaces) + RegCloseKey(hKey_Interfaces); + + RegCloseKey(hKey_Tcpip_Parameters); + + if (!gotString || !*outptr) + return 0; + + return 1; +} + +/* + * get_DNS_Registry() + * + * Locates DNS info in the registry. When located, this returns a pointer + * in *outptr to a newly allocated memory area holding a null-terminated + * string with a space or comma seperated list of DNS IP addresses. + * + * Returns 0 and nullifies *outptr upon inability to return DNSes string. + * + * Returns 1 and sets *outptr when returning a dynamically allocated string. + */ +static int get_DNS_Registry(char **outptr) +{ + win_platform platform; + int gotString = 0; + + *outptr = NULL; + + platform = ares__getplatform(); - if( pFirstEntry ) - free( pFirstEntry ); - if (ret > ret_buf) - ret[-1] = '\0'; - return count; + if (platform == WIN_NT) + gotString = get_DNS_Registry_NT(outptr); + else if (platform == WIN_9X) + gotString = get_DNS_Registry_9X(outptr); + + if (!gotString) + return 0; + + return 1; +} + +/* + * commajoin() + * + * RTF code. + */ +static void commajoin(char **dst, const char *src) +{ + char *tmp; + + if (*dst) + { + tmp = malloc(strlen(*dst) + strlen(src) + 2); + if (!tmp) + return; + sprintf(tmp, "%s,%s", *dst, src); + free(*dst); + *dst = tmp; } else { - FIXED_INFO *fi, *newfi; - DWORD size = sizeof (*fi); - IP_ADDR_STRING *ipAddr; - int i; - int debug = 0; - HRESULT res; - - fi = malloc(size); - if (!fi) - return 0; - - res = (*ares_fpGetNetworkParams) (fi, &size); - if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS)) - goto quit; - - newfi = realloc(fi, size); - if (!newfi) - goto quit; - - fi = newfi; - res = (*ares_fpGetNetworkParams) (fi, &size); - if (res != ERROR_SUCCESS) - goto quit; + *dst = malloc(strlen(src) + 1); + if (!*dst) + return; + strcpy(*dst, src); + } +} - if (debug) +/* + * get_DNS_NetworkParams() + * + * Locates DNS info using GetNetworkParams() function from the Internet + * Protocol Helper (IP Helper) API. When located, this returns a pointer + * in *outptr to a newly allocated memory area holding a null-terminated + * string with a space or comma seperated list of DNS IP addresses. + * + * Returns 0 and nullifies *outptr upon inability to return DNSes string. + * + * Returns 1 and sets *outptr when returning a dynamically allocated string. + * + * Implementation supports Windows 98 and newer. + * + * Note: Ancient PSDK required in order to build a W98 target. + */ +static int get_DNS_NetworkParams(char **outptr) +{ + FIXED_INFO *fi, *newfi; + struct ares_addr namesrvr; + char *txtaddr; + IP_ADDR_STRING *ipAddr; + int res; + DWORD size = sizeof (*fi); + + *outptr = NULL; + + /* Verify run-time availability of GetNetworkParams() */ + if (ares_fpGetNetworkParams == ZERO_NULL) + return 0; + + fi = malloc(size); + if (!fi) + return 0; + + res = (*ares_fpGetNetworkParams) (fi, &size); + if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS)) + goto done; + + newfi = realloc(fi, size); + if (!newfi) + goto done; + + fi = newfi; + res = (*ares_fpGetNetworkParams) (fi, &size); + if (res != ERROR_SUCCESS) + goto done; + + for (ipAddr = &fi->DnsServerList; ipAddr; ipAddr = ipAddr->Next) + { + txtaddr = &ipAddr->IpAddress.String[0]; + + /* Validate converting textual address to binary format. */ + if (ares_inet_pton(AF_INET, txtaddr, &namesrvr.addrV4) == 1) + { + if ((namesrvr.addrV4.S_un.S_addr == INADDR_ANY) || + (namesrvr.addrV4.S_un.S_addr == INADDR_NONE)) + continue; + } + else if (ares_inet_pton(AF_INET6, txtaddr, &namesrvr.addrV6) == 1) { - printf ("Host Name: %s\n", fi->HostName); - printf ("Domain Name: %s\n", fi->DomainName); - printf ("DNS Servers:\n" - " %s (primary)\n", fi->DnsServerList.IpAddress.String); + if (memcmp(&namesrvr.addrV6, &ares_in6addr_any, + sizeof(namesrvr.addrV6)) == 0) + continue; } - if (strlen(fi->DnsServerList.IpAddress.String) > 0 && - inet_addr(fi->DnsServerList.IpAddress.String) != INADDR_NONE && - left > ipv4_size) + else + continue; + + commajoin(outptr, txtaddr); + + if (!*outptr) + break; + } + +done: + if (fi) + free(fi); + + if (!*outptr) + return 0; + + return 1; +} + +/* + * get_DNS_AdaptersAddresses() + * + * Locates DNS info using GetAdaptersAddresses() function from the Internet + * Protocol Helper (IP Helper) API. When located, this returns a pointer + * in *outptr to a newly allocated memory area holding a null-terminated + * string with a space or comma seperated list of DNS IP addresses. + * + * Returns 0 and nullifies *outptr upon inability to return DNSes string. + * + * Returns 1 and sets *outptr when returning a dynamically allocated string. + * + * Implementation supports Windows XP and newer. + */ +#define IPAA_INITIAL_BUF_SZ 15 * 1024 +#define IPAA_MAX_TRIES 3 +static int get_DNS_AdaptersAddresses(char **outptr) +{ + IP_ADAPTER_DNS_SERVER_ADDRESS *ipaDNSAddr; + IP_ADAPTER_ADDRESSES *ipaa, *newipaa, *ipaaEntry; + ULONG ReqBufsz = IPAA_INITIAL_BUF_SZ; + ULONG Bufsz = IPAA_INITIAL_BUF_SZ; + ULONG AddrFlags = 0; + int trying = IPAA_MAX_TRIES; + int res; + + union { + struct sockaddr *sa; + struct sockaddr_in *sa4; + struct sockaddr_in6 *sa6; + } namesrvr; + + char txtaddr[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")]; + + *outptr = NULL; + + /* Verify run-time availability of GetAdaptersAddresses() */ + if (ares_fpGetAdaptersAddresses == ZERO_NULL) + return 0; + + ipaa = malloc(Bufsz); + if (!ipaa) + return 0; + + /* Usually this call suceeds with initial buffer size */ + res = (*ares_fpGetAdaptersAddresses) (AF_UNSPEC, AddrFlags, NULL, + ipaa, &ReqBufsz); + if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS)) + goto done; + + while ((res == ERROR_BUFFER_OVERFLOW) && (--trying)) + { + if (Bufsz < ReqBufsz) { - ret += sprintf (ret, "%s,", fi->DnsServerList.IpAddress.String); - left -= ret - ret_buf; - ++count; + newipaa = realloc(ipaa, ReqBufsz); + if (!newipaa) + goto done; + Bufsz = ReqBufsz; + ipaa = newipaa; } + res = (*ares_fpGetAdaptersAddresses) (AF_UNSPEC, AddrFlags, NULL, + ipaa, &ReqBufsz); + if (res == ERROR_SUCCESS) + break; + } + if (res != ERROR_SUCCESS) + goto done; - for (i = 0, ipAddr = fi->DnsServerList.Next; ipAddr && left > ipv4_size; - ipAddr = ipAddr->Next, i++) + for (ipaaEntry = ipaa; ipaaEntry; ipaaEntry = ipaaEntry->Next) + { + for (ipaDNSAddr = ipaaEntry->FirstDnsServerAddress; + ipaDNSAddr; + ipaDNSAddr = ipaDNSAddr->Next) { - if (inet_addr(ipAddr->IpAddress.String) != INADDR_NONE) + namesrvr.sa = ipaDNSAddr->Address.lpSockaddr; + + if (namesrvr.sa->sa_family == AF_INET) { - ret += sprintf (ret, "%s,", ipAddr->IpAddress.String); - left -= ret - ret_buf; - ++count; + if ((namesrvr.sa4->sin_addr.S_un.S_addr == INADDR_ANY) || + (namesrvr.sa4->sin_addr.S_un.S_addr == INADDR_NONE)) + continue; + if (! ares_inet_ntop(AF_INET, &namesrvr.sa4->sin_addr, + txtaddr, sizeof(txtaddr))) + continue; } - if (debug) - printf (" %s (secondary %d)\n", ipAddr->IpAddress.String, i+1); - } + else if (namesrvr.sa->sa_family == AF_INET6) + { + if (memcmp(&namesrvr.sa6->sin6_addr, &ares_in6addr_any, + sizeof(namesrvr.sa6->sin6_addr)) == 0) + continue; + if (! ares_inet_ntop(AF_INET6, &namesrvr.sa6->sin6_addr, + txtaddr, sizeof(txtaddr))) + continue; + } + else + continue; -quit: - if (fi) - free(fi); + commajoin(outptr, txtaddr); - if (debug && left <= ipv4_size) - printf ("Too many nameservers. Truncating to %d addressess", count); - if (ret > ret_buf) - ret[-1] = '\0'; - return count; + if (!*outptr) + goto done; + } } + +done: + if (ipaa) + free(ipaa); + + if (!*outptr) + return 0; + + return 1; +} + +/* + * get_DNS_Windows() + * + * Locates DNS info from Windows employing most suitable methods available at + * run-time no matter which Windows version it is. When located, this returns + * a pointer in *outptr to a newly allocated memory area holding a string with + * a space or comma seperated list of DNS IP addresses, null-terminated. + * + * Returns 0 and nullifies *outptr upon inability to return DNSes string. + * + * Returns 1 and sets *outptr when returning a dynamically allocated string. + * + * Implementation supports Windows 95 and newer. + */ +static int get_DNS_Windows(char **outptr) +{ + /* Try using IP helper API GetAdaptersAddresses() */ + if (get_DNS_AdaptersAddresses(outptr)) + return 1; + + /* Try using IP helper API GetNetworkParams() */ + if (get_DNS_NetworkParams(outptr)) + return 1; + + /* Fall-back to registry information */ + return get_DNS_Registry(outptr); } #endif static int init_by_resolv_conf(ares_channel channel) { -#ifndef WATT32 +#if !defined(ANDROID) && !defined(__ANDROID__) && !defined(WATT32) char *line = NULL; #endif int status = -1, nservers = 0, nsort = 0; @@ -796,111 +1064,13 @@ static int init_by_resolv_conf(ares_channel channel) #ifdef WIN32 - /* - NameServer info via IPHLPAPI (IP helper API): - GetNetworkParams() should be the trusted source for this. - Available in Win-98/2000 and later. If that fail, fall-back to - registry information. - - NameServer Registry: - - On Windows 9X, the DNS server can be found in: -HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP\NameServer - - On Windows NT/2000/XP/2003: -HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NameServer - or -HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DhcpNameServer - or -HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\{AdapterID}\ -NameServer - or -HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\{AdapterID}\ -DhcpNameServer - */ - - HKEY mykey; - HKEY subkey; - DWORD data_type; - DWORD bytes; - DWORD result; - char buf[512]; - win_platform platform; - if (channel->nservers > -1) /* don't override ARES_OPT_SERVER */ return ARES_SUCCESS; - if (get_iphlpapi_dns_info(buf,sizeof(buf)) > 0) + if (get_DNS_Windows(&line)) { - status = config_nameserver(&servers, &nservers, buf); - if (status == ARES_SUCCESS) - goto okay; - } - - platform = ares__getplatform(); - - if (platform == WIN_NT) - { - if (RegOpenKeyEx( - HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, - KEY_READ, &mykey - ) == ERROR_SUCCESS) - { - RegOpenKeyEx(mykey, "Interfaces", 0, - KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS, &subkey); - if (get_res_nt(mykey, NAMESERVER, &line)) - { - status = config_nameserver(&servers, &nservers, line); - free(line); - } - else if (get_res_nt(mykey, DHCPNAMESERVER, &line)) - { - status = config_nameserver(&servers, &nservers, line); - free(line); - } - /* Try the interfaces */ - else if (get_res_interfaces_nt(subkey, NAMESERVER, &line)) - { - status = config_nameserver(&servers, &nservers, line); - free(line); - } - else if (get_res_interfaces_nt(subkey, DHCPNAMESERVER, &line)) - { - status = config_nameserver(&servers, &nservers, line); - free(line); - } - RegCloseKey(subkey); - RegCloseKey(mykey); - } - } - else if (platform == WIN_9X) - { - if (RegOpenKeyEx( - HKEY_LOCAL_MACHINE, WIN_NS_9X, 0, - KEY_READ, &mykey - ) == ERROR_SUCCESS) - { - if ((result = RegQueryValueEx( - mykey, NAMESERVER, NULL, &data_type, - NULL, &bytes - ) - ) == ERROR_SUCCESS || - result == ERROR_MORE_DATA) - { - if (bytes) - { - line = malloc(bytes+1); - if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type, - (unsigned char *)line, &bytes) == - ERROR_SUCCESS) - { - status = config_nameserver(&servers, &nservers, line); - } - free(line); - } - } - } - RegCloseKey(mykey); + status = config_nameserver(&servers, &nservers, line); + free(line); } if (status == ARES_SUCCESS) @@ -961,12 +1131,22 @@ DhcpNameServer } status = ARES_EOF; -#elif defined(ANDROID) - char value[PROP_VALUE_MAX]=""; - __system_property_get("net.dns1", value); - status = config_nameserver(&servers, &nservers, value); - if (status == ARES_SUCCESS) +#elif defined(ANDROID) || defined(__ANDROID__) + unsigned int i; + char propname[PROP_NAME_MAX]; + char propvalue[PROP_VALUE_MAX]=""; + + for (i = 1; i <= MAX_DNS_PROPERTIES; i++) { + snprintf(propname, sizeof(propname), "%s%u", DNS_PROP_NAME_PREFIX, i); + if (__system_property_get(propname, propvalue) < 1) { + status = ARES_EOF; + break; + } + status = config_nameserver(&servers, &nservers, propvalue); + if (status != ARES_SUCCESS) + break; status = ARES_EOF; + } #else { char *p; @@ -1022,7 +1202,8 @@ DhcpNameServer /* Many systems (Solaris, Linux, BSD's) use nsswitch.conf */ fp = fopen("/etc/nsswitch.conf", "r"); if (fp) { - while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) + while ((status = ares__read_line(fp, &line, &linesize)) == + ARES_SUCCESS) { if ((p = try_config(line, "hosts:", '\0')) && !channel->lookups) /* ignore errors */ @@ -1040,7 +1221,8 @@ DhcpNameServer default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", error, strerror(error))); - DEBUGF(fprintf(stderr, "Error opening file: %s\n", "/etc/nsswitch.conf")); + DEBUGF(fprintf(stderr, "Error opening file: %s\n", + "/etc/nsswitch.conf")); status = ARES_EFILE; } } @@ -1050,7 +1232,8 @@ DhcpNameServer /* Linux / GNU libc 2.x and possibly others have host.conf */ fp = fopen("/etc/host.conf", "r"); if (fp) { - while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) + while ((status = ares__read_line(fp, &line, &linesize)) == + ARES_SUCCESS) { if ((p = try_config(line, "order", '\0')) && !channel->lookups) /* ignore errors */ @@ -1068,7 +1251,8 @@ DhcpNameServer default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", error, strerror(error))); - DEBUGF(fprintf(stderr, "Error opening file: %s\n", "/etc/host.conf")); + DEBUGF(fprintf(stderr, "Error opening file: %s\n", + "/etc/host.conf")); status = ARES_EFILE; } } @@ -1078,7 +1262,8 @@ DhcpNameServer /* Tru64 uses /etc/svc.conf */ fp = fopen("/etc/svc.conf", "r"); if (fp) { - while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) + while ((status = ares__read_line(fp, &line, &linesize)) == + ARES_SUCCESS) { if ((p = try_config(line, "hosts=", '\0')) && !channel->lookups) /* ignore errors */ @@ -1119,9 +1304,6 @@ DhcpNameServer } /* If we got any name server entries, fill them in. */ -#ifdef WIN32 -okay: -#endif if (servers) { channel->servers = servers; @@ -1161,6 +1343,9 @@ static int init_by_defaults(ares_channel channel) if (channel->tcp_port == -1) channel->tcp_port = htons(NAMESERVER_PORT); + if (channel->ednspsz == -1) + channel->ednspsz = EDNSPACKETSZ; + if (channel->nservers == -1) { /* If nobody specified servers, try a local named. */ channel->servers = malloc(sizeof(struct server_state)); @@ -1186,11 +1371,14 @@ static int init_by_defaults(ares_channel channel) /* Derive a default domain search list from the kernel hostname, * or set it to empty if the hostname isn't helpful. */ +#ifndef HAVE_GETHOSTNAME + channel->ndomains = 0; /* default to none */ +#else + GETHOSTNAME_TYPE_ARG2 lenv = 64; size_t len = 64; int res; channel->ndomains = 0; /* default to none */ -#ifdef HAVE_GETHOSTNAME hostname = malloc(len); if(!hostname) { rc = ARES_ENOMEM; @@ -1198,11 +1386,12 @@ static int init_by_defaults(ares_channel channel) } do { - res = gethostname(hostname, len); + res = gethostname(hostname, lenv); if(toolong(res)) { char *p; len *= 2; + lenv *= 2; p = realloc(hostname, len); if(!p) { rc = ARES_ENOMEM; @@ -1216,7 +1405,7 @@ static int init_by_defaults(ares_channel channel) goto error; } - } while(0); + } WHILE_FALSE; dot = strchr(hostname, '.'); if (dot) { @@ -1249,15 +1438,22 @@ static int init_by_defaults(ares_channel channel) error: if(rc) { - if(channel->servers) + if(channel->servers) { free(channel->servers); + channel->servers = NULL; + } if(channel->domains && channel->domains[0]) free(channel->domains[0]); - if(channel->domains) + if(channel->domains) { free(channel->domains); - if(channel->lookups) + channel->domains = NULL; + } + + if(channel->lookups) { free(channel->lookups); + channel->lookups = NULL; + } } if(hostname) @@ -1266,7 +1462,8 @@ static int init_by_defaults(ares_channel channel) return rc; } -#if !defined(WIN32) && !defined(WATT32) +#if !defined(WIN32) && !defined(WATT32) && \ + !defined(ANDROID) && !defined(__ANDROID__) static int config_domain(ares_channel channel, char *str) { char *q; @@ -1314,7 +1511,7 @@ static int config_lookup(ares_channel channel, const char *str, channel->lookups = strdup(lookups); return (channel->lookups) ? ARES_SUCCESS : ARES_ENOMEM; } -#endif /* !WIN32 & !WATT32 */ +#endif /* !WIN32 & !WATT32 & !ANDROID & !__ANDROID__ */ #ifndef WATT32 static int config_nameserver(struct server_state **servers, int *nservers, @@ -1379,7 +1576,7 @@ static int config_nameserver(struct server_state **servers, int *nservers, return ARES_SUCCESS; } -#ifndef WIN32 +#if !defined(WIN32) && !defined(ANDROID) && !defined(__ANDROID__) static int config_sortlist(struct apattern **sortlist, int *nsort, const char *str) { @@ -1460,7 +1657,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort, return ARES_SUCCESS; } -#endif /* !WIN32 */ +#endif /* !WIN32 & !ANDROID & !__ANDROID__ */ #endif /* !WATT32 */ static int set_search(ares_channel channel, const char *str) @@ -1559,7 +1756,8 @@ static const char *try_option(const char *p, const char *q, const char *opt) return ((size_t)(q - p) >= len && !strncmp(p, opt, len)) ? &p[len] : NULL; } -#if !defined(WIN32) && !defined(WATT32) +#if !defined(WIN32) && !defined(WATT32) && \ + !defined(ANDROID) && !defined(__ANDROID__) static char *try_config(char *s, const char *opt, char scc) { size_t len; @@ -1675,7 +1873,7 @@ static void natural_mask(struct apattern *pat) else pat->mask.addr4.s_addr = htonl(IN_CLASSC_NET); } -#endif /* !WIN32 && !WATT32 */ +#endif /* !WIN32 & !WATT32 & !ANDROID & !__ANDROID__ */ /* initialize an rc4 key. If possible a cryptographically secure random key is generated using a suitable function (for example win32's RtlGenRandom as @@ -1706,7 +1904,7 @@ static void randomize_key(unsigned char* key,int key_data_len) #endif #endif /* WIN32 */ - if ( !randomized ) { + if (!randomized) { for (;counter<key_data_len;counter++) key[counter]=(unsigned char)(rand() % 256); } @@ -1745,13 +1943,6 @@ static int init_id_key(rc4_key* key,int key_data_len) return ARES_SUCCESS; } -unsigned short ares__generate_new_id(rc4_key* key) -{ - unsigned short r=0; - ares__rc4(key, (unsigned char *)&r, sizeof(r)); - return r; -} - void ares_set_local_ip4(ares_channel channel, unsigned int local_ip) { channel->local_ip4 = local_ip; diff --git a/ares_init.pdf b/ares_init.pdf Binary files differindex 3759e59..29b9479 100644 --- a/ares_init.pdf +++ b/ares_init.pdf diff --git a/ares_init_options.pdf b/ares_init_options.pdf Binary files differindex 4090757..9688de2 100644 --- a/ares_init_options.pdf +++ b/ares_init_options.pdf diff --git a/ares_library_cleanup.3 b/ares_library_cleanup.3 index 9fcf896..d60c378 100644 --- a/ares_library_cleanup.3 +++ b/ares_library_cleanup.3 @@ -31,11 +31,19 @@ The .B ares_library_cleanup function uninitializes the c-ares library, freeing all resources previously acquired by \fIares_library_init(3)\fP when the library -was initialized. +was initialized, provided there was only one single previous call to +\fIares_library_init(3)\fP. If there was more than one previous call to +\fIares_library_init(3)\fP, this function uninitializes the c-ares +library only if it is the call matching the call to +\fIares_library_init(3)\fP which initialized the library +(usually the very first call to \fIares_library_init(3)\fP). +Other calls to \fIares_library_cleanup(3)\fP have no effect other than +decrementing an internal counter. .PP This function must be called when the program using c-ares will no longer need any c-ares function. Once the program has called -\fIares_library_cleanup(3)\fP it shall not make any further call to any +\fIares_library_cleanup(3)\fP sufficiently often such that the +library is uninitialised, it shall not make any further call to any c-ares function. .PP This function does not cancel any pending c-ares lookups or requests @@ -54,7 +62,12 @@ the DllMain function. Doing so will produce deadlocks and other problems. .SH AVAILABILITY This function was first introduced in c-ares version 1.7.0 along with the definition of preprocessor symbol \fICARES_HAVE_ARES_LIBRARY_CLEANUP\fP as an -indication of the availability of this function. +indication of the availability of this function. Reference counting in +\fIares_library_init()\fP and \fIares_library_cleanup()\fP, which requires +calls to the former function to match calls to the latter, is present since +c-ares version 1.10.0. +Earlier versions would deinitialize the library on the first call +to \fIares_library_cleanup()\fP. .PP Since the introduction of this function, it is absolutely mandatory to call it for any Win32/64 program using c-ares. diff --git a/ares_library_cleanup.pdf b/ares_library_cleanup.pdf Binary files differindex ccd4ecc..85af342 100644 --- a/ares_library_cleanup.pdf +++ b/ares_library_cleanup.pdf diff --git a/ares_library_init.3 b/ares_library_init.3 index b3efc18..797476b 100644 --- a/ares_library_init.3 +++ b/ares_library_init.3 @@ -33,13 +33,15 @@ function performs initializations internally required by the c-ares library that must take place before any other function provided by c-ares can be used in a program. .PP -This function must be called one time within the life of a program, +This function must be called at least once within the life of a program, before the program actually executes any other c-ares library function. -Initializations done by this function remain effective until a -call to \fIares_library_cleanup(3)\fP is performed. +Initializations done by this function remain effective until a number of +calls to \fIares_library_cleanup(3)\fP equal to the number of calls to +this function are performed. .PP -Successive calls to this function do nothing, only the first call done -when c-ares is in an uninitialized state is actually effective. +Successive calls to this function do nothing further, only the first +call done when c-ares is in an uninitialized state is actually +effective. .PP The .I flags @@ -77,7 +79,11 @@ non-zero error number will be returned to indicate the error. Except for .SH AVAILABILITY This function was first introduced in c-ares version 1.7.0 along with the definition of preprocessor symbol \fICARES_HAVE_ARES_LIBRARY_INIT\fP as an -indication of the availability of this function. +indication of the availability of this function. Its recursive behavior, +which requires a matching number of calls to \fIares_library_cleanup()\fP +in order to deinitialize the library, is present since c-ares version +1.10.0. Earlier versions would deinitialize the library on the first call +to \fIares_library_cleanup()\fP. .PP Since the introduction of this function it is absolutely mandatory to call it for any Win32/64 program using c-ares. diff --git a/ares_library_init.c b/ares_library_init.c index f0137a1..770e7c2 100644 --- a/ares_library_init.c +++ b/ares_library_init.c @@ -101,7 +101,10 @@ int ares_library_init(int flags) int res; if (ares_initialized) - return ARES_SUCCESS; + { + ares_initialized++; + return ARES_SUCCESS; + } ares_initialized++; if (flags & ARES_LIB_INIT_WIN32) @@ -122,6 +125,8 @@ void ares_library_cleanup(void) if (!ares_initialized) return; ares_initialized--; + if (ares_initialized) + return; if (ares_init_flags & ARES_LIB_INIT_WIN32) ares_win32_cleanup(); diff --git a/ares_library_init.pdf b/ares_library_init.pdf Binary files differindex 5cbc451..5d2c321 100644 --- a/ares_library_init.pdf +++ b/ares_library_init.pdf diff --git a/ares_llist.c b/ares_llist.c index c0acd90..36ca84c 100644 --- a/ares_llist.c +++ b/ares_llist.c @@ -61,26 +61,3 @@ void ares__remove_from_list(struct list_node* node) { } } -/* Swap the contents of two lists */ -void ares__swap_lists(struct list_node* head_a, - struct list_node* head_b) { - int is_a_empty = ares__is_list_empty(head_a); - int is_b_empty = ares__is_list_empty(head_b); - struct list_node old_a = *head_a; - struct list_node old_b = *head_b; - - if (is_a_empty) { - ares__init_list_head(head_b); - } else { - *head_b = old_a; - old_a.next->prev = head_b; - old_a.prev->next = head_b; - } - if (is_b_empty) { - ares__init_list_head(head_a); - } else { - *head_a = old_b; - old_b.next->prev = head_a; - old_b.prev->next = head_a; - } -} diff --git a/ares_llist.h b/ares_llist.h index b09f0de..20f4d1c 100644 --- a/ares_llist.h +++ b/ares_llist.h @@ -36,7 +36,4 @@ void ares__insert_in_list(struct list_node* new_node, void ares__remove_from_list(struct list_node* node); -void ares__swap_lists(struct list_node* head_a, - struct list_node* head_b); - #endif /* __ARES_LLIST_H */ diff --git a/ares_mkquery.3 b/ares_mkquery.3 index f7c5413..b2c90a9 100644 --- a/ares_mkquery.3 +++ b/ares_mkquery.3 @@ -25,6 +25,8 @@ ares_mkquery \- Compose a single-question DNS query buffer .B int *\fIbuflen\fP) .fi .SH DESCRIPTION +Deprecated function. See \fIares_create_query(3)\fP instead! + The .B ares_mkquery function composes a DNS query with a single question. @@ -50,6 +52,11 @@ and the length of which will be stored in the variable pointed to by .IR buflen . It is the caller's responsibility to free this buffer using \fIares_free_string(3)\fP when it is no longer needed. + +Usage of \fIares_mkquery(3)\fP is deprecated, whereas the function is +equivalent to \fIares_create_query(3)\fP with \fBmax_udp_size\fP set to +0. + .SH RETURN VALUES .B ares_mkquery can return any of the following values: diff --git a/ares_mkquery.c b/ares_mkquery.c index e33f13f..5aea914 100644 --- a/ares_mkquery.c +++ b/ares_mkquery.c @@ -15,181 +15,10 @@ */ #include "ares_setup.h" - -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif -#ifdef HAVE_NETINET_IN_H -# include <netinet/in.h> -#endif -#ifdef HAVE_ARPA_NAMESER_H -# include <arpa/nameser.h> -#else -# include "nameser.h" -#endif -#ifdef HAVE_ARPA_NAMESER_COMPAT_H -# include <arpa/nameser_compat.h> -#endif - -#include <stdlib.h> -#include <string.h> #include "ares.h" -#include "ares_dns.h" -#include "ares_private.h" - -/* Header format, from RFC 1035: - * 1 1 1 1 1 1 - * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * | ID | - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * |QR| Opcode |AA|TC|RD|RA| Z | RCODE | - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * | QDCOUNT | - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * | ANCOUNT | - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * | NSCOUNT | - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * | ARCOUNT | - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * - * AA, TC, RA, and RCODE are only set in responses. Brief description - * of the remaining fields: - * ID Identifier to match responses with queries - * QR Query (0) or response (1) - * Opcode For our purposes, always QUERY - * RD Recursion desired - * Z Reserved (zero) - * QDCOUNT Number of queries - * ANCOUNT Number of answers - * NSCOUNT Number of name server records - * ARCOUNT Number of additional records - * - * Question format, from RFC 1035: - * 1 1 1 1 1 1 - * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * | | - * / QNAME / - * / / - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * | QTYPE | - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * | QCLASS | - * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - * - * The query name is encoded as a series of labels, each represented - * as a one-byte length (maximum 63) followed by the text of the - * label. The list is terminated by a label of length zero (which can - * be thought of as the root domain). - */ int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id, int rd, unsigned char **buf, int *buflen) { - int len; - unsigned char *q; - const char *p; - - /* Set our results early, in case we bail out early with an error. */ - *buflen = 0; - *buf = NULL; - - /* Compute the length of the encoded name so we can check buflen. - * Start counting at 1 for the zero-length label at the end. */ - len = 1; - for (p = name; *p; p++) - { - if (*p == '\\' && *(p + 1) != 0) - p++; - len++; - } - /* If there are n periods in the name, there are n + 1 labels, and - * thus n + 1 length fields, unless the name is empty or ends with a - * period. So add 1 unless name is empty or ends with a period. - */ - if (*name && *(p - 1) != '.') - len++; - - /* Immediately reject names that are longer than the maximum of 255 - * bytes that's specified in RFC 1035 ("To simplify implementations, - * the total length of a domain name (i.e., label octets and label - * length octets) is restricted to 255 octets or less."). We aren't - * doing this just to be a stickler about RFCs. For names that are - * too long, 'dnscache' closes its TCP connection to us immediately - * (when using TCP) and ignores the request when using UDP, and - * BIND's named returns ServFail (TCP or UDP). Sending a request - * that we know will cause 'dnscache' to close the TCP connection is - * painful, since that makes any other outstanding requests on that - * connection fail. And sending a UDP request that we know - * 'dnscache' will ignore is bad because resources will be tied up - * until we time-out the request. - */ - if (len > MAXCDNAME) - return ARES_EBADNAME; - - *buflen = len + HFIXEDSZ + QFIXEDSZ; - *buf = malloc(*buflen); - if (!*buf) - return ARES_ENOMEM; - - /* Set up the header. */ - q = *buf; - memset(q, 0, HFIXEDSZ); - DNS_HEADER_SET_QID(q, id); - DNS_HEADER_SET_OPCODE(q, QUERY); - if (rd) { - DNS_HEADER_SET_RD(q, 1); - } - else { - DNS_HEADER_SET_RD(q, 0); - } - DNS_HEADER_SET_QDCOUNT(q, 1); - - /* A name of "." is a screw case for the loop below, so adjust it. */ - if (strcmp(name, ".") == 0) - name++; - - /* Start writing out the name after the header. */ - q += HFIXEDSZ; - while (*name) - { - if (*name == '.') - return ARES_EBADNAME; - - /* Count the number of bytes in this label. */ - len = 0; - for (p = name; *p && *p != '.'; p++) - { - if (*p == '\\' && *(p + 1) != 0) - p++; - len++; - } - if (len > MAXLABEL) - return ARES_EBADNAME; - - /* Encode the length and copy the data. */ - *q++ = (unsigned char)len; - for (p = name; *p && *p != '.'; p++) - { - if (*p == '\\' && *(p + 1) != 0) - p++; - *q++ = *p; - } - - /* Go to the next label and repeat, unless we hit the end. */ - if (!*p) - break; - name = p + 1; - } - - /* Add the zero-length label at the end. */ - *q++ = 0; - - /* Finish off the question with the type and class. */ - DNS_QUESTION_SET_TYPE(q, type); - DNS_QUESTION_SET_CLASS(q, dnsclass); - - return ARES_SUCCESS; + return ares_create_query(name, dnsclass, type, id, rd, buf, buflen, 0); } diff --git a/ares_mkquery.pdf b/ares_mkquery.pdf Binary files differindex 04f225c..35c2826 100644 --- a/ares_mkquery.pdf +++ b/ares_mkquery.pdf diff --git a/ares_nowarn.c b/ares_nowarn.c index 701add5..a4dce89 100644 --- a/ares_nowarn.c +++ b/ares_nowarn.c @@ -1,5 +1,5 @@ -/* Copyright (C) 2010-2011 by Daniel Stenberg +/* Copyright (C) 2010-2012 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -23,9 +23,6 @@ #if defined(__INTEL_COMPILER) && defined(__unix__) -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -39,6 +36,19 @@ #include "ares_nowarn.h" +#if (SIZEOF_SHORT == 2) +# define CARES_MASK_SSHORT 0x7FFF +# define CARES_MASK_USHORT 0xFFFF +#elif (SIZEOF_SHORT == 4) +# define CARES_MASK_SSHORT 0x7FFFFFFF +# define CARES_MASK_USHORT 0xFFFFFFFF +#elif (SIZEOF_SHORT == 8) +# define CARES_MASK_SSHORT 0x7FFFFFFFFFFFFFFF +# define CARES_MASK_USHORT 0xFFFFFFFFFFFFFFFF +#else +# error "SIZEOF_SHORT not defined" +#endif + #if (SIZEOF_INT == 2) # define CARES_MASK_SINT 0x7FFF # define CARES_MASK_UINT 0xFFFF @@ -51,8 +61,44 @@ #elif (SIZEOF_INT == 16) # define CARES_MASK_SINT 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF # define CARES_MASK_UINT 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +#else +# error "SIZEOF_INT not defined" +#endif + +#if (CARES_SIZEOF_LONG == 2) +# define CARES_MASK_SLONG 0x7FFFL +# define CARES_MASK_ULONG 0xFFFFUL +#elif (CARES_SIZEOF_LONG == 4) +# define CARES_MASK_SLONG 0x7FFFFFFFL +# define CARES_MASK_ULONG 0xFFFFFFFFUL +#elif (CARES_SIZEOF_LONG == 8) +# define CARES_MASK_SLONG 0x7FFFFFFFFFFFFFFFL +# define CARES_MASK_ULONG 0xFFFFFFFFFFFFFFFFUL +#elif (CARES_SIZEOF_LONG == 16) +# define CARES_MASK_SLONG 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFL +# define CARES_MASK_ULONG 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUL +#else +# error "CARES_SIZEOF_LONG not defined" +#endif + +/* +** unsigned size_t to signed long +*/ + +long aresx_uztosl(size_t uznum) +{ +#ifdef __INTEL_COMPILER +# pragma warning(push) +# pragma warning(disable:810) /* conversion may lose significant bits */ #endif + return (long)(uznum & (size_t) CARES_MASK_SLONG); + +#ifdef __INTEL_COMPILER +# pragma warning(pop) +#endif +} + /* ** unsigned size_t to signed int */ @@ -72,6 +118,43 @@ int aresx_uztosi(size_t uznum) } /* +** unsigned size_t to signed short +*/ + +short aresx_uztoss(size_t uznum) +{ +#ifdef __INTEL_COMPILER +# pragma warning(push) +# pragma warning(disable:810) /* conversion may lose significant bits */ +#endif + + return (short)(uznum & (size_t) CARES_MASK_SSHORT); + +#ifdef __INTEL_COMPILER +# pragma warning(pop) +#endif +} + +/* +** signed int to signed short +*/ + +short aresx_sitoss(int sinum) +{ +#ifdef __INTEL_COMPILER +# pragma warning(push) +# pragma warning(disable:810) /* conversion may lose significant bits */ +#endif + + DEBUGASSERT(sinum >= 0); + return (short)(sinum & (int) CARES_MASK_SSHORT); + +#ifdef __INTEL_COMPILER +# pragma warning(pop) +#endif +} + +/* ** signed long to signed int */ @@ -128,6 +211,25 @@ unsigned int aresx_sztoui(ssize_t sznum) #endif } +/* +** signed int to unsigned short +*/ + +unsigned short aresx_sitous(int sinum) +{ +#ifdef __INTEL_COMPILER +# pragma warning(push) +# pragma warning(disable:810) /* conversion may lose significant bits */ +#endif + + DEBUGASSERT(sinum >= 0); + return (unsigned short)(sinum & (int) CARES_MASK_USHORT); + +#ifdef __INTEL_COMPILER +# pragma warning(pop) +#endif +} + #if defined(__INTEL_COMPILER) && defined(__unix__) int aresx_FD_ISSET(int fd, fd_set *fdset) diff --git a/ares_nowarn.h b/ares_nowarn.h index bcaa227..9b76d66 100644 --- a/ares_nowarn.h +++ b/ares_nowarn.h @@ -2,7 +2,7 @@ #define HEADER_CARES_NOWARN_H -/* Copyright (C) 2010-2011 by Daniel Stenberg +/* Copyright (C) 2010-2012 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -17,7 +17,11 @@ * without express or implied warranty. */ -int aresx_uztosi(size_t uznum); +long aresx_uztosl(size_t uznum); +int aresx_uztosi(size_t uznum); +short aresx_uztoss(size_t uznum); + +short aresx_sitoss(int sinum); int aresx_sltosi(long slnum); @@ -25,6 +29,8 @@ int aresx_sztosi(ssize_t sznum); unsigned int aresx_sztoui(ssize_t sznum); +unsigned short aresx_sitous(int sinum); + #if defined(__INTEL_COMPILER) && defined(__unix__) int aresx_FD_ISSET(int fd, fd_set *fdset); diff --git a/ares_options.c b/ares_options.c index 5174ef2..76d82df 100644 --- a/ares_options.c +++ b/ares_options.c @@ -1,6 +1,6 @@ /* Copyright 1998 by the Massachusetts Institute of Technology. - * Copyright (C) 2008-2011 by Daniel Stenberg + * Copyright (C) 2008-2013 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -24,7 +24,7 @@ #include "ares.h" #include "ares_data.h" -#include "inet_net_pton.h" +#include "ares_inet_net_pton.h" #include "ares_private.h" @@ -132,6 +132,7 @@ int ares_set_servers(ares_channel channel, } /* Incomming string format: host[:port][,host[:port]]... */ +/* IPv6 addresses with ports require square brackets [fe80::1%lo0]:53 */ int ares_set_servers_csv(ares_channel channel, const char* _csv) { @@ -139,6 +140,7 @@ int ares_set_servers_csv(ares_channel channel, char* csv = NULL; char* ptr; char* start_host; + int cc = 0; int rv = ARES_SUCCESS; struct ares_addr_node *servers = NULL; struct ares_addr_node *last = NULL; @@ -164,28 +166,53 @@ int ares_set_servers_csv(ares_channel channel, start_host = csv; for (ptr = csv; *ptr; ptr++) { - if (*ptr == ',') { + if (*ptr == ':') { + /* count colons to determine if we have an IPv6 number or IPv4 with + port */ + cc++; + } + else if (*ptr == '[') { + /* move start_host if an open square bracket is found wrapping an IPv6 + address */ + start_host = ptr + 1; + } + else if (*ptr == ',') { char* pp = ptr - 1; + char* p = ptr; struct in_addr in4; struct ares_in6_addr in6; struct ares_addr_node *s = NULL; *ptr = 0; /* null terminate host:port string */ - /* Got an entry..see if port was specified. */ - while (pp > start_host) { - if (*pp == ':') - break; /* yes */ - if (!ISDIGIT(*pp)) { - /* Found end of digits before we found :, so wasn't a port */ - pp = ptr; - break; + /* Got an entry..see if the port was specified. */ + if (cc > 0) { + while (pp > start_host) { + /* a single close square bracket followed by a colon, ']:' indicates + an IPv6 address with port */ + if ((*pp == ']') && (*p == ':')) + break; /* found port */ + /* a single colon, ':' indicates an IPv4 address with port */ + if ((*pp == ':') && (cc == 1)) + break; /* found port */ + if (!(ISDIGIT(*pp) || (*pp == ':'))) { + /* Found end of digits before we found :, so wasn't a port */ + /* must allow ':' for IPv6 case of ']:' indicates we found a port */ + pp = p = ptr; + break; + } + pp--; + p--; + } + if ((pp != start_host) && ((pp + 1) < ptr)) { + /* Found it. Parse over the port number */ + /* when an IPv6 address is wrapped with square brackets the port + starts at pp + 2 */ + if (*pp == ']') + p++; /* move p before ':' */ + /* p will point to the start of the port */ + (void)strtol(p, NULL, 10); + *pp = 0; /* null terminate host */ } - pp--; - } - if ((pp != start_host) && ((pp + 1) < ptr)) { - /* Found it. Parse over the port number */ - (void)strtol(pp + 1, NULL, 10); - *pp = 0; /* null terminate host */ } /* resolve host, try ipv4 first, rslt is in network byte order */ rv = ares_inet_pton(AF_INET, start_host, &in4); @@ -221,6 +248,8 @@ int ares_set_servers_csv(ares_channel channel, s->next = NULL; if (last) { last->next = s; + /* need to move last to maintain the linked list */ + last = last->next; } else { servers = s; @@ -230,6 +259,7 @@ int ares_set_servers_csv(ares_channel channel, /* Set up for next one */ start_host = ptr + 1; + cc = 0; } } diff --git a/ares_parse_a_reply.3 b/ares_parse_a_reply.3 index 7fd06f9..8db8ed9 100644 --- a/ares_parse_a_reply.3 +++ b/ares_parse_a_reply.3 @@ -22,7 +22,7 @@ ares_parse_a_reply \- Parse a reply to a DNS query of type A .PP .B int ares_parse_a_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, .B struct hostent **\fIhost\fP, -.B struct ares_addrttl *\fIaddrttls\fB, int *\fInaddrttls\fB); +.B struct ares_addrttl *\fIaddrttls\fP, int *\fInaddrttls\fP); .fi .SH DESCRIPTION The diff --git a/ares_parse_a_reply.c b/ares_parse_a_reply.c index 4bd0845..a3ed69e 100644 --- a/ares_parse_a_reply.c +++ b/ares_parse_a_reply.c @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -41,8 +38,6 @@ # include <strings.h> #endif -#include <stdlib.h> -#include <string.h> #ifdef HAVE_LIMITS_H # include <limits.h> #endif @@ -141,6 +136,12 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen, rr_len = DNS_RR_LEN(aptr); rr_ttl = DNS_RR_TTL(aptr); aptr += RRFIXEDSZ; + if (aptr + rr_len > abuf + alen) + { + free(rr_name); + status = ARES_EBADRESP; + break; + } if (rr_class == C_IN && rr_type == T_A && rr_len == sizeof(struct in_addr) diff --git a/ares_parse_a_reply.pdf b/ares_parse_a_reply.pdf Binary files differindex 565ff0f..2314e35 100644 --- a/ares_parse_a_reply.pdf +++ b/ares_parse_a_reply.pdf diff --git a/ares_parse_aaaa_reply.3 b/ares_parse_aaaa_reply.3 index 7fdaa68..476a3f1 100644 --- a/ares_parse_aaaa_reply.3 +++ b/ares_parse_aaaa_reply.3 @@ -22,7 +22,7 @@ ares_parse_aaaa_reply \- Parse a reply to a DNS query of type AAAA .PP .B int ares_parse_aaaa_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, .B struct hostent **\fIhost\fP, -.B struct ares_addr6ttl *\fIaddrttls\fB, int *\fInaddrttls\fB); +.B struct ares_addr6ttl *\fIaddrttls\fP, int *\fInaddrttls\fP); .fi .SH DESCRIPTION The diff --git a/ares_parse_aaaa_reply.c b/ares_parse_aaaa_reply.c index 1fbe838..31e4a8c 100644 --- a/ares_parse_aaaa_reply.c +++ b/ares_parse_aaaa_reply.c @@ -17,9 +17,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -42,15 +39,13 @@ # include <strings.h> #endif -#include <stdlib.h> -#include <string.h> #ifdef HAVE_LIMITS_H # include <limits.h> #endif #include "ares.h" #include "ares_dns.h" -#include "inet_net_pton.h" +#include "ares_inet_net_pton.h" #include "ares_private.h" int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, @@ -141,6 +136,12 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, rr_len = DNS_RR_LEN(aptr); rr_ttl = DNS_RR_TTL(aptr); aptr += RRFIXEDSZ; + if (aptr + rr_len > abuf + alen) + { + free(rr_name); + status = ARES_EBADRESP; + break; + } if (rr_class == C_IN && rr_type == T_AAAA && rr_len == sizeof(struct ares_in6_addr) @@ -204,7 +205,9 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, } } - if (status == ARES_SUCCESS && naddrs == 0) + /* the check for naliases to be zero is to make sure CNAME responses + don't get caught here */ + if (status == ARES_SUCCESS && naddrs == 0 && naliases == 0) status = ARES_ENODATA; if (status == ARES_SUCCESS) { @@ -239,6 +242,8 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, for (i = 0; i < naddrs; i++) hostent->h_addr_list[i] = (char *) &addrs[i]; hostent->h_addr_list[naddrs] = NULL; + if (!naddrs && addrs) + free(addrs); *host = hostent; return ARES_SUCCESS; } diff --git a/ares_parse_aaaa_reply.pdf b/ares_parse_aaaa_reply.pdf Binary files differindex 3c6b6e1..42fd803 100644 --- a/ares_parse_aaaa_reply.pdf +++ b/ares_parse_aaaa_reply.pdf diff --git a/ares_parse_mx_reply.c b/ares_parse_mx_reply.c index 2180054..95400dd 100644 --- a/ares_parse_mx_reply.c +++ b/ares_parse_mx_reply.c @@ -17,9 +17,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -38,8 +35,6 @@ # include <arpa/nameser_compat.h> #endif -#include <stdlib.h> -#include <string.h> #include "ares.h" #include "ares_dns.h" #include "ares_data.h" @@ -105,6 +100,11 @@ ares_parse_mx_reply (const unsigned char *abuf, int alen, rr_class = DNS_RR_CLASS (aptr); rr_len = DNS_RR_LEN (aptr); aptr += RRFIXEDSZ; + if (aptr + rr_len > abuf + alen) + { + status = ARES_EBADRESP; + break; + } /* Check if we are really looking at a MX record */ if (rr_class == C_IN && rr_type == T_MX) diff --git a/ares_parse_mx_reply.pdf b/ares_parse_mx_reply.pdf Binary files differindex c8c1482..2cd70cf 100644 --- a/ares_parse_mx_reply.pdf +++ b/ares_parse_mx_reply.pdf diff --git a/ares_parse_naptr_reply.3 b/ares_parse_naptr_reply.3 new file mode 100644 index 0000000..2a5f1e5 --- /dev/null +++ b/ares_parse_naptr_reply.3 @@ -0,0 +1,83 @@ +.\" +.\" Copyright 1998 by the Massachusetts Institute of Technology. +.\" +.\" Permission to use, copy, modify, and distribute this +.\" software and its documentation for any purpose and without +.\" fee is hereby granted, provided that the above copyright +.\" notice appear in all copies and that both that copyright +.\" notice and this permission notice appear in supporting +.\" documentation, and that the name of M.I.T. not be used in +.\" advertising or publicity pertaining to distribution of the +.\" software without specific, written prior permission. +.\" M.I.T. makes no representations about the suitability of +.\" this software for any purpose. It is provided "as is" +.\" without express or implied warranty. +.\" +.TH ARES_PARSE_NAPTR_REPLY 3 "23 February 2012" +.SH NAME +ares_parse_naptr_reply \- Parse a reply to a DNS query of type NAPTR +.SH SYNOPSIS +.nf +.B #include <ares.h> +.PP +.B int ares_parse_naptr_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, +.B struct ares_naptr_reply** \fInaptr_out\fP); +.fi +.SH DESCRIPTION +The +.B ares_parse_naptr_reply +function parses the response to a query of type NAPTR into a +linked list of +.I struct ares_naptr_reply +The parameters +.I abuf +and +.I alen +give the contents of the response. The result is stored in allocated +memory and a pointer to it stored into the variable pointed to by +.IR naptr_out . +It is the caller's responsibility to free the resulting +.IR naptr_out +structure when it is no longer needed using the function +.B ares_free_data +.PP +The structure +.I ares_naptr_reply +contains the following fields: +.sp +.in +4n +.nf +struct ares_naptr_reply { + struct ares_naptr_reply *next; + unsigned char *flags; + unsigned char *service; + unsigned char *regexp; + char *replacement; + unsigned short order; + unsigned short preference; +}; +.fi +.in +.PP +.SH RETURN VALUES +.B ares_parse_naptr_reply +can return any of the following values: +.TP 15 +.B ARES_SUCCESS +The response was successfully parsed. +.TP 15 +.B ARES_EBADRESP +The response was malformatted. +.TP 15 +.B ARES_ENODATA +The response did not contain an answer to the query. +.TP 15 +.B ARES_ENOMEM +Memory was exhausted. +.SH AVAILABILITY +This function was first introduced in c-ares version 1.7.6. +.SH SEE ALSO +.BR ares_query (3) +.BR ares_free_data (3) +.SH AUTHOR +Written by Jakub Hrozek <jhrozek@redhat.com>, on behalf of Red Hat, Inc http://www.redhat.com diff --git a/ares_parse_naptr_reply.c b/ares_parse_naptr_reply.c new file mode 100644 index 0000000..4935366 --- /dev/null +++ b/ares_parse_naptr_reply.c @@ -0,0 +1,188 @@ + +/* Copyright 1998 by the Massachusetts Institute of Technology. + * Copyright (C) 2009 by Jakub Hrozek <jhrozek@redhat.com> + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in + * advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" + * without express or implied warranty. + */ + +#include "ares_setup.h" + +#ifdef HAVE_NETINET_IN_H +# include <netinet/in.h> +#endif +#ifdef HAVE_NETDB_H +# include <netdb.h> +#endif +#ifdef HAVE_ARPA_INET_H +# include <arpa/inet.h> +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include <arpa/nameser.h> +#else +# include "nameser.h" +#endif +#ifdef HAVE_ARPA_NAMESER_COMPAT_H +# include <arpa/nameser_compat.h> +#endif + +#include "ares.h" +#include "ares_dns.h" +#include "ares_data.h" +#include "ares_private.h" + +/* AIX portability check */ +#ifndef T_NAPTR + #define T_NAPTR 35 /* naming authority pointer */ +#endif + +int +ares_parse_naptr_reply (const unsigned char *abuf, int alen, + struct ares_naptr_reply **naptr_out) +{ + unsigned int qdcount, ancount, i; + const unsigned char *aptr, *vptr; + int status, rr_type, rr_class, rr_len; + long len; + char *hostname = NULL, *rr_name = NULL; + struct ares_naptr_reply *naptr_head = NULL; + struct ares_naptr_reply *naptr_last = NULL; + struct ares_naptr_reply *naptr_curr; + + /* Set *naptr_out to NULL for all failure cases. */ + *naptr_out = NULL; + + /* Give up if abuf doesn't have room for a header. */ + if (alen < HFIXEDSZ) + return ARES_EBADRESP; + + /* Fetch the question and answer count from the header. */ + qdcount = DNS_HEADER_QDCOUNT (abuf); + ancount = DNS_HEADER_ANCOUNT (abuf); + if (qdcount != 1) + return ARES_EBADRESP; + if (ancount == 0) + return ARES_ENODATA; + + /* Expand the name from the question, and skip past the question. */ + aptr = abuf + HFIXEDSZ; + status = ares_expand_name (aptr, abuf, alen, &hostname, &len); + if (status != ARES_SUCCESS) + return status; + + if (aptr + len + QFIXEDSZ > abuf + alen) + { + free (hostname); + return ARES_EBADRESP; + } + aptr += len + QFIXEDSZ; + + /* Examine each answer resource record (RR) in turn. */ + for (i = 0; i < ancount; i++) + { + /* Decode the RR up to the data field. */ + status = ares_expand_name (aptr, abuf, alen, &rr_name, &len); + if (status != ARES_SUCCESS) + { + break; + } + aptr += len; + if (aptr + RRFIXEDSZ > abuf + alen) + { + status = ARES_EBADRESP; + break; + } + rr_type = DNS_RR_TYPE (aptr); + rr_class = DNS_RR_CLASS (aptr); + rr_len = DNS_RR_LEN (aptr); + aptr += RRFIXEDSZ; + if (aptr + rr_len > abuf + alen) + { + status = ARES_EBADRESP; + break; + } + + /* Check if we are really looking at a NAPTR record */ + if (rr_class == C_IN && rr_type == T_NAPTR) + { + /* parse the NAPTR record itself */ + + /* Allocate storage for this NAPTR answer appending it to the list */ + naptr_curr = ares_malloc_data(ARES_DATATYPE_NAPTR_REPLY); + if (!naptr_curr) + { + status = ARES_ENOMEM; + break; + } + if (naptr_last) + { + naptr_last->next = naptr_curr; + } + else + { + naptr_head = naptr_curr; + } + naptr_last = naptr_curr; + + vptr = aptr; + naptr_curr->order = DNS__16BIT(vptr); + vptr += sizeof(unsigned short); + naptr_curr->preference = DNS__16BIT(vptr); + vptr += sizeof(unsigned short); + + status = ares_expand_string(vptr, abuf, alen, &naptr_curr->flags, &len); + if (status != ARES_SUCCESS) + break; + vptr += len; + + status = ares_expand_string(vptr, abuf, alen, &naptr_curr->service, &len); + if (status != ARES_SUCCESS) + break; + vptr += len; + + status = ares_expand_string(vptr, abuf, alen, &naptr_curr->regexp, &len); + if (status != ARES_SUCCESS) + break; + vptr += len; + + status = ares_expand_name(vptr, abuf, alen, &naptr_curr->replacement, &len); + if (status != ARES_SUCCESS) + break; + } + + /* Don't lose memory in the next iteration */ + free (rr_name); + rr_name = NULL; + + /* Move on to the next record */ + aptr += rr_len; + } + + if (hostname) + free (hostname); + if (rr_name) + free (rr_name); + + /* clean up on error */ + if (status != ARES_SUCCESS) + { + if (naptr_head) + ares_free_data (naptr_head); + return status; + } + + /* everything looks fine, return the data */ + *naptr_out = naptr_head; + + return ARES_SUCCESS; +} + diff --git a/ares_parse_ns_reply.c b/ares_parse_ns_reply.c index 5e9af71..d331e67 100644 --- a/ares_parse_ns_reply.c +++ b/ares_parse_ns_reply.c @@ -20,9 +20,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -41,8 +38,6 @@ # include <arpa/nameser_compat.h> #endif -#include <stdlib.h> -#include <string.h> #include "ares.h" #include "ares_dns.h" #include "ares_private.h" @@ -110,6 +105,12 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen, rr_class = DNS_RR_CLASS( aptr ); rr_len = DNS_RR_LEN( aptr ); aptr += RRFIXEDSZ; + if (aptr + rr_len > abuf + alen) + { + free(rr_name); + status = ARES_EBADRESP; + break; + } if ( rr_class == C_IN && rr_type == T_NS ) { diff --git a/ares_parse_ns_reply.pdf b/ares_parse_ns_reply.pdf Binary files differindex afed8a8..b124884 100644 --- a/ares_parse_ns_reply.pdf +++ b/ares_parse_ns_reply.pdf diff --git a/ares_parse_ptr_reply.c b/ares_parse_ptr_reply.c index 3b6dbc3..df21e40 100644 --- a/ares_parse_ptr_reply.c +++ b/ares_parse_ptr_reply.c @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -38,10 +35,9 @@ # include <strings.h> #endif -#include <stdlib.h> -#include <string.h> #include "ares.h" #include "ares_dns.h" +#include "ares_nowarn.h" #include "ares_private.h" int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, @@ -107,6 +103,12 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, rr_class = DNS_RR_CLASS(aptr); rr_len = DNS_RR_LEN(aptr); aptr += RRFIXEDSZ; + if (aptr + rr_len > abuf + alen) + { + free(rr_name); + status = ARES_EBADRESP; + break; + } if (rr_class == C_IN && rr_type == T_PTR && strcasecmp(rr_name, ptrname) == 0) @@ -189,8 +191,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, for (i=0 ; i<aliascnt ; i++) hostent->h_aliases[i] = aliases[i]; hostent->h_aliases[aliascnt] = NULL; - hostent->h_addrtype = family; - hostent->h_length = addrlen; + hostent->h_addrtype = aresx_sitoss(family); + hostent->h_length = aresx_sitoss(addrlen); memcpy(hostent->h_addr_list[0], addr, addrlen); hostent->h_addr_list[1] = NULL; *host = hostent; @@ -207,7 +209,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, status = ARES_ENOMEM; } for (i=0 ; i<aliascnt ; i++) - if (aliases[i]) + if (aliases[i]) free(aliases[i]); free(aliases); if (hostname) diff --git a/ares_parse_ptr_reply.pdf b/ares_parse_ptr_reply.pdf Binary files differindex 7f84a14..480ad37 100644 --- a/ares_parse_ptr_reply.pdf +++ b/ares_parse_ptr_reply.pdf diff --git a/ares_parse_soa_reply.3 b/ares_parse_soa_reply.3 new file mode 100644 index 0000000..1c4456f --- /dev/null +++ b/ares_parse_soa_reply.3 @@ -0,0 +1,80 @@ +.\" +.\" Copyright 1998 by the Massachusetts Institute of Technology. +.\" +.\" Permission to use, copy, modify, and distribute this +.\" software and its documentation for any purpose and without +.\" fee is hereby granted, provided that the above copyright +.\" notice appear in all copies and that both that copyright +.\" notice and this permission notice appear in supporting +.\" documentation, and that the name of M.I.T. not be used in +.\" advertising or publicity pertaining to distribution of the +.\" software without specific, written prior permission. +.\" M.I.T. makes no representations about the suitability of +.\" this software for any purpose. It is provided "as is" +.\" without express or implied warranty. +.\" +.TH ARES_PARSE_SOA_REPLY 3 "29 May 2012" +.SH NAME +ares_parse_soa_reply \- Parse a reply to a DNS query of type SOA +.SH SYNOPSIS +.nf +.B #include <ares.h> +.PP +.B int ares_parse_soa_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, +.B struct ares_soa_reply** \fIsoa_out\fP); +.fi +.SH DESCRIPTION +The +.B ares_parse_soa_reply +function parses the response to a query of type SOA into a +.IR struct\ ares_soa_reply . +The parameters +.I abuf +and +.I alen +give the contents of the response. The result is stored in allocated +memory and a pointer to it stored into the variable pointed to by +.IR soa_out . +It is the caller's responsibility to free the resulting +.IR soa_out +structure when it is no longer needed using the function +.B ares_free_data +.PP +The structure +.I ares_soa_reply +contains the following fields: +.sp +.in +4n +.nf +struct ares_soa_reply { + char *nsname; + char *hostmaster; + unsigned int serial; + unsigned int refresh; + unsigned int retry; + unsigned int expire; + unsigned int minttl; +}; +.fi +.in +.PP +.SH RETURN VALUES +.B ares_parse_soa_reply +can return any of the following values: +.TP 15 +.B ARES_SUCCESS +The response was successfully parsed. +.TP 15 +.B ARES_EBADRESP +The response was malformatted. +.TP 15 +.B ARES_ENODATA +The response did not contain an answer to the query. +.TP 15 +.B ARES_ENOMEM +Memory was exhausted. +.SH AVAILABILITY +This function was first introduced in c-ares version 1.9.0. +.SH SEE ALSO +.BR ares_query (3) +.BR ares_free_data (3) diff --git a/ares_parse_soa_reply.c b/ares_parse_soa_reply.c new file mode 100644 index 0000000..da1c6dc --- /dev/null +++ b/ares_parse_soa_reply.c @@ -0,0 +1,130 @@ + +/* Copyright 1998 by the Massachusetts Institute of Technology. + * Copyright (C) 2012 Marko Kreen <markokr@gmail.com> + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in + * advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" + * without express or implied warranty. + */ + +#include "ares_setup.h" + +#ifdef HAVE_NETINET_IN_H +# include <netinet/in.h> +#endif +#ifdef HAVE_NETDB_H +# include <netdb.h> +#endif +#ifdef HAVE_ARPA_INET_H +# include <arpa/inet.h> +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include <arpa/nameser.h> +#else +# include "nameser.h" +#endif +#ifdef HAVE_ARPA_NAMESER_COMPAT_H +# include <arpa/nameser_compat.h> +#endif + +#include "ares.h" +#include "ares_dns.h" +#include "ares_data.h" +#include "ares_private.h" + +int +ares_parse_soa_reply(const unsigned char *abuf, int alen, + struct ares_soa_reply **soa_out) +{ + const unsigned char *aptr; + long len; + char *qname = NULL, *rr_name = NULL; + struct ares_soa_reply *soa = NULL; + int qdcount, ancount; + int status; + + if (alen < HFIXEDSZ) + return ARES_EBADRESP; + + /* parse message header */ + qdcount = DNS_HEADER_QDCOUNT(abuf); + ancount = DNS_HEADER_ANCOUNT(abuf); + if (qdcount != 1 || ancount != 1) + return ARES_EBADRESP; + aptr = abuf + HFIXEDSZ; + + /* query name */ + status = ares__expand_name_for_response(aptr, abuf, alen, &qname, &len); + if (status != ARES_SUCCESS) + goto failed_stat; + aptr += len; + + /* skip qtype & qclass */ + if (aptr + QFIXEDSZ > abuf + alen) + goto failed; + aptr += QFIXEDSZ; + + /* rr_name */ + status = ares__expand_name_for_response(aptr, abuf, alen, &rr_name, &len); + if (status != ARES_SUCCESS) + goto failed_stat; + aptr += len; + + /* skip rr_type, rr_class, rr_ttl, rr_rdlen */ + if (aptr + RRFIXEDSZ > abuf + alen) + goto failed; + aptr += RRFIXEDSZ; + + /* allocate result struct */ + soa = ares_malloc_data(ARES_DATATYPE_SOA_REPLY); + if (!soa) + return ARES_ENOMEM; + + /* nsname */ + status = ares__expand_name_for_response(aptr, abuf, alen, &soa->nsname, &len); + if (status != ARES_SUCCESS) + goto failed_stat; + aptr += len; + + /* hostmaster */ + status = ares__expand_name_for_response(aptr, abuf, alen, &soa->hostmaster, &len); + if (status != ARES_SUCCESS) + goto failed_stat; + aptr += len; + + /* integer fields */ + if (aptr + 5 * 4 > abuf + alen) + goto failed; + soa->serial = DNS__32BIT(aptr + 0 * 4); + soa->refresh = DNS__32BIT(aptr + 1 * 4); + soa->retry = DNS__32BIT(aptr + 2 * 4); + soa->expire = DNS__32BIT(aptr + 3 * 4); + soa->minttl = DNS__32BIT(aptr + 4 * 4); + + free(qname); + free(rr_name); + + *soa_out = soa; + + return ARES_SUCCESS; + +failed: + status = ARES_EBADRESP; + +failed_stat: + ares_free_data(soa); + if (qname) + free(qname); + if (rr_name) + free(rr_name); + return status; +} + diff --git a/ares_parse_soa_reply.pdf b/ares_parse_soa_reply.pdf Binary files differnew file mode 100644 index 0000000..8c7786c --- /dev/null +++ b/ares_parse_soa_reply.pdf diff --git a/ares_parse_srv_reply.c b/ares_parse_srv_reply.c index 9c7eb6e..0739c27 100644 --- a/ares_parse_srv_reply.c +++ b/ares_parse_srv_reply.c @@ -17,9 +17,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -38,8 +35,6 @@ # include <arpa/nameser_compat.h> #endif -#include <stdlib.h> -#include <string.h> #include "ares.h" #include "ares_dns.h" #include "ares_data.h" @@ -110,6 +105,11 @@ ares_parse_srv_reply (const unsigned char *abuf, int alen, rr_class = DNS_RR_CLASS (aptr); rr_len = DNS_RR_LEN (aptr); aptr += RRFIXEDSZ; + if (aptr + rr_len > abuf + alen) + { + status = ARES_EBADRESP; + break; + } /* Check if we are really looking at a SRV record */ if (rr_class == C_IN && rr_type == T_SRV) diff --git a/ares_parse_srv_reply.pdf b/ares_parse_srv_reply.pdf Binary files differindex 81b35e9..1854537 100644 --- a/ares_parse_srv_reply.pdf +++ b/ares_parse_srv_reply.pdf diff --git a/ares_parse_txt_reply.3 b/ares_parse_txt_reply.3 index c9926bc..063b3ff 100644 --- a/ares_parse_txt_reply.3 +++ b/ares_parse_txt_reply.3 @@ -27,7 +27,7 @@ ares_parse_txt_reply \- Parse a reply to a DNS query of type TXT The .B ares_parse_txt_reply function parses the response to a query of type TXT into a -linked list of +linked list (one element per sub-string) of .I struct ares_txt_reply The parameters .I abuf diff --git a/ares_parse_txt_reply.c b/ares_parse_txt_reply.c index 5165332..981db4c 100644 --- a/ares_parse_txt_reply.c +++ b/ares_parse_txt_reply.c @@ -17,9 +17,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -42,9 +39,6 @@ # include <strings.h> #endif -#include <stdlib.h> -#include <string.h> - #include "ares.h" #include "ares_dns.h" #include "ares_data.h" @@ -54,7 +48,7 @@ int ares_parse_txt_reply (const unsigned char *abuf, int alen, struct ares_txt_reply **txt_out) { - size_t substr_len, str_len; + size_t substr_len; unsigned int qdcount, ancount, i; const unsigned char *aptr; const unsigned char *strptr; @@ -112,27 +106,15 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen, rr_class = DNS_RR_CLASS (aptr); rr_len = DNS_RR_LEN (aptr); aptr += RRFIXEDSZ; + if (aptr + rr_len > abuf + alen) + { + status = ARES_EBADRESP; + break; + } /* Check if we are really looking at a TXT record */ if (rr_class == C_IN && rr_type == T_TXT) { - /* Allocate storage for this TXT answer appending it to the list */ - txt_curr = ares_malloc_data(ARES_DATATYPE_TXT_REPLY); - if (!txt_curr) - { - status = ARES_ENOMEM; - break; - } - if (txt_last) - { - txt_last->next = txt_curr; - } - else - { - txt_head = txt_curr; - } - txt_last = txt_curr; - /* * There may be multiple substrings in a single TXT record. Each * substring may be up to 255 characters in length, with a @@ -141,36 +123,49 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen, * substrings contained therein. */ - /* Compute total length to allow a single memory allocation */ strptr = aptr; while (strptr < (aptr + rr_len)) { substr_len = (unsigned char)*strptr; - txt_curr->length += substr_len; - strptr += substr_len + 1; - } - - /* Including null byte */ - txt_curr->txt = malloc (txt_curr->length + 1); - if (txt_curr->txt == NULL) - { - status = ARES_ENOMEM; - break; - } + if (strptr + substr_len + 1 > aptr + rr_len) + { + status = ARES_EBADRESP; + break; + } + + ++strptr; + + /* Allocate storage for this TXT answer appending it to the list */ + txt_curr = ares_malloc_data(ARES_DATATYPE_TXT_REPLY); + if (!txt_curr) + { + status = ARES_ENOMEM; + break; + } + if (txt_last) + { + txt_last->next = txt_curr; + } + else + { + txt_head = txt_curr; + } + txt_last = txt_curr; + + txt_curr->length = substr_len; + txt_curr->txt = malloc (substr_len + 1/* Including null byte */); + if (txt_curr->txt == NULL) + { + status = ARES_ENOMEM; + break; + } + memcpy ((char *) txt_curr->txt, strptr, substr_len); + + /* Make sure we NULL-terminate */ + txt_curr->txt[substr_len] = 0; - /* Step through the list of substrings, concatenating them */ - str_len = 0; - strptr = aptr; - while (strptr < (aptr + rr_len)) - { - substr_len = (unsigned char)*strptr; - strptr++; - memcpy ((char *) txt_curr->txt + str_len, strptr, substr_len); - str_len += substr_len; strptr += substr_len; } - /* Make sure we NULL-terminate */ - *((char *) txt_curr->txt + txt_curr->length) = '\0'; } /* Don't lose memory in the next iteration */ diff --git a/ares_parse_txt_reply.pdf b/ares_parse_txt_reply.pdf Binary files differindex ef3e2b9..26401df 100644 --- a/ares_parse_txt_reply.pdf +++ b/ares_parse_txt_reply.pdf diff --git a/ares_private.h b/ares_private.h index ff45ba7..ab5be5a 100644 --- a/ares_private.h +++ b/ares_private.h @@ -26,9 +26,6 @@ #define WIN32 #endif -#include <stdio.h> -#include <sys/types.h> - #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif @@ -40,10 +37,6 @@ #define HAVE_WRITEV 1 #endif -#ifdef NETWARE -#include <time.h> -#endif - #define DEFAULT_TIMEOUT 5000 /* milliseconds */ #define DEFAULT_TRIES 4 #ifndef INADDR_NONE @@ -113,6 +106,13 @@ # define writev(s,ptr,cnt) ares_writev(s,ptr,cnt) #endif +/********* EDNS defines section ******/ +#define EDNSPACKETSZ 1280 /* Reasonable UDP payload size, as suggested + in RFC2671 */ +#define MAXENDSSZ 4096 /* Maximum (local) limit for edns packet size */ +#define EDNSFIXEDSZ 11 /* Size of EDNS header */ +/********* EDNS defines section ******/ + struct ares_addr { int family; union { @@ -260,6 +260,7 @@ struct ares_channeldata { struct apattern *sortlist; int nsort; char *lookups; + int ednspsz; /* For binding to local devices and/or IP addresses. Leave * them null/zero for no binding. @@ -317,7 +318,6 @@ long ares__timeoffset(struct timeval *now, struct timeval *check); /* returns ARES_SUCCESS if library has been initialized */ int ares_library_initialized(void); -void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len); void ares__send_query(ares_channel channel, struct query *query, struct timeval *now); void ares__close_sockets(ares_channel channel, struct server_state *server); @@ -342,13 +342,14 @@ long ares__tvdiff(struct timeval t1, struct timeval t2); do { \ if ((c)->sock_state_cb) \ (c)->sock_state_cb((c)->sock_state_cb_data, (s), (r), (w)); \ - } while (0) + } WHILE_FALSE #ifdef CURLDEBUG /* This is low-level hard-hacking memory leak tracking and similar. Using the libcurl lowlevel code from within library is ugly and only works when c-ares is built and linked with a similarly curldebug-enabled libcurl, but we do this anyway for convenience. */ +#define HEADER_CURL_SETUP_ONCE_H #include "../lib/memdebug.h" #endif diff --git a/ares_process.c b/ares_process.c index e5efa5f..bbeca5e 100644 --- a/ares_process.c +++ b/ares_process.c @@ -1,6 +1,6 @@ /* Copyright 1998 by the Massachusetts Institute of Technology. - * Copyright (C) 2004-2010 by Daniel Stenberg + * Copyright (C) 2004-2013 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -17,9 +17,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_SYS_UIO_H # include <sys/uio.h> #endif @@ -41,16 +38,9 @@ # include <arpa/nameser_compat.h> #endif -#ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -#endif - #ifdef HAVE_STRINGS_H # include <strings.h> #endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif #ifdef HAVE_SYS_IOCTL_H # include <sys/ioctl.h> #endif @@ -59,10 +49,7 @@ #endif #include <assert.h> -#include <string.h> -#include <stdlib.h> #include <fcntl.h> -#include <time.h> #include "ares.h" #include "ares_dns.h" @@ -268,7 +255,7 @@ static void write_tcp_data(ares_channel channel, if (wcount < 0) { if (!try_again(SOCKERRNO)) - handle_error(channel, i, now); + handle_error(channel, i, now); continue; } @@ -284,7 +271,7 @@ static void write_tcp_data(ares_channel channel, if (scount < 0) { if (!try_again(SOCKERRNO)) - handle_error(channel, i, now); + handle_error(channel, i, now); continue; } @@ -356,11 +343,11 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds, } if(read_fds) - /* If there's an error and we close this socket, then open - * another with the same fd to talk to another server, then we - * don't want to think that it was the new socket that was - * ready. This is not disastrous, but is likely to result in - * extra system calls and confusion. */ + /* If there's an error and we close this socket, then open another + * with the same fd to talk to another server, then we don't want to + * think that it was the new socket that was ready. This is not + * disastrous, but is likely to result in extra system calls and + * confusion. */ FD_CLR(server->tcp_socket, read_fds); if (server->tcp_lenbuf_pos != 2) @@ -374,7 +361,7 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds, if (count <= 0) { if (!(count == -1 && try_again(SOCKERRNO))) - handle_error(channel, i, now); + handle_error(channel, i, now); continue; } @@ -401,7 +388,7 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds, if (count <= 0) { if (!(count == -1 && try_again(SOCKERRNO))) - handle_error(channel, i, now); + handle_error(channel, i, now); continue; } @@ -430,7 +417,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, struct server_state *server; int i; ssize_t count; - unsigned char buf[PACKETSZ + 1]; + unsigned char buf[MAXENDSSZ + 1]; #ifdef HAVE_RECVFROM ares_socklen_t fromlen; union { @@ -472,25 +459,31 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, /* To reduce event loop overhead, read and process as many * packets as we can. */ do { + if (server->udp_socket == ARES_SOCKET_BAD) + count = 0; + + else { #ifdef HAVE_RECVFROM - if (server->addr.family == AF_INET) - fromlen = sizeof(from.sa4); - else - fromlen = sizeof(from.sa6); - count = (ssize_t)recvfrom(server->udp_socket, (void *)buf, sizeof(buf), - 0, &from.sa, &fromlen); + if (server->addr.family == AF_INET) + fromlen = sizeof(from.sa4); + else + fromlen = sizeof(from.sa6); + count = (ssize_t)recvfrom(server->udp_socket, (void *)buf, + sizeof(buf), 0, &from.sa, &fromlen); #else - count = sread(server->udp_socket, buf, sizeof(buf)); + count = sread(server->udp_socket, buf, sizeof(buf)); #endif + } + if (count == -1 && try_again(SOCKERRNO)) continue; else if (count <= 0) handle_error(channel, i, now); #ifdef HAVE_RECVFROM else if (!same_address(&from.sa, &server->addr)) - /* The address the response comes from does not match - * the address we sent the request to. Someone may be - * attempting to perform a cache poisoning attack. */ + /* The address the response comes from does not match the address we + * sent the request to. Someone may be attempting to perform a cache + * poisoning attack. */ break; #endif else @@ -507,11 +500,10 @@ static void process_timeouts(ares_channel channel, struct timeval *now) struct list_node* list_head; struct list_node* list_node; - /* Process all the timeouts that have fired since the last time we - * processed timeouts. If things are going well, then we'll have - * hundreds/thousands of queries that fall into future buckets, and - * only a handful of requests that fall into the "now" bucket, so - * this should be quite quick. + /* Process all the timeouts that have fired since the last time we processed + * timeouts. If things are going well, then we'll have hundreds/thousands of + * queries that fall into future buckets, and only a handful of requests + * that fall into the "now" bucket, so this should be quite quick. */ for (t = channel->last_timeout_processed; t <= now->tv_sec; t++) { @@ -536,7 +528,7 @@ static void process_answer(ares_channel channel, unsigned char *abuf, int alen, int whichserver, int tcp, struct timeval *now) { - int tc, rcode; + int tc, rcode, packetsz; unsigned short id; struct query *query; struct list_node* list_head; @@ -553,11 +545,10 @@ static void process_answer(ares_channel channel, unsigned char *abuf, rcode = DNS_HEADER_RCODE(abuf); /* Find the query corresponding to this packet. The queries are - * hashed/bucketed by query id, so this lookup should be quick. - * Note that both the query id and the questions must be the same; - * when the query id wraps around we can have multiple outstanding - * queries with the same query id, so we need to check both the id and - * question. + * hashed/bucketed by query id, so this lookup should be quick. Note that + * both the query id and the questions must be the same; when the query id + * wraps around we can have multiple outstanding queries with the same query + * id, so we need to check both the id and question. */ query = NULL; list_head = &(channel->queries_by_qid[id % ARES_QID_TABLE_SIZE]); @@ -574,11 +565,34 @@ static void process_answer(ares_channel channel, unsigned char *abuf, if (!query) return; + packetsz = PACKETSZ; + /* If we use EDNS and server answers with one of these RCODES, the protocol + * extension is not understood by the responder. We must retry the query + * without EDNS enabled. + */ + if (channel->flags & ARES_FLAG_EDNS) + { + packetsz = channel->ednspsz; + if (rcode == NOTIMP || rcode == FORMERR || rcode == SERVFAIL) + { + int qlen = alen - EDNSFIXEDSZ; + channel->flags ^= ARES_FLAG_EDNS; + query->tcplen -= EDNSFIXEDSZ; + query->qlen -= EDNSFIXEDSZ; + query->tcpbuf[0] = (unsigned char)((qlen >> 8) & 0xff); + query->tcpbuf[1] = (unsigned char)(qlen & 0xff); + DNS_HEADER_SET_ARCOUNT(query->tcpbuf + 2, 0); + query->tcpbuf = realloc(query->tcpbuf, query->tcplen); + ares__send_query(channel, query, now); + return; + } + } + /* If we got a truncated UDP packet and are not ignoring truncation, * don't accept the packet, and switch the query to TCP if we hadn't * done so already. */ - if ((tc || alen > PACKETSZ) && !tcp && !(channel->flags & ARES_FLAG_IGNTC)) + if ((tc || alen > packetsz) && !tcp && !(channel->flags & ARES_FLAG_IGNTC)) { if (!query->using_tcp) { @@ -591,8 +605,8 @@ static void process_answer(ares_channel channel, unsigned char *abuf, /* Limit alen to PACKETSZ if we aren't using TCP (only relevant if we * are ignoring truncation. */ - if (alen > PACKETSZ && !tcp) - alen = PACKETSZ; + if (alen > packetsz && !tcp) + alen = packetsz; /* If we aren't passing through all error packets, discard packets * with SERVFAIL, NOTIMP, or REFUSED response codes. @@ -626,6 +640,31 @@ static void process_broken_connections(ares_channel channel, } } +/* Swap the contents of two lists */ +static void swap_lists(struct list_node* head_a, + struct list_node* head_b) +{ + int is_a_empty = ares__is_list_empty(head_a); + int is_b_empty = ares__is_list_empty(head_b); + struct list_node old_a = *head_a; + struct list_node old_b = *head_b; + + if (is_a_empty) { + ares__init_list_head(head_b); + } else { + *head_b = old_a; + old_a.next->prev = head_b; + old_a.prev->next = head_b; + } + if (is_b_empty) { + ares__init_list_head(head_a); + } else { + *head_a = old_b; + old_b.next->prev = head_a; + old_b.prev->next = head_a; + } +} + static void handle_error(ares_channel channel, int whichserver, struct timeval *now) { @@ -639,15 +678,14 @@ static void handle_error(ares_channel channel, int whichserver, /* Reset communications with this server. */ ares__close_sockets(channel, server); - /* Tell all queries talking to this server to move on and not try - * this server again. We steal the current list of queries that were - * in-flight to this server, since when we call next_server this can - * cause the queries to be re-sent to this server, which will - * re-insert these queries in that same server->queries_to_server - * list. + /* Tell all queries talking to this server to move on and not try this + * server again. We steal the current list of queries that were in-flight to + * this server, since when we call next_server this can cause the queries to + * be re-sent to this server, which will re-insert these queries in that + * same server->queries_to_server list. */ ares__init_list_head(&list_head); - ares__swap_lists(&list_head, &(server->queries_to_server)); + swap_lists(&list_head, &(server->queries_to_server)); for (list_node = list_head.next; list_node != &list_head; ) { query = list_node->data; @@ -663,14 +701,15 @@ static void handle_error(ares_channel channel, int whichserver, } static void skip_server(ares_channel channel, struct query *query, - int whichserver) { - /* The given server gave us problems with this query, so if we have - * the luxury of using other servers, then let's skip the - * potentially broken server and just use the others. If we only - * have one server and we need to retry then we should just go ahead - * and re-use that server, since it's our only hope; perhaps we - * just got unlucky, and retrying will work (eg, the server timed - * out our TCP connection just as we were sending another request). + int whichserver) +{ + /* The given server gave us problems with this query, so if we have the + * luxury of using other servers, then let's skip the potentially broken + * server and just use the others. If we only have one server and we need to + * retry then we should just go ahead and re-use that server, since it's our + * only hope; perhaps we just got unlucky, and retrying will work (eg, the + * server timed out our TCP connection just as we were sending another + * request). */ if (channel->nservers > 1) { @@ -693,11 +732,10 @@ static void next_server(ares_channel channel, struct query *query, query->server = (query->server + 1) % channel->nservers; server = &channel->servers[query->server]; - /* We don't want to use this server if (1) we decided this - * connection is broken, and thus about to be closed, (2) - * we've decided to skip this server because of earlier - * errors we encountered, or (3) we already sent this query - * over this exact connection. + /* We don't want to use this server if (1) we decided this connection is + * broken, and thus about to be closed, (2) we've decided to skip this + * server because of earlier errors we encountered, or (3) we already + * sent this query over this exact connection. */ if (!server->is_broken && !query->server_info[query->server].skip_server && @@ -709,11 +747,11 @@ static void next_server(ares_channel channel, struct query *query, return; } - /* You might think that with TCP we only need one try. However, - * even when using TCP, servers can time-out our connection just - * as we're sending a request, or close our connection because - * they die, or never send us a reply because they get wedged or - * tickle a bug that drops our request. + /* You might think that with TCP we only need one try. However, even + * when using TCP, servers can time-out our connection just as we're + * sending a request, or close our connection because they die, or never + * send us a reply because they get wedged or tickle a bug that drops + * our request. */ } @@ -749,11 +787,11 @@ void ares__send_query(ares_channel channel, struct query *query, end_query(channel, query, ARES_ENOMEM, NULL, 0); return; } - /* To make the common case fast, we avoid copies by using the - * query's tcpbuf for as long as the query is alive. In the rare - * case where the query ends while it's queued for transmission, - * then we give the sendreq its own copy of the request packet - * and put it in sendreq->data_storage. + /* To make the common case fast, we avoid copies by using the query's + * tcpbuf for as long as the query is alive. In the rare case where the + * query ends while it's queued for transmission, then we give the + * sendreq its own copy of the request packet and put it in + * sendreq->data_storage. */ sendreq->data_storage = NULL; sendreq->data = query->tcpbuf; @@ -837,30 +875,29 @@ static int setsocknonblock(ares_socket_t sockfd, /* operate on this */ #elif defined(HAVE_IOCTL_FIONBIO) /* older unix versions */ - int flags; - flags = nonblock; + int flags = nonblock ? 1 : 0; return ioctl(sockfd, FIONBIO, &flags); #elif defined(HAVE_IOCTLSOCKET_FIONBIO) #ifdef WATT32 - char flags; + char flags = nonblock ? 1 : 0; #else /* Windows */ - unsigned long flags; + unsigned long flags = nonblock ? 1UL : 0UL; #endif - flags = nonblock; return ioctlsocket(sockfd, FIONBIO, &flags); #elif defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO) /* Amiga */ - return IoctlSocket(sockfd, FIONBIO, (long)nonblock); + long flags = nonblock ? 1L : 0L; + return IoctlSocket(sockfd, FIONBIO, flags); #elif defined(HAVE_SETSOCKOPT_SO_NONBLOCK) /* BeOS */ - long b = nonblock ? 1 : 0; + long b = nonblock ? 1L : 0L; return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); #else @@ -917,10 +954,12 @@ static int configure_socket(ares_socket_t s, int family, ares_channel channel) } } else if (family == AF_INET6) { - if (memcmp(channel->local_ip6, &ares_in6addr_any, sizeof(channel->local_ip6)) != 0) { + if (memcmp(channel->local_ip6, &ares_in6addr_any, + sizeof(channel->local_ip6)) != 0) { memset(&local.sa6, 0, sizeof(local.sa6)); local.sa6.sin6_family = AF_INET6; - memcpy(&local.sa6.sin6_addr, channel->local_ip6, sizeof(channel->local_ip6)); + memcpy(&local.sa6.sin6_addr, channel->local_ip6, + sizeof(channel->local_ip6)); if (bind(s, &local.sa, sizeof(local.sa6)) < 0) return -1; } @@ -947,7 +986,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) salen = sizeof(saddr.sa4); memset(sa, 0, salen); saddr.sa4.sin_family = AF_INET; - saddr.sa4.sin_port = (unsigned short)(channel->tcp_port & 0xffff); + saddr.sa4.sin_port = aresx_sitous(channel->tcp_port); memcpy(&saddr.sa4.sin_addr, &server->addr.addrV4, sizeof(server->addr.addrV4)); break; @@ -956,7 +995,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) salen = sizeof(saddr.sa6); memset(sa, 0, salen); saddr.sa6.sin6_family = AF_INET6; - saddr.sa6.sin6_port = (unsigned short)(channel->tcp_port & 0xffff); + saddr.sa6.sin6_port = aresx_sitous(channel->tcp_port); memcpy(&saddr.sa6.sin6_addr, &server->addr.addrV6, sizeof(server->addr.addrV6)); break; @@ -1039,7 +1078,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) salen = sizeof(saddr.sa4); memset(sa, 0, salen); saddr.sa4.sin_family = AF_INET; - saddr.sa4.sin_port = (unsigned short)(channel->udp_port & 0xffff); + saddr.sa4.sin_port = aresx_sitous(channel->udp_port); memcpy(&saddr.sa4.sin_addr, &server->addr.addrV4, sizeof(server->addr.addrV4)); break; @@ -1048,7 +1087,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) salen = sizeof(saddr.sa6); memset(sa, 0, salen); saddr.sa6.sin6_family = AF_INET6; - saddr.sa6.sin6_port = (unsigned short)(channel->udp_port & 0xffff); + saddr.sa6.sin6_port = aresx_sitous(channel->udp_port); memcpy(&saddr.sa6.sin6_addr, &server->addr.addrV6, sizeof(server->addr.addrV6)); break; @@ -1223,19 +1262,17 @@ static void end_query (ares_channel channel, struct query *query, int status, assert(sendreq->data_storage == NULL); if (status == ARES_SUCCESS) { - /* We got a reply for this query, but this queued - * sendreq points into this soon-to-be-gone query's - * tcpbuf. Probably this means we timed out and queued - * the query for retransmission, then received a - * response before actually retransmitting. This is - * perfectly fine, so we want to keep the connection - * running smoothly if we can. But in the worst case - * we may have sent only some prefix of the query, - * with some suffix of the query left to send. Also, - * the buffer may be queued on multiple queues. To - * prevent dangling pointers to the query's tcpbuf and - * handle these cases, we just give such sendreqs - * their own copy of the query packet. + /* We got a reply for this query, but this queued sendreq + * points into this soon-to-be-gone query's tcpbuf. Probably + * this means we timed out and queued the query for + * retransmission, then received a response before actually + * retransmitting. This is perfectly fine, so we want to keep + * the connection running smoothly if we can. But in the worst + * case we may have sent only some prefix of the query, with + * some suffix of the query left to send. Also, the buffer may + * be queued on multiple queues. To prevent dangling pointers + * to the query's tcpbuf and handle these cases, we just give + * such sendreqs their own copy of the query packet. */ sendreq->data_storage = malloc(sendreq->len); if (sendreq->data_storage != NULL) @@ -1246,14 +1283,12 @@ static void end_query (ares_channel channel, struct query *query, int status, } if ((status != ARES_SUCCESS) || (sendreq->data_storage == NULL)) { - /* We encountered an error (probably a timeout, - * suggesting the DNS server we're talking to is - * probably unreachable, wedged, or severely - * overloaded) or we couldn't copy the request, so - * mark the connection as broken. When we get to - * process_broken_connections() we'll close the - * connection and try to re-send requests to another - * server. + /* We encountered an error (probably a timeout, suggesting the + * DNS server we're talking to is probably unreachable, + * wedged, or severely overloaded) or we couldn't copy the + * request, so mark the connection as broken. When we get to + * process_broken_connections() we'll close the connection and + * try to re-send requests to another server. */ server->is_broken = 1; /* Just to be paranoid, zero out this sendreq... */ @@ -1267,8 +1302,8 @@ static void end_query (ares_channel channel, struct query *query, int status, query->callback(query->arg, status, query->timeouts, abuf, alen); ares__free_query(query); - /* Simple cleanup policy: if no queries are remaining, close all - * network sockets unless STAYOPEN is set. + /* Simple cleanup policy: if no queries are remaining, close all network + * sockets unless STAYOPEN is set. */ if (!(channel->flags & ARES_FLAG_STAYOPEN) && ares__is_list_empty(&(channel->all_queries))) diff --git a/ares_process.pdf b/ares_process.pdf Binary files differindex 624dbb4..d71efff 100644 --- a/ares_process.pdf +++ b/ares_process.pdf diff --git a/ares_query.3 b/ares_query.3 index 0c5df84..733fbc9 100644 --- a/ares_query.3 +++ b/ares_query.3 @@ -118,6 +118,9 @@ No name servers could be contacted. .B ARES_ENOMEM Memory was exhausted. .TP 19 +.B ARES_ECANCELLED +The query was cancelled. +.TP 19 .B ARES_EDESTRUCTION The name service channel .I channel diff --git a/ares_query.c b/ares_query.c index 63652e2..4bc9c25 100644 --- a/ares_query.c +++ b/ares_query.c @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -31,7 +28,6 @@ # include <arpa/nameser_compat.h> #endif -#include <stdlib.h> #include "ares.h" #include "ares_dns.h" #include "ares_private.h" @@ -43,7 +39,7 @@ struct qquery { static void qcallback(void *arg, int status, int timeouts, unsigned char *abuf, int alen); -void ares__rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len) +static void rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len) { unsigned char x; unsigned char y; @@ -105,6 +101,13 @@ static unsigned short generate_unique_id(ares_channel channel) return (unsigned short)id; } +unsigned short ares__generate_new_id(rc4_key* key) +{ + unsigned short r=0; + rc4(key, (unsigned char *)&r, sizeof(r)); + return r; +} + void ares_query(ares_channel channel, const char *name, int dnsclass, int type, ares_callback callback, void *arg) { @@ -114,8 +117,8 @@ void ares_query(ares_channel channel, const char *name, int dnsclass, /* Compose the query. */ rd = !(channel->flags & ARES_FLAG_NORECURSE); - status = ares_mkquery(name, dnsclass, type, channel->next_id, rd, &qbuf, - &qlen); + status = ares_create_query(name, dnsclass, type, channel->next_id, rd, &qbuf, + &qlen, (channel->flags & ARES_FLAG_EDNS) ? channel->ednspsz : 0); if (status != ARES_SUCCESS) { if (qbuf != NULL) free(qbuf); diff --git a/ares_query.pdf b/ares_query.pdf Binary files differindex 1a704e2..c229a7a 100644 --- a/ares_query.pdf +++ b/ares_query.pdf diff --git a/ares_save_options.pdf b/ares_save_options.pdf Binary files differindex 4e9f82f..fd96a14 100644 --- a/ares_save_options.pdf +++ b/ares_save_options.pdf diff --git a/ares_search.3 b/ares_search.3 index 4184b00..2c85d20 100644 --- a/ares_search.3 +++ b/ares_search.3 @@ -119,6 +119,9 @@ No name servers could be contacted. .B ARES_ENOMEM Memory was exhausted. .TP 19 +.B ARES_ECANCELLED +The query was cancelled. +.TP 19 .B ARES_EDESTRUCTION The name service channel .I channel diff --git a/ares_search.c b/ares_search.c index 1877c19..ec07640 100644 --- a/ares_search.c +++ b/ares_search.c @@ -16,11 +16,6 @@ #include "ares_setup.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> - #ifdef HAVE_STRINGS_H # include <strings.h> #endif diff --git a/ares_search.pdf b/ares_search.pdf Binary files differindex 5b5866e..ef6fe99 100644 --- a/ares_search.pdf +++ b/ares_search.pdf diff --git a/ares_send.3 b/ares_send.3 index 48d90ab..b89abfe 100644 --- a/ares_send.3 +++ b/ares_send.3 @@ -73,6 +73,9 @@ No name servers could be contacted. .B ARES_ENOMEM Memory was exhausted. .TP 19 +.B ARES_ECANCELLED +The query was cancelled. +.TP 19 .B ARES_EDESTRUCTION The name service channel .I channel diff --git a/ares_send.c b/ares_send.c index 37b0704..1a450b1 100644 --- a/ares_send.c +++ b/ares_send.c @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -31,9 +28,6 @@ # include <arpa/nameser_compat.h> #endif -#include <stdlib.h> -#include <string.h> -#include <time.h> #include "ares.h" #include "ares_dns.h" #include "ares_private.h" @@ -42,7 +36,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, ares_callback callback, void *arg) { struct query *query; - int i; + int i, packetsz; struct timeval now; /* Verify that the query is at least long enough to hold the header. */ @@ -77,7 +71,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, } /* Compute the query ID. Start with no timeout. */ - query->qid = (unsigned short)DNS_HEADER_QID(qbuf); + query->qid = DNS_HEADER_QID(qbuf); query->timeout.tv_sec = 0; query->timeout.tv_usec = 0; @@ -109,7 +103,10 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, query->server_info[i].skip_server = 0; query->server_info[i].tcp_connection_generation = 0; } - query->using_tcp = (channel->flags & ARES_FLAG_USEVC) || qlen > PACKETSZ; + + packetsz = (channel->flags & ARES_FLAG_EDNS) ? channel->ednspsz : PACKETSZ; + query->using_tcp = (channel->flags & ARES_FLAG_USEVC) || qlen > packetsz; + query->error_status = ARES_ECONNREFUSED; query->timeouts = 0; diff --git a/ares_send.pdf b/ares_send.pdf Binary files differindex 7b8bd4a..f243293 100644 --- a/ares_send.pdf +++ b/ares_send.pdf diff --git a/ares_set_servers.pdf b/ares_set_servers.pdf Binary files differindex ad8eca3..a4c51be 100644 --- a/ares_set_servers.pdf +++ b/ares_set_servers.pdf diff --git a/ares_set_socket_callback.pdf b/ares_set_socket_callback.pdf Binary files differindex ec27bd8..de125a4 100644 --- a/ares_set_socket_callback.pdf +++ b/ares_set_socket_callback.pdf diff --git a/ares_setup.h b/ares_setup.h index a46c510..4df7961 100644 --- a/ares_setup.h +++ b/ares_setup.h @@ -2,7 +2,7 @@ #define HEADER_CARES_SETUP_H -/* Copyright (C) 2004 - 2009 by Daniel Stenberg et al +/* Copyright (C) 2004 - 2012 by Daniel Stenberg et al * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided @@ -157,6 +157,18 @@ #endif /* HAVE_CONFIG_H */ +/* + * Arg 2 type for gethostname in case it hasn't been defined in config file. + */ + +#ifndef GETHOSTNAME_TYPE_ARG2 +# ifdef USE_WINSOCK +# define GETHOSTNAME_TYPE_ARG2 int +# else +# define GETHOSTNAME_TYPE_ARG2 size_t +# endif +#endif + #ifdef __POCC__ # include <sys/types.h> # include <unistd.h> @@ -164,6 +176,14 @@ #endif /* + * Android does have the arpa/nameser.h header which is detected by configure + * but it appears to be empty with recent NDK r7b / r7c, so we undefine here. + */ +#if (defined(ANDROID) || defined(__ANDROID__)) && defined(HAVE_ARPA_NAMESER_H) +# undef HAVE_ARPA_NAMESER_H +#endif + +/* * Recent autoconf versions define these symbols in ares_config.h. We don't * want them (since they collide with the libcurl ones when we build * --enable-debug) so we undef them again here. diff --git a/ares_strerror.pdf b/ares_strerror.pdf Binary files differindex a81b319..60a617a 100644 --- a/ares_strerror.pdf +++ b/ares_strerror.pdf diff --git a/ares_timeout.3 b/ares_timeout.3 index cffbc2e..acf8f74 100644 --- a/ares_timeout.3 +++ b/ares_timeout.3 @@ -15,7 +15,7 @@ .\" .TH ARES_TIMEOUT 3 "25 July 1998" .SH NAME -ares_fds \- Get file descriptors to select on for name service +ares_timeout \- return maximum time to wait .SH SYNOPSIS .nf .B #include <ares.h> diff --git a/ares_timeout.c b/ares_timeout.c index 2da4f5f..0b5a435 100644 --- a/ares_timeout.c +++ b/ares_timeout.c @@ -16,12 +16,10 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> +#ifdef HAVE_LIMITS_H +#include <limits.h> #endif -#include <time.h> - #include "ares.h" #include "ares_private.h" @@ -62,19 +60,22 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, min_offset = offset; } - if(min_offset != -1) { - nextstop.tv_sec = min_offset/1000; - nextstop.tv_usec = (min_offset%1000)*1000; - } - /* If we found a minimum timeout and it's sooner than the one specified in * maxtv (if any), return it. Otherwise go with maxtv. */ - if (min_offset != -1 && (!maxtv || ares__timedout(maxtv, &nextstop))) + if (min_offset != -1) { - *tvbuf = nextstop; - return tvbuf; + int ioffset = (min_offset > (long)INT_MAX) ? INT_MAX : (int)min_offset; + + nextstop.tv_sec = ioffset/1000; + nextstop.tv_usec = (ioffset%1000)*1000; + + if (!maxtv || ares__timedout(maxtv, &nextstop)) + { + *tvbuf = nextstop; + return tvbuf; + } } - else - return maxtv; + + return maxtv; } diff --git a/ares_timeout.pdf b/ares_timeout.pdf Binary files differindex b6bda91..379c14a 100644 --- a/ares_timeout.pdf +++ b/ares_timeout.pdf diff --git a/ares_version.h b/ares_version.h index 50eb638..ef8d230 100644 --- a/ares_version.h +++ b/ares_version.h @@ -3,15 +3,15 @@ #define ARES__VERSION_H /* This is the global package copyright */ -#define ARES_COPYRIGHT "2004 - 2010 Daniel Stenberg, <daniel@haxx.se>." +#define ARES_COPYRIGHT "2004 - 2013 Daniel Stenberg, <daniel@haxx.se>." #define ARES_VERSION_MAJOR 1 -#define ARES_VERSION_MINOR 7 -#define ARES_VERSION_PATCH 5 +#define ARES_VERSION_MINOR 10 +#define ARES_VERSION_PATCH 0 #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ (ARES_VERSION_MINOR<<8)|\ (ARES_VERSION_PATCH)) -#define ARES_VERSION_STR "1.7.5" +#define ARES_VERSION_STR "1.10.0" #if (ARES_VERSION >= 0x010700) # define CARES_HAVE_ARES_LIBRARY_INIT 1 diff --git a/ares_version.pdf b/ares_version.pdf Binary files differindex e5ed36b..742f9d0 100644 --- a/ares_version.pdf +++ b/ares_version.pdf @@ -33,27 +33,27 @@ * author: * Paul Vixie (ISC), June 1996 */ -int -ares_bitncmp(const void *l, const void *r, int n) { - unsigned int lb, rb; - int x, b; +int ares__bitncmp(const void *l, const void *r, int n) +{ + unsigned int lb, rb; + int x, b; - b = n / 8; - x = memcmp(l, r, b); - if (x || (n % 8) == 0) - return (x); + b = n / 8; + x = memcmp(l, r, b); + if (x || (n % 8) == 0) + return (x); - lb = ((const unsigned char *)l)[b]; - rb = ((const unsigned char *)r)[b]; - for (b = n % 8; b > 0; b--) { - if ((lb & 0x80) != (rb & 0x80)) { - if (lb & 0x80) - return (1); - return (-1); - } - lb <<= 1; - rb <<= 1; - } - return (0); + lb = ((const unsigned char *)l)[b]; + rb = ((const unsigned char *)r)[b]; + for (b = n % 8; b > 0; b--) { + if ((lb & 0x80) != (rb & 0x80)) { + if (lb & 0x80) + return (1); + return (-1); + } + lb <<= 1; + rb <<= 1; + } + return (0); } #endif @@ -2,7 +2,7 @@ #define __ARES_BITNCMP_H -/* Copyright (C) 2005 by Dominick Meglio +/* Copyright (C) 2005, 2013 by Dominick Meglio * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -18,9 +18,9 @@ */ #ifndef HAVE_BITNCMP -int ares_bitncmp(const void *l, const void *r, int n); +int ares__bitncmp(const void *l, const void *r, int n); #else -#define ares_bitncmp(x,y,z) bitncmp(x,y,z) +#define ares__bitncmp(x,y,z) bitncmp(x,y,z) #endif #endif /* __ARES_BITNCMP_H */ @@ -1,12 +1,28 @@ #!/bin/sh #-------------------------------------------------------------------------- +# die prints argument string to stdout and exits this shell script. +# +die(){ + echo "buildconf: $@" + exit 1 +} + +#-------------------------------------------------------------------------- # findtool works as 'which' but we use a different name to make it more # obvious we aren't using 'which'! ;-) # findtool(){ file="$1" + if { echo "$file" | grep "/" >/dev/null 2>&1; } then + # when file is given with a path check it first + if test -f "$file"; then + echo "$file" + return + fi + fi + old_IFS=$IFS; IFS=':' for path in $PATH do @@ -51,21 +67,89 @@ if test ! -f configure.ac || fi #-------------------------------------------------------------------------- -# this approach that tries 'glibtool' first is some kind of work-around for -# some BSD-systems I believe that use to provide the GNU libtool named -# glibtool, with 'libtool' being something completely different. +# GNU libtool preliminary check +# +want_lt_major=1 +want_lt_minor=4 +want_lt_patch=2 +want_lt_version=1.4.2 + +# This approach that tries 'glibtool' first is intended for systems that +# have GNU libtool named as 'glibtool' and libtool not being GNU's. + libtool=`findtool glibtool 2>/dev/null` if test ! -x "$libtool"; then libtool=`findtool ${LIBTOOL:-libtool}` fi +if test -z "$libtool"; then + echo "buildconf: libtool not found." + echo " You need GNU libtool $want_lt_version or newer installed." + exit 1 +fi +lt_pver=`$libtool --version 2>/dev/null|head -n 1` +lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"` +lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"` +if test -z "$lt_version"; then + echo "buildconf: libtool not found." + echo " You need GNU libtool $want_lt_version or newer installed." + exit 1 +fi +old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS +lt_major=$1 +lt_minor=$2 +lt_patch=$3 + +if test -z "$lt_major"; then + lt_status="bad" +elif test "$lt_major" -gt "$want_lt_major"; then + lt_status="good" +elif test "$lt_major" -lt "$want_lt_major"; then + lt_status="bad" +elif test -z "$lt_minor"; then + lt_status="bad" +elif test "$lt_minor" -gt "$want_lt_minor"; then + lt_status="good" +elif test "$lt_minor" -lt "$want_lt_minor"; then + lt_status="bad" +elif test -z "$lt_patch"; then + lt_status="bad" +elif test "$lt_patch" -gt "$want_lt_patch"; then + lt_status="good" +elif test "$lt_patch" -lt "$want_lt_patch"; then + lt_status="bad" +else + lt_status="good" +fi +if test "$lt_status" != "good"; then + echo "buildconf: libtool version $lt_version found." + echo " You need GNU libtool $want_lt_version or newer installed." + exit 1 +fi + +#-------------------------------------------------------------------------- +# GNU libtoolize check +# if test -z "$LIBTOOLIZE"; then - # set the LIBTOOLIZE here so that glibtoolize is used if glibtool was found - # $libtool is already the full path + # use (g)libtoolize from same location as (g)libtool libtoolize="${libtool}ize" else libtoolize=`findtool $LIBTOOLIZE` fi +if test ! -f "$libtoolize"; then + echo "buildconf: libtoolize not found." + echo " You need GNU libtoolize $want_lt_version or newer installed." + exit 1 +fi + +#-------------------------------------------------------------------------- +# perl check +# +PERL=`findtool ${PERL:-perl}` +if test -z "$PERL"; then + echo "buildconf: perl not found" + exit 1 +fi #-------------------------------------------------------------------------- # Remove files generated on previous buildconf/configure run. @@ -95,6 +179,7 @@ for fname in .deps \ libcares.pc \ libtool \ libtool.m4 \ + libtool.m4.tmp \ ltmain.sh \ ltoptions.m4 \ ltsugar.m4 \ @@ -110,8 +195,113 @@ done # run the correct scripts now # -${libtoolize} --copy --automake --force -${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS -${AUTOHEADER:-autoheader} -${AUTOCONF:-autoconf} -${AUTOMAKE:-automake} --add-missing --copy +echo "buildconf: running libtoolize" +${libtoolize} --copy --automake --force || die "libtoolize command failed" + +# When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4 +# subdirectory and this local copy is patched to fix some warnings that +# are triggered when running aclocal and using autoconf 2.62 or later. + +if test "$lt_major" = "1" && test "$lt_minor" = "5"; then + if test -z "$lt_patch" || test "$lt_patch" -lt "26"; then + echo "buildconf: copying libtool.m4 to local m4 subdir" + ac_dir=`${ACLOCAL:-aclocal} --print-ac-dir` + if test -f $ac_dir/libtool.m4; then + cp -f $ac_dir/libtool.m4 m4/libtool.m4 + else + echo "buildconf: $ac_dir/libtool.m4 not found" + fi + if test -f m4/libtool.m4; then + echo "buildconf: renaming some variables in local m4/libtool.m4" + $PERL -i.tmp -pe \ + 's/lt_prog_compiler_pic_works/lt_cv_prog_compiler_pic_works/g; \ + s/lt_prog_compiler_static_works/lt_cv_prog_compiler_static_works/g;' \ + m4/libtool.m4 + rm -f m4/libtool.m4.tmp + fi + fi +fi + +if test -f m4/libtool.m4; then + echo "buildconf: converting all mv to mv -f in local m4/libtool.m4" + $PERL -i.tmp -pe 's/\bmv +([^-\s])/mv -f $1/g' m4/libtool.m4 + rm -f m4/libtool.m4.tmp +fi + +echo "buildconf: running aclocal" +${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "aclocal command failed" + +echo "buildconf: converting all mv to mv -f in local aclocal.m4" +$PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4 + +echo "buildconf: running autoheader" +${AUTOHEADER:-autoheader} || die "autoheader command failed" + +echo "buildconf: running autoconf" +${AUTOCONF:-autoconf} || die "autoconf command failed" + +echo "buildconf: running automake" +${AUTOMAKE:-automake} --add-missing --copy || die "automake command failed" + +#-------------------------------------------------------------------------- +# GNU libtool complementary check +# +# Depending on the libtool and automake versions being used, config.guess +# might not be installed in the subdirectory until automake has finished. +# So we can not attempt to use it until this very last buildconf stage. +# +if test ! -f ./config.guess; then + echo "buildconf: config.guess not found" +else + buildhost=`./config.guess 2>/dev/null|head -n 1` + case $buildhost in + *-*-darwin*) + need_lt_major=1 + need_lt_minor=5 + need_lt_patch=26 + need_lt_check="yes" + ;; + *-*-hpux*) + need_lt_major=1 + need_lt_minor=5 + need_lt_patch=24 + need_lt_check="yes" + ;; + esac + if test ! -z "$need_lt_check"; then + if test -z "$lt_major"; then + lt_status="bad" + elif test "$lt_major" -gt "$need_lt_major"; then + lt_status="good" + elif test "$lt_major" -lt "$need_lt_major"; then + lt_status="bad" + elif test -z "$lt_minor"; then + lt_status="bad" + elif test "$lt_minor" -gt "$need_lt_minor"; then + lt_status="good" + elif test "$lt_minor" -lt "$need_lt_minor"; then + lt_status="bad" + elif test -z "$lt_patch"; then + lt_status="bad" + elif test "$lt_patch" -gt "$need_lt_patch"; then + lt_status="good" + elif test "$lt_patch" -lt "$need_lt_patch"; then + lt_status="bad" + else + lt_status="good" + fi + if test "$lt_status" != "good"; then + need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch" + echo "buildconf: libtool version $lt_version found." + echo " $buildhost requires GNU libtool $need_lt_version or newer installed." + rm -f configure + exit 1 + fi + fi +fi + +#-------------------------------------------------------------------------- +# Finished successfully. +# +echo "buildconf: OK" +exit 0 @@ -1,9 +1,10 @@ #! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. +# Wrapper for compilers which do not understand '-c -o'. -scriptversion=2005-05-14.22 +scriptversion=2012-03-05.13; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free +# Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -17,8 +18,7 @@ scriptversion=2005-05-14.22 # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -29,21 +29,219 @@ scriptversion=2005-05-14.22 # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. +right script to run: please start by reading the file 'INSTALL'. Report bugs to <bug-automake@gnu.org>. EOF @@ -53,11 +251,13 @@ EOF echo "compile $scriptversion" exit $? ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; esac ofile= cfile= -eat= for arg do @@ -66,8 +266,8 @@ do else case $1 in -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) @@ -94,22 +294,22 @@ do done if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a + # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also + # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name +# Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break @@ -124,9 +324,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15 ret=$? if test -f "$cofile"; then - mv "$cofile" "$ofile" + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" @@ -138,5 +338,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/config-dos.h b/config-dos.h index d15a177..f80ca2c 100644 --- a/config-dos.h +++ b/config-dos.h @@ -65,7 +65,7 @@ #if defined(__HIGHC__) || \ (defined(__GNUC__) && (__GNUC__ < 4)) -#define ssize_t int + #define ssize_t int #endif /* Target HAVE_x section */ @@ -86,13 +86,14 @@ #elif defined(__HIGHC__) #define HAVE_SYS_TIME_H 1 + #define strerror(e) strerror_s_((e)) #endif #ifdef WATT32 #define HAVE_AF_INET6 1 #define HAVE_ARPA_INET_H 1 #define HAVE_ARPA_NAMESER_H 1 - #define HAVE_CLOSESOCKET_CAMEL 1 + #define HAVE_CLOSE_S 1 #define HAVE_GETHOSTNAME 1 #define HAVE_NETDB_H 1 #define HAVE_NETINET_IN_H 1 @@ -106,7 +107,6 @@ #define HAVE_SYS_UIO_H 1 #define NS_INADDRSZ 4 #define HAVE_STRUCT_SOCKADDR_IN6 1 - #define CloseSocket(s) close_s((s)) #endif #undef word diff --git a/config-win32.h b/config-win32.h index 48ce512..1245ba2 100644 --- a/config-win32.h +++ b/config-win32.h @@ -365,5 +365,21 @@ #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 #endif +/* ---------------------------------------------------------------- */ +/* Win CE */ +/* ---------------------------------------------------------------- */ + +/* FIXME: A proper config-win32ce.h should be created to hold these */ + +/* + * System error codes for Windows CE + */ + +#if defined(_WIN32_WCE) && !defined(HAVE_ERRNO_H) +# define ENOENT ERROR_FILE_NOT_FOUND +# define ESRCH ERROR_PATH_NOT_FOUND +# define ENOMEM ERROR_NOT_ENOUGH_MEMORY +# define ENOSPC ERROR_INVALID_PARAMETER +#endif #endif /* HEADER_CARES_CONFIG_WIN32_H */ diff --git a/config.guess b/config.guess index 40eaed4..d622a44 100755 --- a/config.guess +++ b/config.guess @@ -2,9 +2,9 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ timestamp='2011-05-11' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -792,13 +790,12 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -807,6 +804,9 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -861,6 +861,13 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -895,13 +902,16 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -943,7 +953,7 @@ EOF test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -978,13 +988,13 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -1315,6 +1325,9 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -2,9 +2,9 @@ # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-03-23' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ timestamp='2011-03-23' # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -76,8 +74,8 @@ version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,6 +130,10 @@ case $maybe_os in os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -223,6 +225,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,17 +255,22 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -291,7 +304,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +313,7 @@ case $basic_machine in | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +328,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +341,10 @@ case $basic_machine in strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,11 +367,13 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -365,8 +382,10 @@ case $basic_machine in | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -400,7 +419,7 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +427,11 @@ case $basic_machine in | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +731,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -808,10 +827,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -1120,13 +1147,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1336,7 +1358,7 @@ case $os in | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1521,6 +1543,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1548,9 +1573,6 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout @@ -1,17 +1,257 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for c-ares 1.7.5. +# Generated by GNU Autoconf 2.69 for c-ares 1.10.0. # # Report bugs to <c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares>. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. + +## -------------------------------- ## +## XC_CONFIGURE_PREAMBLE ver: 1.0 ## +## -------------------------------- ## + +xc_configure_preamble_ver_major='1' +xc_configure_preamble_ver_minor='0' + +# +# Set IFS to space, tab and newline. +# + +xc_space=' ' +xc_tab=' ' +xc_newline=' +' +IFS="$xc_space$xc_tab$xc_newline" + +# +# Set internationalization behavior variables. +# + +LANG='C' +LC_ALL='C' +LANGUAGE='C' +export LANG +export LC_ALL +export LANGUAGE + +# +# Some useful variables. +# + +xc_msg_warn='configure: WARNING:' +xc_msg_abrt='Can not continue.' +xc_msg_err='configure: error:' + +# +# Verify that 'echo' command is available, otherwise abort. +# + +xc_tst_str='unknown' +(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + # Try built-in echo, and fail. + echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'test' command is available, otherwise abort. +# + +xc_tst_str='unknown' +(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'PATH' variable is set, otherwise abort. +# + +xc_tst_str='unknown' +(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'expr' command is available, otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null` +case "x$xc_tst_str" in # (( + x7) + : + ;; + *) + echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'sed' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | sed -e 's:unknown:success:' 2>/dev/null` +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'grep' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +(`echo "$xc_tst_str" 2>/dev/null \ + | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'tr' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10" +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | tr -d "0123456789$xc_tab" 2>/dev/null` +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'wc' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown unknown unknown unknown' +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null` +case "x$xc_tst_str" in # (( + x4) + : + ;; + *) + echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'cat' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`cat <<_EOT 2>/dev/null \ + | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null +unknown +unknown +unknown +_EOT` +case "x$xc_tst_str" in # (( + x3) + : + ;; + *) + echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set. +# + +# Directory count in 'PATH' when using a colon separator. +xc_tst_dirs_col='x' +xc_tst_prev_IFS=$IFS; IFS=':' +for xc_tst_dir in $PATH; do + IFS=$xc_tst_prev_IFS + xc_tst_dirs_col="x$xc_tst_dirs_col" +done +IFS=$xc_tst_prev_IFS +xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'` + +# Directory count in 'PATH' when using a semicolon separator. +xc_tst_dirs_sem='x' +xc_tst_prev_IFS=$IFS; IFS=';' +for xc_tst_dir in $PATH; do + IFS=$xc_tst_prev_IFS + xc_tst_dirs_sem="x$xc_tst_dirs_sem" +done +IFS=$xc_tst_prev_IFS +xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'` + +if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then + # When both counting methods give the same result we do not want to + # chose one over the other, and consider auto-detection not possible. + if test -z "$PATH_SEPARATOR"; then + # Stop dead until user provides 'PATH_SEPARATOR' definition. + echo "$xc_msg_err 'PATH_SEPARATOR' variable not set. $xc_msg_abrt" >&2 + exit 1 + fi +else + # Separator with the greater directory count is the auto-detected one. + if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then + xc_tst_auto_separator=';' + else + xc_tst_auto_separator=':' + fi + if test -z "$PATH_SEPARATOR"; then + # Simply use the auto-detected one when not already set. + PATH_SEPARATOR=$xc_tst_auto_separator + elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then + echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2 + fi +fi +xc_PATH_SEPARATOR=$PATH_SEPARATOR + +xc_configure_preamble_result='yes' + + ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## @@ -74,44 +314,6 @@ else fi - if test -z "$cares_cv_PATH_SEPARATOR"; then - if test -z "$PATH"; then - as_fn_error $? "PATH not set. Cannot continue without PATH being set." - fi - tst_dirs_col=0 - tst_save_IFS=$IFS; IFS=':' - for tst_dir in $PATH; do - IFS=$tst_save_IFS - test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1` - done - IFS=$tst_save_IFS - tst_dirs_sem=0 - tst_save_IFS=$IFS; IFS=';' - for tst_dir in $PATH; do - IFS=$tst_save_IFS - test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1` - done - IFS=$tst_save_IFS - if test $tst_dirs_sem -eq $tst_dirs_col; then - if test -z "$PATH_SEPARATOR"; then - as_fn_error $? "PATH_SEPARATOR not set. Cannot continue without it." - fi - else - if test $tst_dirs_sem -gt $tst_dirs_col; then - tst_auto_separator=';' - else - tst_auto_separator=':' - fi - if test -z "$PATH_SEPARATOR"; then - PATH_SEPARATOR="$tst_auto_separator" - fi - fi - cares_cv_PATH_SEPARATOR="$PATH_SEPARATOR" - fi - - - - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -166,6 +368,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -199,7 +426,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -252,21 +480,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -369,6 +601,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -490,6 +730,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -524,16 +768,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -545,28 +789,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -600,8 +824,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='c-ares' PACKAGE_TARNAME='c-ares' -PACKAGE_VERSION='1.7.5' -PACKAGE_STRING='c-ares 1.7.5' +PACKAGE_VERSION='1.10.0' +PACKAGE_STRING='c-ares 1.10.0' PACKAGE_BUGREPORT='c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares' PACKAGE_URL='' @@ -642,15 +866,29 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='LTLIBOBJS +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS LIBOBJS CARES_CFLAG_EXTRAS CARES_PRIVATE_LIBS +CFLAG_CARES_SYMBOL_HIDING +DOING_CARES_SYMBOL_HIDING_FALSE +DOING_CARES_SYMBOL_HIDING_TRUE RANDOM_FILE +DOING_NATIVE_WINDOWS_FALSE +DOING_NATIVE_WINDOWS_TRUE CURLDEBUG_FALSE CURLDEBUG_TRUE -NO_UNDEFINED_FALSE -NO_UNDEFINED_TRUE +CPPFLAG_CARES_STATICLIB +USE_CPPFLAG_CARES_STATICLIB_FALSE +USE_CPPFLAG_CARES_STATICLIB_TRUE +CARES_LT_SHLIB_USE_MIMPURE_TEXT_FALSE +CARES_LT_SHLIB_USE_MIMPURE_TEXT_TRUE +CARES_LT_SHLIB_USE_NO_UNDEFINED_FALSE +CARES_LT_SHLIB_USE_NO_UNDEFINED_TRUE +CARES_LT_SHLIB_USE_VERSION_INFO_FALSE +CARES_LT_SHLIB_USE_VERSION_INFO_TRUE OTOOL64 OTOOL LIPO @@ -669,31 +907,16 @@ LIBTOOL OBJDUMP DLLTOOL AS -CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build am__untar am__tar AMTAR @@ -701,6 +924,7 @@ am__leading_dot SET_MAKE AWK mkdir_p +MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh @@ -712,9 +936,26 @@ ACLOCAL VERSION PACKAGE CYGPATH_W +am__isrc +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build AR EGREP GREP @@ -759,7 +1000,6 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME SHELL -PATH PATH_SEPARATOR' ac_subst_files='' ac_user_opts=' @@ -1248,8 +1488,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1335,7 +1573,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures c-ares 1.7.5 to adapt to many kinds of systems. +\`configure' configures c-ares 1.10.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1405,7 +1643,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of c-ares 1.7.5:";; + short | recursive ) echo "Configuration of c-ares 1.10.0:";; esac cat <<\_ACEOF @@ -1442,7 +1680,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -1525,10 +1763,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -c-ares configure 1.7.5 -generated by GNU Autoconf 2.68 +c-ares configure 1.10.0 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1641,7 +1879,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1943,7 +2181,8 @@ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1958,7 +2197,8 @@ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1983,7 +2223,8 @@ $4 int main (void) { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1998,7 +2239,8 @@ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2031,7 +2273,8 @@ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2157,8 +2400,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by c-ares $as_me 1.7.5, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by c-ares $as_me 1.10.0, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2508,13 +2751,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # using cares-override.m4 ac_config_headers="$ac_config_headers ares_config.h ares_build.h" -: + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. @@ -2526,9 +2772,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } - - -if test $USE_MAINTAINER_MODE = yes; then + if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else @@ -2693,7 +2937,35 @@ $as_echo "yes" >&6; } esac +# +# Check that 'XC_CONFIGURE_PREAMBLE' has already run. +# + +if test -z "$xc_configure_preamble_result"; then + as_fn_error $? "xc_configure_preamble_result not set (internal problem)" "$LINENO" 5 +fi + +# +# Check that 'PATH_SEPARATOR' has already been set. +# +if test -z "$xc_PATH_SEPARATOR"; then + as_fn_error $? "xc_PATH_SEPARATOR not set (internal problem)" "$LINENO" 5 +fi +if test -z "$PATH_SEPARATOR"; then + as_fn_error $? "PATH_SEPARATOR not set (internal or config.site problem)" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for path separator" >&5 +$as_echo_n "checking for path separator... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_SEPARATOR" >&5 +$as_echo "$PATH_SEPARATOR" >&6; } +if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initial path separator" >&5 +$as_echo_n "checking for initial path separator... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_PATH_SEPARATOR" >&5 +$as_echo "$xc_PATH_SEPARATOR" >&6; } + as_fn_error $? "path separator mismatch (internal or config.site problem)" "$LINENO" 5 +fi # Extract the first word of "sed", so it can be a program name with args. @@ -2715,7 +2987,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2762,7 +3034,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2816,7 +3088,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2865,7 +3137,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2909,7 +3181,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2954,7 +3226,7 @@ if test -f ${srcdir}/ares_build.h; then rm -f ${srcdir}/ares_build.h fi -am__api_version="1.9" + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then @@ -2984,438 +3256,6 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='c-ares' - VERSION='1.7.5' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - - # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 @@ -3493,75 +3333,273 @@ cat >>confdefs.h <<_ACEOF _ACEOF -DEPDIR="${am__leading_dot}deps" -ac_config_commands="$ac_config_commands depfiles" + xc_prog_cc_prev_IFS=$IFS + xc_prog_cc_prev_LIBS=$LIBS + xc_prog_cc_prev_CFLAGS=$CFLAGS + xc_prog_cc_prev_LDFLAGS=$LDFLAGS + xc_prog_cc_prev_CPPFLAGS=$CPPFLAGS -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi + xc_bad_var_libs=no + for xc_word in $LIBS; do + case "$xc_word" in + -l* | --library=*) + : + ;; + *) + xc_bad_var_libs=yes + ;; + esac + done + if test $xc_bad_var_libs = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using LIBS: $LIBS" >&5 +$as_echo "$as_me: using LIBS: $LIBS" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS error: LIBS may only be used to specify libraries (-lname)." >&5 +$as_echo "$as_me: LIBS error: LIBS may only be used to specify libraries (-lname)." >&6;} + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi + xc_bad_var_ldflags=no + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_ldflags=yes + ;; + -U*) + xc_bad_var_ldflags=yes + ;; + -I*) + xc_bad_var_ldflags=yes + ;; + -l* | --library=*) + xc_bad_var_ldflags=yes + ;; + esac + done + if test $xc_bad_var_ldflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS: $LDFLAGS" >&5 +$as_echo "$as_me: using LDFLAGS: $LDFLAGS" >&6;} + xc_bad_var_msg="LDFLAGS error: LDFLAGS may only be used to specify linker flags, not" + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -U*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -I*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi + xc_bad_var_cppflags=no + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + xc_bad_var_cppflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cppflags=yes + ;; + -l* | --library=*) + xc_bad_var_cppflags=yes + ;; + esac + done + if test $xc_bad_var_cppflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS: $CPPFLAGS" >&5 +$as_echo "$as_me: using CPPFLAGS: $CPPFLAGS" >&6;} + xc_bad_var_msg="CPPFLAGS error: CPPFLAGS may only be used to specify C preprocessor flags, not" + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -L* | --library-path=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi -if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' + + xc_bad_var_cflags=no + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_cflags=yes + ;; + -U*) + xc_bad_var_cflags=yes + ;; + -I*) + xc_bad_var_cflags=yes + ;; + -rpath*) + xc_bad_var_cflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cflags=yes + ;; + -l* | --library=*) + xc_bad_var_cflags=yes + ;; + esac + done + if test $xc_bad_var_cflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5 +$as_echo "$as_me: using CFLAGS: $CFLAGS" >&6;} + xc_bad_var_msg="CFLAGS error: CFLAGS may only be used to specify C compiler flags, not" + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -U*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -I*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -rpath*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -L* | --library-path=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + if test $xc_bad_var_libs = yes || + test $xc_bad_var_cflags = yes || + test $xc_bad_var_ldflags = yes || + test $xc_bad_var_cppflags = yes; then + as_fn_error $? "Can not continue. Fix errors mentioned immediately above this line." "$LINENO" 5 + fi + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 else - AMDEP_TRUE='#' - AMDEP_FALSE= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - ac_save_CFLAGS="$CFLAGS" - ac_save_CPPFLAGS="$CPPFLAGS" - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -3583,7 +3621,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3623,7 +3661,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3676,7 +3714,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3717,7 +3755,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3775,7 +3813,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3819,7 +3857,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4258,8 +4296,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4343,118 +4380,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - - -if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - CFLAGS="$ac_save_CFLAGS" - CPPFLAGS="$ac_save_CPPFLAGS" - if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } @@ -4565,11 +4490,15 @@ $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC -ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then +am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. @@ -4579,8 +4508,6 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then fi - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4719,6 +4646,593 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + IFS=$xc_prog_cc_prev_IFS + LIBS=$xc_prog_cc_prev_LIBS + CFLAGS=$xc_prog_cc_prev_CFLAGS + LDFLAGS=$xc_prog_cc_prev_LDFLAGS + CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS + + + + + + +am__api_version='1.11' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='c-ares' + VERSION='1.10.0' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : @@ -4735,7 +5249,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4801,7 +5315,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -6047,6 +6561,8 @@ _ACEOF esac rm -rf conftest* fi + + fi @@ -6058,338 +6574,6 @@ $as_echo "#define ETC_INET 1" >>confdefs.h ;; esac -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)" >&5 -$as_echo_n "checking if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)... " >&6; } -case $host in - x86_64*linux*|amd64*freebsd*|ia64*freebsd*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - with_pic=yes - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is icc (to build with PIC)" >&5 -$as_echo_n "checking if compiler is icc (to build with PIC)... " >&6; } -case $CC in - icc | */icc) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - with_pic=yes - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -6398,8 +6582,8 @@ esac -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -6506,7 +6690,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -6585,7 +6769,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -6841,7 +7025,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6885,7 +7069,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7043,6 +7227,11 @@ else lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -7069,7 +7258,8 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else @@ -7082,7 +7272,7 @@ else # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -7304,7 +7494,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7344,7 +7534,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7467,10 +7657,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -7508,8 +7694,8 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -7647,7 +7833,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7687,7 +7873,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7787,7 +7973,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7831,7 +8017,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7955,7 +8141,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7995,7 +8181,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8054,7 +8240,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8094,7 +8280,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8144,13 +8330,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -8297,6 +8483,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -8399,7 +8586,7 @@ static const void *lt_preloaded_setup() { #endif _LT_EOF # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext + mv -f conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" @@ -8601,7 +8788,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" @@ -8684,7 +8878,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -8695,7 +8889,20 @@ sparc*-*solaris*) case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -8728,7 +8935,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8768,7 +8975,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8848,7 +9055,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8888,7 +9095,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8940,7 +9147,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8980,7 +9187,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9032,7 +9239,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9072,7 +9279,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9124,7 +9331,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9164,7 +9371,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9216,7 +9423,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9256,7 +9463,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9335,7 +9542,13 @@ else $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -9346,6 +9559,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -9377,6 +9591,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -9398,7 +9613,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -9585,11 +9802,418 @@ fi done +# ------------------------------------ # +# Determine libtool default behavior # +# ------------------------------------ # + +# +# Default behavior is to enable shared and static libraries on systems +# where libtool knows how to build both library versions, and does not +# require separate configuration and build runs for each flavor. +# + +xc_lt_want_enable_shared='yes' +xc_lt_want_enable_static='yes' + +# +# User may have disabled shared or static libraries. +# +case "x$enable_shared" in # ( + xno) + xc_lt_want_enable_shared='no' + ;; +esac +case "x$enable_static" in # ( + xno) + xc_lt_want_enable_static='no' + ;; +esac +if test "x$xc_lt_want_enable_shared" = 'xno' && + test "x$xc_lt_want_enable_static" = 'xno'; then + as_fn_error $? "can not disable shared and static libraries simultaneously" "$LINENO" 5 +fi + +# +# Default behavior on systems that require independent configuration +# and build runs for shared and static is to enable shared libraries +# and disable static ones. On these systems option '--disable-shared' +# must be used in order to build a proper static library. +# + +if test "x$xc_lt_want_enable_shared" = 'xyes' && + test "x$xc_lt_want_enable_static" = 'xyes'; then + case $host_os in # ( + mingw* | pw32* | cegcc* | os2* | aix*) + xc_lt_want_enable_static='no' + ;; + esac +fi + +# +# Make libtool aware of current shared and static library preferences +# taking in account that, depending on host characteristics, libtool +# may modify these option preferences later in this configure script. +# + +enable_shared=$xc_lt_want_enable_shared +enable_static=$xc_lt_want_enable_static + +# +# Default behavior is to build PIC objects for shared libraries and +# non-PIC objects for static libraries. +# + +xc_lt_want_with_pic='default' + +# +# User may have specified PIC preference. +# + +case "x$with_pic" in # (( + xno) + xc_lt_want_with_pic='no' + ;; + xyes) + xc_lt_want_with_pic='yes' + ;; +esac + +# +# Default behavior on some systems where building a shared library out +# of non-PIC compiled objects will fail with following linker error +# "relocation R_X86_64_32 can not be used when making a shared object" +# is to build PIC objects even for static libraries. This behavior may +# be overriden using 'configure --disable-shared --without-pic'. +# + +if test "x$xc_lt_want_with_pic" = 'xdefault'; then + case $host_cpu in # ( + x86_64 | amd64 | ia64) + case $host_os in # ( + linux* | freebsd*) + xc_lt_want_with_pic='yes' + ;; + esac + ;; + esac +fi + +# +# Make libtool aware of current PIC preference taking in account that, +# depending on host characteristics, libtool may modify PIC default +# behavior to fit host system idiosyncrasies later in this script. +# + +with_pic=$xc_lt_want_with_pic + +## ----------------------- ## +## Start of libtool code ## +## ----------------------- ## # Set options +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + @@ -9662,7 +10286,22 @@ fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -9740,6 +10379,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + test -z "$LN_S" && LN_S="ln -s" @@ -10199,7 +10842,9 @@ lt_prog_compiler_static= case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -10243,7 +10888,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -10290,18 +10935,33 @@ lt_prog_compiler_static= ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -10663,7 +11323,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -10916,8 +11575,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -11295,6 +11953,7 @@ fi # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -11340,6 +11999,7 @@ fi hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -11368,10 +12028,6 @@ fi hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -11384,7 +12040,7 @@ fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -11401,9 +12057,9 @@ fi hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib' else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: @@ -11423,7 +12079,6 @@ fi fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -12047,11 +12702,6 @@ esac - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -12141,7 +12791,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -12150,7 +12800,7 @@ aix3*) ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -12215,7 +12865,7 @@ beos*) ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -12354,7 +13004,7 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -12362,10 +13012,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -12373,7 +13019,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -12391,7 +13037,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -12410,19 +13056,8 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -12483,7 +13118,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -12499,7 +13134,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -12536,9 +13171,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -12631,7 +13266,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -12700,7 +13335,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -12725,7 +13360,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -12749,7 +13384,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -12780,7 +13415,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -12790,7 +13425,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -13557,6 +14192,8 @@ CC="$lt_save_CC" + + ac_config_commands="$ac_config_commands libtool" @@ -13565,39 +14202,226 @@ CC="$lt_save_CC" # Only expand once: +## --------------------- ## +## End of libtool code ## +## --------------------- ## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need CARES_BUILDING_LIBRARY" >&5 -$as_echo_n "checking if we need CARES_BUILDING_LIBRARY... " >&6; } -case $host in - *-*-mingw*) +# +# Verify if finally libtool shared libraries will be built +# -$as_echo "#define CARES_BUILDING_LIBRARY 1" >>confdefs.h +case "x$enable_shared" in # (( + xyes | xno) + xc_lt_build_shared=$enable_shared + ;; + *) + as_fn_error $? "unexpected libtool enable_shared value: $enable_shared" "$LINENO" 5 + ;; +esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need CARES_STATICLIB" >&5 -$as_echo_n "checking if we need CARES_STATICLIB... " >&6; } - if test "X$enable_shared" = "Xno" - then +# +# Verify if finally libtool static libraries will be built +# -$as_echo "#define CARES_STATICLIB 1" >>confdefs.h +case "x$enable_static" in # (( + xyes | xno) + xc_lt_build_static=$enable_static + ;; + *) + as_fn_error $? "unexpected libtool enable_static value: $enable_static" "$LINENO" 5 + ;; +esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# +# Verify if libtool shared libraries should be linked using flag -version-info +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -version-info" >&5 +$as_echo_n "checking whether to build shared libraries with -version-info... " >&6; } +xc_lt_shlib_use_version_info='yes' +if test "x$version_type" = 'xnone'; then + xc_lt_shlib_use_version_info='no' +fi +case $host_os in # ( + amigaos*) + xc_lt_shlib_use_version_info='yes' + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_version_info" >&5 +$as_echo "$xc_lt_shlib_use_version_info" >&6; } + +# +# Verify if libtool shared libraries should be linked using flag -no-undefined +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -no-undefined" >&5 +$as_echo_n "checking whether to build shared libraries with -no-undefined... " >&6; } +xc_lt_shlib_use_no_undefined='no' +if test "x$allow_undefined" = 'xno'; then + xc_lt_shlib_use_no_undefined='yes' +elif test "x$allow_undefined_flag" = 'xunsupported'; then + xc_lt_shlib_use_no_undefined='yes' +fi +case $host_os in # ( + cygwin* | mingw* | pw32* | cegcc* | os2* | aix*) + xc_lt_shlib_use_no_undefined='yes' + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_no_undefined" >&5 +$as_echo "$xc_lt_shlib_use_no_undefined" >&6; } + +# +# Verify if libtool shared libraries should be linked using flag -mimpure-text +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -mimpure-text" >&5 +$as_echo_n "checking whether to build shared libraries with -mimpure-text... " >&6; } +xc_lt_shlib_use_mimpure_text='no' +case $host_os in # ( + solaris2*) + if test "x$GCC" = 'xyes'; then + xc_lt_shlib_use_mimpure_text='yes' fi ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_mimpure_text" >&5 +$as_echo "$xc_lt_shlib_use_mimpure_text" >&6; } + +# +# Find out wether libtool libraries would be built wit PIC +# + +case "x$pic_mode" in # (((( + xdefault) + xc_lt_build_shared_with_pic='yes' + xc_lt_build_static_with_pic='no' + ;; + xyes) + xc_lt_build_shared_with_pic='yes' + xc_lt_build_static_with_pic='yes' + ;; + xno) + xc_lt_build_shared_with_pic='no' + xc_lt_build_static_with_pic='no' + ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + xc_lt_build_shared_with_pic='unknown' + xc_lt_build_static_with_pic='unknown' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unexpected libtool pic_mode value: $pic_mode" >&5 +$as_echo "$as_me: WARNING: unexpected libtool pic_mode value: $pic_mode" >&2;} ;; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with PIC" >&5 +$as_echo_n "checking whether to build shared libraries with PIC... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_shared_with_pic" >&5 +$as_echo "$xc_lt_build_shared_with_pic" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries with PIC" >&5 +$as_echo_n "checking whether to build static libraries with PIC... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_static_with_pic" >&5 +$as_echo "$xc_lt_build_static_with_pic" >&6; } +# +# Verify if libtool shared libraries will be built while static not built +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries only" >&5 +$as_echo_n "checking whether to build shared libraries only... " >&6; } +if test "$xc_lt_build_shared" = 'yes' && + test "$xc_lt_build_static" = 'no'; then + xc_lt_build_shared_only='yes' +else + xc_lt_build_shared_only='no' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_shared_only" >&5 +$as_echo "$xc_lt_build_shared_only" >&6; } - # +# +# Verify if libtool static libraries will be built while shared not built +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries only" >&5 +$as_echo_n "checking whether to build static libraries only... " >&6; } +if test "$xc_lt_build_static" = 'yes' && + test "$xc_lt_build_shared" = 'no'; then + xc_lt_build_static_only='yes' +else + xc_lt_build_static_only='no' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_static_only" >&5 +$as_echo "$xc_lt_build_static_only" >&6; } + + + + +# +# Automake conditionals based on libtool related checks +# + + if test "x$xc_lt_shlib_use_version_info" = 'xyes'; then + CARES_LT_SHLIB_USE_VERSION_INFO_TRUE= + CARES_LT_SHLIB_USE_VERSION_INFO_FALSE='#' +else + CARES_LT_SHLIB_USE_VERSION_INFO_TRUE='#' + CARES_LT_SHLIB_USE_VERSION_INFO_FALSE= +fi + + if test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then + CARES_LT_SHLIB_USE_NO_UNDEFINED_TRUE= + CARES_LT_SHLIB_USE_NO_UNDEFINED_FALSE='#' +else + CARES_LT_SHLIB_USE_NO_UNDEFINED_TRUE='#' + CARES_LT_SHLIB_USE_NO_UNDEFINED_FALSE= +fi + + if test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'; then + CARES_LT_SHLIB_USE_MIMPURE_TEXT_TRUE= + CARES_LT_SHLIB_USE_MIMPURE_TEXT_FALSE='#' +else + CARES_LT_SHLIB_USE_MIMPURE_TEXT_TRUE='#' + CARES_LT_SHLIB_USE_MIMPURE_TEXT_FALSE= +fi + + +# +# Due to libtool and automake machinery limitations of not allowing +# specifying separate CPPFLAGS or CFLAGS when compiling objects for +# inclusion of these in shared or static libraries, we are forced to +# build using separate configure runs for shared and static libraries +# on systems where different CPPFLAGS or CFLAGS are mandatory in order +# to compile objects for each kind of library. Notice that relying on +# the '-DPIC' CFLAG that libtool provides is not valid given that the +# user might for example choose to build static libraries with PIC. +# + +# +# Make our Makefile.am files use the staticlib CPPFLAG only when strictly +# targeting a static library and not building its shared counterpart. +# + + if test "x$xc_lt_build_static_only" = 'xyes'; then + USE_CPPFLAG_CARES_STATICLIB_TRUE= + USE_CPPFLAG_CARES_STATICLIB_FALSE='#' +else + USE_CPPFLAG_CARES_STATICLIB_TRUE='#' + USE_CPPFLAG_CARES_STATICLIB_FALSE= +fi + + +# +# Make staticlib CPPFLAG variable and its definition visible in output +# files unconditionally, providing an empty definition unless strictly +# targeting a static library and not building its shared counterpart. +# + +CPPFLAG_CARES_STATICLIB= +if test "x$xc_lt_build_static_only" = 'xyes'; then + CPPFLAG_CARES_STATICLIB='-DCARES_STATICLIB' +fi + + + + + # compiler_id="unknown" compiler_num="0" # @@ -13636,7 +14460,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC"; then tmp_exp="" @@ -13676,7 +14500,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC_VER"; then tmp_exp="" @@ -13735,7 +14559,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__HP_cc"; then tmp_exp="" @@ -13793,7 +14617,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__IBMC__"; then tmp_exp="" @@ -13859,7 +14683,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__INTEL_COMPILER"; then tmp_exp="" @@ -13903,7 +14727,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = ""; then tmp_exp="" @@ -13975,7 +14799,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__clang__"; then tmp_exp="" @@ -14044,7 +14868,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then tmp_exp="" @@ -14083,6 +14907,46 @@ $as_echo "yes" >&6; } flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" flags_opt_yes="-O2" flags_opt_off="-O0" + + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef _WIN32 +CURL_DEF_TOKEN _WIN32 +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "_WIN32"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def__WIN32=no + + else + curl_cv_have_def__WIN32=yes + curl_cv_def__WIN32=$tmp_exp + + fi + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -14114,7 +14978,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__LCC__"; then tmp_exp="" @@ -14172,7 +15036,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then tmp_exp="" @@ -14212,7 +15076,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "_COMPILER_VERSION"; then tmp_exp="" @@ -14252,7 +15116,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "_SGI_COMPILER_VERSION"; then tmp_exp="" @@ -14312,7 +15176,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then tmp_exp="" @@ -14352,7 +15216,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__sgi"; then tmp_exp="" @@ -14412,7 +15276,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__SUNPRO_C"; then tmp_exp="" @@ -14470,7 +15334,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__TINYC__"; then tmp_exp="" @@ -14528,7 +15392,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__WATCOMC__"; then tmp_exp="" @@ -14571,7 +15435,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ "$SED" 's/["][ ]*["]//g' 2>/dev/null` if test -z "$tmp_exp" || test "$tmp_exp" = "__UNIX__"; then tmp_exp="" @@ -15362,7 +16226,7 @@ $as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;} CLANG) # if test "$want_warnings" = "yes"; then - tmp_CFLAGS="$tmp_CFLAGS -pedantic" + tmp_CFLAGS="$tmp_CFLAGS -pedantic" tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra" tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings" tmp_CFLAGS="$tmp_CFLAGS -Wshadow" @@ -15447,6 +16311,10 @@ $as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;} tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement" fi # + if test "$compiler_num" -ge "400"; then + tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3" + fi + # if test "$compiler_num" -ge "402"; then tmp_CFLAGS="$tmp_CFLAGS -Wcast-align" fi @@ -15458,6 +16326,12 @@ $as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;} tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla" fi # + if test "$compiler_num" -ge "405"; then + if test "$curl_cv_have_def__WIN32" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format" + fi + fi + # fi # if test "$compiler_num" -ge "300"; then @@ -15785,6 +16659,50 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler halts on function prototype mismatch" >&5 +$as_echo_n "checking if compiler halts on function prototype mismatch... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# include <stdlib.h> + int rand(int n); + int rand(int n) + { + if(n) + return ++n; + else + return n; + } + +int main (void) +{ + + int i[2]; + int j = rand(i[0]); + if(j) + return j; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "compiler does not halt on function prototype mismatch." "$LINENO" 5 + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports hiding library internal symbols" >&5 $as_echo_n "checking if compiler supports hiding library internal symbols... " >&6; } supports_symbol_hiding="no" @@ -15794,14 +16712,14 @@ $as_echo_n "checking if compiler supports hiding library internal symbols... " > tmp_EXTERN="" case "$compiler_id" in CLANG) - tmp_EXTERN="__attribute__ ((visibility (\"default\")))" + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" tmp_CFLAGS="-fvisibility=hidden" supports_symbol_hiding="yes" ;; GNU_C) if test "$compiler_num" -ge "304"; then if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then - tmp_EXTERN="__attribute__ ((visibility (\"default\")))" + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" tmp_CFLAGS="-fvisibility=hidden" supports_symbol_hiding="yes" fi @@ -15830,7 +16748,7 @@ int main (void) _ACEOF if ac_fn_c_try_link "$LINENO"; then : - tmp_EXTERN="__attribute__ ((visibility (\"default\")))" + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" tmp_CFLAGS="-fvisibility=hidden" supports_symbol_hiding="yes" @@ -15870,7 +16788,7 @@ int main (void) { char b[16]; - char *r = dummy(&b); + char *r = dummy(&b[0]); if(r) return (int)*r; @@ -15882,6 +16800,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : supports_symbol_hiding="yes" + if test -f conftest.err; then + grep 'visibility' conftest.err >/dev/null + if test "$?" -eq "0"; then + supports_symbol_hiding="no" + fi + fi else @@ -15907,35 +16831,7 @@ $as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared libraries need -no-undefined" >&5 -$as_echo_n "checking if shared libraries need -no-undefined... " >&6; } - need_no_undefined="no" - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*) - need_no_undefined="yes" - ;; - esac - if test "x$allow_undefined" = "xno"; then - need_no_undefined="yes" - elif test "x$allow_undefined_flag" = "xunsupported"; then - need_no_undefined="yes" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_no_undefined" >&5 -$as_echo "$need_no_undefined" >&6; } - - - -if test x$need_no_undefined = xyes; then - NO_UNDEFINED_TRUE= - NO_UNDEFINED_FALSE='#' -else - NO_UNDEFINED_TRUE='#' - NO_UNDEFINED_FALSE= -fi - - - - cares_builddir=`pwd` + cares_builddir=`pwd` supports_curldebug="unknown" if test "$want_curldebug" = "yes"; then if test "x$enable_shared" != "xno" && @@ -15952,7 +16848,7 @@ $as_echo "$as_me: WARNING: unknown enable_static setting." >&2;} fi if test "$supports_curldebug" != "no"; then if test "$enable_shared" = "yes" && - test "$need_no_undefined" = "yes"; then + test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then supports_curldebug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: shared library does not support undefined symbols." >&5 $as_echo "$as_me: WARNING: shared library does not support undefined symbols." >&2;} @@ -16024,9 +16920,7 @@ $as_echo "#define BUILDING_LIBCURL 1" >>confdefs.h squeeze CPPFLAGS fi - - -if test x$want_curldebug = xyes; then + if test x$want_curldebug = xyes; then CURLDEBUG_TRUE= CURLDEBUG_FALSE='#' else @@ -16142,15 +17036,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_native_windows" >&5 $as_echo "$ac_cv_native_windows" >&6; } - case "$ac_cv_native_windows" in - yes) - -cat >>confdefs.h <<_ACEOF -#define NATIVE_WINDOWS 1 -_ACEOF + if test "x$ac_cv_native_windows" = xyes; then + DOING_NATIVE_WINDOWS_TRUE= + DOING_NATIVE_WINDOWS_FALSE='#' +else + DOING_NATIVE_WINDOWS_TRUE='#' + DOING_NATIVE_WINDOWS_FALSE= +fi - ;; - esac case X-"$ac_cv_native_windows" in X-yes) @@ -17655,11 +18548,11 @@ else int main (void) { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -17676,8 +18569,9 @@ int main (void) ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -17693,10 +18587,10 @@ int main (void) iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -17898,6 +18792,39 @@ _ACEOF # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : @@ -17931,32 +18858,32 @@ _ACEOF # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else - if test "$ac_cv_type_long" = yes; then + if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) +as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else - ac_cv_sizeof_long=0 + ac_cv_sizeof_short=0 fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long +#define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF @@ -20448,7 +21375,7 @@ done - # + # tst_links_getaddrinfo="unknown" tst_proto_getaddrinfo="unknown" tst_compi_getaddrinfo="unknown" @@ -20699,6 +21626,10 @@ $as_echo_n "checking if getaddrinfo is threadsafe... " >&6; } tst_tsafe_getaddrinfo="yes" ;; esac + if test "$tst_tsafe_getaddrinfo" = "unknown" && + test "$ac_cv_native_windows" = "yes"; then + tst_tsafe_getaddrinfo="yes" + fi if test "$tst_tsafe_getaddrinfo" = "unknown"; then @@ -20706,7 +21637,6 @@ $as_echo_n "checking if getaddrinfo is threadsafe... " >&6; } /* end confdefs.h. */ - $cares_includes_ws2tcpip $cares_includes_sys_socket $cares_includes_netdb @@ -20739,13 +21669,79 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test "$curl_cv_have_def_h_errno" = "no"; then + if test "$curl_cv_have_def_h_errno" = "yes"; then + tst_h_errno_macro="yes" + else + tst_h_errno_macro="no" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $cares_includes_sys_socket + $cares_includes_netdb + +int main (void) +{ + + h_errno = 2; + if(0 != h_errno) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_h_errno_modifiable_lvalue="yes" + +else + + tst_h_errno_modifiable_lvalue="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + +#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L) + return 0; +#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700) + return 0; +#else + force compilation error +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_h_errno_sbs_issue_7="yes" + +else + + tst_h_errno_sbs_issue_7="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$tst_h_errno_macro" = "no" && + test "$tst_h_errno_modifiable_lvalue" = "no" && + test "$tst_h_errno_sbs_issue_7" = "no"; then tst_tsafe_getaddrinfo="no" + else + tst_tsafe_getaddrinfo="yes" fi fi - if test "$tst_tsafe_getaddrinfo" = "unknown"; then - tst_tsafe_getaddrinfo="yes" - fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_tsafe_getaddrinfo" >&5 $as_echo "$tst_tsafe_getaddrinfo" >&6; } if test "$tst_tsafe_getaddrinfo" = "yes"; then @@ -21219,7 +22215,7 @@ done - # + # tst_links_gethostname="unknown" tst_proto_gethostname="unknown" tst_compi_gethostname="unknown" @@ -21327,6 +22323,53 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # if test "$tst_compi_gethostname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname arg 2 data type" >&5 +$as_echo_n "checking for gethostname arg 2 data type... " >&6; } + tst_gethostname_type_arg2="unknown" + for tst_arg1 in 'char *' 'unsigned char *' 'void *'; do + for tst_arg2 in 'int' 'unsigned int' 'size_t'; do + if test "$tst_gethostname_type_arg2" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $cares_includes_winsock2 + $cares_includes_unistd + $cares_preprocess_callconv + extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2); + +int main (void) +{ + + if(0 != gethostname(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_gethostname_type_arg2="$tst_arg2" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + done + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_gethostname_type_arg2" >&5 +$as_echo "$tst_gethostname_type_arg2" >&6; } + if test "$tst_gethostname_type_arg2" != "unknown"; then + +cat >>confdefs.h <<_ACEOF +#define GETHOSTNAME_TYPE_ARG2 $tst_gethostname_type_arg2 +_ACEOF + + fi + fi + # + if test "$tst_compi_gethostname" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname usage allowed" >&5 $as_echo_n "checking if gethostname usage allowed... " >&6; } if test "x$cares_disallow_gethostname" != "xyes"; then @@ -25914,15 +26957,13 @@ $as_echo "$as_me: WARNING: non-blocking sockets disabled." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether hiding of library internal symbols will actually happen" >&5 $as_echo_n "checking whether hiding of library internal symbols will actually happen... " >&6; } + CFLAG_CARES_SYMBOL_HIDING="" + doing_symbol_hiding="no" if test x"$ac_cv_native_windows" != "xyes" && test "$want_symbol_hiding" = "yes" && test "$supports_symbol_hiding" = "yes"; then - CFLAGS="$CFLAGS $symbol_hiding_CFLAGS" - -cat >>confdefs.h <<_ACEOF -#define CARES_SYMBOL_HIDING 1 -_ACEOF - + doing_symbol_hiding="yes" + CFLAG_CARES_SYMBOL_HIDING="$symbol_hiding_CFLAGS" cat >>confdefs.h <<_ACEOF #define CARES_SYMBOL_SCOPE_EXTERN $symbol_hiding_EXTERN @@ -25934,6 +26975,15 @@ $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + if test x$doing_symbol_hiding = xyes; then + DOING_CARES_SYMBOL_HIDING_TRUE= + DOING_CARES_SYMBOL_HIDING_FALSE='#' +else + DOING_CARES_SYMBOL_HIDING_TRUE='#' + DOING_CARES_SYMBOL_HIDING_FALSE= +fi + + CARES_PRIVATE_LIBS="$LIBS" @@ -25954,6 +27004,174 @@ squeeze LIBS squeeze CARES_PRIVATE_LIBS + + + xc_bad_var_libs=no + for xc_word in $LIBS; do + case "$xc_word" in + -l* | --library=*) + : + ;; + *) + xc_bad_var_libs=yes + ;; + esac + done + if test $xc_bad_var_libs = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using LIBS: $LIBS" >&5 +$as_echo "$as_me: using LIBS: $LIBS" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS error: LIBS may only be used to specify libraries (-lname)." >&5 +$as_echo "$as_me: LIBS error: LIBS may only be used to specify libraries (-lname)." >&6;} + fi + + + xc_bad_var_ldflags=no + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_ldflags=yes + ;; + -U*) + xc_bad_var_ldflags=yes + ;; + -I*) + xc_bad_var_ldflags=yes + ;; + -l* | --library=*) + xc_bad_var_ldflags=yes + ;; + esac + done + if test $xc_bad_var_ldflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS: $LDFLAGS" >&5 +$as_echo "$as_me: using LDFLAGS: $LDFLAGS" >&6;} + xc_bad_var_msg="LDFLAGS error: LDFLAGS may only be used to specify linker flags, not" + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -U*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -I*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + + xc_bad_var_cppflags=no + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + xc_bad_var_cppflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cppflags=yes + ;; + -l* | --library=*) + xc_bad_var_cppflags=yes + ;; + esac + done + if test $xc_bad_var_cppflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS: $CPPFLAGS" >&5 +$as_echo "$as_me: using CPPFLAGS: $CPPFLAGS" >&6;} + xc_bad_var_msg="CPPFLAGS error: CPPFLAGS may only be used to specify C preprocessor flags, not" + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -L* | --library-path=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + + xc_bad_var_cflags=no + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_cflags=yes + ;; + -U*) + xc_bad_var_cflags=yes + ;; + -I*) + xc_bad_var_cflags=yes + ;; + -rpath*) + xc_bad_var_cflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cflags=yes + ;; + -l* | --library=*) + xc_bad_var_cflags=yes + ;; + esac + done + if test $xc_bad_var_cflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5 +$as_echo "$as_me: using CFLAGS: $CFLAGS" >&6;} + xc_bad_var_msg="CFLAGS error: CFLAGS may only be used to specify C compiler flags, not" + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -U*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -I*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -rpath*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -L* | --library-path=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + if test $xc_bad_var_libs = yes || + test $xc_bad_var_cflags = yes || + test $xc_bad_var_ldflags = yes || + test $xc_bad_var_cppflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Continuing even with errors mentioned immediately above this line." >&5 +$as_echo "$as_me: WARNING: Continuing even with errors mentioned immediately above this line." >&2;} + fi + + ac_config_files="$ac_config_files Makefile libcares.pc" cat >confcache <<\_ACEOF @@ -26077,15 +27295,43 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${NO_UNDEFINED_TRUE}" && test -z "${NO_UNDEFINED_FALSE}"; then - as_fn_error $? "conditional \"NO_UNDEFINED\" was never defined. + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${CARES_LT_SHLIB_USE_VERSION_INFO_TRUE}" && test -z "${CARES_LT_SHLIB_USE_VERSION_INFO_FALSE}"; then + as_fn_error $? "conditional \"CARES_LT_SHLIB_USE_VERSION_INFO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CARES_LT_SHLIB_USE_NO_UNDEFINED_TRUE}" && test -z "${CARES_LT_SHLIB_USE_NO_UNDEFINED_FALSE}"; then + as_fn_error $? "conditional \"CARES_LT_SHLIB_USE_NO_UNDEFINED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CARES_LT_SHLIB_USE_MIMPURE_TEXT_TRUE}" && test -z "${CARES_LT_SHLIB_USE_MIMPURE_TEXT_FALSE}"; then + as_fn_error $? "conditional \"CARES_LT_SHLIB_USE_MIMPURE_TEXT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_CPPFLAG_CARES_STATICLIB_TRUE}" && test -z "${USE_CPPFLAG_CARES_STATICLIB_FALSE}"; then + as_fn_error $? "conditional \"USE_CPPFLAG_CARES_STATICLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CURLDEBUG_TRUE}" && test -z "${CURLDEBUG_FALSE}"; then as_fn_error $? "conditional \"CURLDEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${DOING_NATIVE_WINDOWS_TRUE}" && test -z "${DOING_NATIVE_WINDOWS_FALSE}"; then + as_fn_error $? "conditional \"DOING_NATIVE_WINDOWS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DOING_CARES_SYMBOL_HIDING_TRUE}" && test -z "${DOING_CARES_SYMBOL_HIDING_FALSE}"; then + as_fn_error $? "conditional \"DOING_CARES_SYMBOL_HIDING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -26376,16 +27622,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -26445,28 +27691,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -26487,8 +27721,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by c-ares $as_me 1.7.5, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by c-ares $as_me 1.10.0, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -26553,17 +27787,18 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -c-ares config.status 1.7.5 -configured by $0, generated by GNU Autoconf 2.68, +c-ares config.status 1.10.0 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -26647,7 +27882,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -26681,17 +27916,18 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -26772,7 +28008,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -26831,6 +28066,7 @@ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -26879,7 +28115,6 @@ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -27414,6 +28649,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -27468,6 +28708,7 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ @@ -27513,21 +28754,22 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;} || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - "$ac_file" | "$ac_file":* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -27554,17 +28796,28 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ @@ -27587,28 +28840,28 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ @@ -27631,11 +28884,12 @@ $as_echo X"$file" | q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ;; "libtool":C) @@ -27658,8 +28912,8 @@ done # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -27691,6 +28945,10 @@ available_tags="" # ### BEGIN LIBTOOL CONFIG +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + # Assembler program. AS=$lt_AS @@ -27700,10 +28958,6 @@ DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - # Whether or not to build shared libraries. build_libtool_libs=$enable_shared @@ -27722,6 +28976,9 @@ SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -28017,10 +29274,6 @@ no_undefined_flag=$lt_no_undefined_flag # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator diff --git a/configure.ac b/configure.ac index da87ba9..5c02450 100644 --- a/configure.ac +++ b/configure.ac @@ -1,13 +1,15 @@ AC_PREREQ(2.57) dnl Version not hardcoded here. Fetched later from ares_version.h -AC_INIT([c-ares], [1.7.5], +AC_INIT([c-ares], [1.10.0], [c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares]) +XC_OVR_ZZ50 +XC_OVR_ZZ60 CARES_OVERRIDE_AUTOCONF AC_CONFIG_SRCDIR([ares_ipv6.h]) -AM_CONFIG_HEADER([ares_config.h ares_build.h]) +AC_CONFIG_HEADERS([ares_config.h ares_build.h]) AC_CONFIG_MACRO_DIR([m4]) AM_MAINTAINER_MODE @@ -18,7 +20,7 @@ CARES_CHECK_OPTION_WERROR CARES_CHECK_OPTION_CURLDEBUG CARES_CHECK_OPTION_SYMBOL_HIDING -CARES_CHECK_PATH_SEPARATOR_REQUIRED +XC_CHECK_PATH_SEPARATOR dnl SED is mandatory for configure process and libtool. dnl Set it now, allowing it to be changed later. @@ -67,8 +69,6 @@ if test -f ${srcdir}/ares_build.h; then rm -f ${srcdir}/ares_build.h fi -AM_INIT_AUTOMAKE - dnl dnl Detect the canonical host and target build environment dnl @@ -77,9 +77,9 @@ AC_CANONICAL_HOST dnl Get system canonical name AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) -CARES_CHECK_PROG_CC -AM_PROG_CC_C_O -AC_PROG_INSTALL +XC_CHECK_PROG_CC + +AM_INIT_AUTOMAKE dnl This defines _ALL_SOURCE for AIX CARES_CHECK_AIX_ALL_SOURCE @@ -97,53 +97,49 @@ case $host_os in ;; esac -dnl support building of Windows DLLs -AC_LIBTOOL_WIN32_DLL - -dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD -AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)]) -case $host in - x86_64*linux*|amd64*freebsd*|ia64*freebsd*) - AC_MSG_RESULT([yes]) - with_pic=yes - ;; - *) - AC_MSG_RESULT([no]) - ;; -esac - -AC_MSG_CHECKING([if compiler is icc (to build with PIC)]) -case $CC in - icc | */icc) - AC_MSG_RESULT([yes]) - with_pic=yes - ;; - *) - AC_MSG_RESULT([no]) - ;; -esac - -dnl libtool setup -AC_PROG_LIBTOOL - -AC_MSG_CHECKING([if we need CARES_BUILDING_LIBRARY]) -case $host in - *-*-mingw*) - AC_DEFINE(CARES_BUILDING_LIBRARY, 1, [when building c-ares library]) - AC_MSG_RESULT(yes) - AC_MSG_CHECKING([if we need CARES_STATICLIB]) - if test "X$enable_shared" = "Xno" - then - AC_DEFINE(CARES_STATICLIB, 1, [when not building a shared library]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - ;; - *) - AC_MSG_RESULT(no) - ;; -esac +XC_LIBTOOL + +# +# Automake conditionals based on libtool related checks +# + +AM_CONDITIONAL([CARES_LT_SHLIB_USE_VERSION_INFO], + [test "x$xc_lt_shlib_use_version_info" = 'xyes']) +AM_CONDITIONAL([CARES_LT_SHLIB_USE_NO_UNDEFINED], + [test "x$xc_lt_shlib_use_no_undefined" = 'xyes']) +AM_CONDITIONAL([CARES_LT_SHLIB_USE_MIMPURE_TEXT], + [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes']) + +# +# Due to libtool and automake machinery limitations of not allowing +# specifying separate CPPFLAGS or CFLAGS when compiling objects for +# inclusion of these in shared or static libraries, we are forced to +# build using separate configure runs for shared and static libraries +# on systems where different CPPFLAGS or CFLAGS are mandatory in order +# to compile objects for each kind of library. Notice that relying on +# the '-DPIC' CFLAG that libtool provides is not valid given that the +# user might for example choose to build static libraries with PIC. +# + +# +# Make our Makefile.am files use the staticlib CPPFLAG only when strictly +# targeting a static library and not building its shared counterpart. +# + +AM_CONDITIONAL([USE_CPPFLAG_CARES_STATICLIB], + [test "x$xc_lt_build_static_only" = 'xyes']) + +# +# Make staticlib CPPFLAG variable and its definition visible in output +# files unconditionally, providing an empty definition unless strictly +# targeting a static library and not building its shared counterpart. +# + +CPPFLAG_CARES_STATICLIB= +if test "x$xc_lt_build_static_only" = 'xyes'; then + CPPFLAG_CARES_STATICLIB='-DCARES_STATICLIB' +fi +AC_SUBST([CPPFLAG_CARES_STATICLIB]) dnl ********************************************************************** dnl platform/compiler/architecture specific checks/flags @@ -169,11 +165,9 @@ fi CARES_CHECK_COMPILER_HALT_ON_ERROR CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE +CARES_CHECK_COMPILER_PROTOTYPE_MISMATCH CARES_CHECK_COMPILER_SYMBOL_HIDING -CARES_CHECK_NO_UNDEFINED -AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes) - CARES_CHECK_CURLDEBUG AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes) @@ -460,8 +454,9 @@ AC_HEADER_TIME CURL_CHECK_STRUCT_TIMEVAL AC_CHECK_SIZEOF(size_t) -AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(short) CARES_CONFIGURE_LONG AC_CHECK_SIZEOF(time_t) @@ -853,5 +848,7 @@ squeeze LIBS squeeze CARES_PRIVATE_LIBS +XC_CHECK_BUILD_FLAGS + AC_CONFIG_FILES([Makefile libcares.pc]) AC_OUTPUT @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-07-09.11 +scriptversion=2012-03-27.16; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,9 +17,7 @@ scriptversion=2005-07-09.11 # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -29,7 +28,7 @@ scriptversion=2005-07-09.11 case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -41,11 +40,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. @@ -58,6 +57,12 @@ EOF ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -86,12 +91,48 @@ if test "$depmode" = dashXmstdout; then depmode=dashmstdout fi +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -127,20 +168,21 @@ gcc) ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -172,20 +214,17 @@ sgi) # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile + tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile + >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -195,40 +234,51 @@ sgi) rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -239,23 +289,26 @@ aix) ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -264,23 +317,74 @@ icc) exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -288,13 +392,13 @@ tru64) if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is @@ -326,14 +430,59 @@ tru64) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -345,13 +494,13 @@ dashmstdout) # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -371,15 +520,14 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -396,38 +544,46 @@ makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no - for arg in "$@"; do + cleared=no eat=no + for arg + do case $cleared in no) set ""; shift cleared=yes ;; esac + if test $eat = yes; then + eat=no + continue + fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix="`echo $object | sed 's/^.*\././'`" + obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -441,13 +597,13 @@ cpp) # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -479,13 +635,27 @@ cpp) msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. + # always write the preprocessed file to stdout. "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + IFS=" " for arg do case "$arg" in + -o) + shift + ;; + $object) + shift + ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -498,16 +668,23 @@ msvisualcpp) ;; esac done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + none) exec "$@" ;; @@ -526,5 +703,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/get_ver.awk b/get_ver.awk index a63c729..5e3db6d 100644 --- a/get_ver.awk +++ b/get_ver.awk @@ -4,32 +4,24 @@ # *************************************************************************** # awk script which fetches c-ares version number and string from input # file and writes them to STDOUT. Here you can get an awk version for Win32: -# http://www.gknw.net/development/prgtools/awk-20070501.zip +# http://www.gknw.net/development/prgtools/awk-20100523.zip # BEGIN { - if (match (ARGV[1], /ares_version.h/)) { - while ((getline < ARGV[1]) > 0) { - if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) { - libcares_copyright_str = substr($0, 25, length($0)-25); - } - else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) { - libcares_ver_str = substr($3, 2, length($3)-2); - } - else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) { - libcares_ver_major = substr($3, 1, length($3)); - } - else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) { - libcares_ver_minor = substr($3, 1, length($3)); - } - else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) { - libcares_ver_patch = substr($3, 1, length($3)); - } - } - libcares_ver = libcares_ver_major "," libcares_ver_minor "," libcares_ver_patch; - print "LIBCARES_VERSION = " libcares_ver ""; - print "LIBCARES_VERSION_STR = " libcares_ver_str ""; - print "LIBCARES_COPYRIGHT_STR = " libcares_copyright_str ""; + while ((getline < ARGV[1]) > 0) { + sub("\r", "") # make MSYS gawk work with CRLF header input. + if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) + copyright_string = substr($0, 25, length($0)-25) + else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) + version_string = substr($3, 2, length($3)-2) + else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) + version_major = $3 + else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) + version_minor = $3 + else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) + version_patch = $3 } + print "LIBCARES_VERSION = " version_major "," version_minor "," version_patch + print "LIBCARES_VERSION_STR = " version_string + print "LIBCARES_COPYRIGHT_STR = " copyright_string } - diff --git a/inet_net_pton.c b/inet_net_pton.c index 45bb5d4..71c07c5 100644 --- a/inet_net_pton.c +++ b/inet_net_pton.c @@ -18,9 +18,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -36,15 +33,10 @@ # include <arpa/nameser_compat.h> #endif -#include <ctype.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - #include "ares.h" #include "ares_ipv6.h" #include "ares_nowarn.h" -#include "inet_net_pton.h" +#include "ares_inet_net_pton.h" const struct ares_in6_addr ares_in6addr_any = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }; @@ -448,4 +440,11 @@ int ares_inet_pton(int af, const char *src, void *dst) return 0; return (result > -1 ? 1 : -1); } +#else /* HAVE_INET_PTON */ +int ares_inet_pton(int af, const char *src, void *dst) +{ + /* just relay this to the underlying function */ + return inet_pton(af, src, dst); +} + #endif diff --git a/inet_ntop.c b/inet_ntop.c index 57e1146..9420f6c 100644 --- a/inet_ntop.c +++ b/inet_ntop.c @@ -17,9 +17,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -35,15 +32,8 @@ # include <arpa/nameser_compat.h> #endif -#include <ctype.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - #include "ares.h" #include "ares_ipv6.h" -#include "inet_ntop.h" - #ifndef HAVE_INET_NTOP @@ -69,13 +59,13 @@ static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size); * Paul Vixie, 1996. */ const char * -ares_inet_ntop(int af, const void *src, char *dst, size_t size) +ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size) { switch (af) { case AF_INET: - return (inet_ntop4(src, dst, size)); + return (inet_ntop4(src, dst, (size_t)size)); case AF_INET6: - return (inet_ntop6(src, dst, size)); + return (inet_ntop6(src, dst, (size_t)size)); default: SET_ERRNO(EAFNOSUPPORT); return (NULL); @@ -205,4 +195,14 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size) strcpy(dst, tmp); return (dst); } -#endif + +#else /* HAVE_INET_NTOP */ + +const char * +ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size) +{ + /* just relay this to the underlying function */ + return inet_ntop(af, src, dst, size); +} + +#endif /* HAVE_INET_NTOP */ diff --git a/inet_ntop.h b/inet_ntop.h deleted file mode 100644 index c583488..0000000 --- a/inet_ntop.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __ARES_INET_NTOP_H -#define __ARES_INET_NTOP_H - - -/* Copyright (C) 2005 by Dominick Meglio - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -#ifdef HAVE_INET_NTOP -#define ares_inet_ntop(w,x,y,z) inet_ntop(w,x,y,z) -#else -const char *ares_inet_ntop(int af, const void *src, char *dst, size_t size); -#endif - -#endif /* __ARES_INET_NTOP_H */ diff --git a/libcares.pc.in b/libcares.pc.in index 42672bd..e757c1b 100644 --- a/libcares.pc.in +++ b/libcares.pc.in @@ -15,6 +15,6 @@ Description: asynchronous DNS lookup library Version: @VERSION@ Requires: Requires.private: -Cflags: -I${includedir} +Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@ Libs: -L${libdir} -lcares Libs.private: @CARES_PRIVATE_LIBS@ diff --git a/ltmain.sh b/ltmain.sh index c7dd906..499e473 100755..100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 Debian-2.4-3 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.2 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4 Debian-2.4-3" +VERSION="2.4.2 Debian-2.4.2-1.2" TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ case $progpath in ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ func_help () s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_finish=false opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ esac opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ func_mode_install () # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() { # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ func_exec_program_core () # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ func_mode_link () continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6150,7 +6163,8 @@ func_mode_link () lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6834,7 +6848,7 @@ func_mode_link () test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7319,6 +7333,7 @@ func_mode_link () # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7438,7 +7453,7 @@ func_mode_link () versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8026,6 +8041,11 @@ EOF # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8056,7 +8076,7 @@ EOF elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8064,11 +8084,7 @@ EOF if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9158,6 +9174,8 @@ EOF esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9267,7 +9285,8 @@ EOF *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4 index 5d3035c..2b98a68 100644 --- a/m4/cares-compilers.m4 +++ b/m4/cares-compilers.m4 @@ -1,6 +1,6 @@ #*************************************************************************** # -# Copyright (C) 2009-2011 by Daniel Stenberg et al +# Copyright (C) 2009-2013 by Daniel Stenberg et al # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, provided @@ -15,7 +15,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 67 +# serial 75 dnl CARES_CHECK_COMPILER @@ -23,7 +23,6 @@ dnl ------------------------------------------------- dnl Verify if the C compiler being used is known. AC_DEFUN([CARES_CHECK_COMPILER], [ - AC_BEFORE([$0],[CARES_CHECK_NO_UNDEFINED])dnl # compiler_id="unknown" compiler_num="0" @@ -156,6 +155,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_GNU_C], [ flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" flags_opt_yes="-O2" flags_opt_off="-O0" + CURL_CHECK_DEF([_WIN32], [], [silent]) else AC_MSG_RESULT([no]) fi @@ -850,8 +850,6 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [ CLANG) # if test "$want_warnings" = "yes"; then - dnl All versions of clang support the same warnings as at least - dnl gcc 4.2.1 except -Wunused. tmp_CFLAGS="$tmp_CFLAGS -pedantic" tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra" tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings" @@ -959,6 +957,11 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [ tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement" fi # + dnl Only gcc 4.0 or later + if test "$compiler_num" -ge "400"; then + tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3" + fi + # dnl Only gcc 4.2 or later if test "$compiler_num" -ge "402"; then tmp_CFLAGS="$tmp_CFLAGS -Wcast-align" @@ -972,6 +975,14 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [ tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla" fi # + dnl Only gcc 4.5 or later + if test "$compiler_num" -ge "405"; then + dnl Only windows targets + if test "$curl_cv_have_def__WIN32" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format" + fi + fi + # fi # dnl Do not issue warnings for code in system include paths. @@ -1180,6 +1191,7 @@ dnl shared libraries support undefined symbols, along with dnl an equally configured libcurl. AC_DEFUN([CARES_CHECK_CURLDEBUG], [ + AC_REQUIRE([XC_LIBTOOL])dnl AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl cares_builddir=`pwd` supports_curldebug="unknown" @@ -1196,7 +1208,7 @@ AC_DEFUN([CARES_CHECK_CURLDEBUG], [ fi if test "$supports_curldebug" != "no"; then if test "$enable_shared" = "yes" && - test "$need_no_undefined" = "yes"; then + test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then supports_curldebug="no" AC_MSG_WARN([shared library does not support undefined symbols.]) fi @@ -1258,46 +1270,6 @@ AC_DEFUN([CARES_CHECK_CURLDEBUG], [ ]) -dnl CARES_CHECK_NO_UNDEFINED -dnl ------------------------------------------------- -dnl Checks if the -no-undefined flag must be used when -dnl building shared libraries. This is required on all -dnl systems on which shared libraries should not have -dnl references to undefined symbols. This check should -dnl not be done before AC-PROG-LIBTOOL. - -AC_DEFUN([CARES_CHECK_NO_UNDEFINED], [ - AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl - AC_MSG_CHECKING([if shared libraries need -no-undefined]) - need_no_undefined="no" - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*) - need_no_undefined="yes" - ;; - esac - if test "x$allow_undefined" = "xno"; then - need_no_undefined="yes" - elif test "x$allow_undefined_flag" = "xunsupported"; then - need_no_undefined="yes" - fi - AC_MSG_RESULT($need_no_undefined) -]) - - -dnl CARES_CHECK_PROG_CC -dnl ------------------------------------------------- -dnl Check for compiler program, preventing CFLAGS and -dnl CPPFLAGS from being unexpectedly changed. - -AC_DEFUN([CARES_CHECK_PROG_CC], [ - ac_save_CFLAGS="$CFLAGS" - ac_save_CPPFLAGS="$CPPFLAGS" - AC_PROG_CC - CFLAGS="$ac_save_CFLAGS" - CPPFLAGS="$ac_save_CPPFLAGS" -]) - - dnl CARES_CHECK_COMPILER_HALT_ON_ERROR dnl ------------------------------------------------- dnl Verifies if the compiler actually halts after the @@ -1425,7 +1397,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [ case "$compiler_id" in CLANG) dnl All versions of clang support -fvisibility= - tmp_EXTERN="__attribute__ ((visibility (\"default\")))" + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" tmp_CFLAGS="-fvisibility=hidden" supports_symbol_hiding="yes" ;; @@ -1433,7 +1405,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [ dnl Only gcc 3.4 or later if test "$compiler_num" -ge "304"; then if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then - tmp_EXTERN="__attribute__ ((visibility (\"default\")))" + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" tmp_CFLAGS="-fvisibility=hidden" supports_symbol_hiding="yes" fi @@ -1452,7 +1424,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [ printf("icc fvisibility bug test"); ]]) ],[ - tmp_EXTERN="__attribute__ ((visibility (\"default\")))" + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" tmp_CFLAGS="-fvisibility=hidden" supports_symbol_hiding="yes" ]) @@ -1484,12 +1456,18 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [ } ]],[[ char b[16]; - char *r = dummy(&b); + char *r = dummy(&b[0]); if(r) return (int)*r; ]]) ],[ supports_symbol_hiding="yes" + if test -f conftest.err; then + grep 'visibility' conftest.err >/dev/null + if test "$?" -eq "0"; then + supports_symbol_hiding="no" + fi + fi ],[ supports_symbol_hiding="no" echo " " >&6 @@ -1509,6 +1487,42 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [ ]) +dnl CARES_CHECK_COMPILER_PROTOTYPE_MISMATCH +dnl ------------------------------------------------- +dnl Verifies if the compiler actually halts after the +dnl compilation phase without generating any object +dnl code file, when the source code tries to redefine +dnl a prototype which does not match previous one. + +AC_DEFUN([CARES_CHECK_COMPILER_PROTOTYPE_MISMATCH], [ + AC_REQUIRE([CARES_CHECK_COMPILER_HALT_ON_ERROR])dnl + AC_MSG_CHECKING([if compiler halts on function prototype mismatch]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +# include <stdlib.h> + int rand(int n); + int rand(int n) + { + if(n) + return ++n; + else + return n; + } + ]],[[ + int i[2]; + int j = rand(i[0]); + if(j) + return j; + ]]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([compiler does not halt on function prototype mismatch.]) + ],[ + AC_MSG_RESULT([yes]) + ]) +]) + + dnl CARES_VAR_MATCH (VARNAME, VALUE) dnl ------------------------------------------------- dnl Verifies if shell variable VARNAME contains VALUE. diff --git a/m4/cares-confopts.m4 b/m4/cares-confopts.m4 index f2ab45f..9d12a9b 100644 --- a/m4/cares-confopts.m4 +++ b/m4/cares-confopts.m4 @@ -1,7 +1,6 @@ #*************************************************************************** -# $Id$ # -# Copyright (C) 2008 - 2010 by Daniel Stenberg et al +# Copyright (C) 2008 - 2013 by Daniel Stenberg et al # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, provided @@ -16,7 +15,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 9 +# serial 11 dnl CARES_CHECK_OPTION_CURLDEBUG @@ -67,7 +66,7 @@ dnl variable want_debug value as appropriate. AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [ AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl AC_BEFORE([$0],[CARES_CHECK_OPTION_CURLDEBUG])dnl - AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl + AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl AC_MSG_CHECKING([whether to enable debug build options]) OPT_DEBUG_BUILD="default" AC_ARG_ENABLE(debug, @@ -132,7 +131,7 @@ dnl shell variable want_optimize value as appropriate. AC_DEFUN([CARES_CHECK_OPTION_OPTIMIZE], [ AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl - AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl + AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl AC_MSG_CHECKING([whether to enable compiler optimizer]) OPT_COMPILER_OPTIMIZE="default" AC_ARG_ENABLE(optimize, @@ -229,7 +228,7 @@ dnl shell variable want_warnings as appropriate. AC_DEFUN([CARES_CHECK_OPTION_WARNINGS], [ AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl AC_BEFORE([$0],[CARES_CHECK_OPTION_WERROR])dnl - AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl + AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl AC_MSG_CHECKING([whether to enable strict compiler warnings]) OPT_COMPILER_WARNINGS="default" AC_ARG_ENABLE(warnings, @@ -330,23 +329,26 @@ dnl ------------------------------------------------- dnl Depending on --enable-symbol-hiding or --disable-symbol-hiding dnl configure option, and compiler capability to actually honor such dnl option, this will modify compiler flags as appropriate and also -dnl provide needed definitions for configuration file. +dnl provide needed definitions for configuration and Makefile.am files. dnl This macro should not be used until all compilation tests have dnl been done to prevent interferences on other tests. AC_DEFUN([CARES_CONFIGURE_SYMBOL_HIDING], [ AC_MSG_CHECKING([whether hiding of library internal symbols will actually happen]) + CFLAG_CARES_SYMBOL_HIDING="" + doing_symbol_hiding="no" if test x"$ac_cv_native_windows" != "xyes" && test "$want_symbol_hiding" = "yes" && test "$supports_symbol_hiding" = "yes"; then - CFLAGS="$CFLAGS $symbol_hiding_CFLAGS" - AC_DEFINE_UNQUOTED(CARES_SYMBOL_HIDING, 1, - [Define to 1 to enable hiding of library internal symbols.]) + doing_symbol_hiding="yes" + CFLAG_CARES_SYMBOL_HIDING="$symbol_hiding_CFLAGS" AC_DEFINE_UNQUOTED(CARES_SYMBOL_SCOPE_EXTERN, $symbol_hiding_EXTERN, [Definition to make a library symbol externally visible.]) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi + AM_CONDITIONAL(DOING_CARES_SYMBOL_HIDING, test x$doing_symbol_hiding = xyes) + AC_SUBST(CFLAG_CARES_SYMBOL_HIDING) ]) diff --git a/m4/cares-functions.m4 b/m4/cares-functions.m4 index 68d2ba9..7c7c92b 100644 --- a/m4/cares-functions.m4 +++ b/m4/cares-functions.m4 @@ -1,6 +1,6 @@ #*************************************************************************** # -# Copyright (C) 2008 - 2011 by Daniel Stenberg et al +# Copyright (C) 2008 - 2012 by Daniel Stenberg et al # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, provided @@ -15,7 +15,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 43 +# serial 46 dnl CARES_INCLUDES_ARPA_INET @@ -883,6 +883,7 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [ AC_REQUIRE([CARES_INCLUDES_STRING])dnl AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl AC_REQUIRE([CARES_INCLUDES_NETDB])dnl + AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl # tst_links_getaddrinfo="unknown" tst_proto_getaddrinfo="unknown" @@ -1059,19 +1060,58 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [ tst_tsafe_getaddrinfo="yes" ;; esac + if test "$tst_tsafe_getaddrinfo" = "unknown" && + test "$ac_cv_native_windows" = "yes"; then + tst_tsafe_getaddrinfo="yes" + fi if test "$tst_tsafe_getaddrinfo" = "unknown"; then CURL_CHECK_DEF_CC([h_errno], [ - $cares_includes_ws2tcpip $cares_includes_sys_socket $cares_includes_netdb ], [silent]) - if test "$curl_cv_have_def_h_errno" = "no"; then + if test "$curl_cv_have_def_h_errno" = "yes"; then + tst_h_errno_macro="yes" + else + tst_h_errno_macro="no" + fi + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + $cares_includes_sys_socket + $cares_includes_netdb + ]],[[ + h_errno = 2; + if(0 != h_errno) + return 1; + ]]) + ],[ + tst_h_errno_modifiable_lvalue="yes" + ],[ + tst_h_errno_modifiable_lvalue="no" + ]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ +#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L) + return 0; +#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700) + return 0; +#else + force compilation error +#endif + ]]) + ],[ + tst_h_errno_sbs_issue_7="yes" + ],[ + tst_h_errno_sbs_issue_7="no" + ]) + if test "$tst_h_errno_macro" = "no" && + test "$tst_h_errno_modifiable_lvalue" = "no" && + test "$tst_h_errno_sbs_issue_7" = "no"; then tst_tsafe_getaddrinfo="no" + else + tst_tsafe_getaddrinfo="yes" fi fi - if test "$tst_tsafe_getaddrinfo" = "unknown"; then - tst_tsafe_getaddrinfo="yes" - fi AC_MSG_RESULT([$tst_tsafe_getaddrinfo]) if test "$tst_tsafe_getaddrinfo" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1, @@ -1368,6 +1408,7 @@ dnl HAVE_GETHOSTNAME will be defined. AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [ AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl AC_REQUIRE([CARES_INCLUDES_UNISTD])dnl + AC_REQUIRE([CARES_PREPROCESS_CALLCONV])dnl # tst_links_gethostname="unknown" tst_proto_gethostname="unknown" @@ -1425,6 +1466,35 @@ AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [ fi # if test "$tst_compi_gethostname" = "yes"; then + AC_MSG_CHECKING([for gethostname arg 2 data type]) + tst_gethostname_type_arg2="unknown" + for tst_arg1 in 'char *' 'unsigned char *' 'void *'; do + for tst_arg2 in 'int' 'unsigned int' 'size_t'; do + if test "$tst_gethostname_type_arg2" = "unknown"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + $cares_includes_winsock2 + $cares_includes_unistd + $cares_preprocess_callconv + extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2); + ]],[[ + if(0 != gethostname(0, 0)) + return 1; + ]]) + ],[ + tst_gethostname_type_arg2="$tst_arg2" + ]) + fi + done + done + AC_MSG_RESULT([$tst_gethostname_type_arg2]) + if test "$tst_gethostname_type_arg2" != "unknown"; then + AC_DEFINE_UNQUOTED(GETHOSTNAME_TYPE_ARG2, $tst_gethostname_type_arg2, + [Define to the type of arg 2 for gethostname.]) + fi + fi + # + if test "$tst_compi_gethostname" = "yes"; then AC_MSG_CHECKING([if gethostname usage allowed]) if test "x$cares_disallow_gethostname" != "xyes"; then AC_MSG_RESULT([yes]) diff --git a/m4/cares-override.m4 b/m4/cares-override.m4 index 101ca61..c7400fc 100644 --- a/m4/cares-override.m4 +++ b/m4/cares-override.m4 @@ -1,9 +1,8 @@ #*************************************************************************** -# $Id$ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 4 +# serial 8 dnl CARES_OVERRIDE_AUTOCONF dnl ------------------------------------------------- @@ -17,16 +16,6 @@ AC_BEFORE([$0],[AC_PROG_LIBTOOL]) # using cares-override.m4 ]) -dnl Override some Libtool tests -dnl ------------------------------------------------- -dnl This is done to prevent Libtool 1.5.X from doing -dnl unnecesary C++, Fortran and Java tests and reduce -dnl resulting configure script by nearly 300 Kb. - -m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:]) -m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:]) -m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:]) - dnl Override Autoconf's AC_LANG_PROGRAM (C) dnl ------------------------------------------------- dnl This is done to prevent compiler warning @@ -85,27 +74,3 @@ choke me #endif ], [return $1 ();])]) -dnl Override Autoconf's PATH_SEPARATOR check -dnl ------------------------------------------------- -dnl This is done to ensure that the same check is -dnl used across different Autoconf versions and to -dnl allow us to use this macro early enough in the -dnl configure script. - -m4_defun([_AS_PATH_SEPARATOR_PREPARE], -[CARES_CHECK_PATH_SEPARATOR -m4_define([$0],[])]) - -m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], -[CARES_CHECK_PATH_SEPARATOR -m4_define([$0],[])]) - -dnl Override Autoconf's AC_CONFIG_MACRO_DIR (DIR) -dnl ------------------------------------------------- -dnl This is an emulation of Autoconf's 2.61 macro. -dnl This is done to use fixed macro across Autoconf -dnl versions, and avoid warnings from modern libtool -dnl which traces usage of this macro. - -AC_DEFUN([AC_CONFIG_MACRO_DIR],[:]) - diff --git a/m4/cares-system.m4 b/m4/cares-system.m4 deleted file mode 100644 index f0adc89..0000000 --- a/m4/cares-system.m4 +++ /dev/null @@ -1,83 +0,0 @@ -#*************************************************************************** -# $Id$ -# -# Copyright (C) 2008 - 2009 by Daniel Stenberg et al -# -# Permission to use, copy, modify, and distribute this software and its -# documentation for any purpose and without fee is hereby granted, provided -# that the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -#*************************************************************************** - -# File version for 'aclocal' use. Keep it a single number. -# serial 3 - - -dnl CARES_CHECK_PATH_SEPARATOR -dnl ------------------------------------------------- -dnl Check and compute the path separator for us. This -dnl path separator is the symbol used to diferentiate -dnl or separate paths inside the PATH environment var. - -AC_DEFUN([CARES_CHECK_PATH_SEPARATOR], [ - if test -z "$cares_cv_PATH_SEPARATOR"; then - if test -z "$PATH"; then - AC_MSG_ERROR([PATH not set. Cannot continue without PATH being set.]) - fi - dnl Directory count in PATH when using a colon separator. - tst_dirs_col=0 - tst_save_IFS=$IFS; IFS=':' - for tst_dir in $PATH; do - IFS=$tst_save_IFS - test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1` - done - IFS=$tst_save_IFS - dnl Directory count in PATH when using a semicolon separator. - tst_dirs_sem=0 - tst_save_IFS=$IFS; IFS=';' - for tst_dir in $PATH; do - IFS=$tst_save_IFS - test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1` - done - IFS=$tst_save_IFS - if test $tst_dirs_sem -eq $tst_dirs_col; then - dnl When both counting methods give the same result we do not want to - dnl chose one over the other, and consider auto-detection not possible. - if test -z "$PATH_SEPARATOR"; then - dnl Stop dead until user provides PATH_SEPARATOR definition. - AC_MSG_ERROR([PATH_SEPARATOR not set. Cannot continue without it.]) - fi - else - dnl Separator with the greater directory count is the auto-detected one. - if test $tst_dirs_sem -gt $tst_dirs_col; then - tst_auto_separator=';' - else - tst_auto_separator=':' - fi - if test -z "$PATH_SEPARATOR"; then - dnl Simply use the auto-detected one when not already set. - PATH_SEPARATOR="$tst_auto_separator" - fi - fi - cares_cv_PATH_SEPARATOR="$PATH_SEPARATOR" - fi - AC_SUBST([PATH_SEPARATOR]) - AC_SUBST([PATH]) -]) - - -dnl CARES_CHECK_PATH_SEPARATOR_REQUIRED -dnl ------------------------------------------------- -dnl Use this to ensure that the path separator check -dnl macro is only expanded and included once. - -AC_DEFUN([CARES_CHECK_PATH_SEPARATOR_REQUIRED], [ - AC_REQUIRE([CARES_CHECK_PATH_SEPARATOR])dnl -]) - diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 8ff3c76..a849b9d 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,8 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -11,8 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -146,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +825,31 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1030,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1035,8 +1077,8 @@ _LT_EOF ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1280,7 +1324,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" @@ -1330,14 +1381,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1414,13 +1478,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1600,6 +1664,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1626,7 +1695,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else @@ -1639,7 +1709,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2185,7 +2255,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2194,7 +2264,7 @@ aix3*) ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2259,7 +2329,7 @@ beos*) ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2398,7 +2468,7 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2406,10 +2476,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,7 +2483,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2435,7 +2501,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2454,19 +2520,8 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2527,7 +2582,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2543,7 +2598,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2580,9 +2635,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2657,7 +2712,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2726,7 +2781,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2751,7 +2806,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2775,7 +2830,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2806,7 +2861,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2816,7 +2871,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3197,10 +3252,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3238,8 +3289,8 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3658,6 +3709,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -3752,7 +3804,7 @@ static const void *lt_preloaded_setup() { #endif _LT_EOF # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext + mv -f conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" @@ -3990,7 +4042,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4242,7 +4294,9 @@ m4_if([$1], [CXX], [ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4287,7 +4341,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -4334,18 +4388,33 @@ m4_if([$1], [CXX], [ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4505,7 +4574,9 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4533,7 +4604,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4787,8 +4857,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5084,6 +5153,7 @@ _LT_EOF # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5130,10 +5200,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5146,7 +5212,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5163,9 +5229,9 @@ _LT_EOF hpux9*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib' else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: @@ -5185,7 +5251,6 @@ _LT_EOF fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5627,9 +5692,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1], _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5787,7 +5849,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6157,7 +6218,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6173,9 +6234,6 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -6196,7 +6254,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6209,7 +6267,7 @@ if test "$_lt_caught_CXX_error" != yes; then ;; *) if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -6337,7 +6395,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6345,8 +6403,8 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv -f \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv -f \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6549,7 +6607,7 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv -f \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: @@ -6918,12 +6976,18 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7120,7 +7184,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7253,7 +7316,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7440,6 +7502,77 @@ CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7509,6 +7642,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], @@ -7614,7 +7754,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do fi while true; do cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in + mv -f conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index 17cfd51..5d9acd8 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index 9c7b5d4..07a8602 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/m4/xc-cc-check.m4 b/m4/xc-cc-check.m4 new file mode 100644 index 0000000..cd55405 --- /dev/null +++ b/m4/xc-cc-check.m4 @@ -0,0 +1,96 @@ +#--------------------------------------------------------------------------- +# +# xc-cc-check.m4 +# +# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#--------------------------------------------------------------------------- + +# serial 1 + + +dnl _XC_PROG_CC_PREAMBLE +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_PROG_CC_PREAMBLE], [ + xc_prog_cc_prev_IFS=$IFS + xc_prog_cc_prev_LIBS=$LIBS + xc_prog_cc_prev_CFLAGS=$CFLAGS + xc_prog_cc_prev_LDFLAGS=$LDFLAGS + xc_prog_cc_prev_CPPFLAGS=$CPPFLAGS +]) + + +dnl _XC_PROG_CC_POSTLUDE +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_PROG_CC_POSTLUDE], [ + IFS=$xc_prog_cc_prev_IFS + LIBS=$xc_prog_cc_prev_LIBS + CFLAGS=$xc_prog_cc_prev_CFLAGS + LDFLAGS=$xc_prog_cc_prev_LDFLAGS + CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS + AC_SUBST([CC])dnl + AC_SUBST([CPP])dnl + AC_SUBST([LIBS])dnl + AC_SUBST([CFLAGS])dnl + AC_SUBST([LDFLAGS])dnl + AC_SUBST([CPPFLAGS])dnl +]) + + +dnl _XC_PROG_CC +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_PROG_CC], [ + AC_REQUIRE([_XC_PROG_CC_PREAMBLE])dnl + AC_REQUIRE([XC_CHECK_USER_FLAGS])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AM_PROG_CC_C_O])dnl + AC_REQUIRE([AC_PROG_CPP])dnl + AC_REQUIRE([_XC_PROG_CC_POSTLUDE])dnl +]) + + +dnl XC_CHECK_PROG_CC +dnl ------------------------------------------------- +dnl Public macro. +dnl +dnl Checks for C compiler and C preprocessor programs, +dnl while doing some previous sanity validation on user +dnl provided LIBS, LDFLAGS, CPPFLAGS and CFLAGS values +dnl that must succeed in order to continue execution. +dnl +dnl This sets variables CC and CPP, while preventing +dnl LIBS, LDFLAGS, CFLAGS, CPPFLAGS and IFS from being +dnl unexpectedly changed by underlying macros. + +AC_DEFUN([XC_CHECK_PROG_CC], [ + AC_PREREQ([2.50])dnl + AC_BEFORE([$0],[_XC_PROG_CC_PREAMBLE])dnl + AC_BEFORE([$0],[AC_PROG_INSTALL])dnl + AC_BEFORE([$0],[AC_PROG_CC])dnl + AC_BEFORE([$0],[AM_PROG_CC_C_O])dnl + AC_BEFORE([$0],[AC_PROG_CPP])dnl + AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl + AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl + AC_BEFORE([$0],[_XC_PROG_CC_POSTLUDE])dnl + AC_REQUIRE([_XC_PROG_CC])dnl +]) + diff --git a/m4/xc-lt-iface.m4 b/m4/xc-lt-iface.m4 new file mode 100644 index 0000000..0b90d5f --- /dev/null +++ b/m4/xc-lt-iface.m4 @@ -0,0 +1,465 @@ +#--------------------------------------------------------------------------- +# +# xc-lt-iface.m4 +# +# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#--------------------------------------------------------------------------- + +# serial 1 + + +dnl _XC_LIBTOOL_PREAMBLE +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Checks some configure script options related with +dnl libtool and customizes its default behavior before +dnl libtool code is actually used in script. + +m4_define([_XC_LIBTOOL_PREAMBLE], +[dnl +# ------------------------------------ # +# Determine libtool default behavior # +# ------------------------------------ # + +# +# Default behavior is to enable shared and static libraries on systems +# where libtool knows how to build both library versions, and does not +# require separate configuration and build runs for each flavor. +# + +xc_lt_want_enable_shared='yes' +xc_lt_want_enable_static='yes' + +# +# User may have disabled shared or static libraries. +# +case "x$enable_shared" in @%:@ ( + xno) + xc_lt_want_enable_shared='no' + ;; +esac +case "x$enable_static" in @%:@ ( + xno) + xc_lt_want_enable_static='no' + ;; +esac +if test "x$xc_lt_want_enable_shared" = 'xno' && + test "x$xc_lt_want_enable_static" = 'xno'; then + AC_MSG_ERROR([can not disable shared and static libraries simultaneously]) +fi + +# +# Default behavior on systems that require independent configuration +# and build runs for shared and static is to enable shared libraries +# and disable static ones. On these systems option '--disable-shared' +# must be used in order to build a proper static library. +# + +if test "x$xc_lt_want_enable_shared" = 'xyes' && + test "x$xc_lt_want_enable_static" = 'xyes'; then + case $host_os in @%:@ ( + mingw* | pw32* | cegcc* | os2* | aix*) + xc_lt_want_enable_static='no' + ;; + esac +fi + +# +# Make libtool aware of current shared and static library preferences +# taking in account that, depending on host characteristics, libtool +# may modify these option preferences later in this configure script. +# + +enable_shared=$xc_lt_want_enable_shared +enable_static=$xc_lt_want_enable_static + +# +# Default behavior is to build PIC objects for shared libraries and +# non-PIC objects for static libraries. +# + +xc_lt_want_with_pic='default' + +# +# User may have specified PIC preference. +# + +case "x$with_pic" in @%:@ (( + xno) + xc_lt_want_with_pic='no' + ;; + xyes) + xc_lt_want_with_pic='yes' + ;; +esac + +# +# Default behavior on some systems where building a shared library out +# of non-PIC compiled objects will fail with following linker error +# "relocation R_X86_64_32 can not be used when making a shared object" +# is to build PIC objects even for static libraries. This behavior may +# be overriden using 'configure --disable-shared --without-pic'. +# + +if test "x$xc_lt_want_with_pic" = 'xdefault'; then + case $host_cpu in @%:@ ( + x86_64 | amd64 | ia64) + case $host_os in @%:@ ( + linux* | freebsd*) + xc_lt_want_with_pic='yes' + ;; + esac + ;; + esac +fi + +# +# Make libtool aware of current PIC preference taking in account that, +# depending on host characteristics, libtool may modify PIC default +# behavior to fit host system idiosyncrasies later in this script. +# + +with_pic=$xc_lt_want_with_pic +dnl +m4_define([$0],[])dnl +]) + + +dnl _XC_LIBTOOL_BODY +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl This macro performs embedding of libtool code into +dnl configure script, regardless of libtool version in +dnl use when generating configure script. + +m4_define([_XC_LIBTOOL_BODY], +[dnl +## ----------------------- ## +## Start of libtool code ## +## ----------------------- ## +m4_ifdef([LT_INIT], +[dnl +LT_INIT([win32-dll]) +],[dnl +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL +])dnl +## --------------------- ## +## End of libtool code ## +## --------------------- ## +dnl +m4_define([$0], [])[]dnl +]) + + +dnl _XC_CHECK_LT_BUILD_LIBRARIES +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Checks wether libtool shared and static libraries +dnl are finally built depending on user input, default +dnl behavior and knowledge that libtool has about host +dnl characteristics. +dnl Results stored in following shell variables: +dnl xc_lt_build_shared +dnl xc_lt_build_static + +m4_define([_XC_CHECK_LT_BUILD_LIBRARIES], +[dnl +# +# Verify if finally libtool shared libraries will be built +# + +case "x$enable_shared" in @%:@ (( + xyes | xno) + xc_lt_build_shared=$enable_shared + ;; + *) + AC_MSG_ERROR([unexpected libtool enable_shared value: $enable_shared]) + ;; +esac + +# +# Verify if finally libtool static libraries will be built +# + +case "x$enable_static" in @%:@ (( + xyes | xno) + xc_lt_build_static=$enable_static + ;; + *) + AC_MSG_ERROR([unexpected libtool enable_static value: $enable_static]) + ;; +esac +dnl +m4_define([$0],[])dnl +]) + + +dnl _XC_CHECK_LT_SHLIB_USE_VERSION_INFO +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Checks if the -version-info linker flag must be +dnl provided when building libtool shared libraries. +dnl Result stored in xc_lt_shlib_use_version_info. + +m4_define([_XC_CHECK_LT_SHLIB_USE_VERSION_INFO], +[dnl +# +# Verify if libtool shared libraries should be linked using flag -version-info +# + +AC_MSG_CHECKING([whether to build shared libraries with -version-info]) +xc_lt_shlib_use_version_info='yes' +if test "x$version_type" = 'xnone'; then + xc_lt_shlib_use_version_info='no' +fi +case $host_os in @%:@ ( + amigaos*) + xc_lt_shlib_use_version_info='yes' + ;; +esac +AC_MSG_RESULT([$xc_lt_shlib_use_version_info]) +dnl +m4_define([$0], [])[]dnl +]) + + +dnl _XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Checks if the -no-undefined linker flag must be +dnl provided when building libtool shared libraries. +dnl Result stored in xc_lt_shlib_use_no_undefined. + +m4_define([_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED], +[dnl +# +# Verify if libtool shared libraries should be linked using flag -no-undefined +# + +AC_MSG_CHECKING([whether to build shared libraries with -no-undefined]) +xc_lt_shlib_use_no_undefined='no' +if test "x$allow_undefined" = 'xno'; then + xc_lt_shlib_use_no_undefined='yes' +elif test "x$allow_undefined_flag" = 'xunsupported'; then + xc_lt_shlib_use_no_undefined='yes' +fi +case $host_os in @%:@ ( + cygwin* | mingw* | pw32* | cegcc* | os2* | aix*) + xc_lt_shlib_use_no_undefined='yes' + ;; +esac +AC_MSG_RESULT([$xc_lt_shlib_use_no_undefined]) +dnl +m4_define([$0], [])[]dnl +]) + + +dnl _XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Checks if the -mimpure-text linker flag must be +dnl provided when building libtool shared libraries. +dnl Result stored in xc_lt_shlib_use_mimpure_text. + +m4_define([_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT], +[dnl +# +# Verify if libtool shared libraries should be linked using flag -mimpure-text +# + +AC_MSG_CHECKING([whether to build shared libraries with -mimpure-text]) +xc_lt_shlib_use_mimpure_text='no' +case $host_os in @%:@ ( + solaris2*) + if test "x$GCC" = 'xyes'; then + xc_lt_shlib_use_mimpure_text='yes' + fi + ;; +esac +AC_MSG_RESULT([$xc_lt_shlib_use_mimpure_text]) +dnl +m4_define([$0], [])[]dnl +]) + + +dnl _XC_CHECK_LT_BUILD_WITH_PIC +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Checks wether libtool shared and static libraries +dnl would be built with PIC depending on user input, +dnl default behavior and knowledge that libtool has +dnl about host characteristics. +dnl Results stored in following shell variables: +dnl xc_lt_build_shared_with_pic +dnl xc_lt_build_static_with_pic + +m4_define([_XC_CHECK_LT_BUILD_WITH_PIC], +[dnl +# +# Find out wether libtool libraries would be built wit PIC +# + +case "x$pic_mode" in @%:@ (((( + xdefault) + xc_lt_build_shared_with_pic='yes' + xc_lt_build_static_with_pic='no' + ;; + xyes) + xc_lt_build_shared_with_pic='yes' + xc_lt_build_static_with_pic='yes' + ;; + xno) + xc_lt_build_shared_with_pic='no' + xc_lt_build_static_with_pic='no' + ;; + *) + xc_lt_build_shared_with_pic='unknown' + xc_lt_build_static_with_pic='unknown' + AC_MSG_WARN([unexpected libtool pic_mode value: $pic_mode]) + ;; +esac +AC_MSG_CHECKING([whether to build shared libraries with PIC]) +AC_MSG_RESULT([$xc_lt_build_shared_with_pic]) +AC_MSG_CHECKING([whether to build static libraries with PIC]) +AC_MSG_RESULT([$xc_lt_build_static_with_pic]) +dnl +m4_define([$0],[])dnl +]) + + +dnl _XC_CHECK_LT_BUILD_SINGLE_VERSION +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Checks wether a libtool shared or static library +dnl is finally built exclusively without the other. +dnl Results stored in following shell variables: +dnl xc_lt_build_shared_only +dnl xc_lt_build_static_only + +m4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION], +[dnl +# +# Verify if libtool shared libraries will be built while static not built +# + +AC_MSG_CHECKING([whether to build shared libraries only]) +if test "$xc_lt_build_shared" = 'yes' && + test "$xc_lt_build_static" = 'no'; then + xc_lt_build_shared_only='yes' +else + xc_lt_build_shared_only='no' +fi +AC_MSG_RESULT([$xc_lt_build_shared_only]) + +# +# Verify if libtool static libraries will be built while shared not built +# + +AC_MSG_CHECKING([whether to build static libraries only]) +if test "$xc_lt_build_static" = 'yes' && + test "$xc_lt_build_shared" = 'no'; then + xc_lt_build_static_only='yes' +else + xc_lt_build_static_only='no' +fi +AC_MSG_RESULT([$xc_lt_build_static_only]) +dnl +m4_define([$0],[])dnl +]) + + +dnl _XC_LIBTOOL_POSTLUDE +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Performs several checks related with libtool that +dnl can not be done unless libtool code has already +dnl been executed. See individual check descriptions +dnl for further info. + +m4_define([_XC_LIBTOOL_POSTLUDE], +[dnl +_XC_CHECK_LT_BUILD_LIBRARIES +_XC_CHECK_LT_SHLIB_USE_VERSION_INFO +_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED +_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT +_XC_CHECK_LT_BUILD_WITH_PIC +_XC_CHECK_LT_BUILD_SINGLE_VERSION +dnl +m4_define([$0],[])dnl +]) + + +dnl XC_LIBTOOL +dnl ------------------------------------------------- +dnl Public macro. +dnl +dnl This macro embeds libtool machinery into configure +dnl script, regardless of libtool version, and performs +dnl several additional checks whose results can be used +dnl later on. +dnl +dnl Usage of this macro ensures that generated configure +dnl script uses equivalent logic irrespective of autoconf +dnl or libtool version being used to generate configure +dnl script. +dnl +dnl Results stored in following shell variables: +dnl xc_lt_build_shared +dnl xc_lt_build_static +dnl xc_lt_shlib_use_version_info +dnl xc_lt_shlib_use_no_undefined +dnl xc_lt_shlib_use_mimpure_text +dnl xc_lt_build_shared_with_pic +dnl xc_lt_build_static_with_pic +dnl xc_lt_build_shared_only +dnl xc_lt_build_static_only + +AC_DEFUN([XC_LIBTOOL], +[dnl +AC_PREREQ([2.50])dnl +dnl +AC_BEFORE([$0],[LT_INIT])dnl +AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl +AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl +dnl +AC_REQUIRE([XC_CHECK_PATH_SEPARATOR])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +dnl +_XC_LIBTOOL_PREAMBLE +_XC_LIBTOOL_BODY +_XC_LIBTOOL_POSTLUDE +dnl +m4_ifdef([AC_LIBTOOL_WIN32_DLL], + [m4_undefine([AC_LIBTOOL_WIN32_DLL])])dnl +m4_ifdef([AC_PROG_LIBTOOL], + [m4_undefine([AC_PROG_LIBTOOL])])dnl +m4_ifdef([LT_INIT], + [m4_undefine([LT_INIT])])dnl +dnl +m4_define([$0],[])dnl +]) + diff --git a/m4/xc-val-flgs.m4 b/m4/xc-val-flgs.m4 new file mode 100644 index 0000000..81d1eac --- /dev/null +++ b/m4/xc-val-flgs.m4 @@ -0,0 +1,243 @@ +#--------------------------------------------------------------------------- +# +# xc-val-flgs.m4 +# +# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#--------------------------------------------------------------------------- + +# serial 1 + + +dnl _XC_CHECK_VAR_LIBS +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_CHECK_VAR_LIBS], [ + xc_bad_var_libs=no + for xc_word in $LIBS; do + case "$xc_word" in + -l* | --library=*) + : + ;; + *) + xc_bad_var_libs=yes + ;; + esac + done + if test $xc_bad_var_libs = yes; then + AC_MSG_NOTICE([using LIBS: $LIBS]) + AC_MSG_NOTICE([LIBS error: LIBS may only be used to specify libraries (-lname).]) + fi +]) + + +dnl _XC_CHECK_VAR_LDFLAGS +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_CHECK_VAR_LDFLAGS], [ + xc_bad_var_ldflags=no + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_ldflags=yes + ;; + -U*) + xc_bad_var_ldflags=yes + ;; + -I*) + xc_bad_var_ldflags=yes + ;; + -l* | --library=*) + xc_bad_var_ldflags=yes + ;; + esac + done + if test $xc_bad_var_ldflags = yes; then + AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS]) + xc_bad_var_msg="LDFLAGS error: LDFLAGS may only be used to specify linker flags, not" + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + AC_MSG_NOTICE([$xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word]) + ;; + -U*) + AC_MSG_NOTICE([$xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word]) + ;; + -I*) + AC_MSG_NOTICE([$xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word]) + ;; + -l* | --library=*) + AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word]) + ;; + esac + done + fi +]) + + +dnl _XC_CHECK_VAR_CPPFLAGS +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_CHECK_VAR_CPPFLAGS], [ + xc_bad_var_cppflags=no + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + xc_bad_var_cppflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cppflags=yes + ;; + -l* | --library=*) + xc_bad_var_cppflags=yes + ;; + esac + done + if test $xc_bad_var_cppflags = yes; then + AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS]) + xc_bad_var_msg="CPPFLAGS error: CPPFLAGS may only be used to specify C preprocessor flags, not" + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + AC_MSG_NOTICE([$xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word]) + ;; + -L* | --library-path=*) + AC_MSG_NOTICE([$xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word]) + ;; + -l* | --library=*) + AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word]) + ;; + esac + done + fi +]) + + +dnl _XC_CHECK_VAR_CFLAGS +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_CHECK_VAR_CFLAGS], [ + xc_bad_var_cflags=no + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_cflags=yes + ;; + -U*) + xc_bad_var_cflags=yes + ;; + -I*) + xc_bad_var_cflags=yes + ;; + -rpath*) + xc_bad_var_cflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cflags=yes + ;; + -l* | --library=*) + xc_bad_var_cflags=yes + ;; + esac + done + if test $xc_bad_var_cflags = yes; then + AC_MSG_NOTICE([using CFLAGS: $CFLAGS]) + xc_bad_var_msg="CFLAGS error: CFLAGS may only be used to specify C compiler flags, not" + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + AC_MSG_NOTICE([$xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word]) + ;; + -U*) + AC_MSG_NOTICE([$xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word]) + ;; + -I*) + AC_MSG_NOTICE([$xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word]) + ;; + -rpath*) + AC_MSG_NOTICE([$xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word]) + ;; + -L* | --library-path=*) + AC_MSG_NOTICE([$xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word]) + ;; + -l* | --library=*) + AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word]) + ;; + esac + done + fi +]) + + +dnl XC_CHECK_USER_FLAGS +dnl ------------------------------------------------- +dnl Public macro. +dnl +dnl Performs some sanity checks for LIBS, LDFLAGS, +dnl CPPFLAGS and CFLAGS values that the user might +dnl have set. When checks fails, user is noticed +dnl about errors detected in all of them and script +dnl execution is halted. +dnl +dnl Intended to be used early in configure script. + +AC_DEFUN([XC_CHECK_USER_FLAGS], [ + AC_PREREQ([2.50])dnl + AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl + dnl check order below matters + _XC_CHECK_VAR_LIBS + _XC_CHECK_VAR_LDFLAGS + _XC_CHECK_VAR_CPPFLAGS + _XC_CHECK_VAR_CFLAGS + if test $xc_bad_var_libs = yes || + test $xc_bad_var_cflags = yes || + test $xc_bad_var_ldflags = yes || + test $xc_bad_var_cppflags = yes; then + AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.]) + fi +]) + + +dnl XC_CHECK_BUILD_FLAGS +dnl ------------------------------------------------- +dnl Public macro. +dnl +dnl Performs some sanity checks for LIBS, LDFLAGS, +dnl CPPFLAGS and CFLAGS values that the configure +dnl script might have set. When checks fails, user +dnl is noticed about errors detected in all of them +dnl but script continues execution. +dnl +dnl Intended to be used very late in configure script. + +AC_DEFUN([XC_CHECK_BUILD_FLAGS], [ + AC_PREREQ([2.50])dnl + dnl check order below matters + _XC_CHECK_VAR_LIBS + _XC_CHECK_VAR_LDFLAGS + _XC_CHECK_VAR_CPPFLAGS + _XC_CHECK_VAR_CFLAGS + if test $xc_bad_var_libs = yes || + test $xc_bad_var_cflags = yes || + test $xc_bad_var_ldflags = yes || + test $xc_bad_var_cppflags = yes; then + AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.]) + fi +]) + diff --git a/m4/zz40-xc-ovr.m4 b/m4/zz40-xc-ovr.m4 new file mode 100644 index 0000000..0e3b1cb --- /dev/null +++ b/m4/zz40-xc-ovr.m4 @@ -0,0 +1,668 @@ +#--------------------------------------------------------------------------- +# +# zz40-xc-ovr.m4 +# +# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#--------------------------------------------------------------------------- + +# serial 1 + + +dnl The funny name of this file is intentional in order to make it +dnl sort alphabetically after any libtool, autoconf or automake +dnl provided .m4 macro file that might get copied into this same +dnl subdirectory. This allows that macro (re)definitions from this +dnl file may override those provided in other files. + + +dnl Version macros +dnl ------------------------------------------------- +dnl Public macros. + +m4_define([XC_CONFIGURE_PREAMBLE_VER_MAJOR],[1])dnl +m4_define([XC_CONFIGURE_PREAMBLE_VER_MINOR],[0])dnl + + +dnl _XC_CFG_PRE_PREAMBLE +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_CFG_PRE_PREAMBLE], +[ +## -------------------------------- ## +@%:@@%:@ [XC_CONFIGURE_PREAMBLE] ver: []dnl +XC_CONFIGURE_PREAMBLE_VER_MAJOR.[]dnl +XC_CONFIGURE_PREAMBLE_VER_MINOR ## +## -------------------------------- ## + +xc_configure_preamble_ver_major='XC_CONFIGURE_PREAMBLE_VER_MAJOR' +xc_configure_preamble_ver_minor='XC_CONFIGURE_PREAMBLE_VER_MINOR' + +# +# Set IFS to space, tab and newline. +# + +xc_space=' ' +xc_tab=' ' +xc_newline=' +' +IFS="$xc_space$xc_tab$xc_newline" + +# +# Set internationalization behavior variables. +# + +LANG='C' +LC_ALL='C' +LANGUAGE='C' +export LANG +export LC_ALL +export LANGUAGE + +# +# Some useful variables. +# + +xc_msg_warn='configure: WARNING:' +xc_msg_abrt='Can not continue.' +xc_msg_err='configure: error:' +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_CMD_ECHO +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'echo' command +dnl is available, otherwise aborts execution. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO], +[dnl +AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl +# +# Verify that 'echo' command is available, otherwise abort. +# + +xc_tst_str='unknown' +(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in @%:@ (( + xsuccess) + : + ;; + *) + # Try built-in echo, and fail. + echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_CMD_TEST +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'test' command +dnl is available, otherwise aborts execution. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_TEST], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl +# +# Verify that 'test' command is available, otherwise abort. +# + +xc_tst_str='unknown' +(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in @%:@ (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_VAR_PATH +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'PATH' variable +dnl is set, otherwise aborts execution. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_VAR_PATH], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl +# +# Verify that 'PATH' variable is set, otherwise abort. +# + +xc_tst_str='unknown' +(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in @%:@ (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_CMD_EXPR +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'expr' command +dnl is available, otherwise aborts execution. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl +# +# Verify that 'expr' command is available, otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null` +case "x$xc_tst_str" in @%:@ (( + x7) + : + ;; + *) + echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_UTIL_SED +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'sed' utility +dnl is found within 'PATH', otherwise aborts execution. +dnl +dnl This 'sed' is required in order to allow configure +dnl script bootstrapping itself. No fancy testing for a +dnl proper 'sed' this early, that should be done later. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_SED], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl +# +# Verify that 'sed' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | sed -e 's:unknown:success:' 2>/dev/null` +case "x$xc_tst_str" in @%:@ (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_UTIL_GREP +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'grep' utility +dnl is found within 'PATH', otherwise aborts execution. +dnl +dnl This 'grep' is required in order to allow configure +dnl script bootstrapping itself. No fancy testing for a +dnl proper 'grep' this early, that should be done later. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl +# +# Verify that 'grep' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +(`echo "$xc_tst_str" 2>/dev/null \ + | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in @%:@ (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_UTIL_TR +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'tr' utility +dnl is found within 'PATH', otherwise aborts execution. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_TR], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl +# +# Verify that 'tr' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10" +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | tr -d "0123456789$xc_tab" 2>/dev/null` +case "x$xc_tst_str" in @%:@ (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_UTIL_WC +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'wc' utility +dnl is found within 'PATH', otherwise aborts execution. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_WC], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl +# +# Verify that 'wc' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown unknown unknown unknown' +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null` +case "x$xc_tst_str" in @%:@ (( + x4) + : + ;; + *) + echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_BASIC_CHK_UTIL_CAT +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that verifies that 'cat' utility +dnl is found within 'PATH', otherwise aborts execution. + +AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl +# +# Verify that 'cat' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`cat <<_EOT 2>/dev/null \ + | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null +unknown +unknown +unknown +_EOT` +case "x$xc_tst_str" in @%:@ (( + x3) + : + ;; + *) + echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac +]) + + +dnl _XC_CFG_PRE_CHECK_PATH_SEPARATOR +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl Emits shell code that computes the path separator +dnl and stores the result in 'PATH_SEPARATOR', unless +dnl the user has already set it with a non-empty value. +dnl +dnl This path separator is the symbol used to separate +dnl or diferentiate paths inside the 'PATH' environment +dnl variable. +dnl +dnl Non-empty user provided 'PATH_SEPARATOR' always +dnl overrides the auto-detected one. + +AC_DEFUN([_XC_CFG_PRE_CHECK_PATH_SEPARATOR], +[dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl +# +# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set. +# + +# Directory count in 'PATH' when using a colon separator. +xc_tst_dirs_col='x' +xc_tst_prev_IFS=$IFS; IFS=':' +for xc_tst_dir in $PATH; do + IFS=$xc_tst_prev_IFS + xc_tst_dirs_col="x$xc_tst_dirs_col" +done +IFS=$xc_tst_prev_IFS +xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'` + +# Directory count in 'PATH' when using a semicolon separator. +xc_tst_dirs_sem='x' +xc_tst_prev_IFS=$IFS; IFS=';' +for xc_tst_dir in $PATH; do + IFS=$xc_tst_prev_IFS + xc_tst_dirs_sem="x$xc_tst_dirs_sem" +done +IFS=$xc_tst_prev_IFS +xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'` + +if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then + # When both counting methods give the same result we do not want to + # chose one over the other, and consider auto-detection not possible. + if test -z "$PATH_SEPARATOR"; then + # Stop dead until user provides 'PATH_SEPARATOR' definition. + echo "$xc_msg_err 'PATH_SEPARATOR' variable not set. $xc_msg_abrt" >&2 + exit 1 + fi +else + # Separator with the greater directory count is the auto-detected one. + if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then + xc_tst_auto_separator=';' + else + xc_tst_auto_separator=':' + fi + if test -z "$PATH_SEPARATOR"; then + # Simply use the auto-detected one when not already set. + PATH_SEPARATOR=$xc_tst_auto_separator + elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then + echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2 + fi +fi +xc_PATH_SEPARATOR=$PATH_SEPARATOR +AC_SUBST([PATH_SEPARATOR])dnl +]) + + +dnl _XC_CFG_PRE_POSTLUDE +dnl ------------------------------------------------- +dnl Private macro. + +AC_DEFUN([_XC_CFG_PRE_POSTLUDE], +[dnl +AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl +AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl +dnl +xc_configure_preamble_result='yes' +]) + + +dnl XC_CONFIGURE_PREAMBLE +dnl ------------------------------------------------- +dnl Public macro. +dnl +dnl This macro emits shell code which does some +dnl very basic checks related with the availability +dnl of some commands and utilities needed to allow +dnl configure script bootstrapping itself when using +dnl these to figure out other settings. Also emits +dnl code that performs PATH_SEPARATOR auto-detection +dnl and sets its value unless it is already set with +dnl a non-empty value. +dnl +dnl These basic checks are intended to be placed and +dnl executed as early as possible in the resulting +dnl configure script, and as such these must be pure +dnl and portable shell code. +dnl +dnl This macro may be used directly, or indirectly +dnl when using other macros that AC_REQUIRE it such +dnl as XC_CHECK_PATH_SEPARATOR. +dnl +dnl Currently the mechanism used to ensure that this +dnl macro expands early enough in generated configure +dnl script is making it override autoconf and libtool +dnl PATH_SEPARATOR check. + +AC_DEFUN([XC_CONFIGURE_PREAMBLE], +[dnl +AC_PREREQ([2.50])dnl +dnl +AC_BEFORE([$0],[_XC_CFG_PRE_PREAMBLE])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl +AC_BEFORE([$0],[_XC_CFG_PRE_POSTLUDE])dnl +dnl +AC_BEFORE([$0],[AC_CHECK_TOOL])dnl +AC_BEFORE([$0],[AC_CHECK_PROG])dnl +AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl +AC_BEFORE([$0],[AC_CHECK_PROGS])dnl +dnl +AC_BEFORE([$0],[AC_PATH_TOOL])dnl +AC_BEFORE([$0],[AC_PATH_PROG])dnl +AC_BEFORE([$0],[AC_PATH_PROGS])dnl +dnl +AC_BEFORE([$0],[AC_PROG_SED])dnl +AC_BEFORE([$0],[AC_PROG_GREP])dnl +AC_BEFORE([$0],[AC_PROG_LN_S])dnl +AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl +AC_BEFORE([$0],[AC_PROG_INSTALL])dnl +AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl +AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl +dnl +AC_BEFORE([$0],[LT_INIT])dnl +AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl +AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl +dnl +AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl +AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl +AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl +AC_REQUIRE([_XC_CFG_PRE_POSTLUDE])dnl +dnl +m4_pattern_forbid([^_*XC])dnl +m4_define([$0],[])dnl +]) + + +dnl Override autoconf and libtool PATH_SEPARATOR check +dnl ------------------------------------------------- +dnl Macros overriding. +dnl +dnl This is done to ensure that the same check is +dnl used across different autoconf versions and to +dnl allow expansion of XC_CONFIGURE_PREAMBLE macro +dnl early enough in the generated configure script. + +dnl +dnl Override when using autoconf 2.53 and newer. +dnl + +m4_ifdef([_AS_PATH_SEPARATOR_PREPARE], +[dnl +m4_undefine([_AS_PATH_SEPARATOR_PREPARE])dnl +m4_defun([_AS_PATH_SEPARATOR_PREPARE], +[dnl +AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl +m4_define([$0],[])dnl +])dnl +]) + +dnl +dnl Override when using autoconf 2.50 to 2.52 +dnl + +m4_ifdef([_AC_INIT_PREPARE_FS_SEPARATORS], +[dnl +m4_undefine([_AC_INIT_PREPARE_FS_SEPARATORS])dnl +m4_defun([_AC_INIT_PREPARE_FS_SEPARATORS], +[dnl +AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl +ac_path_separator=$PATH_SEPARATOR +m4_define([$0],[])dnl +])dnl +]) + +dnl +dnl Override when using libtool 1.4.2 +dnl + +m4_ifdef([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], +[dnl +m4_undefine([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl +m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], +[dnl +AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl +lt_cv_sys_path_separator=$PATH_SEPARATOR +m4_define([$0],[])dnl +])dnl +]) + + +dnl XC_CHECK_PATH_SEPARATOR +dnl ------------------------------------------------- +dnl Public macro. +dnl +dnl Usage of this macro ensures that generated configure +dnl script uses the same PATH_SEPARATOR check irrespective +dnl of autoconf or libtool version being used to generate +dnl configure script. +dnl +dnl Emits shell code that computes the path separator +dnl and stores the result in 'PATH_SEPARATOR', unless +dnl the user has already set it with a non-empty value. +dnl +dnl This path separator is the symbol used to separate +dnl or diferentiate paths inside the 'PATH' environment +dnl variable. +dnl +dnl Non-empty user provided 'PATH_SEPARATOR' always +dnl overrides the auto-detected one. +dnl +dnl Strictly speaking the check is done in two steps. The +dnl first, which does the actual check, takes place in +dnl XC_CONFIGURE_PREAMBLE macro and happens very early in +dnl generated configure script. The second one shows and +dnl logs the result of the check into config.log at a later +dnl configure stage. Placement of this second stage in +dnl generated configure script will be done where first +dnl direct or indirect usage of this macro happens. + +AC_DEFUN([XC_CHECK_PATH_SEPARATOR], +[dnl +AC_PREREQ([2.50])dnl +dnl +AC_BEFORE([$0],[AC_CHECK_TOOL])dnl +AC_BEFORE([$0],[AC_CHECK_PROG])dnl +AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl +AC_BEFORE([$0],[AC_CHECK_PROGS])dnl +dnl +AC_BEFORE([$0],[AC_PATH_TOOL])dnl +AC_BEFORE([$0],[AC_PATH_PROG])dnl +AC_BEFORE([$0],[AC_PATH_PROGS])dnl +dnl +AC_BEFORE([$0],[AC_PROG_SED])dnl +AC_BEFORE([$0],[AC_PROG_GREP])dnl +AC_BEFORE([$0],[AC_PROG_LN_S])dnl +AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl +AC_BEFORE([$0],[AC_PROG_INSTALL])dnl +AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl +AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl +dnl +AC_BEFORE([$0],[LT_INIT])dnl +AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl +AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl +dnl +AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl +dnl +# +# Check that 'XC_CONFIGURE_PREAMBLE' has already run. +# + +if test -z "$xc_configure_preamble_result"; then + AC_MSG_ERROR([xc_configure_preamble_result not set (internal problem)]) +fi + +# +# Check that 'PATH_SEPARATOR' has already been set. +# + +if test -z "$xc_PATH_SEPARATOR"; then + AC_MSG_ERROR([xc_PATH_SEPARATOR not set (internal problem)]) +fi +if test -z "$PATH_SEPARATOR"; then + AC_MSG_ERROR([PATH_SEPARATOR not set (internal or config.site problem)]) +fi +AC_MSG_CHECKING([for path separator]) +AC_MSG_RESULT([$PATH_SEPARATOR]) +if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then + AC_MSG_CHECKING([for initial path separator]) + AC_MSG_RESULT([$xc_PATH_SEPARATOR]) + AC_MSG_ERROR([path separator mismatch (internal or config.site problem)]) +fi +dnl +m4_pattern_forbid([^_*XC])dnl +m4_define([$0],[])dnl +]) + diff --git a/m4/zz50-xc-ovr.m4 b/m4/zz50-xc-ovr.m4 new file mode 100644 index 0000000..7e9ae59 --- /dev/null +++ b/m4/zz50-xc-ovr.m4 @@ -0,0 +1,60 @@ +#--------------------------------------------------------------------------- +# +# zz50-xc-ovr.m4 +# +# Copyright (c) 2011 Daniel Stenberg <daniel@haxx.se> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#--------------------------------------------------------------------------- + +# serial 1 + + +dnl The funny name of this file is intentional in order to make it +dnl sort alphabetically after any libtool, autoconf or automake +dnl provided .m4 macro file that might get copied into this same +dnl subdirectory. This allows that macro (re)definitions from this +dnl file may override those provided in other files. + + +dnl Override some language related macros +dnl ------------------------------------------------- +dnl This is done to prevent Libtool 1.5.X from doing +dnl unnecesary C++, Fortran and Java tests when only +dnl using C language and reduce resulting configure +dnl script by nearly 300 Kb. + +m4_ifdef([AC_LIBTOOL_LANG_CXX_CONFIG], + [m4_undefine([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:]) + +m4_ifdef([AC_LIBTOOL_LANG_F77_CONFIG], + [m4_undefine([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:]) + +m4_ifdef([AC_LIBTOOL_LANG_GCJ_CONFIG], + [m4_undefine([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:]) + + +dnl XC_OVR_ZZ50 +dnl ------------------------------------------------- +dnl Placing a call to this macro in configure.ac will +dnl make macros in this file visible to other macros +dnl used for same configure script, overriding those +dnl provided elsewhere. + +AC_DEFUN([XC_OVR_ZZ50], + [AC_BEFORE([$0],[AC_PROG_LIBTOOL])]) + diff --git a/m4/zz60-xc-ovr.m4 b/m4/zz60-xc-ovr.m4 new file mode 100644 index 0000000..959f118 --- /dev/null +++ b/m4/zz60-xc-ovr.m4 @@ -0,0 +1,64 @@ +#--------------------------------------------------------------------------- +# +# zz60-xc-ovr.m4 +# +# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#--------------------------------------------------------------------------- + +# serial 1 + + +dnl The funny name of this file is intentional in order to make it +dnl sort alphabetically after any libtool, autoconf or automake +dnl provided .m4 macro file that might get copied into this same +dnl subdirectory. This allows that macro (re)definitions from this +dnl file may override those provided in other files. + + +dnl Override an autoconf provided macro +dnl ------------------------------------------------- +dnl This macro overrides the one provided by autoconf +dnl 2.58 or newer, and provides macro definition for +dnl autoconf 2.57 or older which lack it. This allows +dnl using libtool 2.2 or newer, which requires that +dnl this macro is used in configure.ac, with autoconf +dnl 2.57 or older. + +m4_ifdef([AC_CONFIG_MACRO_DIR], +[dnl +m4_undefine([AC_CONFIG_MACRO_DIR])dnl +]) +m4_define([AC_CONFIG_MACRO_DIR],[]) + + +dnl XC_OVR_ZZ60 +dnl ------------------------------------------------- +dnl Placing a call to this macro in configure.ac will +dnl make macros in this file visible to other macros +dnl used for same configure script, overriding those +dnl provided elsewhere. + +AC_DEFUN([XC_OVR_ZZ60], +[dnl +AC_BEFORE([$0],[LT_INIT])dnl +AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl +AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl +AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl +dnl +AC_BEFORE([$0],[AC_CONFIG_MACRO_DIR])dnl +AC_BEFORE([$0],[AC_CONFIG_MACRO_DIRS])dnl +]) + @@ -59,6 +59,9 @@ print "running configure\n"; print "running make pdf\n"; `make -s pdf`; +print "produce CHANGES\n"; +`git log --pretty=fuller --no-color --date=short --decorate=full -1000 | ./git2changes.pl > CHANGES.dist`; + # now make the actual tarball print "running make dist\n"; `make dist VERSION=$version`; @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2012-01-06.13; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -18,9 +18,7 @@ scriptversion=2005-06-08.21 # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,6 +31,8 @@ if test $# -eq 0; then fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +44,7 @@ fi msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,15 +77,18 @@ Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + Send bug reports to <bug-automake@gnu.org>." exit $? ;; @@ -103,23 +106,21 @@ Send bug reports to <bug-automake@gnu.org>." esac +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). -case "$1" in - lex|yacc) +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) # Not GNU programs, they don't have --version. ;; - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -135,7 +136,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -145,7 +146,7 @@ WARNING: \`$1' is $msg. You should only need it if touch aclocal.m4 ;; - autoconf) + autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the @@ -154,7 +155,7 @@ WARNING: \`$1' is $msg. You should only need it if touch configure ;; - autoheader) + autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want @@ -164,7 +165,7 @@ WARNING: \`$1' is $msg. You should only need it if test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -184,7 +185,7 @@ WARNING: \`$1' is $msg. You should only need it if while read f; do touch "$f"; done ;; - autom4te) + autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the @@ -192,8 +193,8 @@ WARNING: \`$1' is needed, but is $msg. You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -207,80 +208,78 @@ WARNING: \`$1' is needed, but is $msg. fi ;; - bison|yacc) + bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; - lex|flex) + lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; - help2man) + help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit 1 + exit $? fi ;; - makeinfo) + makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -289,11 +288,17 @@ WARNING: \`$1' is $msg. You should only need it if DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -303,41 +308,6 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. @@ -356,5 +326,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: @@ -186,11 +186,19 @@ typedef enum __ns_rcode { #define T_SRV ns_t_srv #define T_ATMA ns_t_atma #define T_NAPTR ns_t_naptr +#define T_KX ns_t_kx +#define T_CERT ns_t_cert +#define T_A6 ns_t_a6 +#define T_DNAME ns_t_dname +#define T_SINK ns_t_sink +#define T_OPT ns_t_opt +#define T_APL ns_t_apl #define T_DS ns_t_ds #define T_SSHFP ns_t_sshfp #define T_RRSIG ns_t_rrsig #define T_NSEC ns_t_nsec #define T_DNSKEY ns_t_dnskey +#define T_TKEY ns_t_tkey #define T_TSIG ns_t_tsig #define T_IXFR ns_t_ixfr #define T_AXFR ns_t_axfr diff --git a/setup_once.h b/setup_once.h index a333f54..25b144a 100644 --- a/setup_once.h +++ b/setup_once.h @@ -2,7 +2,7 @@ #define __SETUP_ONCE_H -/* Copyright (C) 2004 - 2011 by Daniel Stenberg et al +/* Copyright (C) 2004 - 2013 by Daniel Stenberg et al * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided @@ -72,10 +72,38 @@ #include <fcntl.h> #endif -#ifdef HAVE_STDBOOL_H +#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T) #include <stdbool.h> #endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#ifdef __hpux +# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL) +# ifdef _APP32_64BIT_OFF_T +# define OLD_APP32_64BIT_OFF_T _APP32_64BIT_OFF_T +# undef _APP32_64BIT_OFF_T +# else +# undef OLD_APP32_64BIT_OFF_T +# endif +# endif +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif + +#ifdef __hpux +# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL) +# ifdef OLD_APP32_64BIT_OFF_T +# define _APP32_64BIT_OFF_T OLD_APP32_64BIT_OFF_T +# undef OLD_APP32_64BIT_OFF_T +# endif +# endif +#endif + /* * Definition of timeval struct for platforms that don't have it. @@ -232,6 +260,8 @@ struct timeval { # define sclose(x) closesocket((x)) #elif defined(HAVE_CLOSESOCKET_CAMEL) # define sclose(x) CloseSocket((x)) +#elif defined(HAVE_CLOSE_S) +# define sclose(x) close_s((x)) #else # define sclose(x) close((x)) #endif @@ -260,6 +290,18 @@ struct timeval { /* + * 'bool' stuff compatible with HP-UX headers. + */ + +#if defined(__hpux) && !defined(HAVE_BOOL_T) + typedef int bool; +# define false 0 +# define true 1 +# define HAVE_BOOL_T +#endif + + +/* * 'bool' exists on platforms with <stdbool.h>, i.e. C99 platforms. * On non-C99 platforms there's no bool, so define an enum for that. * On C99 platforms 'false' and 'true' also exist. Enum uses a @@ -300,6 +342,27 @@ struct timeval { /* + * Macro WHILE_FALSE may be used to build single-iteration do-while loops, + * avoiding compiler warnings. Mostly intended for other macro definitions. + */ + +#define WHILE_FALSE while(0) + +#if defined(_MSC_VER) && !defined(__POCC__) +# undef WHILE_FALSE +# if (_MSC_VER < 1500) +# define WHILE_FALSE while(1, 0) +# else +# define WHILE_FALSE \ +__pragma(warning(push)) \ +__pragma(warning(disable:4127)) \ +while(0) \ +__pragma(warning(pop)) +# endif +#endif + + +/* * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type. */ @@ -336,7 +399,7 @@ typedef int sig_atomic_t; #ifdef DEBUGBUILD #define DEBUGF(x) x #else -#define DEBUGF(x) do { } while (0) +#define DEBUGF(x) do { } WHILE_FALSE #endif @@ -347,7 +410,7 @@ typedef int sig_atomic_t; #if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H) #define DEBUGASSERT(x) assert(x) #else -#define DEBUGASSERT(x) do { } while (0) +#define DEBUGASSERT(x) do { } WHILE_FALSE #endif @@ -460,18 +523,6 @@ typedef int sig_atomic_t; /* - * System error codes for Windows CE - */ - -#if defined(WIN32) && !defined(HAVE_ERRNO_H) -#define ENOENT ERROR_FILE_NOT_FOUND -#define ESRCH ERROR_PATH_NOT_FOUND -#define ENOMEM ERROR_NOT_ENOUGH_MEMORY -#define ENOSPC ERROR_INVALID_PARAMETER -#endif - - -/* * Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid() */ @@ -501,4 +552,3 @@ typedef int sig_atomic_t; #endif /* __SETUP_ONCE_H */ - diff --git a/vc/cares/vc6cares.dsp b/vc/cares/vc6cares.dsp index 595a0f1..02a4909 100644 --- a/vc/cares/vc6cares.dsp +++ b/vc/cares/vc6cares.dsp @@ -170,6 +170,10 @@ SOURCE=..\..\ares_cancel.c # End Source File
# Begin Source File
+SOURCE=..\..\ares_create_query.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\ares_data.c
# End Source File
# Begin Source File
@@ -254,6 +258,10 @@ SOURCE=..\..\ares_parse_mx_reply.c # End Source File
# Begin Source File
+SOURCE=..\..\ares_parse_naptr_reply.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\ares_parse_ns_reply.c
# End Source File
# Begin Source File
@@ -262,6 +270,10 @@ SOURCE=..\..\ares_parse_ptr_reply.c # End Source File
# Begin Source File
+SOURCE=..\..\ares_parse_soa_reply.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\ares_parse_srv_reply.c
# End Source File
# Begin Source File
|