+if [ "x${gcc_lib}" == "x" ]; then
+ if [ -d "${mingw_top}/lib/gcc-lib/mingw32" ]; then
+ mingw_gcc_lib=${mingw_top}/lib/gcc-lib/mingw32
+ else
+ mingw_gcc_lib=${mingw_top}/lib/gcc/mingw32
+ fi
+ for i in `ls -r ${mingw_gcc_lib}`; do
+ if [ -d "${mingw_gcc_lib}/$i" ]; then
+ gcc_lib=${mingw_gcc_lib}/$i
+ echo "Found gcc lib in $gcc_lib"
+ break
+ fi
+ done
+ if [ "${gcc_lib}" == "" ]; then
+ echo "Can't find gcc lib files; please set \$gcc_lib"
+ exit 1
+ fi
+fi
+
+# The gcc-lib directory of the mingw tree you want to
+# include with the binary dist.
+if [ "x${gcc_libexec}" == "x" ]; then
+ if [ -d "${mingw_top}/libexec/gcc-lib/mingw32" ]; then
+ mingw_gcc_libexec=${mingw_top}/libexec/gcc-lib/mingw32
+ else
+ mingw_gcc_libexec=${mingw_top}/libexec/gcc/mingw32
+ fi
+ for i in `ls -r ${mingw_gcc_libexec}`; do
+ if [ -d "${mingw_gcc_libexec}/$i" ]; then
+ gcc_libexec=${mingw_gcc_libexec}/$i
+ echo "Found gcc libexec in $gcc_libexec"
+ break
+ fi
+ done
+ if [ "${gcc_libexec}" == "" ]; then
+ echo "Can't find gcc libexec files; please set \$gcc_libexec"
+ exit 1
+ fi
+fi
+