diff --git a/setup.py b/setup.py
index 2047a3b..565a133 100644
--- a/setup.py
+++ b/setup.py
@@ -7,35 +7,16 @@ import sys
 ## Test for functions, with a hack to suppress compiler warnings.
 cc = distutils.ccompiler.new_compiler()
 defines = []
-if cc.has_function('rintf(1.0);rand', includes=['math.h', 'stdlib.h'],
-                   libraries=['m']):
-    defines.append(('HAVE_RINTF', '1'))
-if cc.has_function('finite(1.0);rand', includes=['math.h', 'stdlib.h']):
-    defines.append(('HAVE_FINITE', '1'))
-if cc.has_function('expm1(1.0);rand', includes=['math.h', 'stdlib.h'],
-                   libraries=['m']):
-    defines.append(('HAVE_EXPM1', '1'))
-if cc.has_function('rint(1.0);rand', includes=['math.h', 'stdlib.h'], 
-                   libraries=['m']):
-    defines.append(('HAVE_RINT', '1'))
-if cc.has_function('double log2(double) ; log2(1.0);rand', 
-                   includes=['math.h', 'stdlib.h'], libraries=['m']):
-    defines.append(('HAVE_LOG2', '1'))
-if cc.has_function('logbl(1.0);rand', includes=['math.h', 'stdlib.h'],
-                   libraries=['m']):
-    defines.append(('HAVE_LOGBL', '1'))
-if cc.has_function('snprintf(0, 0, "");rand', 
-                   includes=['stdio.h', 'stdlib.h']):
-    defines.append(('HAVE_SNPRINTF', '1'))
-if cc.has_function('log1p(1.0);rand', includes=['math.h', 'stdlib.h'],
-                   libraries=['m']):
-    defines.append(('HAVE_LOG1P', '1'))
-if cc.has_function('double round(double) ; round(1.0);rand', 
-                   includes=['math.h', 'stdlib.h'], libraries=['m']):
-    defines.append(('HAVE_ROUND', '1'))
-if cc.has_function('double fmin(double, double); fmin(1.0,0.0);rand', 
-                   includes=['math.h', 'stdlib.h'], libraries=['m']):
-    defines.append(('HAVE_FMIN', '1'))
+defines.append(('HAVE_RINTF', '1'))
+defines.append(('HAVE_FINITE', '1'))
+defines.append(('HAVE_EXPM1', '1'))
+defines.append(('HAVE_RINT', '1'))
+defines.append(('HAVE_LOG2', '1'))
+defines.append(('HAVE_LOGBL', '1'))
+defines.append(('HAVE_SNPRINTF', '1'))
+defines.append(('HAVE_LOG1P', '1'))
+defines.append(('HAVE_ROUND', '1'))
+defines.append(('HAVE_FMIN', '1'))
 
 # prefix directory for pysplicing module
 pysplicing_dir = 'pysplicing'
