Whamcloud - gitweb
debian: compile without using dietlibc if SKIP_DIETLIBC=yes
authorTheodore Ts'o <tytso@mit.edu>
Mon, 26 Mar 2012 23:31:06 +0000 (16:31 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 27 Mar 2012 04:38:39 +0000 (21:38 -0700)
Some distributions such as Ubuntu don't have dietlibc.  If
SKIP_DIETLIBC=yes appears in rules.custom, this will change the
control file and cause the build rules to skip using dietlibc when
building the BUILD-BF version of e2fsprogs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debian/control.in
debian/rules

index b131526..135ca92 100644 (file)
@@ -3,11 +3,13 @@ Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends},REMOVE_ME))dnl
 define(UTIL_LINUX_NG_DEFINES,
 ifdef(`UTIL_LINUX_NG', ``libblkid-dev (>= 2.16), uuid-dev (>= 2.16),''))dnl
+define(DIETLIBC_DEFINES,
+ifdef(`DIETLIBC', ``dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc],''))dnl
 Source: e2fsprogs
 Section: admin
 Priority: required
 Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
-Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc], gcc-multilib [mips mipsel], debhelper (>= 7.0), UTIL_LINUX_NG_DEFINES m4
+Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, DIETLIBC_DEFINES gcc-multilib [mips mipsel], debhelper (>= 7.0), UTIL_LINUX_NG_DEFINES m4
 Standards-Version: 3.9.2
 Homepage: http://e2fsprogs.sourceforge.net
 
index afb548c..b2db89e 100755 (executable)
@@ -191,6 +191,14 @@ else
 M4_ARGS+=-UDO_MULTIARCH
 endif
 
+ifneq ($(SKIP_DIETLIBC),)
+M4_ARGS+=-UDIETLIBC
+WITH_DIET_LIBC = 
+else
+M4_ARGS+=-DDIETLIBC
+WITH_DIET_LIBC = --with-diet-libc 
+endif
+
 FILES_FIXUP= libcomerr2.files comerr-dev.files libss2.files ss-dev.files \
        libuuid1.files uuid-dev.files libblkid1.files libblkid-dev.files \
        e2fslibs.files e2fslibs-dev.files
@@ -270,7 +278,7 @@ ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
        if type diet > /dev/null  2>&1 ; then \
                cd ${staticbuilddir} && AWK=/usr/bin/awk \
                ${topdir}/configure ${STATIC_CONF_FLAGS} \
-               --with-diet-libc CFLAGS="${CFLAGS}"; \
+               ${WITH_DIET_LIBC} CFLAGS="${CFLAGS}"; \
        else \
                cd ${staticbuilddir} && AWK=/usr/bin/awk \
                        ${topdir}/configure ${STATIC_CONF_FLAGS} \