On Thursday 03 February 2011, Jim Jagielski wrote: > Don't we also need to now start linking against lresolv?? > > ..../dev/httpd-git-trunk/srclib/apr-util/libaprutil-1.la -lexpat > -liconv > /Users/jim/src/asf/code/dev/httpd-git-trunk/srclib/apr/libapr-1.la > -lpthread Undefined symbols: > "_res_9_init", referenced from: > _main in libmain.a(main.o) > ld: symbol(s) not found > collect2: ld returned 1 exit status > make[1]: *** [httpd] Error 1 > make: *** [install-recursive] Error 1 > > after this patch, build now breaks (at least os OS X).
I have read the AC_SEARCH_LIBS docs [1] to mean that it adds -lresolv automatically to LIBS if needed. On my system, the test result is "none needed", so I can't really test this. Maybe we need an explicit APR_ADDTO? Does the attached patch help? [1] http://www.gnu.org/software/hello/manual/autoconf/Libraries.html
diff --git a/configure.in b/configure.in index 5082c6e..a3925fe 100644 --- a/configure.in +++ b/configure.in @@ -417,7 +417,12 @@ LIBS="$saved_LIBS" dnl See Comment #Spoon +saved_LIBS="$LIBS" +LIBS="" AC_SEARCH_LIBS(res_init, resolv, , [AC_SEARCH_LIBS(__res_init,resolv)]) +APR_ADDTO(AP_LIBS, [$LIBS]) +LIBS="$saved_LIBS" + AC_CHECK_FUNCS( \ getpwnam \ getgrnam \
