Skip to content

configure: WARNING: unrecognized options: --with-compiler #20

Closed
@lyokha

Description

@lyokha

Cabal unconditionally passes option --with-compiler or --with-hc in Distribution.Simple.Setup.configureArgs. This makes configure run from cabal v1-configure or cabal v2-build print the warning.

This can be fixed by declaring dummy with-options in configure.ac

diff --git a/configure.ac b/configure.ac
index 93942e2..1a1c036 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,10 @@ AC_CONFIG_HEADERS([cbits/hs_resolv_config.h])
 AC_PROG_CC
 AC_C_CONST
 
+dnl ignore options --with-compiler and --with-hc passed by cabal configure
+AC_ARG_WITH([compiler], [], [], [])
+AC_ARG_WITH([hc], [], [], [])
+
 AC_CHECK_HEADERS([netinet/in.h arpa/nameser.h])
 AC_CHECK_HEADER([resolv.h],,AC_MSG_ERROR([required <resolv.h> header not found]),[[
 #include <sys/types.h>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions