forked from Imagelibrary/rtems
Rework rpmprefix logic.
Add --enable-infos/build_infos.
This commit is contained in:
@@ -14,34 +14,52 @@ AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
|
|||||||
|
|
||||||
AM_INIT_AUTOMAKE([1.9])
|
AM_INIT_AUTOMAKE([1.9])
|
||||||
|
|
||||||
|
case "$prefix" in
|
||||||
|
/usr)
|
||||||
|
build_infos=0
|
||||||
|
rpmprefix=
|
||||||
|
;;
|
||||||
|
/usr/local)
|
||||||
|
build_infos=0
|
||||||
|
rpmprefix="local-"
|
||||||
|
;;
|
||||||
|
/opt/rtems)
|
||||||
|
build_infos=1
|
||||||
|
rpmprefix="rtems-"
|
||||||
|
;;
|
||||||
|
NONE) # Default prefix
|
||||||
|
build_infos=1
|
||||||
|
rpmprefix="[rtems-]RTEMS_API[-]"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
AC_ARG_ENABLE([rpmprefix],
|
AC_ARG_ENABLE([rpmprefix],
|
||||||
[ --enable-rpmprefix=<rpmprefix> prefix rpms],[
|
[ --enable-rpmprefix=<rpmprefix> prefix rpms],[
|
||||||
case "$prefix" in
|
case "$enable_rpmprefix" in
|
||||||
/usr) rpmprefix=
|
yes) # ignore, use default
|
||||||
AC_MSG_WARN([Ignoring given rpmprefix])
|
|
||||||
;;
|
;;
|
||||||
NONE) rpmprefix=[rtems-]RTEMS_API[-]
|
no) rpmprefix=
|
||||||
AC_MSG_WARN([Ignoring given rpmprefix])
|
|
||||||
;;
|
;;
|
||||||
*)
|
*) # presume user knows what he is doing
|
||||||
case $enable_rpmprefix in
|
|
||||||
''|[rtems-]RTEMS_API[-])
|
|
||||||
AC_MSG_ERROR([Invalid --enable-rpmprefix]);;
|
|
||||||
*)
|
|
||||||
rpmprefix=$enable_rpmprefix;;
|
rpmprefix=$enable_rpmprefix;;
|
||||||
esac
|
esac
|
||||||
;;
|
|
||||||
esac
|
|
||||||
],[
|
|
||||||
# defaults
|
|
||||||
case "$prefix" in
|
|
||||||
/usr) rpmprefix=;;
|
|
||||||
NONE) rpmprefix=[rtems-]RTEMS_API[-];;
|
|
||||||
*) AC_MSG_ERROR([Missing --enable-rpmprefix]) ;;
|
|
||||||
esac
|
|
||||||
])
|
])
|
||||||
AC_SUBST(rpmprefix)
|
AC_SUBST(rpmprefix)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([infos],
|
||||||
|
[ --enable-infos enable building infos],[
|
||||||
|
case "$enable_infos" in
|
||||||
|
yes)
|
||||||
|
build_infos=1;;
|
||||||
|
no)
|
||||||
|
build_infos=0;;
|
||||||
|
*)
|
||||||
|
AC_MSG_ERROR([Invalid argument to --enable-infos])
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
AC_SUBST(build_infos)
|
||||||
|
|
||||||
|
|
||||||
AS_IF([test "${host}" != "${build}"],[
|
AS_IF([test "${host}" != "${build}"],[
|
||||||
AC_MSG_CHECKING(for RPM OS)
|
AC_MSG_CHECKING(for RPM OS)
|
||||||
case "$host" in
|
case "$host" in
|
||||||
|
|||||||
Reference in New Issue
Block a user