Fix regression in qsort_r BSD detection
Fix regression in qsort_r BSD detection

We can use AC_CHECK_FUNCS to detect if qsort_r is available on
the system or not since it will unconditionnally define
HAVE_QSORT_R, which we don't want since on BSD, qsort_r isn't usable
for us, so we don't want to have HAVE_QSORT_R defined on such platforms.
By using AC_CHECK_FUNC instead, we can defer defining HAVE_QSORT_R until
we have actually tested it's usable.

https://bugzilla.gnome.org/show_bug.cgi?id=651920

djdeath/glib,pstglia/platform-external-bluetooth-glib,antono/glib,gale320/glib,tamaskenez/glib,MathieuDuponchelle/glib,iConsole/Console-OS_external_bluetooth_glib,bluez-android/glib,cosimoc/glib,tamaskenez/glib,cention-sany/glib,zsx/glib,justinkb/aosp-bluez.glib,endlessm/glib,zsx/glib,darren-clark/android_platform_external_bluetooth_glib,tamaskenez/glib,01org/android-bluez-glib,justinkb/aosp-bluez.glib,cosimoc/glib,johne53/MB3Glib,pstglia/platform-external-bluetooth-glib,tamaskenez/glib,djdeath/glib,justinkb/aosp-bluez.glib,antono/glib,Distrotech/glib,krichter722/glib,johne53/MB3Glib,01org/android-bluez-glib,krichter722/glib,pstglia/external-bluetooth-glib,ieei/glib,cention-sany/glib,bluez-android/glib,mzabaluev/glib,Distrotech/glib,MathieuDuponchelle/glib,gale320/glib,lukasz-skalski/glib,cention-sany/glib,mzabaluev/glib,lukasz-skalski/glib,darren-clark/android_platform_external_bluetooth_glib,krichter722/glib,johne53/MB3Glib,cention-sany/glib,Distrotech/glib,pstglia/external-bluetooth-glib,gale320/glib,gale320/glib,tchakabam/glib,pstglia/external-bluetooth-glib,bluez-android/glib,endlessm/glib,01org/android-bluez-glib,tchakabam/glib,pstglia/external-bluetooth-glib,cention-sany/glib,zsx/glib,cosimoc/glib,tchakabam/glib,justinkb/aosp-bluez.glib,MathieuDuponchelle/glib,bluez-android/glib,tchakabam/glib,bluez-android/glib,endlessm/glib,iConsole/Console-OS_external_bluetooth_glib,djdeath/glib,lukasz-skalski/glib,darren-clark/android_platform_external_bluetooth_glib,tamaskenez/glib,mzabaluev/glib,krichter722/glib,01org/android-bluez-glib,MathieuDuponchelle/glib,mzabaluev/glib,ieei/glib,zsx/glib,Distrotech/glib,01org/android-bluez-glib,darren-clark/android_platform_external_bluetooth_glib,endlessm/glib,cosimoc/glib,pstglia/platform-external-bluetooth-glib,antono/glib,djdeath/glib,pstglia/platform-external-bluetooth-glib,ieei/glib,pstglia/external-bluetooth-glib,johne53/MB3Glib,ieei/glib,iConsole/Console-OS_external_bluetooth_glib,johne53/MB3Glib,tchakabam/glib,lukasz-skalski/glib,darren-clark/android_platform_external_bluetooth_glib,ieei/glib,pstglia/platform-external-bluetooth-glib,iConsole/Console-OS_external_bluetooth_glib,Distrotech/glib,johne53/MB3Glib,iConsole/Console-OS_external_bluetooth_glib,MathieuDuponchelle/glib,krichter722/glib,justinkb/aosp-bluez.glib,endlessm/glib,antono/glib,cosimoc/glib,mzabaluev/glib,djdeath/glib,lukasz-skalski/glib,gale320/glib