diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-10-15 17:49:35 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-10-15 17:49:35 +0000 |
commit | 64cc4bb5af9eaac1b1c9d30f675d7205bfcf99e5 (patch) | |
tree | 60fd5aedf40ada1113a44c008870fae48e16b1bf /scripts/configure.ac | |
parent | 2001-10-12 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-64cc4bb5af9eaac1b1c9d30f675d7205bfcf99e5.tar.bz2 |
2001-10-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* mkbinutilsspec.in: Guard sed-pattern against autoconf.
* mkgccnewlibspec.in: Guard sed-pattern against autoconf, remove
Target_alias.
* mkgdbspec.in: Guard sed-pattern against autoconf.
* mkbspspec.in: Guard sed-pattern against autoconf.
* configure.ac: Rework check for RPM_SPECSdir.
* autotools/automake-rtems.spec: Update to automake-1.5.
Diffstat (limited to 'scripts/configure.ac')
-rw-r--r-- | scripts/configure.ac | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/scripts/configure.ac b/scripts/configure.ac index 2d94ef16bc..f343676ec0 100644 --- a/scripts/configure.ac +++ b/scripts/configure.ac @@ -21,25 +21,33 @@ AC_MSG_RESULT([$EXEEXT]) test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache . ./setup.cache -# Some linux distributions use /usr/src/packages -# redhat uses /usr/src/redhat -# others might use /usr/src AC_MSG_CHECKING(for rpm SPECS directory) -if test -d /usr/src/packages/SPECS; -then - RPM_SPECSdir=/usr/src/packages/SPECS; -elif test -d /usr/src/redhat/SPECS; -then - RPM_SPECSdir=/usr/src/redhat/SPECS; -elif test -d /usr/src/SPECS; +# Allow users to override RPM_SPECSdir from the environment. +if test x"$RPM_SPECSdir" = x"$RPM_SPECSdir"; then - RPM_SPECSdir=/usr/src/SPECS; -elif test -d /usr/local/src/redhat/SPECS; -then - RPM_SPECSdir=/usr/local/src/redhat/SPECS; +# SuSE uses /usr/src/packages +# redhat uses /usr/src/redhat +# MDK is reported to use /usr/src/RPM +# others might use /usr/src + rpmpath="/usr:/usr/local" + rpmdirs="src/packages:src/redhat:src/RPM:src" + save_IFS="$IFS"; IFS=":" + for d in $rpmdirs; do + for p in $rpmpath; do + list="$p/$d:$list" + done + done + for d in $list; do + if test -d $d/SPECS; then + RPM_SPECSdir="$d/SPECS"; + break; + fi + done + IFS="$save_IFS" fi + if test x"$RPM_SPECSdir" = x"" ; then -AC_MSG_ERROR(not found) +AC_MSG_ERROR([not found]) fi AC_MSG_RESULT($RPM_SPECSdir) AC_SUBST(RPM_SPECSdir) |