summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-10-24 18:29:44 +0000
committerRoland McGrath <roland@gnu.org>1998-10-24 18:29:44 +0000
commitb1ea47a5d5532c2e89d351a2f312566d9bfd2d7f (patch)
tree2a57f90eeadb7821b93e8c8daa825bb541864069
parent867c029ac994415e7801c9ea47f318d9807d7c7b (diff)
1998-10-24 Roland McGrath <roland@baalperazim.frob.com>
* configure.in (--enable-kdb): Fix help text; handle --disable-kdb. Remove BUILD_CC checks and lex/yacc checks (which were for mig). (installed_clib): Remove these checks. (LD, NM, MIG): Use AC_CHECK_TOOL for these.
-rw-r--r--configure.in62
1 files changed, 14 insertions, 48 deletions
diff --git a/configure.in b/configure.in
index 36c8edc..27a3208 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ dnl documentation is hereby granted, provided that both the copyright
dnl notice and this permission notice appear in all copies of the
dnl software, derivative works or modified versions, and any portions
dnl thereof, and that both notices appear in supporting documentation.
-dnl
+dnl
dnl THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
@@ -26,7 +26,7 @@ i[[3456]]86) systype=i386 ;;
*) AC_MSG_ERROR([unsupported CPU type]) ;;
esac
-case "$host_os" in
+case "$host_os" in
gnu*) ;;
*) AC_MSG_ERROR([sorry, this is the gnu os, not $host_os]) ;;
esac
@@ -40,60 +40,26 @@ AC_PREFIX_DEFAULT()
#
# Options
#
-AC_ARG_ENABLE(kdb, Enable use of in-kernel debugger, AC_DEFINE(MACH_KDB))
+AC_ARG_ENABLE(kdb,
+[ --enable-kdb enable use of in-kernel debugger],
+[test "x$enableval" = xno || AC_DEFINE(MACH_KDB)])
#
# Programs
#
-AC_PROG_CC_LOCAL
-AC_PROG_AWK
-AC_PROG_INSTALL
-AC_CHECK_TOOL(MIG, mig, mig)
-
-if test $cross_compiling = yes; then
- AC_CHECK_PROGS(BUILD_CC, gcc cc)
- CC=$BUILD_CC
-fi
-AC_PROG_LEX
-AC_PROG_YACC
+AC_PROG_INSTALL
+AC_PROG_AWK
-if test $cross_compiling = yes ; then
- CC=$ac_cv_prog_CC
-fi
+AC_CHECK_TOOL(CC, gcc)
+# That check handles cross-compilation well, but AC_PROG_CC tests for GCC
+# and sets default CFLAGS nicely for us, so do that too.
+AC_PROG_CC_LOCAL
+AC_CHECK_TOOL(LD, ld)
+AC_CHECK_TOOL(NM, nm)
-usable_libc='yes'
-needed_funcs='memcpy memset bcopy bzero htonl ntohl ntohs'
-AC_CHECK_FUNCS($needed_funcs, , usable_libc=no)
-if test $usable_libc = no ; then
- echo "Support functions not found using $CC, trying $BUILD_CC."
- CC="$BUILD_CC"
- for i in $needed_funcs ; do
- unset ac_cv_func_$i
- done
- usable_libc=yes
- AC_CHECK_FUNCS($needed_funcs, , usable_libc=no)
- if test $usable_libc = no ; then
- echo "Configuration problem:" 1>&2
- echo "Please set installed-clib in the toplevel Makefile so the functions:"
- echo "$needed_funcs are available."
- exit 1
- else
- changequote(,)
- set -- `$BUILD_CC -v 2>&1 | sed -n 's/.*from \(.*\)\/lib\/gcc-lib\/\([^/][^/]*\).*/\1 \2/p'`
- changequote([,])
- if test -f "$1/$2/lib/libc.a" ; then
- installed_clib=$1/$2/lib/libc.a
- else
- installed_clib=$1/lib/libc.a
- fi
- fi
- CC=$ac_cv_prog_CC
-else
- installed_clib=$prefix/lib/libcrt.a
-fi
-AC_SUBST(installed_clib)
+AC_CHECK_TOOL(MIG, mig, mig)
# Set up `machine' link in build directory for easier header file location.
AC_LINK_FILES(${systype}/${systype},machine)