diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl
index 91b859bca5f2fc06145dc531e499353519c37463..89f5eeff9a4fc9aa14e27ad4a7583d384ce5417a 100644
--- a/tests/symbol-scan.pl
+++ b/tests/symbol-scan.pl
@@ -27,13 +27,23 @@
 
 use strict;
 use warnings;
+use vars qw($Cpreprocessor);
 
 #
 # configurehelp perl module is generated by configure script
 #
-use configurehelp qw(
-    $Cpreprocessor
-    );
+my $rc = eval {
+    require configurehelp;
+    configurehelp->import(qw(
+        $Cpreprocessor
+    ));
+    1;
+};
+# Set default values if configure has not generated a configurehelp.pm file.
+# This is the case with cmake.
+if (!$rc) {
+    $Cpreprocessor = 'cpp';
+}
 
 # we may get the dir root pointed out
 my $root=$ARGV[0] || ".";