Hi all,

I stumbled across the check for libresolv in configure.ac (and meson.build) – 
there seems to be no reference to it within the sources, so IMHO the check (and 
the linker option) could be removed as in the attached patch, couldn't it?  Or 
did I miss something?

Cheers,
Albrecht.
diff --git a/configure.ac b/configure.ac
index 080678d73..1d0cb3f4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -245,26 +245,6 @@ PKG_CHECK_MODULES(LIBNETCLIENT, [
 	gnutls
 ])
 
-AC_MSG_CHECKING(whether res_init is available)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <resolv.h>;]],
-                               [[res_init();]])],
-               have_res_init=yes,
-               have_res_init=no)
-if test $have_res_init = no ; then
-    save_LIBS=$LIBS
-    LIBS="$LIBS -lresolv"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <resolv.h>;]],
-                                   [[res_init();]])],
-                   have_res_init=yes)
-fi
-AC_MSG_RESULT([$have_res_init])
-if test $have_res_init = no ; then
-    LIBS=$save_LIBS
-else
-    AC_DEFINE(HAVE_RES_INIT,1,
-              [Defined when res_init is available.])
-fi
-
 dnl ##########################################################################
 dnl Check versions
 dnl ##########################################################################
diff --git a/meson.build b/meson.build
index ec05689c9..2ab92ff10 100644
--- a/meson.build
+++ b/meson.build
@@ -159,22 +159,6 @@ libnetclient_deps = [glib_dep,
                      gio_dep,
                      gnutls_dep]
 
-# Check whether res_init is available
-result = compiler.has_function('res_init', prefix : '#include <resolv.h>')
-if not result
-  result = compiler.has_function('res_init',
-                                 prefix : '#include <resolv.h>',
-                                 args   : '-lresolv')
-  if result
-    add_global_link_arguments('-lresolv')
-  endif
-endif
-
-if result
-  conf.set('HAVE_RES_INIT', 1,
-    description : 'Defined when res_init is available.')
-endif
-
 # ##########################################################################
 # Check versions
 # ##########################################################################

Attachment: pgpcfo4U_exiI.pgp
Description: PGP signature

_______________________________________________
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list

Reply via email to