}
pushvar(){
- for var in $*; do
- eval level=\${${var}_level:=0}
- eval ${var}_${level}="\$$var"
- eval ${var}_level=$(($level+1))
+ for pvar in $*; do
+ eval level=\${${pvar}_level:=0}
+ eval ${pvar}_${level}="\$$pvar"
+ eval ${pvar}_level=$(($level+1))
done
}
popvar(){
- for var in $*; do
- eval level=\${${var}_level:-0}
+ for pvar in $*; do
+ eval level=\${${pvar}_level:-0}
test $level = 0 && continue
eval level=$(($level-1))
- eval $var="\${${var}_${level}}"
- eval ${var}_level=$level
- eval unset ${var}_${level}
+ eval $pvar="\${${pvar}_${level}}"
+ eval ${pvar}_level=$level
+ eval unset ${pvar}_${level}
done
}
}
enable_deep_weak(){
- do_enable_deep $*
- enable_weak $*
+ for var; do
+ disabled $var && continue
+ pushvar var
+ do_enable_deep $var
+ popvar var
+ enable_weak $var
+ done
}
enabled(){
attribute_packed
cdio_paranoia_h
cdio_paranoia_paranoia_h
+ CL_cl_h
clock_gettime
closesocket
cmov
check_func_headers windows.h VirtualAlloc
check_func_headers glob.h glob
+check_header cl/cl.h
check_header direct.h
check_header dlfcn.h
check_header dxva.h
die "ERROR: openal not found"; } &&
{ check_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" ||
die "ERROR: openal must be installed and version must be 1.1 or compatible"; }
-enabled opencl && require2 opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL
+enabled opencl && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
+ check_lib2 CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
+ die "ERROR: opencl not found"; } &&
+ { check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
+ check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
+ die "ERROR: opencl must be installed and version must be 1.2 or compatible"; }
enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||