?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:Csym mistrustnm: Options contains libc libs runnm test \
- +cc +optimize +ccflags +ldflags run rm _exe
+ +cc +optimize +ccflags +ldflags run rm _exe d_cplusplus
?MAKE: -pick add $@ %<
?LINT:define csym
?LINT:use libc
?S: "run", the test program will be run as well as being compiled.
?S:.
?V:csym
-?T:tval tx tlook tf tdc
+?T:tval tx tlook tf tdc extern_C
: is a C symbol defined?
csym='tlook=$1;
case "$3" in
?X: trick is obsoleted by future gcc releases). -- RAM
?X:
tval=false;
+ case "$d_cplusplus" in
+ $define) extern_C=\"C\";;
+ esac;
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;
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_cplusplus: Compile Inlibc Setvar run cat rm
+?MAKE:d_cplusplus: Compile Setvar run cat rm
?MAKE: -pick add $@ %<
?S:d_cplusplus (d_cplusplus.U):
?S: This variable conditionally defines the USE_CPLUSPLUS symbol, which