diff --git a/configure.ac b/configure.ac index aadf63f04f69d127e51c48a2e0c7b9878b338516..36d68919949fe07ec4168b07ed937150e0076f14 100644 --- a/configure.ac +++ b/configure.ac @@ -1058,8 +1058,12 @@ AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]), AC_CONFIG_SUBDIRS(ares) aresinc=`cd $srcdir/ares && pwd` CPPFLAGS="$CPPFLAGS -I$aresinc" - areslib=`cd ares && pwd` - LDFLAGS="$LDFLAGS -L$areslib" + + dnl the pwd= below cannot 'cd' into the ares dir to get the full + dnl path to it, since it may not exist yet if we build outside of + dnl the source tree + pwd=`pwd` + LDFLAGS="$LDFLAGS -L$pwd/ares" fi else CPPFLAGS="$CPPFLAGS -I$enableval/include"