~vcs-imports/mhash/main

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
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT
AC_CONFIG_SRCDIR([lib/mhash.c])

AC_CANONICAL_SYSTEM([])

VERSION=0.9.2

AM_INIT_AUTOMAKE(mhash, $VERSION)
MHASH_VERSION=$VERSION
AC_SUBST(MHASH_VERSION)

AC_CONFIG_HEADER([mhash_config.h])

AC_GNU_SOURCE

AM_MAINTAINER_MODE
	
dnl AC_PROG_MAKE_SET

AC_ARG_WITH(CC,
[  --with-CC               choose compiler],
  if test "$withval" != "no" && test "$withval" != "yes" ; then
    CC="$withval"
  fi
)

AC_ARG_WITH(CFLAGS,
[  --with-CFLAGS           set C compiler flags],
  if test "$withval" != "no" && test "$withval" != "yes" ; then
    CFLAGS="$withval"
  fi
)

AC_ARG_WITH(CPPFLAGS,
[  --with-CPPFLAGS         set C preprocessor flags],
  if test "$withval" != "no" && test "$withval" != "yes" ; then
    CPPFLAGS="$withval"
  fi
)

AC_ARG_WITH(LDFLAGS,
[  --with-LDFLAGS          set linker flags],
  if test "$withval" != "no" && test "$withval" != "yes" ; then
    LDFLAGS="$withval"
  fi
)

AC_ARG_ENABLE(md5,
[  --disable-md5           disable the MD5 algorithm],
, 
AC_DEFINE(ENABLE_MD5), 1, "MD-5 Algorithm")

AC_ARG_ENABLE(sha1,
[  --disable-sha1          disable the SHA1 algorithm],
, 
AC_DEFINE(ENABLE_SHA1), 1, "SHA-1 Algorithm")

AC_ARG_ENABLE(md4,
[  --disable-md4           disable the MD4 algorithm],
, 
AC_DEFINE(ENABLE_MD4), 1, "MD-4 Algorithm")

AC_ARG_ENABLE(md2,
[  --disable-md2           disable the MD2 algorithm],
,
AC_DEFINE(ENABLE_MD2), 1, "MD-2 Algorithm")

AC_ARG_ENABLE(tiger,
[  --disable-tiger         disable the TIGER algorithm],
, 
AC_DEFINE(ENABLE_TIGER), 1, "Tiger Algorithm")

AC_ARG_ENABLE(haval,
[  --disable-haval         disable the HAVAL algorithm],
, 
AC_DEFINE(ENABLE_HAVAL), 1, "Haval Algorithm")

AC_ARG_ENABLE(crc32,
[  --disable-crc32         disable the CRC32 algorithm],
, 
AC_DEFINE(ENABLE_CRC32), 1, "CRC32 Algorithm")

AC_ARG_ENABLE(adler32,
[  --disable-adler32       disable the ADLER32 algorithm],
, 
AC_DEFINE(ENABLE_ADLER32), 1, "Adler32 Algorithm")

AC_ARG_ENABLE(ripemd,
[  --disable-ripemd        disable the RIPEMD128/160/256/320 algorithms],
, 
AC_DEFINE(ENABLE_RIPEMD), 1, "RIPE Substitutes for MD")

AC_ARG_ENABLE(gost,
[  --disable-gost          disable the GOST algorithm],
, 
AC_DEFINE(ENABLE_GOST), 1, "GOST Algorithm")

AC_ARG_ENABLE(sha256-sha224,
[  --disable-sha256-sha224 disable the SHA256 and SHA224 algorithms],
, 
AC_DEFINE(ENABLE_SHA256_SHA224), 1, "SHA-224 and SHA-256")

AC_ARG_ENABLE(sha512-sha384,
[  --disable-sha512-sha384 disable the SHA512 and SHA384 algorithms],
, 
AC_DEFINE(ENABLE_SHA512_SHA384), 1, "SHA-384 and SHA-256")

AC_ARG_ENABLE(snefru,
[  --disable-snefru        disable the SNEFRU algorithm],
,
AC_DEFINE(ENABLE_SNEFRU), 1, "Snefru Algorithm")

AC_ARG_ENABLE(whirlpool,
[  --disable-whirlpool     disable the WHIRLPOOL algorithm],
, 
AC_DEFINE(ENABLE_WHIRLPOOL), 1, "Whirlpool Algorithm")

AC_LANG(C)
AC_PROG_CC

dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB

dnl if test $ac_cv_c_compiler_gnu = yes; then
dnl  CFLAGS="${CFLAGS} --fast-math -Wall -Wpointer-arith -pedantic"
dnl fi

AC_HEADER_STDC
AC_CHECK_HEADERS(sys/stat.h sys/types.h fcntl.h signal.h unistd.h utime.h)

AC_C_CONST
AC_TYPE_SIZE_T
AC_CHECK_SIZEOF

AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(bzero signal sigaction memset fcntl fsync)
AC_CHECK_FUNCS(lstat stat umask utime memmove bcopy strtol)

AC_TYPE_SIZE_T

dnl Checks for libraries.
AC_CHECK_SIZEOF(unsigned long long int, 8)
AC_CHECK_SIZEOF(unsigned long int, 4)
AC_CHECK_SIZEOF(unsigned int, 4)
AC_CHECK_SIZEOF(unsigned short int, 2)
AC_CHECK_SIZEOF(unsigned char, 1)

AC_C_BIGENDIAN

dnl AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AM_SET_LIBTOOL_VARIABLE([--silent])

AC_CONFIG_FILES([Makefile mhash.spec doc/Makefile src/Makefile lib/Makefile])
AC_OUTPUT