Skip to content

Commit

Permalink
configure: Add --enable-meta, --disable-random [WIP]
Browse files Browse the repository at this point in the history
For #5.  Needs to be tested.
  • Loading branch information
cxw42 committed Apr 25, 2021
1 parent 527cb47 commit a9f5c07
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ AC_SEARCH_LIBS([log2], [m],
]
)

dnl Wren class Meta (default disabled)
AC_ARG_ENABLE([meta],
AS_HELP_STRING([--enable-meta], [Enable the Wren "Meta" class (default disabled)]))
AM_CONDITIONAL([USE_WREN_META], [test "x$enable_meta" = "xyes"])

dnl Wren class Random (default enabled)
AC_ARG_ENABLE([random],
AS_HELP_STRING([--disable-random], [Disable the Wren "Random" class (default enabled)]))
AM_CONDITIONAL([USE_WREN_RANDOM], [test "x$enable_random" != "xno"])

dnl === Code coverage =====================================================

dnl For some reason, the coverage data is referring to src/.../glib-2.0.vapi.
Expand Down
23 changes: 23 additions & 0 deletions wren-pkg/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ libwren_@APIVER@_la_SOURCES = \
wren/src/vm/wren_value.h \
wren/src/vm/wren_vm.c \
wren/src/vm/wren_vm.h \
$(EOL)

# --- Meta and Random ---

EXTRA_libwren_@APIVER@_la_SOURCES = \
wren/src/optional/wren_opt_meta.c \
wren/src/optional/wren_opt_meta.h \
wren/src/optional/wren_opt_meta.wren.inc \
Expand All @@ -56,11 +61,29 @@ libwren_@APIVER@_la_SOURCES = \
wren/src/optional/wren_opt_random.wren.inc \
$(EOL)

if USE_WREN_META
libwren_@APIVER@_la_SOURCES += \
wren/src/optional/wren_opt_meta.c \
wren/src/optional/wren_opt_meta.h \
wren/src/optional/wren_opt_meta.wren.inc \
$(EOL)
endif

if USE_WREN_RANDOM
libwren_@APIVER@_la_SOURCES += \
wren/src/optional/wren_opt_random.c \
wren/src/optional/wren_opt_random.h \
wren/src/optional/wren_opt_random.wren.inc \
$(EOL)
endif

# === Other Wren files ==================================================

EXTRA_DIST += \
wren/AUTHORS \
wren/CHANGELOG.md \
wren/LICENSE \
wren/README.md \
wren/src/optional/wren_opt_meta.wren \
wren/src/optional/wren_opt_random.wren \
$(EOL)

0 comments on commit a9f5c07

Please sign in to comment.