Permalink
Browse files

unix: Remove c-ares and libev configure scripts

Instead let's be a bit more clever.
  • Loading branch information...
ry committed Jun 27, 2011
1 parent 8801925 commit daa499c5675c84d59d62491bdde673a58346ba0b
Showing with 4,663 additions and 67,067 deletions.
  1. +56 −3 Makefile
  2. +22 −0 c-ares/CMakeLists.txt
  3. +0 −169 c-ares/Makefile.Watcom
  4. +0 −175 c-ares/Makefile.am
  5. +0 −85 c-ares/Makefile.dj
  6. +0 −1,401 c-ares/Makefile.in
  7. +0 −192 c-ares/Makefile.inc
  8. +0 −68 c-ares/Makefile.m32
  9. +0 −476 c-ares/Makefile.msvc
  10. +0 −434 c-ares/Makefile.netware
  11. +21 −0 c-ares/README.node
  12. +0 −1,925 c-ares/acinclude.m4
  13. +0 −931 c-ares/aclocal.m4
  14. +0 −627 c-ares/acountry.c
  15. +0 −819 c-ares/adig.c
  16. +0 −201 c-ares/ahost.c
  17. +3 −0 c-ares/ares.h
  18. +0 −252 c-ares/ares_build.h
  19. +0 −43 c-ares/ares_cancel.3
  20. +0 −43 c-ares/ares_destroy.3
  21. +0 −38 c-ares/ares_destroy_options.3
  22. +0 −43 c-ares/ares_dup.3
  23. +0 −63 c-ares/ares_expand_name.3
  24. +0 −61 c-ares/ares_expand_string.3
  25. +0 −61 c-ares/ares_fds.3
  26. +0 −72 c-ares/ares_free_data.3
  27. +0 −45 c-ares/ares_free_hostent.3
  28. +0 −35 c-ares/ares_free_string.3
  29. +0 −78 c-ares/ares_get_servers.3
  30. +0 −101 c-ares/ares_gethostbyaddr.3
  31. +0 −105 c-ares/ares_gethostbyname.3
  32. +0 −83 c-ares/ares_gethostbyname_file.3
  33. +0 −149 c-ares/ares_getnameinfo.3
  34. +0 −57 c-ares/ares_getsock.3
  35. +0 −223 c-ares/ares_init.3
  36. +0 −1 c-ares/ares_init_options.3
  37. +0 −73 c-ares/ares_library_cleanup.3
  38. +0 −96 c-ares/ares_library_init.3
  39. +0 −75 c-ares/ares_mkquery.3
  40. +0 −78 c-ares/ares_parse_a_reply.3
  41. +0 −78 c-ares/ares_parse_aaaa_reply.3
  42. +0 −79 c-ares/ares_parse_mx_reply.3
  43. +0 −66 c-ares/ares_parse_ns_reply.3
  44. +0 −74 c-ares/ares_parse_ptr_reply.3
  45. +0 −81 c-ares/ares_parse_srv_reply.3
  46. +0 −80 c-ares/ares_parse_txt_reply.3
  47. +0 −80 c-ares/ares_process.3
  48. +0 −146 c-ares/ares_query.3
  49. +0 −74 c-ares/ares_save_options.3
  50. +0 −148 c-ares/ares_search.3
  51. +0 −120 c-ares/ares_send.3
  52. +0 −84 c-ares/ares_set_servers.3
  53. +0 −28 c-ares/ares_set_socket_callback.3
  54. +3 −0 c-ares/ares_setup.h
  55. +0 −37 c-ares/ares_strerror.3
  56. +0 −61 c-ares/ares_timeout.3
  57. +0 −40 c-ares/ares_version.3
  58. +0 −117 c-ares/buildconf
  59. +0 −65 c-ares/cares.rc
  60. +0 −142 c-ares/compile
  61. +0 −114 c-ares/config-dos.h
  62. +0 −1,502 c-ares/config.guess
  63. +0 −1,714 c-ares/config.sub
  64. +8 −6 c-ares/{ares_build.h.in → config_cygwin/ares_build.h}
  65. +513 −0 c-ares/config_cygwin/ares_config.h
  66. +112 −0 c-ares/config_darwin/ares_build.h
  67. +513 −0 c-ares/config_darwin/ares_config.h
  68. +112 −0 c-ares/config_freebsd/ares_build.h
  69. +513 −0 c-ares/config_freebsd/ares_config.h
  70. +112 −0 c-ares/config_linux/ares_build.h
  71. +513 −0 c-ares/config_linux/ares_config.h
  72. +112 −0 c-ares/config_openbsd/ares_build.h
  73. +513 −0 c-ares/config_openbsd/ares_config.h
  74. +112 −0 c-ares/config_sunos/ares_build.h
  75. +167 −166 c-ares/{ares_config.h.in → config_sunos/ares_config.h}
  76. +111 −0 c-ares/config_win32/ares_build.h
  77. +513 −0 c-ares/config_win32/ares_config.h
  78. +0 −27,058 c-ares/configure
  79. +0 −889 c-ares/configure.ac
  80. +0 −530 c-ares/depcomp
  81. +0 −250 c-ares/install-sh
  82. +0 −20 c-ares/libcares.pc.in
  83. +0 −8,413 c-ares/ltmain.sh
  84. +0 −1,551 c-ares/m4/cares-compilers.m4
  85. +0 −352 c-ares/m4/cares-confopts.m4
  86. +0 −3,235 c-ares/m4/cares-functions.m4
  87. +0 −102 c-ares/m4/cares-override.m4
  88. +0 −611 c-ares/m4/cares-reentrant.m4
  89. +0 −83 c-ares/m4/cares-system.m4
  90. +0 −7,377 c-ares/m4/libtool.m4
  91. +0 −368 c-ares/m4/ltoptions.m4
  92. +0 −123 c-ares/m4/ltsugar.m4
  93. +0 −23 c-ares/m4/ltversion.m4
  94. +0 −92 c-ares/m4/lt~obsolete.m4
  95. +0 −74 c-ares/maketgz
  96. +0 −360 c-ares/missing
  97. +0 −39 c-ares/mkinstalldirs
  98. +0 −170 c-ares/vc/acountry/vc6acountry.dsp
  99. +0 −170 c-ares/vc/adig/vc6adig.dsp
  100. +0 −170 c-ares/vc/ahost/vc6ahost.dsp
  101. +0 −397 c-ares/vc/cares/vc6cares.dsp
  102. +0 −29 c-ares/vc/cares/vc6cares.dsw
  103. +0 −74 c-ares/vc/vc6aws.dsw
  104. +4 −2 config-mingw.mk
  105. +21 −22 config-unix.mk
  106. +123 −0 ev/config_cygwin.h
  107. +122 −0 ev/config_darwin.h
  108. +120 −0 ev/config_freebsd.h
  109. +122 −0 ev/config_linux.h
  110. +122 −0 ev/config_sunos.h
