(CommandList
  children: [
    (FuncDef
      name: ldflags
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (SimpleCommand
                  words: [{(pkg-config)} {(--libs)} {(ncursesw)}]
                  redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[23])]
                )
                (C {(exit)})
              ]
              op_id: Op_DAmp
            )
            (AndOr
              children: [
                (SimpleCommand
                  words: [{(pkg-config)} {(--libs)} {(ncurses)}]
                  redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[37])]
                )
                (C {(exit)})
              ]
              op_id: Op_DAmp
            )
            (ForEach
              iter_name: ext
              iter_words: [{(so)} {(a)} {(dll.a)} {(dylib)}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (ForEach
                      iter_name: lib
                      iter_words: [{(ncursesw)} {(ncurses)} {(curses)}]
                      do_arg_iter: False
                      body: 
                        (DoGroup
                          children: [
                            (Pipeline
                              children: [
                                (C {($ VSub_Name "$cc")} 
                                  {(-print-file-name) (Lit_Other "=") (lib) (${ VSub_Name lib) (.) 
                                    (${ VSub_Name ext)
                                  }
                                )
                                (C {(grep)} {(-q)} {(/)})
                              ]
                              negated: False
                            )
                            (If
                              arms: [
                                (if_arm
                                  cond: [
                                    (Sentence
                                      child: 
                                        (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-eq)} {(0)} 
                                          {(Lit_Other "]")}
                                        )
                                      terminator: <Op_Semi ";">
                                    )
                                  ]
                                  action: [(C {(echo)} {(DQ (-l) (${ VSub_Name lib))}) (C {(exit)})]
                                  spids: [-1 116]
                                )
                              ]
                              spids: [-1 132]
                            )
                          ]
                          spids: [78 135]
                        )
                      spids: [69 76]
                    )
                  ]
                  spids: [61 138]
                )
              spids: [50 59]
            )
            (C {(exit)} {(1)})
          ]
          spids: [14]
        )
      spids: [10 13]
    )
    (FuncDef
      name: ccflags
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (SimpleCommand
                          words: [{(pkg-config)} {(--cflags)} {(ncursesw)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 2
                              arg_word: {(/dev/null)}
                              spids: [166]
                            )
                          ]
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(echo)} {(SQ <"-DCURSES_LOC=\"<ncurses.h>\" -DNCURSES_WIDECHAR=1">)})]
                  spids: [-1 170]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (SimpleCommand
                          words: [{(pkg-config)} {(--cflags)} {(ncurses)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 2
                              arg_word: {(/dev/null)}
                              spids: [188]
                            )
                          ]
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(echo)} {(SQ <"-DCURSES_LOC=\"<ncurses.h>\"">)})]
                  spids: [180 192]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-f)} {(/usr/include/ncursesw/curses.h)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} {(SQ <"-I/usr/include/ncursesw -DCURSES_LOC=\"<curses.h>\"">)})
                    (C {(echo)} {(SQ <" -DNCURSES_WIDECHAR=1">)})
                  ]
                  spids: [202 213]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-f)} {(/usr/include/ncurses/ncurses.h)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(echo)} {(SQ <"-I/usr/include/ncurses -DCURSES_LOC=\"<ncurses.h>\"">)})]
                  spids: [230 241]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-f)} {(/usr/include/ncurses/curses.h)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(echo)} {(SQ <"-I/usr/include/ncurses -DCURSES_LOC=\"<curses.h>\"">)})]
                  spids: [251 262]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(Lit_Other "[")} {(-f)} {(/usr/include/ncurses.h)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(echo)} {(SQ <"-DCURSES_LOC=\"<ncurses.h>\"">)})]
                  spids: [272 283]
                )
              ]
              else_action: [(C {(echo)} {(SQ <"-DCURSES_LOC=\"<curses.h>\"">)})]
              spids: [293 303]
            )
          ]
          spids: [155]
        )
      spids: [151 154]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:tmp) op:Equal rhs:{(.lxdialog.tmp)} spids:[311])]
      spids: [311]
    )
    (C {(trap)} {(DQ ("rm -f ") ($ VSub_Name "$tmp"))} {(0)} {(1)} {(2)} {(3)} {(15)})
    (FuncDef
      name: check
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{($ VSub_Name "$cc")} {(-x)} {(c)} {(-)} {(-o)} {($ VSub_Name "$tmp")}]
              redirects: [
                (Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[354])
                (HereDoc
                  op_id: Redir_DLess
                  fd: -1
                  body: {("#include CURSES_LOC\n") ("main() {}\n")}
                  do_expansion: False
                  here_end: EOF
                  was_filled: True
                  spids: [357]
                )
              ]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(KW_Bang "!") (Lit_Other "=")} {(0)} 
                          {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ (" *** Unable to find the ncurses libraries or the"))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[386])]
                    )
                    (SimpleCommand
                      words: [{(echo)} {(DQ (" *** required header files."))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[396])]
                    )
                    (SimpleCommand
                      words: [{(echo)} {(DQ (" *** 'make menuconfig' requires the ncurses libraries."))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[406])]
                    )
                    (SimpleCommand
                      words: [{(echo)} {(DQ (" *** "))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[416])]
                    )
                    (SimpleCommand
                      words: [{(echo)} {(DQ (" *** Install ncurses (ncurses-devel) and try again."))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[426])]
                    )
                    (SimpleCommand
                      words: [{(echo)} {(DQ (" *** "))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[436])]
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [-1 377]
                )
              ]
              spids: [-1 445]
            )
          ]
          spids: [339]
        )
      spids: [335 338]
    )
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (C {(printf)} 
              {
                (DQ ("Usage: ") ($ VSub_Number "$0") 
                  (" [-check compiler options|-ccflags|-ldflags compiler options]") (EscapedLiteralPart token:<Lit_EscapedChar "\\n">)
                )
              }
            )
          ]
          spids: [454]
        )
      spids: [450 453]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-eq)} {(0)} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [(C {(usage)}) (C {(exit)} {(1)})]
          spids: [-1 482]
        )
      ]
      spids: [-1 492]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:cc) op:Equal rhs:{(DQ )} spids:[495])]
      spids: [495]
    )
    (Case
      to_match: {(DQ ($ VSub_Number "$1"))}
      arms: [
        (case_arm
          pat_list: [{(DQ (-check))}]
          action: [
            (C {(shift)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cc)
                  op: Equal
                  rhs: {(DQ ($ VSub_At "$@"))}
                  spids: [517]
                )
              ]
              spids: [517]
            )
            (C {(check)})
          ]
          spids: [509 511 526 -1]
        )
        (case_arm pat_list:[{(DQ (-ccflags))}] action:[(C {(ccflags)})] spids:[530532538-1])
        (case_arm
          pat_list: [{(DQ (-ldflags))}]
          action: [
            (C {(shift)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cc)
                  op: Equal
                  rhs: {(DQ ($ VSub_At "$@"))}
                  spids: [550]
                )
              ]
              spids: [550]
            )
            (C {(ldflags)})
          ]
          spids: [542 544 559 -1]
        )
        (case_arm
          pat_list: [{(DQ ("*"))}]
          action: [(C {(usage)}) (C {(exit)} {(1)})]
          spids: [563 565 576 -1]
        )
      ]
      spids: [499 505 578]
    )
  ]
)