Mercurial > hg > toybox
comparison scripts/genconfig.sh @ 454:8f5780dd6da4
The unshare test needs $CC defined, source configure to get it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 13 Feb 2012 08:44:32 -0600 |
parents | 8b0487639db9 |
children | f0247cfc37f2 |
comparison
equal
deleted
inserted
replaced
453:8bc2fec2abf3 | 454:8f5780dd6da4 |
---|---|
4 # before menuconfig. (It's called again from scripts/make.sh just to be sure.) | 4 # before menuconfig. (It's called again from scripts/make.sh just to be sure.) |
5 | 5 |
6 mkdir -p generated | 6 mkdir -p generated |
7 OUTFILE=generated/Config.in | 7 OUTFILE=generated/Config.in |
8 | 8 |
9 source configure | |
10 | |
9 genconfig() | 11 genconfig() |
10 { | 12 { |
11 # Probe for container support on target | 13 # Probe for container support on target |
12 | 14 |
13 echo -e "# container support\nconfig TOYBOX_CONTAINER\n\tbool" || return 1 | 15 echo -e "# container support\nconfig TOYBOX_CONTAINER\n\tbool" || return 1 |
14 $CC -c -xc -o /dev/null - 2>/dev/null << EOF | 16 $CC -c -xc -o /dev/null - << EOF |
15 #include <sched.h> | 17 #include <sched.h> |
16 int x=CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET; | 18 int x=CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET; |
17 EOF | 19 EOF |
18 [ $? -eq 0 ] && DEFAULT=y || DEFAULT=n | 20 [ $? -eq 0 ] && DEFAULT=y || DEFAULT=n |
19 echo -e "\tdefault $DEFAULT\n" || return 1 | 21 echo -e "\tdefault $DEFAULT\n" || return 1 |