source: trunk/libs/newlib/src/libgloss/epiphany/configure.in @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 4.3 KB
Line 
1# Makefile for libgloss/epiphany
2
3# Copyright (c) 2011, Adapteva, Inc.
4# All rights reserved.
5
6# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> for Adapteva Inc
7
8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions are met:
10#  * Redistributions of source code must retain the above copyright notice,
11#    this list of conditions and the following disclaimer.
12#  * Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15#  * Neither the name of Adapteva nor the names of its contributors may be
16#    used to endorse or promote products derived from this software without
17#    specific prior written permission.
18
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29# POSSIBILITY OF SUCH DAMAGE.                                               */
30
31# Process this file with autoconf to produce a configure script
32
33AC_PREREQ(2.59)
34AC_INIT(libepiphany,0.0.1)
35AC_CONFIG_HEADER(config.h)
36
37# No shared libraries allowed
38if test "${enable_shared}" = "yes" ; then
39    echo "Shared libraries not supported for cross compiling, ignored"
40fi
41
42# Where are the auxillary tools (confg.sub etc)?
43if test "$srcdir" = "." ; then
44  if test "${with_target_subdir}" != "." ; then
45    libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
46  else
47    libgloss_topdir="${srcdir}/${with_multisrctop}../.."
48  fi
49else
50  libgloss_topdir="${srcdir}/../.."
51fi
52AC_CONFIG_AUX_DIR($libgloss_topdir)
53
54AC_CANONICAL_SYSTEM
55AC_ARG_PROGRAM
56
57AC_PROG_INSTALL
58
59AC_DEFINE(HAVE_GNU_LD, 1, [Using GNU ld])
60
61# We always use ELF, define various useful associated things.
62AC_DEFINE(HAVE_ELF, 1, [Using ELF format])
63
64# Assembler directives (the assembler handles them, whether it does anything
65# useful with them is another matter...
66AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE, 1, [.previous directive allowed])
67AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE, 1,
68          [.pushsection/.popsection directives allowed])
69
70# Section attributes in C don't currently work
71#AC_DEFINE(HAVE_SECTION_ATTRIBUTES, 1, [support for section attributes])
72
73# Sort out what the symbol prefix is (we could just fix it as '_', but let the
74# script work it out.
75AC_CACHE_CHECK([for symbol prefix], libc_symbol_prefix, [dnl
76cat > conftest.c <<\EOF
77foo () { }
78EOF
79dnl
80libc_symbol_prefix=none
81if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null]);
82then
83  libc_symbol_prefix='$'
84else
85  if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "_foo" > /dev/null]);
86  then
87    libc_symbol_prefix=_
88  fi
89fi
90rm -f conftest* ])
91if test $libc_symbol_prefix != none; then
92  AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_symbol_prefix", [symbol prefix])
93else
94  AC_DEFINE(__SYMBOL_PREFIX, "", [symbol prefix])
95fi
96
97# Standard stuff copied from libnosys. For this we'll need to an aclocal.m4
98LIB_AC_PROG_CC
99AS=${AS-as}
100AC_SUBST(AS)
101AR=${AR-ar}
102AC_SUBST(AR)
103LD=${LD-ld}
104AC_SUBST(LD)
105AC_PROG_RANLIB
106LIB_AM_PROG_AS
107
108host_makefile_frag=${srcdir}/../config/default.mh
109
110dnl We have to assign the same value to other variables because autoconf
111dnl doesn't provide a mechanism to substitute a replacement keyword with
112dnl arbitrary data or pathnames.
113dnl
114host_makefile_frag_path=$host_makefile_frag
115AC_SUBST(host_makefile_frag_path)
116AC_SUBST_FILE(host_makefile_frag)
117
118AC_CONFIG_FILES(Makefile,
119ac_file=Makefile . ${libgloss_topdir}/config-ml.in,
120srcdir=${srcdir}
121target=${target}
122with_multisubdir=${with_multisubdir}
123ac_configure_args="${ac_configure_args} --enable-multilib"
124CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
125libgloss_topdir=${libgloss_topdir}
126)
127AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.