NetBSD/gnu/dist/binutils/configure.in

203 lines
4.9 KiB
Plaintext
Raw Normal View History

1997-09-24 19:39:15 +04:00
dnl Process this file with autoconf to produce a configure script.
dnl
AC_PREREQ(2.5)
AC_INIT(ar.c)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(binutils, 2.9.1)
AM_PROG_LIBTOOL
1997-09-24 19:39:15 +04:00
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in
yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
AC_ARG_ENABLE(commonbfdlib,
[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
[case "${enableval}" in
yes) commonbfdlib=true ;;
no) commonbfdlib=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
AM_CONFIG_HEADER(config.h:config.in)
1997-09-24 19:39:15 +04:00
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi
if test -z "$host" ; then
AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
fi
AC_PROG_CC
AC_PROG_YACC
AC_PROG_LEX
AC_DECL_YYTEXT
AM_MAINTAINER_MODE
AM_CYGWIN32
AM_EXEEXT
1997-09-24 19:39:15 +04:00
# host-specific stuff:
HDEFINES=
. ${srcdir}/../bfd/configure.host
AC_SUBST(HDEFINES)
AR=${AR-ar}
AC_SUBST(AR)
AC_PROG_RANLIB
AM_PROG_INSTALL
1997-09-24 19:39:15 +04:00
BFD_CC_FOR_BUILD
AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h)
AC_HEADER_SYS_WAIT
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(sbrk utimes)
AC_MSG_CHECKING(for time_t in time.h)
AC_CACHE_VAL(bu_cv_decl_time_t_time_h,
[AC_TRY_COMPILE([#include <time.h>], [time_t i;],
bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)])
AC_MSG_RESULT($bu_cv_decl_time_t_time_h)
if test $bu_cv_decl_time_t_time_h = yes; then
AC_DEFINE([HAVE_TIME_T_IN_TIME_H])
fi
AC_MSG_CHECKING(for time_t in sys/types.h)
AC_CACHE_VAL(bu_cv_decl_time_t_types_h,
[AC_TRY_COMPILE([#include <sys/types.h>], [time_t i;],
bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)])
AC_MSG_RESULT($bu_cv_decl_time_t_types_h)
if test $bu_cv_decl_time_t_types_h = yes; then
AC_DEFINE([HAVE_TIME_T_IN_TYPES_H])
fi
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
# by default.
AC_MSG_CHECKING([for utime.h])
AC_CACHE_VAL(bu_cv_header_utime_h,
[AC_TRY_COMPILE([#include <sys/types.h>
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include <utime.h>],
[struct utimbuf s;],
bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)])
AC_MSG_RESULT($bu_cv_header_utime_h)
if test $bu_cv_header_utime_h = yes; then
AC_DEFINE(HAVE_GOOD_UTIME_H)
fi
BFD_NEED_DECLARATION(fprintf)
BFD_NEED_DECLARATION(strstr)
BFD_NEED_DECLARATION(sbrk)
BFD_NEED_DECLARATION(getenv)
BFD_BINARY_FOPEN
# target-specific stuff:
# Canonicalize the secondary target names.
if test -n "$enable_targets"; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
do
result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
if test -n "$result"; then
canon_targets="$canon_targets $result"
else
# Allow targets that config.sub doesn't recognize, like "all".
canon_targets="$canon_targets $targ"
fi
done
fi
all_targets=false
BUILD_NLMCONV=
NLMCONV_DEFS=
BUILD_SRCONV=
BUILD_DLLTOOL=
DLLTOOL_DEFS=
BUILD_WINDRES=
1997-09-24 19:39:15 +04:00
for targ in $target $canon_targets
do
if test "x$targ" = "xall"; then
all_targets=true
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
BUILD_SRCONV='$(SRCONV_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
else
case $targ in
changequote(,)dnl
i[3456]86*-*-netware*)
changequote([,])dnl
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
;;
alpha*-*-netware*)
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
;;
powerpc*-*-netware*)
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
;;
sparc*-*-netware*)
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
;;
esac
case $targ in
*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)$(EXEEXT)' ;;
1997-09-24 19:39:15 +04:00
esac
case $targ in
arm-*pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
;;
changequote(,)dnl
i[3-6]86-*pe* | i[3-6]86-*-cygwin32* | i[3-6]86-*-mingw32*)
1997-09-24 19:39:15 +04:00
changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
;;
powerpc*-*-*pe* | powerpc*-*-cygwin32)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
1997-09-24 19:39:15 +04:00
;;
esac
fi
done
AC_SUBST(NLMCONV_DEFS)
AC_SUBST(BUILD_NLMCONV)
AC_SUBST(BUILD_SRCONV)
AC_SUBST(BUILD_DLLTOOL)
AC_SUBST(DLLTOOL_DEFS)
AC_SUBST(BUILD_WINDRES)
AC_DEFINE_UNQUOTED(TARGET, "${target}")
1997-09-24 19:39:15 +04:00
targ=$target
. $srcdir/../bfd/config.bfd
if test "x$targ_underscore" = "xyes"; then
UNDERSCORE=1
else
UNDERSCORE=0
fi
AC_SUBST(UNDERSCORE)
AC_OUTPUT(Makefile)