(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TMP) op: Equal rhs: { (BracedVarSub token: <VSub_Name TMP> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)}) spids: [41 46] ) } spids: [40] ) ] spids: [40] ) (Assignment keyword: Assign_Readonly pairs: [(assign_pair lhs:(LhsName name:TMP) op:Equal spids:[53])] spids: [51] ) (FuncDef name: log body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$0') (': ') ($ VSub_At '$@'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[74])] ) ] spids: [63] ) spids: [59 62] ) (FuncDef name: die body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$0') (' ERROR: ') ($ VSub_At '$@'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[95])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [84] ) spids: [80 83] ) (FuncDef name: show_help body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('Usage: ./configure [OPTION]\n') ('\n') ('Detects system settings before a build of Oil.\n') ('\n') (' --prefix Prefix for the bin/ directory [/usr/local]\n') (' --with-readline Fail unless readline is available.\n') (" --without-readline Don't compile with readline, even if it's available.\n") ("\t\t The shell won't have any interactive features.\n") ) } do_expansion: True here_end: EOF was_filled: T spids: [115] ) ] ) ] spids: [110] ) spids: [106 109] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FLAG_prefix) op: Equal rhs: {(SQ </usr/local>)} spids: [139] ) ] spids: [139] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:FLAG_with_readline) op:Equal rhs:{(SQ )} spids:[144])] spids: [144] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:FLAG_without_readline) op:Equal rhs:{(SQ )} spids:[151])] spids: [151] ) (While cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [16777215 178 184 16777215] ) (case_arm pat_list: [{(--help)}] action: [(C {(show_help)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})] spids: [187 188 203 16777215] ) (case_arm pat_list: [{(--with-readline)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FLAG_with_readline) op: Equal rhs: {(1)} spids: [211] ) ] spids: [211] ) ] spids: [207 208 215 16777215] ) (case_arm pat_list: [{(--without-readline)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FLAG_without_readline) op: Equal rhs: {(1)} spids: [223] ) ] spids: [223] ) ] spids: [219 220 227 16777215] ) (case_arm pat_list: [{(--prefix) (Lit_Other '=') (Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FLAG_prefix) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ':')} {(SQ <'--prefix=\\(.*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [246 258] ) } spids: [245] ) ] spids: [245] ) ] spids: [239 242 261 16777215] ) (case_arm pat_list: [{(--prefix)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {($ VSub_Pound '$#')} {(-eq)} {(1)}) terminator: <Op_Semi ';'> ) ] action: [(C {(die)} {(DQ ('--prefix requires an argument'))})] spids: [16777215 279] ) ] spids: [16777215 289] ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FLAG_prefix) op: Equal rhs: {($ VSub_Number '$1')} spids: [295] ) ] spids: [295] ) ] spids: [264 265 299 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(die)} {(DQ ("Invalid argument '") ($ VSub_Number '$1') ("'"))})] spids: [302 303 315 16777215] ) ] spids: [167 173 318] ) (C {(shift)}) ] spids: [164 323] ) ) (FuncDef name: cc_quiet body: (BraceGroup children: [ (SimpleCommand words: [{(cc)} {(DQ ($ VSub_At '$@'))} {(-o)} {(/dev/null)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [349] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[352]) ] ) ] spids: [336] ) spids: [332 335] ) (FuncDef name: cc_or_die body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(cc)} {(DQ ($ VSub_At '$@'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$TMP') (/cc.log)} spids: [375] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [379] ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log)} {(DQ ("Error running 'cc ") ($ VSub_At '$@') ("':"))}) (C {(cat)} {($ VSub_Name '$TMP') (/cc.log)}) (C {(die)} {(DQ ('Fatal compile error running feature test'))}) ] spids: [16777215 383] ) ] spids: [16777215 408] ) ] spids: [362] ) spids: [358 361] ) (FuncDef name: cc_statement body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:pp_var) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [425] ) ] spids: [423] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:prog) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [433] ) ] spids: [431] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$TMP') (/cc_statement.c)} spids: [442] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: {(DQ ('int main() {\n') (' ') ($ VSub_Name '$prog') ('\n') ('}\n'))} do_expansion: True here_end: EOF was_filled: T spids: [446] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(cc_quiet)} {($ VSub_Name '$TMP') (/cc_statement.c)}) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('#define ') ($ VSub_Name '$pp_var') (' 1'))}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [16777215 468] ) ] else_action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [485 493] ) ] spids: [420] ) spids: [416 419] ) (FuncDef name: detect_readline body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(cc_quiet)} {(build/detect-readline.c)} {(-l)} {(readline)}) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(SQ <'HAVE_READLINE=1'>)})] spids: [16777215 519] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(DQ ($ VSub_Name '$FLAG_with_readline'))} {(Lit_Other '=')} {(1)} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(die)} { (SQ <'readline was not detected on the system (--with-readline passed).'>) } ) ] spids: [16777215 545] ) ] spids: [16777215 555] ) (C {(echo)} {(SQ <'HAVE_READLINE='>)}) ] spids: [529 565] ) ] spids: [505] ) spids: [501 504] ) (FuncDef name: detect_and_echo_vars body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(DQ ($ VSub_Name '$FLAG_without_readline'))} {(Lit_Other '=')} {(1)}) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(SQ <'HAVE_READLINE='>)})] spids: [16777215 590] ) ] else_action: [(C {(detect_readline)})] spids: [600 606] ) (C {(echo)} {(DQ ('PREFIX=') ($ VSub_Name '$FLAG_prefix'))}) ] spids: [574] ) spids: [570 573] ) (FuncDef name: cc_print_expr body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:c_expr) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [631] ) ] spids: [629] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$TMP') (/print_expr.c)} spids: [639] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('#include <stdio.h>\n') ('#include <sys/types.h> /* size_t, pid_t */\n') ('\n') ('int main() {\n') (' printf(') (Right_DoubleQuote '"') ('%lu') (Right_DoubleQuote '"') (', ') ($ VSub_Name '$c_expr') (');\n') ('}\n') ) } do_expansion: True here_end: EOF was_filled: T spids: [643] ) ] ) (C {(cc_or_die)} {(-o)} {($ VSub_Name '$TMP') (/print_expr)} {($ VSub_Name '$TMP') (/print_expr.c)} ) (SimpleCommand words: [{($ VSub_Name '$TMP') (/print_expr)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$TMP') (/print_expr.out)} spids: [675] ) ] ) ] spids: [626] ) spids: [622 625] ) (FuncDef name: check_sizeof body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:pp_var) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [730] ) ] spids: [728] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:c_type) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [738] ) ] spids: [736] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:min_bytes) op: Equal rhs: {(DQ ($ VSub_Number '$3'))} spids: [746] ) ] spids: [744] ) (C {(cc_print_expr)} {(DQ ('sizeof(') ($ VSub_Name '$c_type') (')'))}) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:actual_bytes) op:Equal spids:[765])] spids: [763] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:actual_bytes) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(cat)} {($ VSub_Name '$TMP') (/print_expr.out)})] ) left_token: <Left_CommandSub '$('> spids: [769 774] ) } spids: [768] ) ] spids: [768] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$min_bytes'))}) (C {(test)} {(DQ ($ VSub_Name '$actual_bytes'))} {(-lt)} {(DQ ($ VSub_Name '$min_bytes'))} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(die)} { (DQ ('sizeof(') ($ VSub_Name '$c_type') (') should be at least ') ($ VSub_Name '$min_bytes') ('; got ') ($ VSub_Name '$actual_bytes') ) } ) ] spids: [16777215 803] ) ] spids: [16777215 818] ) (C {(echo)} {(DQ ('#define ') ($ VSub_Name '$pp_var') (' ') ($ VSub_Name '$actual_bytes'))}) ] spids: [725] ) spids: [721 724] ) (FuncDef name: detect_c_language body: (BraceGroup children: [ (C {(check_sizeof)} {(SIZEOF_INT)} {(SQ <int>)} {(4)}) (C {(check_sizeof)} {(SIZEOF_LONG)} {(SQ <long>)} {(4)}) (C {(check_sizeof)} {(SIZEOF_VOID_P)} {(SQ <'void *'>)} {(4)}) (C {(check_sizeof)} {(SIZEOF_SHORT)} {(SQ <short>)} {(2)}) (C {(check_sizeof)} {(SIZEOF_FLOAT)} {(SQ <float>)} {(4)}) (C {(check_sizeof)} {(SIZEOF_DOUBLE)} {(SQ <double>)} {(8)}) (C {(check_sizeof)} {(SIZEOF_SIZE_T)} {(SQ <size_t>)} {(4)}) (C {(check_sizeof)} {(SIZEOF_FPOS_T)} {(SQ <fpos_t>)} {(4)}) (C {(check_sizeof)} {(SIZEOF_PID_T)} {(SQ <pid_t>)} {(4)}) (C {(check_sizeof)} {(SIZEOF_OFF_T)} {(SQ <off_t>)} {(SQ )}) (C {(check_sizeof)} {(SIZEOF_TIME_T)} {(SQ <time_t>)} {(SQ )}) (If arms: [ (if_arm cond: [ (C {(cc_statement)} {(HAVE_LONG_LONG)} {(SQ <'long long x; x = (long long)0;'>)}) ] action: [(C {(check_sizeof)} {(SIZEOF_LONG_LONG)} {(SQ <'long long'>)} {(8)})] spids: [16777215 1003] ) ] spids: [16777215 1017] ) (If arms: [ (if_arm cond: [ (C {(cc_statement)} {(HAVE_LONG_DOUBLE)} {(SQ <'long double x; x = (long double)0;'>)} ) ] action: [(C {(check_sizeof)} {(SIZEOF_LONG_DOUBLE)} {(SQ <'long double'>)} {(8)})] spids: [16777215 1031] ) ] spids: [16777215 1045] ) (If arms: [ (if_arm cond: [(C {(cc_statement)} {(HAVE_C99_BOOL)} {(SQ <'_Bool x; x = (_Bool)0;'>)})] action: [(C {(check_sizeof)} {(SIZEOF__BOOL)} {(SQ <_Bool>)} {(1)})] spids: [16777215 1060] ) ] spids: [16777215 1078] ) (C {(echo)} {(SQ <'#define HAVE_WCHAR_H 1'>)}) (C {(echo)} {(SQ <'#define SIZEOF_WCHAR_T 4'>)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$TMP') (/detect_va_list.c)} spids: [1128] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('#include <stdarg.h> /* C89 */\n') ('int main() {\n') (' va_list list1, list2;\n') (' list1 = list2;\n') ('}\n') ) } do_expansion: True here_end: EOF was_filled: T spids: [1132] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(cc_quiet)} {($ VSub_Name '$TMP') (/detect_va_list.c)}) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(SQ )})] spids: [16777215 1150] ) ] else_action: [(C {(echo)} {(SQ <'#define VA_LIST_IS_ARRAY 1'>)})] spids: [1162 1172] ) ] spids: [842] ) spids: [838 841] ) (FuncDef name: main body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children:[(C {(cc_quiet)} {(build/detect-cc.c)})] negated:T) terminator: <Op_Semi ';'> ) ] action: [(C {(die)} {(DQ ("Couldn't compile a basic C program (cc not installed?)"))})] spids: [16777215 1202] ) ] spids: [16777215 1212] ) (C {(mkdir)} {(-p)} {(_build)}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:sh_out) op: Equal rhs: {(_build/detected-config.sh)} spids: [1233] ) ] spids: [1231] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:c_out) op: Equal rhs: {(_build/detected-config.h)} spids: [1239] ) ] spids: [1237] ) (SimpleCommand words: [{(detect_and_echo_vars)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$sh_out')} spids: [1246] ) ] ) (SimpleCommand words: [{(detect_c_language)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$c_out')} spids: [1253] ) ] ) (C {(log)} {(DQ ('Wrote ') ($ VSub_Name '$sh_out') (' and ') ($ VSub_Name '$c_out'))}) ] spids: [1190] ) spids: [1186 1189] ) (FuncDef name: unittest body: (BraceGroup children: [ (C {(cc_print_expr)} {(SQ <'sizeof(int)'>)}) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:actual) op:Equal spids:[1287])] spids: [1285] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:actual) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(cat)} {($ VSub_Name '$TMP') (/print_expr.out)})] ) left_token: <Left_CommandSub '$('> spids: [1291 1296] ) } spids: [1290] ) ] spids: [1290] ) (AndOr ops: [Op_DPipe] children: [ (C {(test)} {(DQ ($ VSub_Name '$actual'))} {(Lit_Other '=')} {(4)}) (C {(die)} {(DQ ('Expected 4, got ') ($ VSub_Name '$actual'))}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(check_sizeof)} {(SIZEOF_INT)} {(SQ <int>)} {(4)}) (C {(die)} {(DQ (FAILED))}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(cc_statement)} {(HAVE_INT)} {(SQ <'int x = (int)0;'>)}) (C {(die)} {(DQ (FAILED))}) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(cc_statement)} {(HAVE_FOO)} {(SQ <'foo x = (foo)0;'>)}) (C {(die)} {(DQ ('Expected to fail'))}) ] ) ] spids: [1275] ) spids: [1271 1274] ) (C {(main)} {(DQ ($ VSub_At '$@'))}) ] )