source: trunk/libs/newlib/src/libgloss/libnosys/configure.in @ 536

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

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

File size: 4.7 KB
Line 
1# 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#
15AC_PREREQ(2.59)
16AC_INIT(close.c)
17AC_CONFIG_HEADER(config.h)
18
19if test "${enable_shared}" = "yes" ; then
20    echo "Shared libraries not supported for cross compiling, ignored"
21fi
22
23if 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
29else
30  libgloss_topdir="${srcdir}/../.."
31fi
32AC_CONFIG_AUX_DIR($libgloss_topdir)
33
34AC_CANONICAL_SYSTEM
35AC_ARG_PROGRAM
36
37AC_PROG_INSTALL
38
39AC_DEFINE(HAVE_GNU_LD)
40dnl Make sure syscall names match those being used by newlib
41case "${target}" in
42  *-*-cygwin*)
43        ;;
44  a29k-amd-udi)
45        ;;
46  aarch64*-*-*)
47        ;;
48  arc-*-*)
49        ;;
50  arm*-*-*)
51        ;;
52  bfin-*-*)
53        ;;
54  cris-*-* | crisv32-*-*)
55        ;;
56  d10v*)
57        ;;
58  h8300*-*-*)
59        ;;     
60  h8500-*-*)
61        ;;     
62  i[3456]86-*-sco*)
63        ;;
64  lm32-*-*)
65        ;;
66  m32r-*-*)
67        ;;
68  mn10?00-*-*)
69        ;;
70  riscv*-*-*)
71        ;;
72  powerpcle-*-pe)
73        ;;
74  sh*-*-*)
75        ;;
76  sparc-sun-sunos*)
77        ;;
78  sparc64-*-*)
79        ;;
80  v850*-*-*)
81        ;;
82  w65-*-*)
83        ;;     
84  xstormy16-*-*)
85        ;;
86  z8k-*-*)
87        ;;
88  *)
89        AC_DEFINE(MISSING_SYSCALL_NAMES)
90        ;;
91esac
92
93dnl Make sure we know if elf format used
94case "${target}" in
95  *-*-elf)
96        AC_DEFINE(HAVE_ELF)
97
98        AC_CACHE_CHECK([for .previous assembler directive],
99                         libc_cv_asm_previous_directive, [dnl
100        libc_cv_asm_previous_directive=no
101        cat > conftest.s <<EOF
102.section foo_section
103.previous
104EOF
105        if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
106          libc_cv_asm_previous_directive=yes
107        fi
108        rm -f conftest*])
109
110        if test "x${libc_cv_asm_previous_directive}" = "xyes"; then
111          AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE)
112        fi
113
114        AC_CACHE_CHECK([for .popsection assembler directive],
115                         libc_cv_asm_popsection_directive, [dnl
116        libc_cv_asm_popsection_directive=no
117        cat > conftest.s <<EOF
118.pushsection foo_section
119.popsection
120EOF
121        if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
122          libc_cv_asm_popsection_directive=yes
123        fi
124        rm -f conftest*])
125
126        if test "x${libc_cv_asm_popsection_directive}" = "xyes"; then
127          AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE)
128        fi
129
130        AC_CACHE_CHECK([for section attributes],
131                         libc_cv_section_attributes, [dnl
132        libc_cv_section_attributes=no
133        cat > conftest.c <<EOF
134int secttest __attribute__ ((section (".gnu.warning.secttest"))) = 10;
135int main() {}
136EOF
137        if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.c 1>&AC_FD_CC); then
138          libc_cv_section_attributes=yes
139        fi
140        rm -f conftest*])
141        if test "x${libc_cv_section_attributes}" = "xyes"; then
142          AC_DEFINE(HAVE_SECTION_ATTRIBUTES)
143        fi
144        ;;
145esac
146
147AC_CACHE_CHECK([for symbol prefix], libc_cv_symbol_prefix, [dnl
148cat > conftest.c <<\EOF
149foo () { }
150EOF
151dnl
152libc_cv_symbol_prefix=none
153if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null]);
154then
155  libc_cv_symbol_prefix='$'
156else
157  if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "_foo" > /dev/null]);
158  then
159    libc_cv_symbol_prefix=_
160  fi
161fi
162rm -f conftest* ])
163if test $libc_cv_symbol_prefix != none; then
164  AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix")
165else
166  AC_DEFINE(__SYMBOL_PREFIX, "")
167fi
168
169LIB_AC_PROG_CC
170AS=${AS-as}
171AC_SUBST(AS)
172AR=${AR-ar}
173AC_SUBST(AR)
174LD=${LD-ld}
175AC_SUBST(LD)
176AC_PROG_RANLIB
177LIB_AM_PROG_AS
178
179host_makefile_frag=${srcdir}/../config/default.mh
180
181dnl We have to assign the same value to other variables because autoconf
182dnl doesn't provide a mechanism to substitute a replacement keyword with
183dnl arbitrary data or pathnames.
184dnl
185host_makefile_frag_path=$host_makefile_frag
186AC_SUBST(host_makefile_frag_path)
187AC_SUBST_FILE(host_makefile_frag)
188
189AC_CONFIG_FILES(Makefile,
190ac_file=Makefile . ${libgloss_topdir}/config-ml.in,
191srcdir=${srcdir}
192target=${target}
193with_multisubdir=${with_multisubdir}
194ac_configure_args="${ac_configure_args} --enable-multilib"
195CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
196libgloss_topdir=${libgloss_topdir}
197)
198AC_OUTPUT
199
200
Note: See TracBrowser for help on using the repository browser.