1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756
|
dnl Process this file with autoconf to produce a configure script
dnl Initialization
AC_INIT()
AC_CANONICAL_SYSTEM
dnl Automake
AM_INIT_AUTOMAKE(beecrypt, 2.2.0)
AM_CONFIG_HEADER(beecrypt.gnu.h)
AM_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
dnl Check system type
case $target_os in
cygwin*)
AC_DEFINE(CYGWIN)
AC_DEFINE(WIN32)
;;
darwin*)
AC_DEFINE(DARWIN)
;;
freebsd*)
AC_DEFINE(FREEBSD)
;;
linux*)
AC_DEFINE(LINUX)
;;
netbsd*)
AC_DEFINE(NETBSD)
;;
openbsd*)
AC_DEFINE(OPENBSD)
;;
osf*)
AC_DEFINE(OSF)
;;
*qnx)
AC_DEFINE(QNX)
;;
solaris*)
AC_DEFINE(SOLARIS)
;;
sysv*uv*)
AC_DEFINE(SCO_UNIX)
;;
*)
AC_MSG_WARN([Operating system type $target_os currently not supported and/or tested])
;;
esac
case $target_os in
cygwin* | darwin*)
AC_DEFINE(LEADING_UNDERSCORE)
;;
*)
AC_DEFINE(NO_UNDERSCORES)
;;
esac
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LN_S
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_C_INLINE
if test "$ac_cv_prog_gcc" != yes; then
AC_CACHE_CHECK([whether we are using Sun Workshop C], ac_cv_prog_SUNPRO_CC, [
AC_EGREP_CPP(yes, [
#ifdef __SUNPRO_C
yes;
#endif
], ac_cv_prog_SUNPRO_CC=yes, ac_cv_prog_SUNPRO_CC=no)
])
if test "$ac_cv_prog_SUNPRO_CC" != yes; then
AC_CACHE_CHECK([whether we are using Compaq's C compiler], ac_cv_prog_DECC, [
AC_EGREP_CPP(yes, [
#ifdef __DECC
yes;
#endif
], ac_cv_prog_DECC=yes, ac_cv_prog_DECC=no)
])
fi
fi
AC_ARG_ENABLE(debug, [ --enable-debug creates debugging code [default=no]],
[ if test "$enableval" = no; then
ac_enable_debug=no
else
ac_enable_debug=yes
fi
], [ ac_enable_debug=no])
dnl Check if we need to disable optimizations
AC_ARG_ENABLE(optimized, [ --enable-optimized enables the assembler optimizations [default depends on --enable-debug value]],
[ if test "$enableval" = no; then
ac_enable_optimized=no
else
ac_enable_optimized=yes
fi
],
[ if test "$ac_enable_debug" = no; then
ac_enable_optimized=yes
else
ac_enable_optimized=no
fi
])
dnl Check if we have the necessary java components installed
AC_ARG_WITH(javaglue, [ --with-javaglue creates the java glue code [default=yes]],
[ if test "$withval" = no; then
ac_with_javaglue=no
else
ac_with_javaglue=yes
fi
], [ ac_with_javaglue=yes ])
if test "$ac_with_javaglue" = yes ; then
AC_CHECK_PROG(ac_cv_have_java, java, yes, no)
if test "$ac_cv_have_java" = yes; then
AC_CHECK_PROG(ac_cv_have_javac, javac, yes, no)
if test "$ac_cv_have_javac" = yes; then
AC_CACHE_CHECK([for java native interface headers], ac_cv_java_include, [
cat > conftest.java << EOF
public class conftest
{
public static void main(String[[]] argv)
{
System.out.println(System.getProperty("java.home"));
}
}
EOF
java_home=`javac conftest.java; java -classpath . conftest`
case $target_os in
cygwin*)
java_home=`cygpath -u -p "$java_home"`
;;
esac
if test -d "$ac_cv_java_include" ; then
ac_cv_java_headers=yes
else
case $target_os in
darwin*)
ac_cv_java_include="$java_home"/../../../Headers
;;
*)
ac_cv_java_include="$java_home"/../include
esac
if test -d "$ac_cv_java_include" ; then
ac_cv_java_headers=yes
else
AC_MSG_WARN([java headers not found, disabling javaglue])
ac_cv_java_headers=no
ac_with_javaglue=no
fi
fi
rm -fr conftest*
])
else
AC_MSG_WARN([javac not found, disabling javaglue])
ac_cv_java_headers=no
ac_with_javaglue=no
fi
else
AC_MSG_WARN([java not found, disabling javaglue])
ac_cv_java_headers=no
ac_with_javaglue=no
fi
fi
if test "$ac_with_javaglue" = yes ; then
AC_DEFINE(JAVAGLUE,1)
else
AC_DEFINE(JAVAGLUE,0)
fi
dnl Check if we want to enable threads
AC_ARG_ENABLE(threads, [ --enable-threads enables multithread safety [default=yes]],
[ if test "$enableval" = no; then
ac_enable_threads=no
else
ac_enable_threads=yes
fi
], [ ac_enable_threads=yes ])
dnl Check if we want to enable aio
AC_ARG_ENABLE(aio, [ --enable-aio enables asynchronous i/o for entropy gathering [default=yes]],
[ if test "$enableval" = no; then
ac_enable_aio=no
else
ac_enable_aio=yes
fi
], [ ac_enable_aio=yes ])
dnl Check if we want to use mtmalloc
AC_ARG_WITH(mtmalloc, [ --with-mtmalloc links against the mtmalloc library [default=no]],
[ if test "$withval" = no; then
ac_with_mtmalloc=no
else
ac_with_mtmalloc=yes
fi
], [ ac_with_mtmalloc=no ])
dnl Product and version
AC_SUBST(CC)
AC_SUBST(CPP)
AC_SUBST(LD)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
dnl Checks for library functions.
AC_FUNC_MEMCMP
dnl Checks for header files.
AC_CHECK_HEADERS(errno.h string.h ctype.h stdlib.h)
AC_CHECK_HEADERS(unistd.h fcntl.h)
AC_CHECK_HEADERS(sys/types.h sys/stat.h)
AC_CHECK_HEADERS(termio.h termios.h)
AC_CHECK_HEADERS(sys/audioio.h sys/ioctl.h sys/soundcard.h)
AC_CHECK_HEADERS(time.h sys/time.h)
if test "$ac_cv_header_sys_time_h" = yes; then
AC_CHECK_FUNC(gettimeofday, [
AC_DEFINE(HAVE_GETTIMEOFDAY, 1)
])
AC_CHECK_FUNC(gethrtime, [
AC_DEFINE(HAVE_GETHRTIME, 1)
])
fi
case $target_os in
cygwin*)
;;
*)
if test "$ac_enable_threads" = yes; then
AC_DEFINE(ENABLE_THREADS, 1)
AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h)
if test "$ac_cv_header_thread_h" = yes; then
AC_HAVE_LIBRARY(thread)
elif test "$ac_cv_header_pthread_h" = yes; then
AC_HAVE_LIBRARY(pthread)
else
AC_MSG_WARN([Can't find any thread libraries])
AC_DEFINE(ENABLE_THREADS, 0)
fi
fi
if test "$ac_enable_aio" = yes; then
AC_CHECK_HEADERS(aio.h)
if test "$ac_cv_header_aio_h" = yes; then
AC_SEARCH_LIBS(aio_read, [c rt aio posix4], [ ], [
AC_MSG_ERROR([no library containing aio routines found])
])
AC_CACHE_CHECK([whether aio works], ac_cv_have_working_aio, [
cat > conftest.aio << EOF
The quick brown fox jumps over the lazy dog.
EOF
AC_TRY_RUN([
#if HAVE_ERRNO_H
# include <errno.h>
#endif
#if HAVE_FCNTL_H
# include <fcntl.h>
#endif
#if HAVE_STRING_H
# include <string.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <aio.h>
#include <stdio.h>
main()
{
struct aiocb a;
const struct aiocb* a_list = &a;
struct timespec a_timeout;
char buffer[32];
int i, rc, fd = open("conftest.aio", O_RDONLY);
if (fd < 0)
exit(1);
memset(&a, 0, sizeof(struct aiocb));
a.aio_fildes = fd;
a.aio_offset = 0;
a.aio_reqprio = 0;
a.aio_buf = buffer;
a.aio_nbytes = sizeof(buffer);
a.aio_sigevent.sigev_notify = SIGEV_NONE;
a_timeout.tv_sec = 1;
a_timeout.tv_nsec = 0;
if (aio_read(&a) < 0)
exit(1);
if (aio_suspend(&a_list, 1, &a_timeout) < 0)
{
#if HAVE_ERRNO_H
/* some linux systems don't await timeout and return instantly */
if (errno == EAGAIN)
{
nanosleep(&a_timeout, (struct timespec*) 0);
if (aio_suspend(&a_list, 1, &a_timeout) < 0)
exit(1);
}
else
exit(1);
#else
exit(1);
#endif
}
if (aio_error(&a) < 0)
exit(1);
if (aio_return(&a) < 0)
exit(1);
exit(0);
}
], ac_cv_have_working_aio=yes, ac_cv_have_working_aio=no)
])
if test "$ac_cv_have_working_aio" = yes; then
AC_DEFINE(ENABLE_AIO, 1)
fi
rm -fr conftest*
fi
fi
if test "$ac_with_mtmalloc" = yes; then
AC_CHECK_HEADERS(mtmalloc.h)
AC_HAVE_LIBRARY(mtmalloc)
fi
;;
esac
dnl Checks for compiler flags
CFLAGS=""
CPPFLAGS=""
LDFLAGS=""
if test "$ac_enable_optimized" = yes; then
case $target_cpu in
alpha*)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_ALPHA"
;;
arm*)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_ARM"
;;
ia64)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_IA64"
;;
i386)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I386"
;;
i486)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I486"
;;
i586)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I586"
;;
i686)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I686"
;;
ia64)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_IA64"
;;
powerpc)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_POWERPC"
;;
sparcv8)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_SPARCV8"
;;
sparcv8plus*)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_SPARCV8PLUS"
CFLAGS="$CFLAGS -Wa,-xarch=v8plus"
;;
sparcv9)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_SPARCV9"
CFLAGS="$CFLAGS -Wa,-xarch=v9"
;;
sparcv9a)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_SPARCV9"
CFLAGS="$CFLAGS -Wa,-xarch=v9a"
;;
sparcv9b)
CPPFLAGS="$CPPFLAGS -DOPTIMIZE_SPARCV9"
CFLAGS="$CFLAGS -Wa,-xarch=v9b"
;;
x86)
# QNX Neutrino doesn't list the exact cpu type
;;
esac
fi
if test "$ac_enable_debug" = yes; then
CFLAGS="$CFLAGS -g"
if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -Wall"
elif test "$ac_cv_prog_SUNPRO_CC" = yes; then
if test "$ac_enable_threads" = yes; then
CFLAGS="$CFLAGS -mt"
fi
fi
else
if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -O3"
if test "$ac_enable_optimized" = yes; then
case $target_cpu in
# This switch makes the mp32 routines slower by about 10%, so it's disabled
# alphaev6)
# CFLAGS="$CFLAGS -mcpu=ev6"
# ;;
arm*)
CFLAGS="$CFLAGS -fomit-frame-pointer"
;;
i386)
CFLAGS="$CFLAGS -m386 -march=i386 -fomit-frame-pointer"
;;
i486)
CFLAGS="$CFLAGS -m486 -march=i486 -fomit-frame-pointer"
;;
i586)
CFLAGS="$CFLAGS -mpentium -march=pentium -fomit-frame-pointer"
;;
i686)
CFLAGS="$CFLAGS -mpentiumpro -march=pentiumpro -fomit-frame-pointer"
;;
sparcv8)
CFLAGS="$CFLAGS -mv8"
;;
# This actually performs WORSE on gcc up to 2.95.3!
# sparcv8plus*)
# CFLAGS="$CFLAGS -mv8plus"
# ;;
sparcv9*)
AC_MSG_WARN([gcc currently cannot build 64-bit objects])
CFLAGS="$CFLAGS -mcpu=v9 -m64 -mptr64"
;;
esac
fi
elif test "$ac_cv_prog_SUNPRO_CC" = yes; then
CFLAGS="$CFLAGS -fast"
if test "$ac_enable_threads" = yes; then
CFLAGS="$CFLAGS -mt"
fi
if test "$ac_enable_optimized" = yes; then
case $target_cpu in
sparcv8)
CFLAGS="$CFLAGS -xtarget=generic -xarch=v8"
;;
sparcv8plus)
CFLAGS="$CFLAGS -xtarget=generic -xarch=v8plus"
;;
sparcv8plusa)
CFLAGS="$CFLAGS -xtarget=generic -xarch=v8plusa"
;;
sparcv8plusb)
CFLAGS="$CFLAGS -xtarget=generic -xarch=v8plusb"
;;
sparcv9)
CFLAGS="-xarch=v9"
CFLAGS="$CFLAGS -xtarget=generic64 -xarch=v9"
LDFLAGS="$LDFLAGS -64"
;;
sparcv9a)
CFLAGS="-xarch=v9"
CFLAGS="$CFLAGS -xtarget=generic64 -xarch=v9a"
LDFLAGS="$LDFLAGS -64"
;;
sparcv9b)
CFLAGS="-xarch=v9"
CFLAGS="$CFLAGS -xtarget=generic64 -xarch=v9b"
LDFLAGS="$LDFLAGS -64"
;;
esac
fi
elif test "$ac_cv_prog_DECC" = yes; then
CFLAGS="$CFLAGS -fast"
if test "$ac_enable_threads" = yes; then
CFLAGS="$CFLAGS -pthread"
fi
else
CFLAGS="$CFLAGS -O2"
fi
fi
case $target_os in
freebsd*)
if test "$ac_enable_threads" = yes; then
CFLAGS="$CFLAGS -pthread"
LDFLAGS="$LDFLAGS -pthread"
fi
;;
esac
if test "$ac_with_javaglue" = yes ; then
CFLAGS="$CFLAGS -I$ac_cv_java_include"
case $target_os in
cygwin*)
CFLAGS="$CFLAGS -I$ac_cv_java_include"/win32
;;
darwin*)
;;
linux*)
CFLAGS="$CFLAGS -I$ac_cv_java_include"/linux
;;
osf*)
CFLAGS="$CFLAGS -I$ac_cv_java_include"/osf
;;
solaris*)
CFLAGS="$CFLAGS -I$ac_cv_java_include"/solaris
;;
*)
AC_MSG_WARN([please add appropriate -I$ac_cv_java_include/<operating system> flag])
;;
esac
fi
dnl Checks for endianness
AC_C_BIGENDIAN
dnl Checks for word sizes
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(unsigned char)
if test "$ac_cv_sizeof_char" -eq 1; then
AC_DEFINE(INT8_TYPE, [char])
else
AC_MSG_ERROR([compiler has no 1 byte char])
fi
if test "$ac_cv_sizeof_unsigned_char" -eq 1; then
AC_DEFINE(UINT8_TYPE, [unsigned char])
else
AC_MSG_ERROR([compiler has no 1 byte unsigned char])
fi
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(unsigned short)
if test "$ac_cv_sizeof_short" -eq 2; then
AC_DEFINE(INT16_TYPE, [short])
else
AC_MSG_ERROR([compiler has no 2 byte short])
fi
if test "$ac_cv_sizeof_unsigned_short" -eq 2; then
AC_DEFINE(UINT16_TYPE, [unsigned short])
else
AC_MSG_ERROR([compiler has no 2 byte unsigned short])
fi
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(unsigned long)
if test "$ac_cv_sizeof_int" -eq 4; then
AC_DEFINE(INT32_TYPE, [int])
elif test "$ac_cv_sizeof_long" -eq 4; then
AC_DEFINE(INT32_TYPE, [long])
else
AC_MSG_ERROR([compiler has no 4 byte integer])
fi
if test "$ac_cv_sizeof_unsigned_int" -eq 4; then
AC_DEFINE(UINT32_TYPE, [unsigned int])
elif test "$ac_cv_sizeof_unsigned_long" -eq 4; then
AC_DEFINE(UINT32_TYPE, [unsigned long])
else
AC_MSG_ERROR([compiler has no 4 byte unsigned integer])
fi
if test "$ac_cv_sizeof_long" -eq 8; then
AC_DEFINE(INT64_TYPE, [long])
else
AC_CHECK_SIZEOF(long long)
if test "$ac_cv_sizeof_long_long" -eq 8; then
AC_DEFINE(HAVE_LONG_LONG)
AC_DEFINE(INT64_TYPE, [long long])
else
AC_MSG_ERROR([compiler has no 8 byte integer])
fi
fi
if test "$ac_cv_sizeof_unsigned_long" -eq 8; then
AC_DEFINE(UINT64_TYPE, [unsigned long])
else
AC_CHECK_SIZEOF(unsigned long long)
if test "$ac_cv_sizeof_unsigned_long_long" -eq 8; then
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG)
AC_DEFINE(UINT64_TYPE, [unsigned long long])
else
AC_MSG_ERROR([compiler has no 8 byte unsigned integer])
fi
fi
AC_CHECK_SIZEOF(float)
if test "$ac_cv_sizeof_float" -eq 4; then
AC_DEFINE(FLOAT4_TYPE, [float])
else
AC_MSG_ERROR([compiler has no 4 byte float])
fi
AC_CHECK_SIZEOF(double)
if test "$ac_cv_sizeof_double" -eq 8; then
AC_DEFINE(DOUBLE8_TYPE, [double])
else
AC_MSG_ERROR([compiler has no 8 byte double])
fi
dnl Checks for devices
AC_CHECKING(for specific entropy devices)
case $target_os in
cygwin*)
AC_MSG_CHECKING([for wavein])
AC_MSG_RESULT(yes)
AC_MSG_CHECKING([for wincrypt])
AC_MSG_RESULT(yes)
AC_MSG_CHECKING([for console])
AC_MSG_RESULT(yes)
;;
linux*)
AC_CACHE_CHECK([for /dev/dsp], ac_cv_have_dev_dsp, [
if test -r /dev/dsp; then
ac_cv_have_dev_dsp=yes
else
ac_cv_have_dev_dsp=no
fi
])
if test "$ac_cv_have_dev_dsp" = yes; then
AC_DEFINE(HAVE_DEV_DSP, 1)
fi
;;
solaris*)
AC_CACHE_CHECK([for /dev/audio], ac_cv_have_dev_audio, [
if test -r /dev/audio; then
ac_cv_have_dev_audio=yes
else
ac_cv_have_dev_audio=no
fi
])
if test "$ac_cv_have_dev_audio" = yes; then
AC_DEFINE(HAVE_DEV_AUDIO, 1)
fi
;;
*)
AC_MSG_WARN(no specific entropy devices present)
;;
esac
case $target_os in
cygwin*)
;;
*)
AC_CHECKING(for generic entropy devices)
AC_CACHE_CHECK([for /dev/random], ac_cv_have_dev_random, [
if test -r /dev/random; then
ac_cv_have_dev_random=yes
else
ac_cv_have_dev_random=no
fi
])
if test "$ac_cv_have_dev_random" = yes; then
AC_DEFINE(HAVE_DEV_RANDOM, 1)
fi
AC_CACHE_CHECK([for /dev/urandom], ac_cv_have_dev_urandom, [
if test -r /dev/urandom; then
ac_cv_have_dev_urandom=yes
else
ac_cv_have_dev_urandom=no
fi
])
if test "$ac_cv_have_dev_urandom" = yes; then
AC_DEFINE(HAVE_DEV_URANDOM, 1)
fi
AC_CACHE_CHECK([for /dev/tty], ac_cv_have_dev_tty, [
if test -r /dev/tty; then
ac_cv_have_dev_tty=yes
else
ac_cv_have_dev_tty=no
fi
])
if test "$ac_cv_have_dev_tty" = yes; then
AC_DEFINE(HAVE_DEV_TTY, 1)
fi
;;
esac
dnl Generate the assembler optimizations
rm -f $srcdir/blowfishopt.c $srcdir/blowfishopt.S
rm -f $srcdir/mp32opt.c $srcdir/mp32opt.S
rm -f $srcdir/sha1opt.c $srcdir/sha1opt.S
if test "$ac_enable_optimized" = yes; then
case $target_cpu in
arm*)
cat > $srcdir/mp32opt.S << EOF
#include "gas/mp32opt.arm.S"
EOF
;;
i[[34]]86)
cat > $srcdir/mp32opt.S << EOF
#include "gas/mp32opt.i386.S"
EOF
;;
i[[56]]86)
cat > $srcdir/blowfishopt.S << EOF
#include "gas/blowfishopt.i586.S"
EOF
cat > $srcdir/mp32opt.S << EOF
#include "gas/mp32opt.i386.S"
EOF
cat > $srcdir/sha1opt.S << EOF
#include "gas/sha1opt.i586.S"
EOF
;;
ia64)
cat > $srcdir/mp32opt.S << EOF
#include "gas/mp32opt.ia64.S"
EOF
;;
powerpc)
cat > $srcdir/mp32opt.S << EOF
#include "gas/mp32opt.powerpc.S"
EOF
;;
sparcv8)
cat > $srcdir/mp32opt.S << EOF
#include "gas/mp32opt.sparcv8.S"
EOF
;;
sparcv8plus* | sparcv9*)
cat > $srcdir/mp32opt.S << EOF
#include "gas/mp32opt.sparcv9.S"
EOF
;;
esac
fi
if test ! -r $srcdir/blowfishopt.S; then
cat > $srcdir/blowfishopt.c << EOF
EOF
fi
if test ! -r $srcdir/mp32opt.S; then
cat > $srcdir/mp32opt.c << EOF
EOF
fi
if test ! -r $srcdir/sha1opt.S; then
cat > $srcdir/sha1opt.c << EOF
EOF
fi
dnl Output
AC_OUTPUT(Makefile docs/Makefile gas/Makefile masm/Makefile mwerks/Makefile tests/Makefile)
|