fixed build on non-i386 architectures
authorMartin Willi <martin@strongswan.org>
Tue, 17 Feb 2009 09:34:52 +0000 (09:34 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 17 Feb 2009 09:34:52 +0000 (09:34 -0000)
packages/strongswan/debian/rules

index 8f83325..e6367a2 100755 (executable)
@@ -5,6 +5,11 @@
 CC = gcc
 CFLAGS = -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing -g
 INSTALL_PROGRAM = install
 CC = gcc
 CFLAGS = -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing -g
 INSTALL_PROGRAM = install
+CONFIGURE_ARGS = \
+       --disable-fips-prf --enable-openssl --enable-nm --enable-ldap \
+       --enable-eap-gtc --enable-eap-md5 --enable-agent --enable-curl \
+       --enable-padlock --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib \
+       --with-ipsecdir=/usr/lib/strongswan
 
 ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O2
 
 ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O2
@@ -16,13 +21,13 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        MAKEFLAGS += -j$(NUMJOBS)
 endif
        NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        MAKEFLAGS += -j$(NUMJOBS)
 endif
+ifeq ($(DEB_BUILD_ARCH_CPU),i386)
+  CONFIGURE_ARGS += --enable-padlock
+endif
 
 build:
        dh_testdir
 
 build:
        dh_testdir
-       ./configure --disable-fips-prf --enable-openssl --enable-nm --enable-ldap \
-       --enable-eap-gtc --enable-eap-md5 --enable-agent --enable-curl \
-       --enable-padlock --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib \
-       --with-ipsecdir=/usr/lib/strongswan
+       ./configure $(CONFIGURE_ARGS)
        $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
        touch build
 
        $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
        touch build