Welcome to mirror list, hosted at ThFree Co, Russian Federation.

configure.in « arm « machine « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ad7bfe048037a6764bb560c413e200d8a123b220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
dnl This is the newlib/libc/machine/arm configure.in file.
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT([newlib],[NEWLIB_VERSION])
AC_CONFIG_SRCDIR([Makefile.am])

dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. 
AC_CONFIG_AUX_DIR(../../../..)

NEWLIB_CONFIGURE(../../..)

dnl Check for Thumb1 supported.
AC_CACHE_CHECK(whether we are using thumb1,
	       acnewlib_cv_thumb1_processor, [dnl
cat > conftest.c <<EOF

#if defined (__thumb__) && !defined (__thumb2__)
  #define _THUMB1
 #else
  #error "not thumb1"
#endif
int main () {
  return 0;
}
EOF
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
							1>&AS_MESSAGE_LOG_FD])
then
  acnewlib_cv_thumb1_processor=yes;
else
  acnewlib_cv_thumb1_processor=no;
fi
rm -f conftest*])

AM_CONDITIONAL(HAVE_THUMB1, test x"$acnewlib_cv_thumb1_processor" = x"yes")

dnl Check for whether the size is preferred.
AC_CACHE_CHECK(whether the size is preferred,
	       acnewlib_cv_opt_size, [dnl
cat > conftest.c <<EOF

#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
  #define OPT_SIZE
 #else
  #error "not need for size optimization."
#endif
int main () {
  return 0;
}
EOF
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
							1>&AS_MESSAGE_LOG_FD])
then
  acnewlib_cv_opt_size=yes;
else
  acnewlib_cv_opt_size=no;
fi
rm -f conftest*])

AM_CONDITIONAL(OPT_SIZE, test x"$acnewlib_cv_opt_size" = x"yes")

AC_SUBST(CFLAGS)

AC_CONFIG_FILES([Makefile])
AC_OUTPUT