[d7aecdc] | 1 | ## $Id$ |
---|
| 2 | |
---|
[810720b6] | 3 | AC_PREREQ(2.59) |
---|
[7dcc3fe] | 4 | AC_INIT([rtems-scripts],[_RTEMS_VERSION],[rtems-bugs@rtems.com]) |
---|
[d7aecdc] | 5 | AC_CONFIG_SRCDIR([binutils]) |
---|
[620c972] | 6 | RTEMS_TOP([..]) |
---|
[087a6c86] | 7 | |
---|
[3e46c1cf] | 8 | AM_INIT_AUTOMAKE([no-define foreign 1.9]) |
---|
[d7aecdc] | 9 | |
---|
| 10 | AC_CANONICAL_HOST |
---|
| 11 | |
---|
| 12 | test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache |
---|
| 13 | . ./setup.cache |
---|
| 14 | |
---|
[c0b267a] | 15 | RTEMS_ENABLE_RPMPREFIX |
---|
[f8f365a6] | 16 | |
---|
[d7aecdc] | 17 | AC_MSG_CHECKING(for rpm SPECS directory) |
---|
[64cc4bb5] | 18 | # Allow users to override RPM_SPECSdir from the environment. |
---|
[96a2a02] | 19 | if test -z "$RPM_SPECSdir" ; |
---|
[d7aecdc] | 20 | then |
---|
[64cc4bb5] | 21 | # SuSE uses /usr/src/packages |
---|
| 22 | # redhat uses /usr/src/redhat |
---|
| 23 | # MDK is reported to use /usr/src/RPM |
---|
| 24 | # others might use /usr/src |
---|
| 25 | rpmpath="/usr:/usr/local" |
---|
| 26 | rpmdirs="src/packages:src/redhat:src/RPM:src" |
---|
| 27 | save_IFS="$IFS"; IFS=":" |
---|
| 28 | for d in $rpmdirs; do |
---|
| 29 | for p in $rpmpath; do |
---|
| 30 | list="$p/$d:$list" |
---|
| 31 | done |
---|
| 32 | done |
---|
| 33 | for d in $list; do |
---|
| 34 | if test -d $d/SPECS; then |
---|
| 35 | RPM_SPECSdir="$d/SPECS"; |
---|
| 36 | break; |
---|
| 37 | fi |
---|
| 38 | done |
---|
| 39 | IFS="$save_IFS" |
---|
[d7aecdc] | 40 | fi |
---|
[64cc4bb5] | 41 | |
---|
[d7aecdc] | 42 | if test x"$RPM_SPECSdir" = x"" ; then |
---|
[64cc4bb5] | 43 | AC_MSG_ERROR([not found]) |
---|
[d7aecdc] | 44 | fi |
---|
| 45 | AC_MSG_RESULT($RPM_SPECSdir) |
---|
| 46 | AC_SUBST(RPM_SPECSdir) |
---|
| 47 | |
---|
| 48 | AC_MSG_CHECKING(for RPM CPU type) |
---|
| 49 | case "$host" in |
---|
| 50 | i?86-*linux*) RPM_CPU=i386 ;; |
---|
| 51 | i?86-*cygwin*) RPM_CPU=i386 ;; |
---|
[0694dbab] | 52 | sparc-*solaris*) RPM_CPU=sparc ;; |
---|
[d7aecdc] | 53 | *) |
---|
| 54 | AC_MSG_ERROR([RPM CPU for ${host} is unknown]) |
---|
| 55 | ;; |
---|
| 56 | esac |
---|
| 57 | AC_MSG_RESULT($RPM_CPU) |
---|
| 58 | |
---|
[afe5cac] | 59 | GCC3NEWLIBVERS="gcc-${gcc3_version}-newlib-${gcc3newlib_version}" |
---|
| 60 | AC_SUBST(GCC3NEWLIBVERS) |
---|
[d7aecdc] | 61 | BINUTILSVERS="binutils-${binutils_version}" |
---|
| 62 | AC_SUBST(BINUTILSVERS) |
---|
| 63 | GDBVERS="gdb-${gdb_version}" |
---|
| 64 | AC_SUBST(GDBVERS) |
---|
| 65 | BSPVERS="${rtems_version}" |
---|
[5d85028] | 66 | AC_SUBST(RTEMS_VERSION,[_RTEMS_VERSION]) |
---|
[d7aecdc] | 67 | AC_SUBST(BSPVERS) |
---|
| 68 | AC_SUBST(RPM_CPU) |
---|
[087a6c86] | 69 | AC_SUBST(rpmprefix,$rpmprefix) |
---|
[d61e9c0f] | 70 | AC_SUBST(rpmgroup,[RTEMS/][RTEMS_API]) |
---|
[beabcaf9] | 71 | AC_SUBST(RTEMS_RPM_RELEASE,$rtems_rpm_release) |
---|
[f8f365a6] | 72 | AC_SUBST(osversion,$osversion) |
---|
[d7aecdc] | 73 | AC_CONFIG_FILES([Makefile |
---|
| 74 | binutils/Makefile |
---|
[afe5cac] | 75 | gcc3newlib/Makefile |
---|
[d7aecdc] | 76 | gdb/Makefile |
---|
| 77 | rtems/Makefile |
---|
[353dbe95] | 78 | autotools/Makefile |
---|
| 79 | autotools/automake-rtems.spec |
---|
[d21091b] | 80 | autotools/autoconf-rtems.spec |
---|
[620c972] | 81 | cpukit/Makefile |
---|
[2eb3fdaa] | 82 | rtemsdoc/Makefile |
---|
[353dbe95] | 83 | ]) |
---|
[3d36fe3d] | 84 | |
---|
[6044dd2f] | 85 | AC_CONFIG_FILES([common/common.add common/clean.add]) |
---|
[3d36fe3d] | 86 | AC_CONFIG_FILES([buildalltar],[chmod +x buildalltar]) |
---|
| 87 | AC_CONFIG_FILES([buildall],[chmod +x buildall]) |
---|
[c86d8e7f] | 88 | AC_CONFIG_FILES([gdb/mkspec],[chmod +x gdb/mkspec]) |
---|
[b601e1a] | 89 | AC_CONFIG_FILES([binutils/mkspec],[chmod +x binutils/mkspec]) |
---|
[3d36fe3d] | 90 | AC_CONFIG_FILES([mkbspspec],[chmod +x mkbspspec]) |
---|
[4aba88a1] | 91 | AC_CONFIG_FILES([gcc3newlib/mkspec],[chmod +x gcc3newlib/mkspec]) |
---|
[620c972] | 92 | AC_CONFIG_FILES([cpukit/mkspec],[chmod +x cpukit/mkspec]) |
---|
[3d36fe3d] | 93 | |
---|
[d7aecdc] | 94 | AC_CONFIG_COMMANDS([default],[[chmod 755 buildall |
---|
| 95 | chmod 755 buildalltar |
---|
| 96 | ]],[[]]) |
---|
| 97 | AC_OUTPUT |
---|