aboutsummaryrefslogtreecommitdiffstats
path: root/sdk/bin/config.sub
diff options
context:
space:
mode:
Diffstat (limited to 'sdk/bin/config.sub')
-rwxr-xr-xsdk/bin/config.sub38
1 files changed, 38 insertions, 0 deletions
diff --git a/sdk/bin/config.sub b/sdk/bin/config.sub
new file mode 100755
index 0000000..81a7488
--- /dev/null
+++ b/sdk/bin/config.sub
@@ -0,0 +1,38 @@
+fn_find_fpath() {
+ save_ifs="$IFS"
+ IFS="${IFS}:"
+ for dir in $3 ; do
+ if test $1 $dir/$2 ; then
+ IFS="$save_ifs"
+ return 0
+ fi
+ done
+ IFS="$save_ifs"
+ return 1
+}
+
+fn_find_type() {
+ fail=$1
+ shift
+ text=$1
+ shift
+ for fn in $* ; do
+ if test -f "$fn" ; then
+ grep "$text" <$fn >/dev/null
+ if test ! $? = 1 ; then
+ return 1
+ fi
+ fi
+ done
+ echo "#define "$fail >>$CONFIG
+ return 0
+}
+
+fn_find_file() {
+ if test ! -f $2 ; then
+ echo "#define "$1 >>$CONFIG
+ return 1
+ fi
+ return 0
+}
+