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