[d7aecdc] | 1 | ## $Id$ |
---|
| 2 | |
---|
| 3 | AC_PREREQ(2.52) |
---|
[d7c8239] | 4 | AC_INIT([rtems-scripts],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com]) |
---|
[d7aecdc] | 5 | AC_CONFIG_SRCDIR([binutils]) |
---|
[620c972] | 6 | RTEMS_TOP([..]) |
---|
[b96a7b1] | 7 | AC_PREFIX_DEFAULT([/opt/rtems]) |
---|
[d7c8239] | 8 | AM_INIT_AUTOMAKE([no-define foreign 1.6]) |
---|
[d7aecdc] | 9 | |
---|
| 10 | AC_CANONICAL_HOST |
---|
| 11 | |
---|
| 12 | # Check for .exe suffix. |
---|
| 13 | # With autoconf > 2.13 AC_EXEEXT is not what we want to use. |
---|
| 14 | AC_MSG_CHECKING([for executable suffix]) |
---|
| 15 | case "$host" in |
---|
| 16 | i?86-*cygwin*) |
---|
| 17 | EXEEXT=.exe ;; |
---|
| 18 | esac |
---|
| 19 | AC_SUBST(EXEEXT) |
---|
| 20 | AC_MSG_RESULT([$EXEEXT]) |
---|
| 21 | |
---|
| 22 | test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache |
---|
| 23 | . ./setup.cache |
---|
| 24 | |
---|
| 25 | AC_MSG_CHECKING(for rpm SPECS directory) |
---|
[64cc4bb5] | 26 | # Allow users to override RPM_SPECSdir from the environment. |
---|
[96a2a02] | 27 | if test -z "$RPM_SPECSdir" ; |
---|
[d7aecdc] | 28 | then |
---|
[64cc4bb5] | 29 | # SuSE uses /usr/src/packages |
---|
| 30 | # redhat uses /usr/src/redhat |
---|
| 31 | # MDK is reported to use /usr/src/RPM |
---|
| 32 | # others might use /usr/src |
---|
| 33 | rpmpath="/usr:/usr/local" |
---|
| 34 | rpmdirs="src/packages:src/redhat:src/RPM:src" |
---|
| 35 | save_IFS="$IFS"; IFS=":" |
---|
| 36 | for d in $rpmdirs; do |
---|
| 37 | for p in $rpmpath; do |
---|
| 38 | list="$p/$d:$list" |
---|
| 39 | done |
---|
| 40 | done |
---|
| 41 | for d in $list; do |
---|
| 42 | if test -d $d/SPECS; then |
---|
| 43 | RPM_SPECSdir="$d/SPECS"; |
---|
| 44 | break; |
---|
| 45 | fi |
---|
| 46 | done |
---|
| 47 | IFS="$save_IFS" |
---|
[d7aecdc] | 48 | fi |
---|
[64cc4bb5] | 49 | |
---|
[d7aecdc] | 50 | if test x"$RPM_SPECSdir" = x"" ; then |
---|
[64cc4bb5] | 51 | AC_MSG_ERROR([not found]) |
---|
[d7aecdc] | 52 | fi |
---|
| 53 | AC_MSG_RESULT($RPM_SPECSdir) |
---|
| 54 | AC_SUBST(RPM_SPECSdir) |
---|
| 55 | |
---|
| 56 | AC_MSG_CHECKING(for RPM CPU type) |
---|
| 57 | case "$host" in |
---|
| 58 | i?86-*linux*) RPM_CPU=i386 ;; |
---|
| 59 | i?86-*cygwin*) RPM_CPU=i386 ;; |
---|
[0694dbab] | 60 | sparc-*solaris*) RPM_CPU=sparc ;; |
---|
[d7aecdc] | 61 | *) |
---|
| 62 | AC_MSG_ERROR([RPM CPU for ${host} is unknown]) |
---|
| 63 | ;; |
---|
| 64 | esac |
---|
| 65 | AC_MSG_RESULT($RPM_CPU) |
---|
| 66 | |
---|
| 67 | GCCNEWLIBVERS="gcc-${gcc_version}-newlib-${newlib_version}" |
---|
| 68 | AC_SUBST(GCCNEWLIBVERS) |
---|
[afe5cac] | 69 | GCC3NEWLIBVERS="gcc-${gcc3_version}-newlib-${gcc3newlib_version}" |
---|
| 70 | AC_SUBST(GCC3NEWLIBVERS) |
---|
[d7aecdc] | 71 | BINUTILSVERS="binutils-${binutils_version}" |
---|
| 72 | AC_SUBST(BINUTILSVERS) |
---|
| 73 | GDBVERS="gdb-${gdb_version}" |
---|
| 74 | AC_SUBST(GDBVERS) |
---|
| 75 | BSPVERS="${rtems_version}" |
---|
| 76 | AC_SUBST(RTEMS_VERSION) |
---|
| 77 | AC_SUBST(BSPVERS) |
---|
| 78 | AC_SUBST(RPM_CPU) |
---|
| 79 | |
---|
| 80 | AC_CONFIG_FILES([Makefile |
---|
| 81 | binutils/Makefile |
---|
| 82 | gccnewlib/Makefile |
---|
[afe5cac] | 83 | gcc3newlib/Makefile |
---|
[d7aecdc] | 84 | gdb/Makefile |
---|
| 85 | rtems/Makefile |
---|
[353dbe95] | 86 | autotools/Makefile |
---|
| 87 | autotools/automake-rtems.spec |
---|
[620c972] | 88 | cpukit/Makefile |
---|
[353dbe95] | 89 | ]) |
---|
[3d36fe3d] | 90 | |
---|
| 91 | AC_CONFIG_FILES([buildalltar],[chmod +x buildalltar]) |
---|
| 92 | AC_CONFIG_FILES([buildall],[chmod +x buildall]) |
---|
| 93 | AC_CONFIG_FILES([mkgdbspec],[chmod +x mkgdbspec]) |
---|
| 94 | AC_CONFIG_FILES([mkbinutilspec],[chmod +x mkbinutilspec]) |
---|
| 95 | AC_CONFIG_FILES([mkgccnewlibspec],[chmod +x mkgccnewlibspec]) |
---|
| 96 | AC_CONFIG_FILES([mkbspspec],[chmod +x mkbspspec]) |
---|
[4aba88a1] | 97 | AC_CONFIG_FILES([gcc3newlib/mkspec],[chmod +x gcc3newlib/mkspec]) |
---|
[620c972] | 98 | AC_CONFIG_FILES([cpukit/mkspec],[chmod +x cpukit/mkspec]) |
---|
[3d36fe3d] | 99 | |
---|
[d7aecdc] | 100 | AC_CONFIG_COMMANDS([default],[[chmod 755 buildall |
---|
| 101 | chmod 755 buildalltar |
---|
| 102 | ]],[[]]) |
---|
| 103 | AC_OUTPUT |
---|