From d047093e1a741d75fb8d70f44b2356327af0ba21 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 14 Feb 2012 19:59:53 +0100 Subject: [PATCH] configure: add option to set the /package/ name Allow users to define the package name at ./configure time. The default "linux" is because kconfig comes from the Linux kernel. Signed-off-by: "Yann E. MORIN" --- configure.ac | 17 +++++++++++++++++ libs/parser/Makefile.am | 1 + 2 files changed, 18 insertions(+) diff --git a/configure.ac b/configure.ac index 2396271..e5e7bad 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,22 @@ AC_CHECK_FUNCS([ gettimeofday mkdir regcomp setlocale uname ]) # End of the autoscan-detected stuff #--------------------------------------------------------------------------- +#---------------------------------------- +# Set misc options +# Although there is a default (="linux") in the code, we do provide +# a default here, to get a consistent autostuff behavior +AC_ARG_ENABLE( + [package-name], + [AS_HELP_STRING( + [--enable-package-name], + [set the package name (default=kconfig-frontends)])], + [AS_CASE( + ["$enableval"], + [yes], [package_name=$PACKAGE_NAME], + [no], [package_name=], + [package_name=$enableval])]) +AC_SUBST([package_name], [${package_name=$PACKAGE_NAME}]) + #---------------------------------------- # Options to selectively enable/disable frontends # All are selected by default @@ -297,6 +313,7 @@ AC_CONFIG_FILES([ AC_OUTPUT AC_MSG_NOTICE([Configured with:]) +AC_MSG_NOTICE([- package name: '$package_name']) AC_MSG_NOTICE([- frontends:]) AS_IF([test "$enable_conf" = "yes"], [AC_MSG_NOTICE([ - conf: yes])], diff --git a/libs/parser/Makefile.am b/libs/parser/Makefile.am index 8e0602a..5e25765 100644 --- a/libs/parser/Makefile.am +++ b/libs/parser/Makefile.am @@ -6,6 +6,7 @@ dist_EXTRA_libkconfigparser_la_SOURCES = \ 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_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION) include_HEADERS = expr.h lkc.h lkc_proto.h -- 2.39.5