View
@@ -20,6 +20,56 @@
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ifdef MSVC
+uname_S := MINGW
+endif
+
+CPPFLAGS += -Ic-ares/
+CARES_OBJS =
+CARES_OBJS += c-ares/ares__close_sockets.o
+CARES_OBJS += c-ares/ares__get_hostent.o
+CARES_OBJS += c-ares/ares__read_line.o
+CARES_OBJS += c-ares/ares__timeval.o
+CARES_OBJS += c-ares/ares_cancel.o
+CARES_OBJS += c-ares/ares_data.o
+CARES_OBJS += c-ares/ares_destroy.o
+CARES_OBJS += c-ares/ares_expand_name.o
+CARES_OBJS += c-ares/ares_expand_string.o
+CARES_OBJS += c-ares/ares_fds.o
+CARES_OBJS += c-ares/ares_free_hostent.o
+CARES_OBJS += c-ares/ares_free_string.o
+CARES_OBJS += c-ares/ares_gethostbyaddr.o
+CARES_OBJS += c-ares/ares_gethostbyname.o
+CARES_OBJS += c-ares/ares_getnameinfo.o
+CARES_OBJS += c-ares/ares_getopt.o
+CARES_OBJS += c-ares/ares_getsock.o
+CARES_OBJS += c-ares/ares_init.o
+CARES_OBJS += c-ares/ares_library_init.o
+CARES_OBJS += c-ares/ares_llist.o
+CARES_OBJS += c-ares/ares_mkquery.o
+CARES_OBJS += c-ares/ares_nowarn.o
+CARES_OBJS += c-ares/ares_options.o
+CARES_OBJS += c-ares/ares_parse_a_reply.o
+CARES_OBJS += c-ares/ares_parse_aaaa_reply.o
+CARES_OBJS += c-ares/ares_parse_mx_reply.o
+CARES_OBJS += c-ares/ares_parse_ns_reply.o
+CARES_OBJS += c-ares/ares_parse_ptr_reply.o
+CARES_OBJS += c-ares/ares_parse_srv_reply.o
+CARES_OBJS += c-ares/ares_parse_txt_reply.o
+CARES_OBJS += c-ares/ares_process.o
+CARES_OBJS += c-ares/ares_query.o
+CARES_OBJS += c-ares/ares_search.o
+CARES_OBJS += c-ares/ares_send.o
+CARES_OBJS += c-ares/ares_strcasecmp.o
+CARES_OBJS += c-ares/ares_strdup.o
+CARES_OBJS += c-ares/ares_strerror.o
+CARES_OBJS += c-ares/ares_timeout.o
+CARES_OBJS += c-ares/ares_version.o
+CARES_OBJS += c-ares/ares_writev.o
+CARES_OBJS += c-ares/bitncmp.o
+CARES_OBJS += c-ares/inet_net_pton.o
+CARES_OBJS += c-ares/inet_ntop.o
+
ifneq (,$(findstring MINGW,$(uname_S)))
include config-mingw.mk
else
@@ -31,16 +81,19 @@ BENCHMARKS=test/echo-server.c test/dns-server.c test/benchmark-*.c
all: uv.a test/run-tests test/run-benchmarks
+$(CARES_OBJS): %.o: %.c
+ $(CC) -o $*.o -c $(CFLAGS) $(CPPFLAGS) $< -DHAVE_CONFIG_H
+
test/run-tests$(E): test/*.h test/run-tests.c $(RUNNER_SRC) test/runner-unix.c $(TESTS) uv.a
- $(CC) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-tests test/run-tests.c \
+ $(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-tests test/run-tests.c \
test/runner.c $(RUNNER_SRC) $(TESTS) uv.a $(RUNNER_LIBS)
test/run-benchmarks$(E): test/*.h test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) uv.a
- $(CC) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-benchmarks test/run-benchmarks.c \
+ $(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-benchmarks test/run-benchmarks.c \
test/runner.c $(RUNNER_SRC) $(BENCHMARKS) uv.a $(RUNNER_LIBS)
test/echo.o: test/echo.c test/echo.h
- $(CC) $(CFLAGS) -c test/echo.c -o test/echo.o
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c test/echo.c -o test/echo.o
.PHONY: clean clean-platform distclean distclean-platform test benchmark
View
@@ -0,0 +1,22 @@
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${node_platform}-${cares_arch})
+add_definitions(-DHAVE_CONFIG_H=1)
+
+include(CheckLibraryExists)
+check_library_exists(socket socket "" HAVE_SOCKET_LIB)
+check_library_exists(nsl gethostbyname "" HAVE_NSL_LIB)
+
+file(GLOB lib_sources *.c)
+add_library(cares ${lib_sources})
+
+if(${HAVE_SOCKET_LIB})
+ set(cares_libs ${cares_libs} socket)
+endif()
+
+if(${HAVE_NSL_LIB})
+ set(cares_libs ${cares_libs} nsl)
+endif()
+
+if(cares_libs)
+ target_link_libraries(cares ${cares_libs})
+endif()
View
@@ -1,169 +0,0 @@
-#
-# Watcom / OpenWatcom / Win32 makefile for cares.
-# Quick hack by Guenter; comments to: /dev/nul
-#
-
-!ifndef %watcom
-!error WATCOM environment variable not set!
-!else
-SYS_INCL = -I$(%watcom)\h\nt -I$(%watcom)\h
-SYS_LIBS = $(%watcom)\lib386\nt;$(%watcom)\lib386
-!endif
-
-!ifdef %libname
-LIBNAME = $(%libname)
-!else
-LIBNAME = cares
-!endif
-TARGETS = $(LIBNAME).dll $(LIBNAME)_imp.lib $(LIBNAME).lib
-DEMOS = adig.exe ahost.exe acountry.exe
-
-CC = wcc386
-LD = wlink
-AR = wlib
-RC = wrc
-
-!ifdef __LOADDLL__
-! loaddll wcc386 wccd386
-! loaddll wpp386 wppd386
-! loaddll wlib wlibd
-!endif
-
-!if $(__VERSION__) < 1250
-RM = del /q /f 2>NUL
-!else
-RM = rm -f
-!endif
-MD = mkdir
-RD = rmdir /q /s 2>NUL
-CP = copy
-
-CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm &
- -wcd=201 -bt=nt -d+ -dWIN32 -dCARES_BUILDING_LIBRARY &
- -dNTDDI_VERSION=0x05000100 -I. $(SYS_INCL)
-
-LFLAGS = option quiet, map, caseexact, eliminate
-
-!ifdef %debug
-DEBUG = -dDEBUG=1 -dDEBUGBUILD
-CFLAGS += -d3 $(DEBUG)
-LFLAGS += debug all
-!else
-CFLAGS += -d0
-!endif
-
-!ifdef %use_ipv6
-CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6
-!endif
-
-#
-# Change to suite.
-#
-!ifdef %use_watt32
-CFLAGS += -dUSE_WATT32 -I$(%watt_root)\inc
-!endif
-
-OBJ_BASE = WC_Win32.obj
-LINK_ARG = $(OBJ_BASE)\dyn\wlink.arg
-LIB_ARG = $(OBJ_BASE)\stat\wlib.arg
-
-# In order to process Makefile.inc wmake must be called with -u switch!
-!ifneq __MAKEOPTS__ -u
-!error You MUST call wmake with the -u switch!
-!else
-!include Makefile.inc
-!endif
-
-OBJS = $(CSOURCES:.c=.obj)
-OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
-
-#
-# Use $(OBJS) as a template to generate $(OBJS_STAT) and $(OBJS_DYN).
-#
-OBJ_DIR = $(OBJ_BASE)\stat
-OBJS_STAT = $+ $(OBJS) $-
-
-OBJ_DIR = $(OBJ_BASE)\dyn
-OBJS_DYN = $+ $(OBJS) $-
-
-ARESBUILDH = ares_build.h
-RESOURCE = $(OBJ_BASE)\dyn\cares.res
-
-all: $(ARESBUILDH) $(OBJ_BASE) $(TARGETS) .SYMBOLIC
- @echo Welcome to cares
-
-demos: all $(DEMOS) .SYMBOLIC
- @echo Welcome to cares-demos
-
-$(OBJ_BASE):
- -$(MD) $^@
- -$(MD) $^@\stat
- -$(MD) $^@\dyn
- -$(MD) $^@\demos
-
-$(ARESBUILDH): .EXISTSONLY
- $(CP) $^@.dist $^@
-
-$(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG)
- $(LD) name $^@ @$]@
-
-$(LIBNAME).lib: $(OBJS_STAT) $(LIB_ARG)
- $(AR) -q -b -c $^@ @$]@
-
-adig.exe: $(OBJ_BASE)\demos\adig.obj $(OBJ_BASE)\demos\ares_getopt.obj $(LIBNAME).lib
- $(LD) name $^@ system nt $(LFLAGS) file { $[@ $(OBJ_BASE)\demos\ares_getopt.obj } library $]@, ws2_32.lib
-
-ahost.exe: $(OBJ_BASE)\demos\ahost.obj $(OBJ_BASE)\demos\ares_getopt.obj $(LIBNAME).lib
- $(LD) name $^@ system nt $(LFLAGS) file { $[@ $(OBJ_BASE)\demos\ares_getopt.obj } library $]@, ws2_32.lib
-
-acountry.exe: $(OBJ_BASE)\demos\acountry.obj $(OBJ_BASE)\demos\ares_getopt.obj $(LIBNAME).lib
- $(LD) name $^@ system nt $(LFLAGS) file { $[@ $(OBJ_BASE)\demos\ares_getopt.obj } library $]@, ws2_32.lib
-
-clean: .SYMBOLIC
- -$(RM) $(OBJS_STAT)
- -$(RM) $(OBJS_DYN)
- -$(RM) $(RESOURCE) $(LINK_ARG) $(LIB_ARG)
-
-vclean realclean: clean .SYMBOLIC
- -$(RM) $(TARGETS) $(LIBNAME).map
- -$(RM) $(DEMOS) $(DEMOS:.exe=.map)
- -$(RD) $(OBJ_BASE)\stat
- -$(RD) $(OBJ_BASE)\dyn
- -$(RD) $(OBJ_BASE)\demos
- -$(RD) $(OBJ_BASE)
-
-.ERASE
-$(RESOURCE): cares.rc .AUTODEPEND
- $(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@
-
-.ERASE
-.c{$(OBJ_BASE)\dyn}.obj:
- $(CC) $(CFLAGS) -bd $[@ -fo=$^@
-
-.ERASE
-.c{$(OBJ_BASE)\stat}.obj:
- $(CC) $(CFLAGS) -DCARES_STATICLIB $[@ -fo=$^@
-
-.ERASE
-.c{$(OBJ_BASE)\demos}.obj:
- $(CC) $(CFLAGS) -DCARES_STATICLIB $[@ -fo=$^@
-
-$(LINK_ARG): $(__MAKEFILES__)
- %create $^@
- @%append $^@ system nt dll
- @%append $^@ file { $(OBJS_DYN) }
- @%append $^@ option res=$(RESOURCE), implib=$(LIBNAME)_imp.lib
- @%append $^@ $(LFLAGS)
- @%append $^@ libpath $(SYS_LIBS)
-# @%append $^@ library clib3r.lib
-!ifdef %use_watt32
- @%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
-!else
- @%append $^@ library ws2_32.lib
-!endif
-
-$(LIB_ARG): $(__MAKEFILES__)
- %create $^@
- @for %f in ($(OBJS_STAT)) do @%append $^@ +- %f
-
-
Oops, something went wrong.

0 comments on commit daa499c

Please sign in to comment.