1 | ## $Id$ |
---|
2 | |
---|
3 | AC_PREREQ(2.57) |
---|
4 | AC_INIT([rtems-scripts],[_RTEMS_VERSION],[rtems-bugs@rtems.com]) |
---|
5 | AC_CONFIG_SRCDIR([binutils]) |
---|
6 | RTEMS_TOP([..]) |
---|
7 | |
---|
8 | AM_INIT_AUTOMAKE([no-define foreign 1.7.2]) |
---|
9 | |
---|
10 | AC_CANONICAL_HOST |
---|
11 | |
---|
12 | test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache |
---|
13 | . ./setup.cache |
---|
14 | |
---|
15 | AC_ARG_ENABLE([rpmprefix], |
---|
16 | [ --enable-rpmprefix=<rpmprefix> prefix rpms], |
---|
17 | [case $enable_rpmprefix in |
---|
18 | yes ) rpmprefix="rtems-"]RTEMS_API["-";; |
---|
19 | no ) rpmprefix="%{nil}";; |
---|
20 | * ) AS_IF([test -z "$enable_rpmprefix"], |
---|
21 | [rpmprefix="%{nil}"], |
---|
22 | [rpmprefix="$enable_rpmprefix"]);; |
---|
23 | esac], |
---|
24 | [rpmprefix="rtems-"]RTEMS_API["-"]) |
---|
25 | |
---|
26 | AC_ARG_ENABLE([osversions], |
---|
27 | [ --enable-osversions whether to use version numbers in os-tripples], |
---|
28 | [case $enable_osversions in |
---|
29 | yes ) osversion=RTEMS_API;; |
---|
30 | * ) osversion=;; |
---|
31 | esac], |
---|
32 | [osversion=]) |
---|
33 | |
---|
34 | AC_MSG_CHECKING(for rpm SPECS directory) |
---|
35 | # Allow users to override RPM_SPECSdir from the environment. |
---|
36 | if test -z "$RPM_SPECSdir" ; |
---|
37 | then |
---|
38 | # SuSE uses /usr/src/packages |
---|
39 | # redhat uses /usr/src/redhat |
---|
40 | # MDK is reported to use /usr/src/RPM |
---|
41 | # others might use /usr/src |
---|
42 | rpmpath="/usr:/usr/local" |
---|
43 | rpmdirs="src/packages:src/redhat:src/RPM:src" |
---|
44 | save_IFS="$IFS"; IFS=":" |
---|
45 | for d in $rpmdirs; do |
---|
46 | for p in $rpmpath; do |
---|
47 | list="$p/$d:$list" |
---|
48 | done |
---|
49 | done |
---|
50 | for d in $list; do |
---|
51 | if test -d $d/SPECS; then |
---|
52 | RPM_SPECSdir="$d/SPECS"; |
---|
53 | break; |
---|
54 | fi |
---|
55 | done |
---|
56 | IFS="$save_IFS" |
---|
57 | fi |
---|
58 | |
---|
59 | if test x"$RPM_SPECSdir" = x"" ; then |
---|
60 | AC_MSG_ERROR([not found]) |
---|
61 | fi |
---|
62 | AC_MSG_RESULT($RPM_SPECSdir) |
---|
63 | AC_SUBST(RPM_SPECSdir) |
---|
64 | |
---|
65 | AC_MSG_CHECKING(for RPM CPU type) |
---|
66 | case "$host" in |
---|
67 | i?86-*linux*) RPM_CPU=i386 ;; |
---|
68 | i?86-*cygwin*) RPM_CPU=i386 ;; |
---|
69 | sparc-*solaris*) RPM_CPU=sparc ;; |
---|
70 | *) |
---|
71 | AC_MSG_ERROR([RPM CPU for ${host} is unknown]) |
---|
72 | ;; |
---|
73 | esac |
---|
74 | AC_MSG_RESULT($RPM_CPU) |
---|
75 | |
---|
76 | GCCNEWLIBVERS="gcc-${gcc_version}-newlib-${newlib_version}" |
---|
77 | AC_SUBST(GCCNEWLIBVERS) |
---|
78 | GCC3NEWLIBVERS="gcc-${gcc3_version}-newlib-${gcc3newlib_version}" |
---|
79 | AC_SUBST(GCC3NEWLIBVERS) |
---|
80 | BINUTILSVERS="binutils-${binutils_version}" |
---|
81 | AC_SUBST(BINUTILSVERS) |
---|
82 | GDBVERS="gdb-${gdb_version}" |
---|
83 | AC_SUBST(GDBVERS) |
---|
84 | BSPVERS="${rtems_version}" |
---|
85 | AC_SUBST(RTEMS_VERSION) |
---|
86 | AC_SUBST(BSPVERS) |
---|
87 | AC_SUBST(RPM_CPU) |
---|
88 | AC_SUBST(rpmprefix,$rpmprefix) |
---|
89 | AC_SUBST(rpmgroup,[RTEMS/][RTEMS_API]) |
---|
90 | AC_SUBST(osversion,$osversion) |
---|
91 | |
---|
92 | AC_CONFIG_FILES([Makefile |
---|
93 | binutils/Makefile |
---|
94 | gccnewlib/Makefile |
---|
95 | gcc3newlib/Makefile |
---|
96 | gdb/Makefile |
---|
97 | rtems/Makefile |
---|
98 | autotools/Makefile |
---|
99 | autotools/automake-rtems.spec |
---|
100 | autotools/autoconf-rtems.spec |
---|
101 | cpukit/Makefile |
---|
102 | rtemsdoc/Makefile |
---|
103 | ]) |
---|
104 | |
---|
105 | AC_CONFIG_FILES([common/common.add common/clean.add]) |
---|
106 | AC_CONFIG_FILES([buildalltar],[chmod +x buildalltar]) |
---|
107 | AC_CONFIG_FILES([buildall],[chmod +x buildall]) |
---|
108 | AC_CONFIG_FILES([gdb/mkspec],[chmod +x gdb/mkspec]) |
---|
109 | AC_CONFIG_FILES([binutils/mkspec],[chmod +x binutils/mkspec]) |
---|
110 | AC_CONFIG_FILES([mkgccnewlibspec],[chmod +x mkgccnewlibspec]) |
---|
111 | AC_CONFIG_FILES([mkbspspec],[chmod +x mkbspspec]) |
---|
112 | AC_CONFIG_FILES([gcc3newlib/mkspec],[chmod +x gcc3newlib/mkspec]) |
---|
113 | AC_CONFIG_FILES([cpukit/mkspec],[chmod +x cpukit/mkspec]) |
---|
114 | AC_CONFIG_FILES([rtemsdoc/mkspec],[chmod +x rtemsdoc/mkspec]) |
---|
115 | |
---|
116 | AC_CONFIG_COMMANDS([default],[[chmod 755 buildall |
---|
117 | chmod 755 buildalltar |
---|
118 | ]],[[]]) |
---|
119 | AC_OUTPUT |
---|