curl-library
[PATCH 6/8] symbol-scan.pl: do not require autotools
From: Peter Wu <peter_at_lekensteyn.nl>
Date: Thu, 6 Nov 2014 01:32:46 +0100
Date: Thu, 6 Nov 2014 01:32:46 +0100
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 <peter_at_lekensteyn.nl>
--- tests/symbol-scan.pl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl index 91b859b..89f5eef 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] || "."; -- 2.1.2 ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-11-06