summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-04-10 18:30:04 +0000
committerNicholas Clark <nick@ccl4.org>2007-04-10 18:30:04 +0000
commit328aef96c192c44093e580ff7a2614137052ba36 (patch)
tree2a53a540850c42d041461e24cc8b544aba3889de /Configure
parent2679043380ccf1423491dfb0147e322b03f679e3 (diff)
downloadperl-328aef96c192c44093e580ff7a2614137052ba36.tar.gz
Make the don't-use-nm symbol table probes work under C++.
p4raw-id: //depot/perl@30897
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure7
1 files changed, 5 insertions, 2 deletions
diff --git a/Configure b/Configure
index dd3cd9219c..b317e44475 100755
--- a/Configure
+++ b/Configure
@@ -7582,18 +7582,21 @@ true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
esac;
case "$tx" in
yes)
+ case "$d_cplusplus" in
+ $define) extern_C=\"C\";;
+ esac;
tval=false;
if $test "$runnm" = true; then
if $contains $tlook $tf >/dev/null 2>&1; then
tval=true;
elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
- echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
+ echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
$cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
$test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
$rm -f try$_exe try.c core core.* try.core;
fi;
else
- echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
+ echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
$cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
$rm -f try$_exe try.c;
fi;