Browse Source

build: Error out if the host dpkg architecture cannot be determined

Continuing will only produce a buggy dpkg.
Guillem Jover 15 years ago
parent
commit
773e6dcc0e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      m4/dpkg-arch.m4

+ 5 - 1
m4/dpkg-arch.m4

@@ -57,7 +57,11 @@ AC_DEFUN([DPKG_ARCHITECTURE],
 DPKG_OS_TYPE
 DPKG_OS_TYPE
 AC_MSG_CHECKING([dpkg architecture name])
 AC_MSG_CHECKING([dpkg architecture name])
 _DPKG_ARCHITECTURE([DEB_HOST_ARCH], [dpkg_arch])
 _DPKG_ARCHITECTURE([DEB_HOST_ARCH], [dpkg_arch])
-AC_MSG_RESULT([$dpkg_arch])
+if test "x$dpkg_arch" = "x"; then
+	AC_MSG_ERROR([cannot determine host dpkg architecture])
+else
+	AC_MSG_RESULT([$dpkg_arch])
+fi
 AC_DEFINE_UNQUOTED(ARCHITECTURE, "${dpkg_arch}",
 AC_DEFINE_UNQUOTED(ARCHITECTURE, "${dpkg_arch}",
 	[Set this to the canonical dpkg architecture name.])
 	[Set this to the canonical dpkg architecture name.])
 ])# DPKG_ARCHITECTURE
 ])# DPKG_ARCHITECTURE