chiark / gitweb /
cleanup: All the whitespace fixes, all at once.
[mLib] / configure.in
index 3cafccc0a3be71cc13e3bec336842a6b8275a1c7..64d63c417bc797a813f1d9b93343755a4c269511 100644 (file)
@@ -1,6 +1,6 @@
-dnl -*-fundamental-*-
+dnl -*-m4-*-
 dnl
 dnl
-dnl $Id: configure.in,v 1.35 2003/11/29 11:59:17 mdw Exp $
+dnl $Id$
 dnl
 dnl Configuration script for mLib
 dnl
 dnl
 dnl Configuration script for mLib
 dnl
@@ -15,84 +15,17 @@ dnl mLib is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU Library General Public License as
 dnl published by the Free Software Foundation; either version 2 of the
 dnl License, or (at your option) any later version.
 dnl it under the terms of the GNU Library General Public License as
 dnl published by the Free Software Foundation; either version 2 of the
 dnl License, or (at your option) any later version.
-dnl 
+dnl
 dnl mLib is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU Library General Public License for more details.
 dnl mLib is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU Library General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU Library General Public
 dnl License along with mLib; if not, write to the Free
 dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 dnl MA 02111-1307, USA.
 
 dnl You should have received a copy of the GNU Library General Public
 dnl License along with mLib; if not, write to the Free
 dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 dnl MA 02111-1307, USA.
 
-dnl ----- Revision history --------------------------------------------------
-dnl
-dnl $Log: configure.in,v $
-dnl Revision 1.35  2003/11/29 11:59:17  mdw
-dnl Various stuff.
-dnl
-dnl Revision 1.34  2003/10/12 14:54:18  mdw
-dnl Version bump.
-dnl
-dnl Revision 1.33  2003/05/18 15:17:04  mdw
-dnl Version bump.
-dnl
-dnl Revision 1.32  2003/05/16 00:26:22  mdw
-dnl Version bump.
-dnl
-dnl Revision 1.30  2003/04/23 12:50:30  mdw
-dnl New manpage installer.
-dnl
-dnl Revision 1.29  2001/06/22 19:34:07  mdw
-dnl Find out whether @<float.h>@ exists (hack for uC-Linux).
-dnl
-dnl Revision 1.28  2000/10/08 11:07:55  mdw
-dnl Define a constant to tell @mdwopt@ that @str_qword@ is available.
-dnl Reinstate the `-pedantic' option to GCC.
-dnl
-dnl Revision 1.27  2000/08/15 21:39:13  mdw
-dnl New library configuration stuff from `common'.
-dnl
-dnl Revision 1.25  2000/07/16 18:57:42  mdw
-dnl Version bump.  Change compiler flags.
-dnl
-dnl Revision 1.19  1999/11/11 18:47:33  mdw
-dnl Use `libtool' to generate a shared library.
-dnl
-dnl Revision 1.18  1999/11/11 17:48:28  mdw
-dnl New configuration system for library clients.
-dnl
-dnl Revision 1.17  1999/10/04 21:48:50  mdw
-dnl Find libraries for standalone name resolver server.
-dnl
-dnl Revision 1.14  1999/07/06 19:18:47  mdw
-dnl Handle new manual page directory.
-dnl
-dnl Revision 1.11  1999/05/21 22:11:20  mdw
-dnl Omitted version number changes from change log.  Changed version
-dnl number. ;-)
-dnl
-dnl Revision 1.8  1999/05/14 21:08:56  mdw
-dnl Bump version number to 1.3, to celebrate adding in the `select'
-dnl routines.
-dnl
-dnl Revision 1.6  1999/05/06 19:51:35  mdw
-dnl Reformatted the LGPL notice a little bit.
-dnl
-dnl Revision 1.5  1999/05/05 18:50:31  mdw
-dnl Change licensing conditions to LGPL.
-dnl
-dnl Revision 1.4  1999/03/24 22:22:57  mdw
-dnl Remove redundant call to AC_PROG_INSTALL.
-dnl
-dnl Revision 1.3  1998/12/15 23:52:42  mdw
-dnl Reordered and tidied.
-dnl
-dnl Revision 1.1.1.1  1998/06/17 23:44:42  mdw
-dnl Initial version of mLib
-dnl
-
 AC_INIT(exc.c)
 mdw_INIT_LIB(mLib, mLib, 2.0.3)
 
 AC_INIT(exc.c)
 mdw_INIT_LIB(mLib, mLib, 2.0.3)
 
@@ -106,6 +39,27 @@ AC_CHECK_HEADERS(float.h)
 mdw_CHECK_MANYLIBS(socket, socket)
 mdw_CHECK_MANYLIBS(gethostbyname, nsl resolv)
 
 mdw_CHECK_MANYLIBS(socket, socket)
 mdw_CHECK_MANYLIBS(gethostbyname, nsl resolv)
 
+DEPLIBS=$LIBS AC_SUBST(DEPLIBS)
+BRES_LIBEXEC="bres\$(EXEEXT)" BRES_SOURCE="bres"
+AC_SUBST(BRES_LIBEXEC) AC_SUBST(BRES_SOURCE)
+AC_ARG_WITH(adns,
+[  --with-adns            use ADNS library for background name resolution],
+[want_adns=$withval], [want_adns=auto])
+if test $want_adns != no; then
+  save_LIBS=$LIBS
+  LIBS=$DEPLIBS
+  mdw_CHECK_MANYLIBS(adns_init, adns, [have_adns=yes], [have_adns=no])
+  DEPLIBS=$LIBS
+  LIBS=$save_LIBS
+  if test $have_adns = yes; then
+    AC_DEFINE(HAVE_ADNS)
+    BRES_LIBEXEC=""
+    BRES_SOURCE="bres-adns"
+  elif test $want_adns = yes; then
+    AC_MSG_ERROR([ADNS library not found, but explicitly requested])
+  fi
+fi
+
 AC_CACHE_CHECK([for msg_control], [mdw_cv_msg_control],
 [AC_TRY_COMPILE(
 [#include <sys/types.h>
 AC_CACHE_CHECK([for msg_control], [mdw_cv_msg_control],
 [AC_TRY_COMPILE(
 [#include <sys/types.h>