[package_name=$enableval])])
AC_SUBST([package_name], [${package_name=$PACKAGE_NAME}])
+AC_ARG_ENABLE(
+ [config-prefix],
+ [AS_HELP_STRING(
+ [--enable-config-prefix=PREFIX],
+ [the prefix to the config option (default=CONFIG_)])],
+ [AS_CASE(
+ ["$enableval"],
+ [*" "*],[AC_MSG_ERROR([config prefix can not contain spaces: '$enableval'])],
+ [yes], [config_prefix=CONFIG_],
+ [no], [config_prefix=],
+ [config_prefix=$enableval])])
+AC_SUBST([config_prefix], [${config_prefix-CONFIG_}])
+
#----------------------------------------
# Options to selectively enable/disable frontends
# All are selected by default
AC_MSG_NOTICE([Configured with:])
AC_MSG_NOTICE([- package name: '$package_name'])
+AC_MSG_NOTICE([- config prefix: '$config_prefix'])
AC_MSG_NOTICE([- frontends:])
AS_IF([test "$enable_conf" = "yes"],
[AC_MSG_NOTICE([ - conf: yes])],
hconf.gperf lconf.l \
confdata.c menu.c symbol.c util.c \
expr.c expr.h lkc.h lkc_proto.h
-libkconfigparser_la_CPPFLAGS = -DPACKAGE=\"$(package_name)\"
+libkconfigparser_la_CPPFLAGS = -DPACKAGE=\"$(package_name)\" \
+ -DCONFIG_=\"$(config_prefix)\"
libkconfigparser_la_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION)
include_HEADERS = expr.h lkc.h lkc_proto.h