summaryrefslogtreecommitdiffstats
path: root/contrib/crossrpms/configure.ac
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2006-02-17 03:11:28 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2006-02-17 03:11:28 +0000
commit0707f5833b9106b6d22c311f58847de202177f6e (patch)
treef2b0897eb30d4bb922c507a9f8c2b277bb0a4bd7 /contrib/crossrpms/configure.ac
parentPropagate $prefix as %_prefix (diff)
downloadrtems-0707f5833b9106b6d22c311f58847de202177f6e.tar.bz2
Couple rpmprefix to prefix
Diffstat (limited to 'contrib/crossrpms/configure.ac')
-rw-r--r--contrib/crossrpms/configure.ac32
1 files changed, 31 insertions, 1 deletions
diff --git a/contrib/crossrpms/configure.ac b/contrib/crossrpms/configure.ac
index 955eb1a46d..ad87027771 100644
--- a/contrib/crossrpms/configure.ac
+++ b/contrib/crossrpms/configure.ac
@@ -1,15 +1,45 @@
## $Id$
+m4_define([RTEMS_API],[4.7])
+
AC_PREREQ(2.59)
AC_INIT([crossbuild],[0.20060211.0],[rtems-bugs@rtems.com])
AC_CONFIG_SRCDIR([binutils/binutils.add])
AC_CONFIG_AUX_DIR(.)
AC_CANONICAL_HOST
+AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
AM_INIT_AUTOMAKE([no-define foreign 1.9])
-RTEMS_ENABLE_RPMPREFIX
+AC_ARG_ENABLE([rpmprefix],
+[ --enable-rpmprefix=<rpmprefix> prefix rpms],[
+ case "$prefix" in
+ /usr) rpmprefix=
+ AC_MSG_WARN([Ignoring given rpmprefix])
+ ;;
+ NONE) rpmprefix=["rtems-"]RTEMS_API["-"]
+ AC_MSG_WARN([Ignoring given rpmprefix])
+ ;;
+ *)
+ case $enable_rpmprefix in
+ ''|["rtems-"]RTEMS_API["-"])
+ AC_MSG_ERROR([Invalid --enable-rpmprefix]);;
+ *)
+ rpmprefix=$enable_rpmprefix;;
+ esac
+ ;;
+ esac
+],[
+# defaults
+ case "$prefix" in
+ /usr) rpmprefix=;;
+ NONE) rpmprefix=["rtems-"]RTEMS_API["-"];;
+ *) AC_MSG_ERROR([Missing --enable-rpmprefix]) ;;
+ esac
+])
+AC_SUBST(rpmprefix)
+
AS_IF([test "${host}" != "${build}"],[
AC_MSG_CHECKING(for RPM OS)