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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
## $Id$
m4_define([M4_RTEMS_API],[4.7])
m4_define([M4_RTEMS_VERSION],[4.6.99.3])
m4_define([M4_RTEMS_RELEASE],[0])
AC_PREREQ([2.68])
AC_INIT([rtemsrpms],[M4_RTEMS_RELEASE],[http://www.rtems.org/bugzilla])
AC_CONFIG_AUX_DIR(.)
AC_CANONICAL_HOST
AC_PREFIX_DEFAULT([/opt/rtems-][M4_RTEMS_API])
AM_INIT_AUTOMAKE([1.11.1])
rpmprefix="[rtems-]M4_RTEMS_API[-]"
case "$prefix" in
/usr/local)
rpmprefix="local-"
;;
/opt/rtems)
;;
NONE|$ac_default_prefix)
prefix=$ac_default_prefix
;;
*)
rpmprefix="custom-"
;;
esac
AC_ARG_ENABLE([rpmprefix],
[ --enable-rpmprefix=<rpmprefix> prefix rpms],[
case "$enable_rpmprefix" in
yes) # ignore, use default
;;
no) # use default
;;
*) # presume user knows what he is doing
rpmprefix=$enable_rpmprefix;;
esac
])
AC_MSG_CHECKING([for rpm database])
rpmdbpath=
AC_ARG_ENABLE([rpmdbpath],
[ --enable-rpmdbpath=<rpmdbpath> rpm database path],[
case "$enable_rpmdbpath" in
yes) # ignore, use default
;;
no) # use default
;;
*) # presume user knows what he is doing
rpmdbpath="--dbpath $enable_rpmdbpath";;
esac
])
AS_IF([test -z $rpmdbpath],
[AC_MSG_RESULT([system])],
[AC_MSG_RESULT([$rpmdbpath])])
AC_MSG_CHECKING([for bootstrap])
bootstrap=no
AC_ARG_ENABLE([bootstrap],
[ --enable-bootstrap=<bootstap> bootstrap RTEMS],[
case "$enable_bootstrap" in
yes|no) # ignore, use default
bootstrap=$enable_bootstrap;;
*) # use default
;;
esac
])
AC_MSG_RESULT([$bootstrap])
dnl The total list:
dnl arm avr h8300 i386 m68k mips powerpc sh sparc tic4x
AC_MSG_CHECKING([for targets])
AC_ARG_ENABLE([targets],
AS_HELP_STRING([--enable-targets=<targets>],[build for targets <targets>]),
[targets="$enable_targets"],
[targets="arm i386 m68k mips powerpc sh sparc tic4x"]
)
AC_MSG_RESULT([$targets])
AC_MSG_CHECKING([for bsps])
bsps="%{nil}"
AC_ARG_ENABLE([bsps],
[ --enable-bsps=<yes/no/bsps> BSP list],[
case "$enable_bsps" in
yes) # ignore, use default
bsps="all"
;;
no | none)
bsps="%{nil}"
;;
*) # take a the list to build
bsps="$enable_bsps"
;;
esac
])
AS_IF([test x"$bsps" = x"%{nil}"],
[AC_MSG_RESULT([none])],
[AC_MSG_RESULT([$bsps])])
AC_SUBST(RTEMS_API, [M4_RTEMS_API])
AC_SUBST(RTEMS_VERSION, [M4_RTEMS_VERSION])
AC_SUBST(RTEMS_RELEASE, [M4_RTEMS_RELEASE])
AC_SUBST(PREFIX, [$prefix])
AC_SUBST(TARGETS, [$targets])
AC_SUBST(RPMPREFIX, [$rpmprefix])
AC_SUBST(RPMDBPATH, [$rpmdbpath])
AC_SUBST(RTEMS_BOOTSTRAP, [$bootstrap])
AC_SUBST(RTEMS_BSP, [$bsps])
AC_CONFIG_FILES([Makefile rtems.spec])
AC_OUTPUT
|