configure.in
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:2k
- dnl Process this file with autoconf to produce a configure script.
- dnl $Id: configure.in,v 1.5 1999/12/08 05:40:58 mrsam Exp $
- dnl
- dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
- dnl distribution information.
- AC_INIT(random128.c)
- AM_INIT_AUTOMAKE(random128,0.10,0)
- dnl Checks for programs.
- AM_CONFIG_HEADER(config.h)
- AC_ISC_POSIX
- AC_PROG_INSTALL
- AC_PROG_LN_S
- AC_PROG_RANLIB
- AC_PROG_CC
- AC_MINIX
- AC_AIX
- AC_PATH_PROGS(PS, ps, ps)
- AC_PATH_PROGS(W, w, w)
- if test "$PS" = "ps"
- then
- AC_MSG_ERROR(Cannot find pathname to ps)
- fi
- if test x$GXX = xyes
- then
- CFLAGS="-Wall $CFLAGS"
- fi
- CFLAGS="-I.. -I$srcdir/.. $CFLAGS"
- dnl Checks for libraries.
- dnl Checks for header files.
- AC_HEADER_SYS_WAIT
- AC_CHECK_HEADERS(unistd.h fcntl.h)
- AC_TYPE_PID_T
- AC_ARG_WITH(random, [ --with-random=/dev/urandom - location of the system random file generator
- --without-random - there is no system random file generator ],
- random="$enableval",
- random="y")
- case "$random" in
- /*)
- ;;
- y*|1*)
- AC_CACHE_CHECK([for random source],random_cv_RANDOM,
- if test -c /dev/urandom
- then
- random_cv_RANDOM=/dev/urandom
- else
- if test -c /dev/random
- then
- random_cv_RANDOM=/dev/random
- else
- random_cv_RANDOM="none"
- fi
- fi
- )
- random="$random_cv_RANDOM"
- ;;
- *)
- random="none"
- ;;
- esac
- if test "$random" != "none"
- then
- AC_DEFINE_UNQUOTED(RANDOM, "$random_cv_RANDOM")
- fi
- AC_CACHE_CHECK([for some good options for ps],random_cv_PS_OPTIONS,
- for opts in -Afl -Afw -Af -Al -afl -afw -af -al Afl Afw Af Al afl afw af al
- do
- ps $opts >/dev/null 2>/dev/null || continue
- break
- done
- random_cv_PS_OPTIONS="$opts"
- )
- AC_DEFINE_UNQUOTED(PS_OPTIONS,"$random_cv_PS_OPTIONS")
- AC_DEFINE_UNQUOTED(PS,"$PS")
- if test "$W" != "w"
- then
- AC_DEFINE_UNQUOTED(W, "$w")
- fi
- AC_OUTPUT(Makefile)