[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]) |
---|
[b96a7b1] | 6 | AC_PREFIX_DEFAULT([/opt/rtems]) |
---|
[d7c8239] | 7 | AM_INIT_AUTOMAKE([no-define foreign 1.6]) |
---|
[d7aecdc] | 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 | AC_MSG_CHECKING(for rpm SPECS directory) |
---|
[64cc4bb5] | 25 | # Allow users to override RPM_SPECSdir from the environment. |
---|
[96a2a02] | 26 | if test -z "$RPM_SPECSdir" ; |
---|
[d7aecdc] | 27 | then |
---|
[64cc4bb5] | 28 | # SuSE uses /usr/src/packages |
---|
| 29 | # redhat uses /usr/src/redhat |
---|
| 30 | # MDK is reported to use /usr/src/RPM |
---|
| 31 | # others might use /usr/src |
---|
| 32 | rpmpath="/usr:/usr/local" |
---|
| 33 | rpmdirs="src/packages:src/redhat:src/RPM:src" |
---|
| 34 | save_IFS="$IFS"; IFS=":" |
---|
| 35 | for d in $rpmdirs; do |
---|
| 36 | for p in $rpmpath; do |
---|
| 37 | list="$p/$d:$list" |
---|
| 38 | done |
---|
| 39 | done |
---|
| 40 | for d in $list; do |
---|
| 41 | if test -d $d/SPECS; then |
---|
| 42 | RPM_SPECSdir="$d/SPECS"; |
---|
| 43 | break; |
---|
| 44 | fi |
---|
| 45 | done |
---|
| 46 | IFS="$save_IFS" |
---|
[d7aecdc] | 47 | fi |
---|
[64cc4bb5] | 48 | |
---|
[d7aecdc] | 49 | if test x"$RPM_SPECSdir" = x"" ; then |
---|
[64cc4bb5] | 50 | AC_MSG_ERROR([not found]) |
---|
[d7aecdc] | 51 | fi |
---|
| 52 | AC_MSG_RESULT($RPM_SPECSdir) |
---|
| 53 | AC_SUBST(RPM_SPECSdir) |
---|
| 54 | |
---|
| 55 | AC_MSG_CHECKING(for RPM CPU type) |
---|
| 56 | case "$host" in |
---|
| 57 | i?86-*linux*) RPM_CPU=i386 ;; |
---|
| 58 | i?86-*cygwin*) RPM_CPU=i386 ;; |
---|
[0694dbab] | 59 | sparc-*solaris*) RPM_CPU=sparc ;; |
---|
[d7aecdc] | 60 | *) |
---|
| 61 | AC_MSG_ERROR([RPM CPU for ${host} is unknown]) |
---|
| 62 | ;; |
---|
| 63 | esac |
---|
| 64 | AC_MSG_RESULT($RPM_CPU) |
---|
| 65 | |
---|
| 66 | GCCNEWLIBVERS="gcc-${gcc_version}-newlib-${newlib_version}" |
---|
| 67 | AC_SUBST(GCCNEWLIBVERS) |
---|
[afe5cac] | 68 | GCC3NEWLIBVERS="gcc-${gcc3_version}-newlib-${gcc3newlib_version}" |
---|
| 69 | AC_SUBST(GCC3NEWLIBVERS) |
---|
[d7aecdc] | 70 | BINUTILSVERS="binutils-${binutils_version}" |
---|
| 71 | AC_SUBST(BINUTILSVERS) |
---|
| 72 | GDBVERS="gdb-${gdb_version}" |
---|
| 73 | AC_SUBST(GDBVERS) |
---|
| 74 | BSPVERS="${rtems_version}" |
---|
| 75 | AC_SUBST(RTEMS_VERSION) |
---|
| 76 | AC_SUBST(BSPVERS) |
---|
| 77 | AC_SUBST(RPM_CPU) |
---|
| 78 | |
---|
| 79 | AC_CONFIG_FILES([Makefile |
---|
| 80 | buildall |
---|
| 81 | buildalltar |
---|
| 82 | mkbinutilspec |
---|
| 83 | mkgccnewlibspec |
---|
[afe5cac] | 84 | mkgcc3newlibspec |
---|
[d7aecdc] | 85 | mkgdbspec |
---|
| 86 | mkbspspec |
---|
| 87 | binutils/Makefile |
---|
| 88 | gccnewlib/Makefile |
---|
[afe5cac] | 89 | gcc3newlib/Makefile |
---|
[d7aecdc] | 90 | gdb/Makefile |
---|
| 91 | rtems/Makefile |
---|
[353dbe95] | 92 | autotools/Makefile |
---|
| 93 | autotools/automake-rtems.spec |
---|
| 94 | ]) |
---|
[d7aecdc] | 95 | AC_CONFIG_COMMANDS([default],[[chmod 755 buildall |
---|
| 96 | chmod 755 buildalltar |
---|
| 97 | ]],[[]]) |
---|
| 98 | AC_OUTPUT |
---|