This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Cleanup configure.in (3/n)


This cleans up some "Checks for libraries".

Checked in.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* configure.in: Create "Checks for libraries" section, and move
	appropriate tests there.  Cleanup check for wctype in libw.  Use
	AC_SEARCH_LIBS to see whether we need libsocket.
	* configure: Regenerated.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.98
diff -u -p -r1.98 configure.in
--- configure.in 31 Dec 2002 13:05:02 -0000 1.98
+++ configure.in 1 Jan 2003 23:49:23 -0000
@@ -1,5 +1,5 @@
 dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+dnl Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
 dnl Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
@@ -108,6 +108,23 @@ AC_CHECK_TOOL(MIG, mig)
 
 AC_ARG_PROGRAM
 
+# ---------------------- #
+# Checks for libraries.  #
+# ---------------------- #
+
+# We might need to link with -lm; most simulators need it.
+AC_CHECK_LIB(m, main)
+
+# We need to link with -lw to get `wctype' on Solaris before Solaris
+# 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
+# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
+# is known to have this problem).  Therefore we avoid libw if we can.
+AC_CHECK_FUNC(wctype, [],
+  [AC_CHECK_LIB(w, wctype)])
+
+# Some systems (e.g. Solaris) have `socketpair' in libsocket.
+AC_SEARCH_LIBS(socketpair, socket)
+
 AC_TYPE_SIGNAL
 
 AC_HEADER_DIRENT
@@ -235,7 +252,6 @@ if test $gdb_cv_have_pt_getxmmregs = yes
 fi
 
 
-AC_CHECK_LIB(socket, socketpair)
 AC_CHECK_FUNCS(socketpair)
 
 
@@ -415,16 +431,6 @@ if test ${host} = ${target} ; then
     AC_DEFINE(_SYSCALL32)
   fi
 fi
-
-dnl See if host has libm.  This is usually needed by simulators.
-AC_CHECK_LIB(m, main)
-
-dnl Solaris puts wctype in /usr/lib/libw.a before Solaris 2.6.
-dnl
-dnl A bug in GNU ld 2.9.1 causes a problem if we link in -lw 
-dnl under Solaris 2.6 because it is some funky empty library.
-dnl So only link in libw if we have to.
-AC_CHECK_LIB(c, wctype,: ,AC_CHECK_LIB(w, wctype))
 
 dnl See if compiler supports "long long" type.
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]