From a9984eddbf37c026932001fb2995c7a903897e64 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Thu, 25 Jun 2009 20:43:13 +0100 Subject: Determine arch for debs automatically. 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 -- cgit v0.10.2-6-g49f6