summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-06-25 19:43:13 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-06-25 19:43:13 (GMT)
commita9984eddbf37c026932001fb2995c7a903897e64 (patch)
tree0a24db62970a12cf4bc28bd2dd6ac0fe03230d94
parent7647b3aed3e9b0d91134ab6b57f56f80fd701b6a (diff)
downloadswift-a9984eddbf37c026932001fb2995c7a903897e64.zip
swift-a9984eddbf37c026932001fb2995c7a903897e64.tar.bz2
Determine arch for debs automatically.
-rw-r--r--Makefile.config.in1
-rwxr-xr-xSwift/Packaging/Debian/Makefile.inc1
-rw-r--r--configure.in12
3 files changed, 13 insertions, 1 deletions
diff --git a/Makefile.config.in b/Makefile.config.in
index 5f97738..f0c5b1f 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -25,3 +25,4 @@ WIN32=@CONFIG_WIN32@
MACOSX=@CONFIG_MACOSX@
BUILD_SWIFT=@BUILD_SWIFT@
QMAKE=@QMAKE@
+ARCH=@ARCH@
diff --git a/Swift/Packaging/Debian/Makefile.inc b/Swift/Packaging/Debian/Makefile.inc
index e93f995..fb079ce 100755
--- a/Swift/Packaging/Debian/Makefile.inc
+++ b/Swift/Packaging/Debian/Makefile.inc
@@ -1,7 +1,6 @@
DATE=`date +%Y%m%d`
SIZE=`du -s tmpusr/usr | awk '{print $1}'`
VERSION=0.3.$(DATE)
-ARCH=amd64
DEBPATH=Swift/Packaging/Debian
DEBNAME=swift-preview_$(VERSION)-$(ARCH).deb
$(DEBPATH)/$(DEBNAME): all
diff --git a/configure.in b/configure.in
index e2cf57b..620e16b 100644
--- a/configure.in
+++ b/configure.in
@@ -46,6 +46,17 @@ case $host in
CONFIG_LIBS="$CONFIG_LIBS -lstdc++"
esac
+case $host in
+ x86_64-*)
+ ARCH="amd64"
+ ;;
+ i686-*)
+ ARCH="i686"
+ ;;
+ *)
+ ARCH="i386"
+esac
+
AC_CHECK_FILE([Swift/Makefile.inc], [BUILD_SWIFT="yes"], [BUILD_SWIFT="no"])
################################################################################
@@ -214,6 +225,7 @@ AC_SUBST(USE_BUNDLED_EXPAT)
AC_SUBST(CONFIG_HAVE_LIBXML)
AC_SUBST(QMAKE)
AC_SUBST(BUILD_SWIFT)
+AC_SUBST(ARCH)
AC_CONFIG_FILES([Makefile.config])
if test "$BUILD_SWIFT" == "yes"; then