Fix autoconf's check for create_timer()
Fix autoconf's check for create_timer()

GHC build system have custom autoconf check for `create_timer()`
function from librt. Check description says that it checks for
`CLOCK_REALTIME` timer, but checking code also checks for
`CLOCK_PROCESS_CPUTIME_ID` timer, which is not commonly present (for
example, FreeBSD doesn't have it). This makes whole check fail despite
the fact that FreeBSD have `create_timer()` call and supports
`CLOCK_REALTIME`. As a consequence, GHC RTS falls back to using SIGALRM
for its timing machinery. Not only it's very ancient codepath, it also
break some FFI bindings to C code that isn't prepared for syscall
interruption caused by SIGALRM delivery.

Grepping through ghc source code reveals that `USE_TIMER_CREATE`
defininition in the config.h doesn't imply having
`CLOCK_PROCESS_CPUTIME_ID`. The only place where
`CLOCK_PROCESS_CPUTIME_ID` is used is rts/posix/GetTime.c and this code
handles the absence of `CLOCK_PROCESS_CPUTIME_ID` gracefully.

This patch makes autoconf checking code to check only for
`timer_create(CLOCK_REALTIME, ...)` and fixes check description.

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D831

ghc-android/ghc,shlevy/ghc,wxwxwwxxx/ghc,TomMD/ghc,olsner/ghc,christiaanb/ghc,mfine/ghc,olsner/ghc,elieux/ghc,sgillespie/ghc,AlexanderPankiv/ghc,anton-dessiatov/ghc,shlevy/ghc,nushio3/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,ezyang/ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,vTurbine/ghc,siddhanathan/ghc,sdiehl/ghc,mcschroeder/ghc,olsner/ghc,GaloisInc/halvm-ghc,wxwxwwxxx/ghc,urbanslug/ghc,snoyberg/ghc,shlevy/ghc,anton-dessiatov/ghc,vikraman/ghc,ml9951/ghc,elieux/ghc,AlexanderPankiv/ghc,sgillespie/ghc,ghc-android/ghc,nkaretnikov/ghc,oldmanmike/ghc,vikraman/ghc,TomMD/ghc,da-x/ghc,ml9951/ghc,mfine/ghc,shlevy/ghc,fmthoma/ghc,urbanslug/ghc,nushio3/ghc,nkaretnikov/ghc,ml9951/ghc,christiaanb/ghc,ghc-android/ghc,TomMD/ghc,oldmanmike/ghc,sgillespie/ghc,snoyberg/ghc,acowley/ghc,acowley/ghc,siddhanathan/ghc,olsner/ghc,sdiehl/ghc,urbanslug/ghc,tjakway/ghcjvm,ml9951/ghc,acowley/ghc,gridaphobe/ghc,mfine/ghc,ezyang/ghc,ghc-android/ghc,nkaretnikov/ghc,gridaphobe/ghc,siddhanathan/ghc,fmthoma/ghc,urbanslug/ghc,mettekou/ghc,TomMD/ghc,vikraman/ghc,siddhanathan/ghc,TomMD/ghc,mettekou/ghc,siddhanathan/ghc,vTurbine/ghc,olsner/ghc,sdiehl/ghc,tjakway/ghcjvm,mfine/ghc,ezyang/ghc,christiaanb/ghc,wxwxwwxxx/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,sdiehl/ghc,nushio3/ghc,wxwxwwxxx/ghc,acowley/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,fmthoma/ghc,wxwxwwxxx/ghc,AlexanderPankiv/ghc,olsner/ghc,vikraman/ghc,mcschroeder/ghc,elieux/ghc,da-x/ghc,oldmanmike/ghc,olsner/ghc,anton-dessiatov/ghc,mettekou/ghc,snoyberg/ghc,AlexanderPankiv/ghc,oldmanmike/ghc,nushio3/ghc,da-x/ghc,gridaphobe/ghc,wxwxwwxxx/ghc,ghc-android/ghc,siddhanathan/ghc,mcschroeder/ghc,oldmanmike/ghc,acowley/ghc,sdiehl/ghc,vikraman/ghc,shlevy/ghc,vikraman/ghc,christiaanb/ghc,mettekou/ghc,nushio3/ghc,nushio3/ghc,ml9951/ghc,snoyberg/ghc,mettekou/ghc,anton-dessiatov/ghc,ezyang/ghc,ezyang/ghc,nkaretnikov/ghc,snoyberg/ghc,mfine/ghc,da-x/ghc,fmthoma/ghc,shlevy/ghc,sdiehl/ghc,mcschroeder/ghc,mcschroeder/ghc,mcschroeder/ghc,elieux/ghc,fmthoma/ghc,ezyang/ghc,shlevy/ghc,ghc-android/ghc,wxwxwwxxx/ghc,mfine/ghc,ml9951/ghc,ml9951/ghc,christiaanb/ghc,urbanslug/ghc,tjakway/ghcjvm,da-x/ghc,elieux/ghc,elieux/ghc,gridaphobe/ghc,vTurbine/ghc,ezyang/ghc,AlexanderPankiv/ghc,christiaanb/ghc,vikraman/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,vTurbine/ghc,elieux/ghc,vTurbine/ghc,sgillespie/ghc,ghc-android/ghc,nkaretnikov/ghc,TomMD/ghc,christiaanb/ghc,TomMD/ghc,ml9951/ghc,tjakway/ghcjvm,sdiehl/ghc,da-x/ghc,AlexanderPankiv/ghc,da-x/ghc,acowley/ghc,mfine/ghc,nkaretnikov/ghc,vTurbine/ghc,gridaphobe/ghc,siddhanathan/ghc,AlexanderPankiv/ghc,gridaphobe/ghc,anton-dessiatov/ghc,mettekou/ghc,acowley/ghc,mcschroeder/ghc,tjakway/ghcjvm,gridaphobe/ghc,snoyberg/ghc,nushio3/ghc,GaloisInc/halvm-ghc,mettekou/ghc,nkaretnikov/ghc,urbanslug/ghc,tjakway/ghcjvm,sgillespie/ghc,snoyberg/ghc,tjakway/ghcjvm,fmthoma/ghc,sgillespie/ghc,urbanslug/ghc