]> git.sur5r.net Git - kconfig-frontends/commitdiff
configure: add option to set the config option prefix
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed, 15 Feb 2012 21:16:47 +0000 (22:16 +0100)
committerYann E. MORIN" <yann.morin.1998@free.fr>
Wed, 15 Feb 2012 21:16:47 +0000 (22:16 +0100)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
configure.ac
libs/parser/Makefile.am

index b8d8894c8e161bea6cae172baa30119a4cdf80ac..062bbb90e7925ad2fb27d84fc46175deab87a82b 100644 (file)
@@ -58,6 +58,19 @@ AC_ARG_ENABLE(
                [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
@@ -333,6 +346,7 @@ AC_OUTPUT
 
 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])],
index 5e25765ad166842a845fb8ea727cbfff02527515..a3862bead016634cc914d26587f9381978bfa3fa 100644 (file)
@@ -6,7 +6,8 @@ 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_CPPFLAGS = -DPACKAGE=\"$(package_name)\"    \
+                               -DCONFIG_=\"$(config_prefix)\"
 libkconfigparser_la_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION)
 
 include_HEADERS = expr.h lkc.h lkc_proto.h