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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [libnosys/] [configure.in] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 56 joel
# 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
#
13
# Process this file with autoconf to produce a configure script.
14
#
15
AC_PREREQ(2.5)dnl
16
AC_INIT(close.c)
17
AC_CONFIG_HEADER(config.h)
18
 
19
if test "${enable_shared}" = "yes" ; then
20
    echo "Shared libraries not supported for cross compiling, ignored"
21
fi
22
 
23
if test "$srcdir" = "." ; then
24
  if test "${with_target_subdir}" != "." ; then
25
    libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
26
  else
27
    libgloss_topdir="${srcdir}/${with_multisrctop}../.."
28
  fi
29
else
30
  libgloss_topdir="${srcdir}/../.."
31
fi
32
AC_CONFIG_AUX_DIR($libgloss_topdir)
33
 
34
AC_CANONICAL_SYSTEM
35
AC_ARG_PROGRAM
36
 
37
AC_PROG_INSTALL
38
 
39
# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
40
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
41
# are building a library that must be included in all links, so we
42
# can't link an executable until this lib is built.
43
# autoconf should provide a way to do this.
44
 
45
AC_DEFUN(LIB_AC_PROG_CC,
46
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
47
AC_CHECK_PROG(CC, gcc, gcc)
48
if test -z "$CC"; then
49
  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
50
  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
51
fi
52
 
53
AC_PROG_CC_GNU
54
 
55
if test $ac_cv_prog_gcc = yes; then
56
  GCC=yes
57
dnl Check whether -g works, even if CFLAGS is set, in case the package
58
dnl plays around with CFLAGS (such as to build both debugging and
59
dnl normal versions of a library), tasteless as that idea is.
60
  ac_test_CFLAGS="${CFLAGS+set}"
61
  ac_save_CFLAGS="$CFLAGS"
62
  CFLAGS=
63
  AC_PROG_CC_G
64
  if test "$ac_test_CFLAGS" = set; then
65
    CFLAGS="$ac_save_CFLAGS"
66
  elif test $ac_cv_prog_cc_g = yes; then
67
    CFLAGS="-g -O2"
68
  else
69
    CFLAGS="-O2"
70
  fi
71
else
72
  GCC=
73
  test "${CFLAGS+set}" = set || CFLAGS="-g"
74
fi
75
])
76
 
77
AC_DEFINE(HAVE_GNU_LD)
78
dnl Make sure syscall names match those being used by newlib
79
case "${target}" in
80
  *-*-cygwin*)
81
        ;;
82
  a29k-amd-udi)
83
        ;;
84
  arc-*-*)
85
        ;;
86
  arm-*-pe)
87
        ;;
88
  arm-*-*)
89
        ;;
90
  strongarm-*-*)
91
        ;;
92
  d10v*)
93
        ;;
94
  h8300*-*-*)
95
        ;;
96
  h8500-*-*)
97
        ;;
98
  i[3456]86-*-sco*)
99
        ;;
100
  m32r-*-*)
101
        ;;
102
  mn10?00-*-*)
103
        ;;
104
  powerpcle-*-pe)
105
        ;;
106
  sh*-*-*)
107
        ;;
108
  sparc-sun-sunos*)
109
        ;;
110
  sparc64-*-*)
111
        ;;
112
  thumb-*-pe)
113
        ;;
114
  thumb-*-*)
115
        ;;
116
  v850-*-*)
117
        ;;
118
  v850e-*-*)
119
        ;;
120
  v850ea-*-*)
121
        ;;
122
  w65-*-*)
123
        ;;
124
  z8k-*-*)
125
        ;;
126
  *)
127
        AC_DEFINE(MISSING_SYSCALL_NAMES)
128
        ;;
129
esac
130
 
131
dnl Make sure we know if elf format used
132
case "${target}" in
133
  *-*-elf)
134
        AC_DEFINE(HAVE_ELF)
135
 
136
        AC_CACHE_CHECK(for .previous assembler directive,
137
                       libc_cv_asm_previous_directive, [dnl
138
        cat > conftest.s <
139
.section foo_section
140
.previous
141
EOF
142
        if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
143
          AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE)
144
        else
145
          rm -f conftest*])
146
          AC_CACHE_CHECK(for .popsection assembler directive,
147
                         libc_cv_asm_popsection_directive, [dnl
148
          cat > conftest.s <
149
.pushsection foo_section
150
.popsection
151
EOF
152
          if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
153
            AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE)
154
          fi
155
        fi
156
        rm -f conftest*])
157
        ;;
158
esac
159
 
160
AC_CACHE_CHECK(for function prefix, libc_dollar_prefix, [dnl
161
cat > conftest.c <<\EOF
162
foo () { }
163
EOF
164
dnl
165
if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null]);
166
then
167
  libc_dollar_prefix=yes
168
else
169
  libc_dollar_prefix=no
170
fi
171
rm -f conftest* ])
172
if test $libc_dollar_prefix = yes ; then
173
  AC_DEFINE(__SYMBOL_PREFIX, "$")
174
else
175
  AC_DEFINE(__SYMBOL_PREFIX, "")
176
fi
177
 
178
LIB_AC_PROG_CC
179
AS=${AS-as}
180
AC_SUBST(AS)
181
AR=${AR-ar}
182
AC_SUBST(AR)
183
LD=${LD-ld}
184
AC_SUBST(LD)
185
AC_PROG_RANLIB
186
 
187
host_makefile_frag=${srcdir}/../config/default.mh
188
 
189
dnl We have to assign the same value to other variables because autoconf
190
dnl doesn't provide a mechanism to substitute a replacement keyword with
191
dnl arbitrary data or pathnames.
192
dnl
193
host_makefile_frag_path=$host_makefile_frag
194
AC_SUBST(host_makefile_frag_path)
195
AC_SUBST_FILE(host_makefile_frag)
196
 
197
AC_OUTPUT(Makefile,
198
ac_file=Makefile . ${libgloss_topdir}/config-ml.in,
199
srcdir=${srcdir}
200
target=${target}
201
ac_configure_args="${ac_configure_args} --enable-multilib"
202
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
203
libgloss_topdir=${libgloss_topdir}
204
)
205
 
206
 

powered by: WebSVN 2.1.0

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