+AC_ARG_WITH(binutils-include-dir,
+ AS_HELP_STRING([--with-binutils-include-dir=<dir>], [include path for binutils headers]),
+ [ ac_binutils_include_dir=$withval ],
+ [ ac_binutils_include_dir=NONE ]
+)
+
+AC_ARG_WITH(binutils-ldscript-dir,
+ AS_HELP_STRING([--with-binutils-ldscript-dir=<dir>], [path to install elf2flt.ld]),
+ [ ac_binutils_ldscript_dir=$withval ],
+ [ ac_binutils_ldscript_dir=NONE ]
+)
+
+AC_ARG_WITH(binutils-build-dir,
+ AS_HELP_STRING([--with-binutils-build-dir=<dir>], [path to compiled binutils tree]),
+ [ ac_binutils_build_dir=$withval ],
+ [ ac_binutils_build_dir=NONE ]
+)
+
+AC_ARG_ENABLE(ld-elf2flt-binary,
+ AS_HELP_STRING([--disable-ld-elf2flt-binary], [use ld-elf2flt shell script]),
+ [ use_ld_elf2flt_binary=$enableval ],
+ [ use_ld_elf2flt_binary=yes ]
+)
+
+dnl convert a yes/no variable to 1/0 for C code
+var_yn_to_10() {
+ if eval test \"\$$1\" = yes ; then
+ eval $1=1
+ else
+ eval $1=0
+ fi
+}
+
+AC_ARG_ENABLE(got-check,
+ AS_HELP_STRING([--disable-got-check], [disable check for GOT (needed on H8)]),
+ [ got_check=$enableval ],
+ [ got_check=yes ]
+)
+var_yn_to_10 got_check
+
+AC_ARG_ENABLE(emit-relocs,
+ AS_HELP_STRING([--disable-emit-relocs], [don't use the --emit-relocs (-q) linker option]),
+ [ emit_relocs=$enableval ],
+ [ emit_relocs=yes ]
+)
+var_yn_to_10 emit_relocs
+
+AC_ARG_ENABLE(emit-ctor-dtor,
+ AS_HELP_STRING([--enable-emit-ctor-dtor], [manually create ctor/dtor list]),
+ [ emit_ctor_dtor=$enableval ],
+ [ emit_ctor_dtor=no ]
+)
+var_yn_to_10 emit_ctor_dtor
+
+AC_ARG_ENABLE(always-reloc-text,
+ AS_HELP_STRING([--enable-always-reloc-text], [always process text relocs ignoring pic/got (needed on Blackfin)]),
+ [ always_reloc_text=$enableval ],
+ [
+ case $target in
+ bfin*) always_reloc_text=yes;;
+ *) always_reloc_text=no;;
+ esac
+ ]
+)
+var_yn_to_10 always_reloc_text
+