/[mcrypt]/shash/configure.in
ViewVC logotype

Contents of /shash/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations)
Sat Aug 31 14:11:33 2002 UTC (19 years, 3 months ago) by nmav
Branch: MAIN
CVS Tags: shash_0_2_6, HEAD
Changes since 1.4: +1 -1 lines
removed the 'nolocks' option. Updated documentation.

1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT()
3 dnl AC_CONFIG_HEADER(config.h)
4
5 AC_PREFIX_DEFAULT(/usr/local)
6
7 AC_CANONICAL_SYSTEM
8 AC_DEFINE_UNQUOTED(T_CPU, "$target_cpu")
9 AC_DEFINE_UNQUOTED(T_VENDOR, "$target_vendor")
10 AC_DEFINE_UNQUOTED(T_OS, "$target_os")
11
12
13 AM_INIT_AUTOMAKE(shash, 0.2.6)
14 AM_CONFIG_HEADER(config.h)
15
16
17 AC_PROG_CC
18
19 AC_C_CONST
20
21 AC_CHECK_LIB(mhash, mhash_keygen, :, AC_MSG_ERROR("You need libmhash 0.7.0 to compile this program. http://schumann.cx/mhash/"))
22
23 dnl Checks for programs.
24 AC_PROG_INSTALL
25 AC_PROG_LN_S
26 AC_PATH_PROG(RM,rm)
27 AC_PATH_PROG(MAKEINFO,makeinfo)
28
29 dnl AC_PROG_MAKE_SET
30
31 AC_CHECK_LIB(pthread, pthread_mutex_lock)
32
33 dnl From GNUPG
34 AC_MSG_CHECKING([whether use of /dev/random is requested])
35 AC_ARG_ENABLE(dev-random,
36 [ --disable-dev-random disable the use of dev random],
37 try_dev_random=$enableval, try_dev_random=yes)
38 AC_MSG_RESULT($try_dev_random)
39
40
41 AC_MSG_CHECKING([whether fcntl-locking is requested])
42 AC_ARG_ENABLE(fcntl-locking,
43 [ --disable-fcntl-locking disable-fcntl-locking],
44 try_fcntl_lock=$enableval, try_fcntl_lock=yes)
45 AC_MSG_RESULT($try_fcntl_lock)
46
47 if test "$try_fcntl_lock" != yes ; then
48 AC_DEFINE(NO_FCNTL_LOCK)
49 fi
50
51 opt_static_link=no
52 AC_MSG_CHECKING([whether static link is requested])
53 AC_ARG_ENABLE(static-link,
54 [ --enable-static-link link shash statically],
55 opt_static_link=$enableval)
56 AC_MSG_RESULT($opt_static_link)
57
58 case "${target}" in
59 *-openbsd*)
60 NAME_OF_DEV_RANDOM="/dev/srandom"
61 NAME_OF_DEV_URANDOM="/dev/urandom"
62 ;;
63 *)
64 NAME_OF_DEV_RANDOM="/dev/random"
65 NAME_OF_DEV_URANDOM="/dev/urandom"
66 ;;
67 esac
68
69 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM")
70 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM")
71
72 dnl check whether we have a random device
73 if test "$try_dev_random" = yes ; then
74 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
75 [if test -c "/dev/random" && test -c "$NAME_OF_DEV_URANDOM" ; then
76 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
77 if test "$ac_cv_have_dev_random" = yes; then
78 AC_DEFINE(HAVE_DEV_RANDOM)
79 else
80 AC_MSG_WARN(No random device found. No real random data can be used.)
81 fi
82 else
83 AC_MSG_CHECKING(for random device)
84 ac_cv_have_dev_random=no
85 AC_MSG_RESULT(has been disabled)
86 AC_MSG_WARN(Support for random device was disabled. No real random data can be used.)
87 fi
88
89
90 if test $ac_cv_prog_gcc = yes; then
91 CFLAGS="${CFLAGS} -Wall -Wpointer-arith"
92 fi
93
94
95 if test "$opt_static_link" = yes; then
96 if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
97 LDFLAGS="$LDFLAGS -static"
98 fi
99 fi
100
101 AC_HEADER_STDC
102 AC_CHECK_HEADERS(unistd.h pwd.h locale.h strings.h ctype.h)
103 AC_CHECK_HEADERS(sys/stat.h sys/types.h fcntl.h sys/wait.h)
104 AC_CHECK_HEADERS(utime.h signal.h sys/mman.h)
105 AC_CHECK_FUNCS(bzero signal sigaction memset fcntl fsync getuid geteuid ftime,,)
106 AC_CHECK_FUNCS(lstat stat umask utime memmove bcopy getpwuid waitpid mlock,,)
107
108 dnl Checks for libraries.
109 AC_C_BIGENDIAN
110 AC_TYPE_SIGNAL
111 AC_CHECK_SIZEOF(unsigned long int, 4)
112 AC_CHECK_SIZEOF(unsigned int, 4)
113 AC_CHECK_SIZEOF(unsigned short int, 2)
114 AC_CHECK_SIZEOF(unsigned char, 1)
115
116 AC_OUTPUT([Makefile src/Makefile doc/Makefile])

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26