+case "${target}" in
+# start-sanitize-sky
+ mips64r59*-sky-*) mips_extra_objs='$(SIM_SKY_OBJS)' ;
+ SIM_SUBTARGET="-DTARGET_SKY -DWITH_DEVICES=1 -DDEVICE_INIT=1";;
+
+# end-sanitize-sky
+ *) mips_extra_objs="" ;;
+esac
+AC_SUBST(mips_extra_objs)
+
+
+AC_PATH_X
+mips_extra_libs=""
+# start-sanitize-sky
+# Enable GPU2 library
+AC_ARG_WITH(sim-gpu2,
+[ --with-sim-gpu2=path Use GPU2 library under given directory],
+[if test -d "${withval}"
+then
+ SIM_SUBTARGET="${SIM_SUBTARGET} -DSKY_GPU2 -I${withval}/include"
+ mips_extra_libs="-L${withval}/lib -lgpu2 -L${x_libraries} -lX11"
+else
+ AC_MSG_ERROR("Directory ${withval} does not exist.");
+fi])dnl
+# end-sanitize-sky
+AC_SUBST(mips_extra_libs)