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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1005 ivang
dnl Process this file with autoconf to produce a configure script.
2
AC_PREREQ(2.7)dnl
3
AC_INIT(README)
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_PROG_INSTALL
21
 
22
AC_CANONICAL_SYSTEM
23
 
24
if test -z "${with_multisubdir}" ; then
25
  configdirs="doc libnosys"
26
else
27
  configdirs="libnosys"
28
fi
29
 
30
case "${target}" in
31
  i386-*-elf*)
32
        configdirs="${configdirs} i386 testsuite";
33
        ;;
34
  m32r-*-*)
35
        configdirs="${configdirs} m32r testsuite"
36
        ;;
37
  m68*-*-*)
38
        configdirs="${configdirs} m68k testsuite"
39
        ;;
40
  hppa*-*-pro*)
41
        configdirs="${configdirs} pa testsuite"
42
        ;;
43
  i960-*-coff)
44
        configdirs="${configdirs} i960 testsuite"
45
        ;;
46
  sparc-*-elf*)
47
        configdirs="${configdirs} sparc testsuite"
48
        ;;
49
  sparc64-*-elf*)
50
        configdirs="${configdirs} sparc testsuite"
51
        ;;
52
  sparc86x-*-*)
53
        configdirs="${configdirs} sparc testsuite"
54
        ;;
55
  sparclite-*-*)
56
        configdirs="${configdirs} sparc testsuite"
57
        ;;
58
  sparclet-*-aout*)
59
        configdirs="${configdirs} sparc sparc/libsys testsuite"
60
        ;;
61
  *arm-wince-pe)
62
        configdirs="wince"
63
        ;;
64
  sh*-*-pe)
65
        configdirs="wince"
66
        ;;
67
  mips*-*-pe)
68
        configdirs="wince"
69
        ;;
70
  mips*-*-*)
71
        configdirs="${configdirs} mips testsuite"
72
        ;;
73
  powerpc-*-*|powerpcle-*-*)
74
        configdirs="${configdirs} rs6000 testsuite"
75
        ;;
76
  mn10200-*-*)
77
        configdirs="${configdirs} mn10200 testsuite"
78
        ;;
79
  mn10300-*-*)
80
        configdirs="${configdirs} mn10300 testsuite"
81
        ;;
82
  d30v-*-*)
83
        configdirs="${configdirs} d30v testsuite"
84
        ;;
85
  fr30-*-*)
86
        configdirs="${configdirs} fr30 testsuite"
87
        ;;
88
  mcore-*-*)
89
        configdirs="${configdirs} mcore testsuite"
90
        ;;
91
esac
92
 
93
# temporarily strip out testsuite
94
configdirs=`echo $configdirs | sed 's/testsuite//'`
95
 
96
AC_CONFIG_SUBDIRS($configdirs)
97
 
98
# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
99
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
100
# are probably using a cross compiler, which will not be able to fully
101
# link an executable.  This should really be fixed in autoconf
102
# itself.
103
 
104
AC_DEFUN(LIB_AC_PROG_CC,
105
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
106
AC_CHECK_PROG(CC, gcc, gcc)
107
if test -z "$CC"; then
108
  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
109
  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
110
fi
111
 
112
AC_PROG_CC_GNU
113
 
114
if test $ac_cv_prog_gcc = yes; then
115
  GCC=yes
116
dnl Check whether -g works, even if CFLAGS is set, in case the package
117
dnl plays around with CFLAGS (such as to build both debugging and
118
dnl normal versions of a library), tasteless as that idea is.
119
  ac_test_CFLAGS="${CFLAGS+set}"
120
  ac_save_CFLAGS="$CFLAGS"
121
  CFLAGS=
122
  AC_PROG_CC_G
123
  if test "$ac_test_CFLAGS" = set; then
124
    CFLAGS="$ac_save_CFLAGS"
125
  elif test $ac_cv_prog_cc_g = yes; then
126
    CFLAGS="-g -O2"
127
  else
128
    CFLAGS="-O2"
129
  fi
130
else
131
  GCC=
132
  test "${CFLAGS+set}" = set || CFLAGS="-g"
133
fi
134
])
135
 
136
LIB_AC_PROG_CC
137
AS=${AS-as}
138
AC_SUBST(AS)
139
AC_CHECK_PROG(AR, ar, ar, :)
140
AR=${AR-ar}
141
AC_SUBST(AR)
142
LD=${LD-ld}
143
AC_SUBST(LD)
144
AC_PROG_RANLIB
145
 
146
host_makefile_frag=${srcdir}/config/default.mh
147
 
148
dnl We have to assign the same value to other variables because autoconf
149
dnl doesn't provide a mechanism to substitute a replacement keyword with
150
dnl arbitrary data or pathnames.
151
dnl
152
host_makefile_frag_path=$host_makefile_frag
153
AC_SUBST(host_makefile_frag_path)
154
AC_SUBST_FILE(host_makefile_frag)
155
 
156
# for now, only add multilibs for specific targets
157
AC_OUTPUT(Makefile,
158
. ${libgloss_topdir}/config-ml.in,
159
srcdir=${srcdir}
160
target=${target}
161
with_multisubdir=${with_multisubdir}
162
ac_configure_args="--enable-multilib ${ac_configure_args}"
163
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
164
libgloss_topdir=${libgloss_topdir}
165
)
166
 
167
 
168
 

powered by: WebSVN 2.1.0

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