OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [sparc/] [configure.in] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
# Copyright (c) 1995, 1996 Cygnus Support
2
#
3
# The authors hereby grant permission to use, copy, modify, distribute,
4
# and license this software and its documentation for any purpose, provided
5
# that existing copyright notices are retained in all copies and that this
6
# notice is included verbatim in any distributions. No written agreement,
7
# license, or royalty fee is required for any of the authorized uses.
8
# Modifications to this software may be copyrighted by their authors
9
# and need not follow the licensing terms described here, provided that
10
# the new terms are clearly indicated on the first page of each file where
11
# they apply.
12
dnl Process this file with autoconf to produce a configure script.
13
AC_PREREQ(2.5)dnl
14
AC_INIT(sparc-stub.c)
15
 
16
if test "${enable_shared}" = "yes" ; then
17
    echo "Shared libraries not supported for cross compiling, ignored"
18
fi
19
 
20
if test "$srcdir" = "." ; then
21
  if test "${with_target_subdir}" != "." ; then
22
    libgloss_topdir="${with_multisrctop}../../.."
23
  else
24
    libgloss_topdir="${with_multisrctop}../.."
25
  fi
26
else
27
  libgloss_topdir="${srcdir}/../.."
28
fi
29
 
30
AC_CONFIG_AUX_DIR($libgloss_topdir)
31
 
32
AC_PROG_INSTALL
33
 
34
AC_CANONICAL_SYSTEM
35
 
36
# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
37
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
38
# are probably using a cross compiler, which will not be able to fully
39
# link an executable.  This should really be fixed in autoconf
40
# itself.
41
 
42
AC_DEFUN(LIB_AC_PROG_CC,
43
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
44
AC_CHECK_PROG(CC, gcc, gcc)
45
if test -z "$CC"; then
46
  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
47
  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
48
fi
49
 
50
AC_PROG_CC_GNU
51
 
52
if test $ac_cv_prog_gcc = yes; then
53
  GCC=yes
54
dnl Check whether -g works, even if CFLAGS is set, in case the package
55
dnl plays around with CFLAGS (such as to build both debugging and
56
dnl normal versions of a library), tasteless as that idea is.
57
  ac_test_CFLAGS="${CFLAGS+set}"
58
  ac_save_CFLAGS="$CFLAGS"
59
  CFLAGS=
60
  AC_PROG_CC_G
61
  if test "$ac_test_CFLAGS" = set; then
62
    CFLAGS="$ac_save_CFLAGS"
63
  elif test $ac_cv_prog_cc_g = yes; then
64
    CFLAGS="-g -O2"
65
  else
66
    CFLAGS="-O2"
67
  fi
68
else
69
  GCC=
70
  test "${CFLAGS+set}" = set || CFLAGS="-g"
71
fi
72
])
73
 
74
LIB_AC_PROG_CC
75
AS=${AS-as}
76
AC_SUBST(AS)
77
AR=${AR-ar}
78
AC_SUBST(AR)
79
LD=${LD-ld}
80
AC_SUBST(LD)
81
AC_PROG_RANLIB
82
 
83
case ${target_cpu} in
84
sparclite*) CPU=SLITE ;;
85
sparclet*) CPU=SPLET ;;
86
sparc64*) CPU=SPARC64 ;;
87
sparc86x*) CPU=SLITE ;;
88
*) CPU=SPARC ;;
89
esac
90
AC_SUBST(CPU)
91
 
92
case ${target_cpu} in
93
sparc64*) CYGMONLDSCRIPTTEMPL=${srcdir}/cygmon-sparc64-ld.src ;;
94
*) CYGMONLDSCRIPTTEMPL=${srcdir}/cygmon.ld.src
95
esac
96
 
97
host_makefile_frag=${srcdir}/../config/default.mh
98
target_makefile_frag=${srcdir}/../config/default.mt
99
 
100
dnl We have to assign the same value to other variables because autoconf
101
dnl doesn't provide a mechanism to substitute a replacement keyword with
102
dnl arbitrary data or pathnames.
103
dnl
104
host_makefile_frag_path=$host_makefile_frag
105
AC_SUBST(host_makefile_frag_path)
106
AC_SUBST_FILE(host_makefile_frag)
107
target_makefile_frag_path=$target_makefile_frag
108
AC_SUBST(target_makefile_frag_path)
109
AC_SUBST_FILE(target_makefile_frag)
110
AC_SUBST(CYGMONLDSCRIPTTEMPL)
111
 
112
AC_OUTPUT(Makefile,
113
. ${libgloss_topdir}/config-ml.in,
114
srcdir=${srcdir}
115
target=${target}
116
ac_configure_args="${ac_configure_args} --enable-multilib"
117
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
118
libgloss_topdir=${libgloss_topdir}
119
)
120
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.