summaryrefslogtreecommitdiffhomepage
path: root/project/config/cfgdefs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'project/config/cfgdefs.sh')
-rw-r--r--project/config/cfgdefs.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh
new file mode 100644
index 0000000..ac597c9
--- /dev/null
+++ b/project/config/cfgdefs.sh
@@ -0,0 +1,42 @@
+# in projects where [ $mb_use_custom_cfgdefs = yes ],
+# cfgdefs.sh is invoked from within ./configure via
+# . $mb_project_dir/project/cfgdefs.sh
+
+# a successful return from cfgdefs.sh will be followed
+# by a second invocation of the config_copy() function,
+# reflecting any changes to common config variables
+# made by cfgdefs.sh.
+
+# finally, cfgdefs.sh may update the contents of the
+# config-time generated cfgdefs.mk.
+
+
+ltdl_drop_in_replacement='no'
+
+for arg ; do
+ case "$arg" in
+ --as-ltdl-drop-in-replacement )
+ ltdl_drop_in_replacement='yes' ;;
+
+ *)
+ error_msg ${arg#}: "unsupported config argument."
+ exit 2
+ esac
+done
+
+
+cfgdefs_output_custom_defs()
+{
+ sed \
+ -e 's/@ltdl_drop_in_replacement@/'"$ltdl_drop_in_replacement"'/g' \
+ "$mb_project_dir/project/config/cfgdefs.in" \
+ | sed -e 's/[ \t]*$//g' \
+ >> "$mb_pwd/cfgdefs.mk"
+}
+
+
+# cfgdefs.in --> cfgdefs.mk
+cfgdefs_output_custom_defs
+
+# all done
+return 0