summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-11-25 21:05:20 +0100
committerYang Tse <yangsita@gmail.com>2010-11-25 21:05:20 +0100
commitef24ecde68a5f577a7f0f423a767620f09a0ab16 (patch)
tree7ccc9ef2db7d579184f565fff94f989f47b62a80 /acinclude.m4
parente8bc33d0a33afdcfcbd07c76432c47522d6ddb7e (diff)
downloadcurl-ef24ecde68a5f577a7f0f423a767620f09a0ab16.tar.gz
symbol-scan: use configure script knowledge about how to run the C preprocessor
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m441
1 files changed, 41 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 225fb9d1d..9f790522a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3246,3 +3246,44 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
fi
fi
])
+
+
+dnl CURL_GENERATE_CONFIGUREHELP_PM
+dnl -------------------------------------------------
+dnl Generate test harness configurehelp.pm module, defining and
+dnl initializing some perl variables with values which are known
+dnl when the configure script runs. For portability reasons, test
+dnl harness needs information on how to run the C preprocessor.
+
+AC_DEFUN([CURL_GENERATE_CONFIGUREHELP_PM], [
+ AC_REQUIRE([AC_PROG_CPP])dnl
+ tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null`
+ if test -z "$tmp_cpp"; then
+ tmp_cpp='cpp'
+ fi
+ cat >./tests/configurehelp.pm <<_EOF
+[@%:@] This is a generated file. Do not edit.
+
+package configurehelp;
+
+use strict;
+use warnings;
+use Exporter;
+
+use vars qw(
+ @ISA
+ @EXPORT_OK
+ \$Cpreprocessor
+ );
+
+@ISA = qw(Exporter);
+
+@EXPORT_OK = qw(
+ \$Cpreprocessor
+ );
+
+\$Cpreprocessor = '$tmp_cpp';
+
+1;
+_EOF
+])