Index: configure.ac
===================================================================
RCS file: /repository/curl/configure.ac,v
retrieving revision 1.32
diff -c -r1.32 configure.ac
*** configure.ac	8 Dec 2003 13:37:38 -0000	1.32
--- configure.ac	9 Dec 2003 03:56:43 -0000
***************
*** 1029,1035 ****
  ares="no"
  AC_MSG_CHECKING([whether to enable ares])
  AC_ARG_ENABLE(ares,
! AC_HELP_STRING([--enable-ares],[Enable using ares for name lookups])
  AC_HELP_STRING([--disable-ares],[Disable using ares for name lookups]),
  [ case "$enableval" in
    no)
--- 1029,1035 ----
  ares="no"
  AC_MSG_CHECKING([whether to enable ares])
  AC_ARG_ENABLE(ares,
! AC_HELP_STRING([--enable-ares=PATH],[Enable using ares for name lookups])
  AC_HELP_STRING([--disable-ares],[Disable using ares for name lookups]),
  [ case "$enableval" in
    no)
***************
*** 1046,1051 ****
--- 1046,1065 ----
         HAVE_ARES="1"
         AC_SUBST(HAVE_ARES)
         ares="yes"
+ 
+        LIBS="$LIBS -lares"
+ 
+        dnl For backwards compatibility default to includes/lib in srcdir/ares
+        dnl If a value is specified it is assumed that the libs are in $val/lib
+        dnl and the includes are in $val/include. This is the default setup for ares
+        dnl so it should not be a problem.
+        if test -z $enableval ; then
+          CPPFLAGS="$CPPFLAGS -I`pwd`/ares"
+          LDFLAGS="$LDFLAGS -L`pwd`/ares"
+        else
+          CPPFLAGS="$CPPFLAGS -I$enableval/include"
+          LDFLAGS="$LDFLAGS -L$enableval/lib"
+        fi
         ;;
    esac ],
         AC_MSG_RESULT(no)
Index: lib/Makefile.am
===================================================================
RCS file: /repository/curl/lib/Makefile.am,v
retrieving revision 1.76
diff -c -r1.76 Makefile.am
*** lib/Makefile.am	10 Nov 2003 09:28:22 -0000	1.76
--- lib/Makefile.am	9 Dec 2003 03:56:43 -0000
***************
*** 13,26 ****
  
  lib_LTLIBRARIES = libcurl.la
  
- if ARES
- ARESINC = -I$(top_srcdir)/ares
- endif
- 
  # we use srcdir/include for the static global include files
  # we use builddir/lib for the generated lib/config.h file to get found
  # we use srcdir/lib for the lib-private header files
! INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/lib -I$(top_srcdir)/lib $(ARESINC)
  
  VERSION=-version-info 2:2:0
  
--- 13,22 ----
  
  lib_LTLIBRARIES = libcurl.la
  
  # we use srcdir/include for the static global include files
  # we use builddir/lib for the generated lib/config.h file to get found
  # we use srcdir/lib for the lib-private header files
! INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/lib -I$(top_srcdir)/lib
  
  VERSION=-version-info 2:2:0
  
***************
*** 63,73 ****
  MIMPURE = -mimpure-text
  endif
  
! if ARES
! ARESLIB = -lares -L$(top_builddir)/ares
! endif
! 
! libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(ARESLIB) $(MIMPURE)
  
  libcurl_la_SOURCES = arpa_telnet.h file.c netrc.h timeval.c	\
  base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c	\
--- 59,65 ----
  MIMPURE = -mimpure-text
  endif
  
! libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(MIMPURE)
  
  libcurl_la_SOURCES = arpa_telnet.h file.c netrc.h timeval.c	\
  base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c	\

