X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-package-data.mk;h=47bed79ee0e2470e2ba88fea9861adb75141ec65;hb=93cd31711eea3dc9aa2ef8995e8ba054dabd87f0;hp=79591dff42c8f2dd244d36a915ca07ad442de8d5;hpb=f75901581bf98293fe825b726326da92d2723003;p=ghc-hetmet.git diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk index 79591df..47bed79 100644 --- a/rules/build-package-data.mk +++ b/rules/build-package-data.mk @@ -12,17 +12,32 @@ define build-package-data # args: $1 = dir, $2 = distdir -ifeq "$(BuildSharedLibs)" "YES" +ifeq "$$(filter p,$$(GhcLibWays))" "p" +$1_$2_CONFIGURE_OPTS += --enable-library-profiling +endif + +ifeq "$$(filter dyn,$$(GhcLibWays))" "dyn" $1_$2_CONFIGURE_OPTS += --enable-shared endif -ifeq "$(HSCOLOUR_SRCS)" "YES" +ifeq "$$(HSCOLOUR_SRCS)" "YES" $1_$2_CONFIGURE_OPTS += --with-hscolour="$$(HSCOLOUR)" endif -$1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(SRC_CC_OPTS) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)" +# We filter out -Werror from SRC_CC_OPTS, because when configure tests +# for a feature it may not generate warning-free C code, and thus may +# think that the feature doesn't exist if -Werror is on. +$1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)" $1_$2_CONFIGURE_OPTS += --configure-option=LDFLAGS="$$(SRC_LD_OPTS) $$($1_LD_OPTS) $$($1_$2_LD_OPTS)" +ifneq "$$(ICONV_INCLUDE_DIRS)" "" +$1_$2_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="$$(ICONV_INCLUDE_DIRS)" +endif + +ifneq "$$(ICONV_LIB_DIRS)" "" +$1_$2_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="$$(ICONV_LIB_DIRS)" +endif + # This rule configures the package, generates the package-data.mk file # for our build system, and registers the package for use in-place in # the build tree.