• the “check headers for declarations” block must be a compile-time check,

not a link-time check (the only one in mirtoconf, and there are, still,
  no run-time checks, thank goddess)
• NEED_ARC4RANDOM is thusly superfluous
This commit is contained in:
tg 2007-10-15 21:09:51 +00:00
parent e2c2a1c1a0
commit d0fc6b07e0

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $MirOS: src/bin/mksh/Build.sh,v 1.271 2007/10/14 13:31:01 tg Exp $ # $MirOS: src/bin/mksh/Build.sh,v 1.272 2007/10/15 21:09:51 tg Exp $
#- #-
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
@ -37,7 +37,6 @@ ao=
fx= fx=
me=`basename "$0"` me=`basename "$0"`
orig_CFLAGS=$CFLAGS orig_CFLAGS=$CFLAGS
NEED_ARC4RANDOM=0
if test -t 1; then if test -t 1; then
bi='' bi=''
@ -811,7 +810,6 @@ if test 0 = $HAVE_ARC4RANDOM && test -f "$srcdir/arc4random.c"; then
HAVE_ARC4RANDOM=1 HAVE_ARC4RANDOM=1
# ensure isolation of source directory from build directory # ensure isolation of source directory from build directory
test -f arc4random.c || cp "$srcdir/arc4random.c" . test -f arc4random.c || cp "$srcdir/arc4random.c" .
NEED_ARC4RANDOM=1
LIBS="$LIBS arc4random.c" LIBS="$LIBS arc4random.c"
fi fi
ac_cppflags ARC4RANDOM ac_cppflags ARC4RANDOM
@ -905,8 +903,8 @@ EOF
# #
# check headers for declarations # check headers for declarations
# #
save_LIBS=$LIBS save_CC=$CC
test 1 = $NEED_ARC4RANDOM && LIBS="$LIBS arc4random.c" CC="$CC -c -o $tcfn"
ac_test '!' arc4random_decl arc4random 1 'if arc4random() does not need to be declared' <<-'EOF' ac_test '!' arc4random_decl arc4random 1 'if arc4random() does not need to be declared' <<-'EOF'
#define MKSH_INCLUDES_ONLY #define MKSH_INCLUDES_ONLY
#include "sh.h" #include "sh.h"
@ -919,12 +917,12 @@ ac_test '!' arc4random_pushb_decl arc4random_pushb 1 'if arc4random_pushb() does
int arc4random_pushb(char, int); /* this clashes if defined before */ int arc4random_pushb(char, int); /* this clashes if defined before */
int main(int ac, char *av[]) { return (arc4random_pushb(**av, ac)); } int main(int ac, char *av[]) { return (arc4random_pushb(**av, ac)); }
EOF EOF
LIBS=$save_LIBS
ac_test sys_siglist_decl sys_siglist 1 'if sys_siglist[] does not need to be declared' <<-'EOF' ac_test sys_siglist_decl sys_siglist 1 'if sys_siglist[] does not need to be declared' <<-'EOF'
#define MKSH_INCLUDES_ONLY #define MKSH_INCLUDES_ONLY
#include "sh.h" #include "sh.h"
int main(void) { return (sys_siglist[0][0]); } int main(void) { return (sys_siglist[0][0]); }
EOF EOF
CC=$save_CC
# #
# other checks # other checks