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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [mcore/] [configure.in] - Blame information for rev 1767

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

Line No. Rev Author Line
1 56 joel
dnl Process this file with autoconf to produce a configure script.
2
AC_PREREQ(2.5)dnl
3
AC_INIT(crt0.S)
4
 
5
if test "${enable_shared}" = "yes" ; then
6
    echo "Shared libraries not supported for cross compiling, ignored"
7
fi
8
 
9
if test "$srcdir" = "." ; then
10
  if test "${with_target_subdir}" != "." ; then
11
    libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
12
  else
13
    libgloss_topdir="${srcdir}/${with_multisrctop}../.."
14
  fi
15
else
16
  libgloss_topdir="${srcdir}/../.."
17
fi
18
AC_CONFIG_AUX_DIR($libgloss_topdir)
19
 
20
AC_CANONICAL_SYSTEM
21
AC_ARG_PROGRAM
22
 
23
AC_PROG_INSTALL
24
 
25
# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
26
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
27
# are probably using a cross compiler, which will not be able to fully
28
# link an executable.  This should really be fixed in autoconf
29
# itself.
30
 
31
AC_DEFUN(LIB_AC_PROG_CC,
32
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
33
AC_CHECK_PROG(CC, gcc, gcc)
34
if test -z "$CC"; then
35
  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
36
  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
37
fi
38
 
39
AC_PROG_CC_GNU
40
 
41
if test $ac_cv_prog_gcc = yes; then
42
  GCC=yes
43
dnl Check whether -g works, even if CFLAGS is set, in case the package
44
dnl plays around with CFLAGS (such as to build both debugging and
45
dnl normal versions of a library), tasteless as that idea is.
46
  ac_test_CFLAGS="${CFLAGS+set}"
47
  ac_save_CFLAGS="$CFLAGS"
48
  CFLAGS=
49
  AC_PROG_CC_G
50
  if test "$ac_test_CFLAGS" = set; then
51
    CFLAGS="$ac_save_CFLAGS"
52
  elif test $ac_cv_prog_cc_g = yes; then
53
    CFLAGS="-g -O2"
54
  else
55
    CFLAGS="-O2"
56
  fi
57
else
58
  GCC=
59
  test "${CFLAGS+set}" = set || CFLAGS="-g"
60
fi
61
])
62
 
63
LIB_AC_PROG_CC
64
AS=${AS-as}
65
AC_SUBST(AS)
66
AR=${AR-ar}
67
AC_SUBST(AR)
68
LD=${LD-ld}
69
AC_SUBST(LD)
70
AC_PROG_RANLIB
71
 
72
case "${target}" in
73
  mcore-*-elf)
74
        bsp_prefix=elf-
75
        ;;
76
  mcore-*-pe)
77
        bsp_prefix=pe-
78
        ;;
79
esac
80
 
81
AC_SUBST(bsp_prefix)
82
 
83
host_makefile_frag=${srcdir}/../config/default.mh
84
 
85
dnl We have to assign the same value to other variables because autoconf
86
dnl doesn't provide a mechanism to substitute a replacement keyword with
87
dnl arbitrary data or pathnames.
88
dnl
89
host_makefile_frag_path=$host_makefile_frag
90
AC_SUBST(host_makefile_frag_path)
91
AC_SUBST_FILE(host_makefile_frag)
92
 
93
AC_OUTPUT(Makefile,
94
. ${libgloss_topdir}/config-ml.in,
95
srcdir=${srcdir}
96
target=${target}
97
ac_configure_args="${ac_configure_args} --enable-multilib"
98
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
99
libgloss_topdir=${libgloss_topdir}
100
)

powered by: WebSVN 2.1.0

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