aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-03-26 21:12:59 +0000
committerIan Lance Taylor <ian@airs.com>1996-03-26 21:12:59 +0000
commit7919b9ec416c33f5a6997ce0c73e1f5d2208ac19 (patch)
treea3c19b650caf2f9bd8e6f952c4a5cadf65ac40fe /opcodes
parent986cf3b852cc7db40e73ec59eb0ef995b24f270c (diff)
downloadgdb-7919b9ec416c33f5a6997ce0c73e1f5d2208ac19.zip
gdb-7919b9ec416c33f5a6997ce0c73e1f5d2208ac19.tar.gz
gdb-7919b9ec416c33f5a6997ce0c73e1f5d2208ac19.tar.bz2
* configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
Miles Bader <miles@gnu.ai.mit.edu>. * configure: Rebuild.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog11
-rwxr-xr-xopcodes/configure149
-rw-r--r--opcodes/configure.in17
3 files changed, 145 insertions, 32 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 7381261..69453ce 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,14 @@
+Tue Mar 26 15:47:14 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
+ Miles Bader <miles@gnu.ai.mit.edu>.
+ * configure: Rebuild.
+
+Sat Mar 16 13:04:07 1996 Fred Fish <fnf@cygnus.com>
+
+ * z8kgen.c (internal, gas): Call xmalloc rather than unchecked
+ malloc.
+
Tue Mar 12 12:14:10 1996 Ian Lance Taylor <ian@cygnus.com>
* configure: Rebuild with autoconf 2.8.
diff --git a/opcodes/configure b/opcodes/configure
index 8ee854e..194c0b5 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.7
+# Generated automatically using autoconf version 2.8
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -336,7 +336,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.7"
+ echo "configure generated by autoconf version 2.8"
exit 0 ;;
-with-* | --with-*)
@@ -501,12 +501,9 @@ fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='echo $CPP $CPPFLAGS 1>&5;
-$CPP $CPPFLAGS'
-ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
-${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
-ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
-${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@@ -522,7 +519,7 @@ fi
# configure.in script for the opcodes library.
-# Copyright (C) 1995 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
# Written by Cygnus Support.
#
# This program is free software; you can redistribute it and/or modify
@@ -702,8 +699,8 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
ALLLIBS='$(TARGETLIB)'
PICFLAG=
-SHLIB=
-SHLINK=
+SHLIB=unused-shlib
+SHLINK=unused-shlink
if test "${shared}" = "true"; then
ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
PICFLAG=-fpic
@@ -734,7 +731,6 @@ else
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
fi
fi
CC="$ac_cv_prog_CC"
@@ -744,6 +740,55 @@ else
echo "$ac_t""no" 1>&6
fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ ac_prog_rejected=no
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
@@ -754,7 +799,7 @@ else
yes;
#endif
EOF
-if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -795,8 +840,14 @@ fi
. ${srcdir}/../bfd/configure.host
-# Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -808,12 +859,12 @@ else
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="ar"
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR=":"
+ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
fi
fi
AR="$ac_cv_prog_AR"
@@ -823,7 +874,39 @@ else
echo "$ac_t""no" 1>&6
fi
-# Extract the first word of "ranlib", so it can be a program name with args.
+
+
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
@@ -851,6 +934,11 @@ else
echo "$ac_t""no" 1>&6
fi
+else
+ RANLIB=":"
+fi
+fi
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -915,8 +1003,9 @@ if test "${shared}" = "true"; then
if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
echo "configure: warning: opcodes --enable-shared only supported when using gcc" 1>&2
shared=false
+ ALLLIBS='$(TARGETLIB)'
PICFLAG=
- SHLIB=
+ SHLIB=unused-shlib
fi
fi
@@ -927,12 +1016,16 @@ fi
if test "${commonbfdlib}" = "true"; then
COMMON_SHLIB=yes
+ # Rebuild the shared library if libiberty or libbfd changes.
+ SHLIB_DEP="../libiberty/libiberty.a ../bfd/libbfd.a"
else
COMMON_SHLIB=
+ SHLIB_DEP=
fi
+
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
@@ -948,12 +1041,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 952 "configure"
+#line 1045 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -962,12 +1056,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 966 "configure"
+#line 1060 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -995,11 +1090,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 999 "configure"
+#line 1094 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1208,7 +1304,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.7"
+ echo "$CONFIG_STATUS generated by autoconf version 2.8"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -1276,6 +1372,7 @@ s%@SHLIB@%$SHLIB%g
s%@SHLIB_CC@%$SHLIB_CC%g
s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
s%@COMMON_SHLIB@%$COMMON_SHLIB%g
+s%@SHLIB_DEP@%$SHLIB_DEP%g
s%@SHLINK@%$SHLINK%g
s%@CPP@%$CPP%g
s%@archdefs@%$archdefs%g
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 90ebe10..d4ff51c 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -1,7 +1,7 @@
AC_PREREQ(2.0)
AC_INIT(z8k-dis.c)
# configure.in script for the opcodes library.
-# Copyright (C) 1995 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
# Written by Cygnus Support.
#
# This program is free software; you can redistribute it and/or modify
@@ -54,8 +54,8 @@ AC_ARG_PROGRAM
ALLLIBS='$(TARGETLIB)'
PICFLAG=
-SHLIB=
-SHLINK=
+SHLIB=unused-shlib
+SHLINK=unused-shlink
if test "${shared}" = "true"; then
ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
PICFLAG=-fpic
@@ -77,16 +77,17 @@ AC_PROG_CC
. ${srcdir}/../bfd/configure.host
AC_SUBST(HDEFINES)
-AC_CHECK_PROG(AR, ar, ar, :)
-AC_PROG_RANLIB
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_PROG_INSTALL
if test "${shared}" = "true"; then
if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
AC_MSG_WARN([opcodes --enable-shared only supported when using gcc])
shared=false
+ ALLLIBS='$(TARGETLIB)'
PICFLAG=
- SHLIB=
+ SHLIB=unused-shlib
fi
fi
@@ -97,10 +98,14 @@ AC_SUBST(SHLIB_CC)
AC_SUBST(SHLIB_CFLAGS)
if test "${commonbfdlib}" = "true"; then
COMMON_SHLIB=yes
+ # Rebuild the shared library if libiberty or libbfd changes.
+ SHLIB_DEP="../libiberty/libiberty.a ../bfd/libbfd.a"
else
COMMON_SHLIB=
+ SHLIB_DEP=
fi
AC_SUBST(COMMON_SHLIB)
+AC_SUBST(SHLIB_DEP)
AC_SUBST(SHLINK)
AC_CHECK_HEADERS(string.h strings.h)