You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by "David N. Welton" <da...@dedasys.com> on 2003/08/20 15:20:09 UTC
detecting libcrypt
So, can one of you OpenBSD people try this out for me?
proc configure::lib_has_function { library function } {
set program {
int main() {
%s();
return 0;
}
}
set program [format $program $function]
set fl [open testconfig.c w]
puts $fl $program
close $fl
if { [catch {
exec cc -o testconfig testconfig.c -l$library
} err] } {
return ""
} else {
return "-l$library"
}
}
puts [configure::lib_has_function crypt crypt]
Thanks,
--
David N. Welton
Consulting: http://www.dedasys.com/
Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
Apache Tcl: http://tcl.apache.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org