Просмотр исходного кода

Added target OS, version and architecture to support package building.

Eric Stanley 14 лет назад
Родитель
Сommit
fe4af3f735
1 измененных файлов с 19 добавлено и 0 удалено
  1. 19 0
      configure.in

+ 19 - 0
configure.in

@@ -361,6 +361,25 @@ AC_SUBST(nagios_group)
 NAGIOS_INSTALL_OPTS="-o $nagios_user -g $nagios_group"
 AC_SUBST(NAGIOS_INSTALL_OPTS)
 
+# Determine target OS, version and architecture for package build macros
+if test "x$target_ver" = "x" ; then
+	TARGET_VER=`uname -r`
+else
+	TARGET_VER=$target_ver
+fi
+AC_SUBST(TARGET_VER)
+if test "x$target_os" = "x" ; then
+	TARGET_OS=`uname -s`
+else
+	TARGET_OS=$target_os
+fi
+AC_SUBST(TARGET_OS)
+if test "x$target_cpu" = "x" ; then
+	TARGET_ARCH=`uname -p`
+else
+	TARGET_ARCH=$target_cpu
+fi
+AC_SUBST(TARGET_ARCH)
 
 AC_ARG_ENABLE(command-args,--enable-command-args allows clients to specify command arguments.  *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!,AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS))