From dd469eec407d0fac7cd16b2899fa7a3da85b9460 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 6 Nov 2014 01:32:46 +0100 Subject: symbol-scan.pl: do not require autotools Makes test1119 pass when building with cmake. configurehelp.pm is generated by configure (autotools). As cmake does not provide a separate variable for the C preprocessor, default to cpp. Before commit ef24ecde68a5f577a7f0f423a767620f09a0ab16 ("symbol-scan: use configure script knowledge about how to run the C preprocessor"), this tool would also use 'cpp'. Signed-off-by: Peter Wu --- tests/symbol-scan.pl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl index 91b859bca..89f5eeff9 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] || "."; -- cgit v1.2.3