1 | ## $Id$ |
---|
2 | |
---|
3 | AC_PREREQ(2.52) |
---|
4 | AC_INIT |
---|
5 | AC_CONFIG_SRCDIR([binutils]) |
---|
6 | |
---|
7 | AM_INIT_AUTOMAKE(rtems-scripts,20010516,no) |
---|
8 | |
---|
9 | AC_CANONICAL_HOST |
---|
10 | |
---|
11 | # Check for .exe suffix. |
---|
12 | # With autoconf > 2.13 AC_EXEEXT is not what we want to use. |
---|
13 | AC_MSG_CHECKING([for executable suffix]) |
---|
14 | case "$host" in |
---|
15 | i?86-*cygwin*) |
---|
16 | EXEEXT=.exe ;; |
---|
17 | esac |
---|
18 | AC_SUBST(EXEEXT) |
---|
19 | AC_MSG_RESULT([$EXEEXT]) |
---|
20 | |
---|
21 | test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache |
---|
22 | . ./setup.cache |
---|
23 | |
---|
24 | # Some linux distributions use /usr/src/packages |
---|
25 | # redhat uses /usr/src/redhat |
---|
26 | # others might use /usr/src |
---|
27 | AC_MSG_CHECKING(for rpm SPECS directory) |
---|
28 | if test -d /usr/src/packages/SPECS; |
---|
29 | then |
---|
30 | RPM_SPECSdir=/usr/src/packages/SPECS; |
---|
31 | elif test -d /usr/src/redhat/SPECS; |
---|
32 | then |
---|
33 | RPM_SPECSdir=/usr/src/redhat/SPECS; |
---|
34 | elif test -d /usr/src/SPECS; |
---|
35 | then |
---|
36 | RPM_SPECSdir=/usr/src/SPECS; |
---|
37 | elif test -d /usr/local/src/redhat/SPECS; |
---|
38 | then |
---|
39 | RPM_SPECSdir=/usr/local/src/redhat/SPECS; |
---|
40 | fi |
---|
41 | if test x"$RPM_SPECSdir" = x"" ; then |
---|
42 | AC_MSG_ERROR(not found) |
---|
43 | fi |
---|
44 | AC_MSG_RESULT($RPM_SPECSdir) |
---|
45 | AC_SUBST(RPM_SPECSdir) |
---|
46 | |
---|
47 | AC_MSG_CHECKING(for RPM CPU type) |
---|
48 | case "$host" in |
---|
49 | i?86-*linux*) RPM_CPU=i386 ;; |
---|
50 | i?86-*cygwin*) RPM_CPU=i386 ;; |
---|
51 | sparc-sun-solaris*) RPM_CPU=sparc ;; |
---|
52 | *) |
---|
53 | AC_MSG_ERROR([RPM CPU for ${host} is unknown]) |
---|
54 | ;; |
---|
55 | esac |
---|
56 | AC_MSG_RESULT($RPM_CPU) |
---|
57 | |
---|
58 | GCCNEWLIBVERS="gcc-${gcc_version}-newlib-${newlib_version}" |
---|
59 | AC_SUBST(GCCNEWLIBVERS) |
---|
60 | BINUTILSVERS="binutils-${binutils_version}" |
---|
61 | AC_SUBST(BINUTILSVERS) |
---|
62 | GDBVERS="gdb-${gdb_version}" |
---|
63 | AC_SUBST(GDBVERS) |
---|
64 | BSPVERS="${rtems_version}" |
---|
65 | AC_SUBST(RTEMS_VERSION) |
---|
66 | AC_SUBST(BSPVERS) |
---|
67 | AC_SUBST(RPM_CPU) |
---|
68 | |
---|
69 | AC_CONFIG_FILES([Makefile |
---|
70 | buildall |
---|
71 | buildalltar |
---|
72 | mkbinutilspec |
---|
73 | mkgccnewlibspec |
---|
74 | mkgdbspec |
---|
75 | mkbspspec |
---|
76 | binutils/Makefile |
---|
77 | gccnewlib/Makefile |
---|
78 | gdb/Makefile |
---|
79 | rtems/Makefile |
---|
80 | autotools/Makefile]) |
---|
81 | AC_CONFIG_COMMANDS([default],[[chmod 755 buildall |
---|
82 | chmod 755 buildalltar |
---|
83 | ]],[[]]) |
---|
84 | AC_OUTPUT |
---|