case $target in
*-*-mingw*)
have_x86_64=false
have_win32=true
PTHREAD_FLAGS=""
;;
x86_64-*-darwin*)
have_x86_64=true
OPENCL_FLAGS="-framework OpenCL"
;;
x86_64-*)
have_x86_64=true
;;
*-*-darwin*)
have_x86_64=false
OPENCL_FLAGS="-framework OpenCL"
;;
*)
have_x86_64=false
;;
esac
Look at the code again. The wildcards are used to allow for the x86_64 and apple portions of the name. In this case, *-*-darwin* translates to "anything"-"anything"-darwin"anyrevision" which means that the darwin case is being reached. I feel that they problem you are having may be more driver or dependency related. But kudos on trying to fix it yourself.
Also, the following compile error was introduced in 1.2.6/1.2.6-1 (don't know exactly which) and has nothing to do with OpenCL being detected or not.