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

Contents of /mcrypt/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.36 - (show annotations)
Fri Feb 21 17:57:14 2003 UTC (21 years, 1 month ago) by nmav
Branch: MAIN
CVS Tags: mcrypt_2_6_4, HEAD
Changes since 1.35: +5 -3 lines
changes for the 2.6.4 release.

1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.50)
3 AC_INIT
4 dnl AC_CONFIG_HEADER(config.h)
5
6 AC_PREFIX_DEFAULT(/usr/local)
7
8 AC_CANONICAL_TARGET([])
9 AC_DEFINE_UNQUOTED(T_CPU, "$target_cpu", [target CPU])
10 AC_DEFINE_UNQUOTED(T_VENDOR, "$target_vendor", [Vendor])
11 AC_DEFINE_UNQUOTED(T_OS, "$target_os", [OS])
12
13 AM_INIT_AUTOMAKE(mcrypt, 2.6.4)
14
15 AM_CONFIG_HEADER(config.h)
16
17 AC_PROG_LIBTOOL
18 AC_PROG_CC
19
20
21 AM_PATH_LIBMCRYPT( 2.5.0,,
22 AC_MSG_ERROR([[*** libmcrypt was not found]])
23 )
24
25 AC_CHECK_LIB(mhash, mhash_keygen, LIBS="${LIBS} -lmhash",
26 AC_MSG_ERROR("You need at least libmhash 0.8.15 to compile this program. http://mhash.sf.net/"))
27
28 AC_MSG_CHECKING([whether mhash >= 0.8.15])
29 AC_TRY_RUN([
30 #include <mhash.h>
31
32 int main() {
33
34 if (MHASH_API_VERSION >= 20020524)
35 exit(0);
36 else
37 exit(-1);
38 }
39 ],
40 dnl ************ CASE >= 0.8.15
41 AC_MSG_RESULT(yes)
42 ,
43 dnl ************ CASE < 0.8.15
44 AC_MSG_RESULT(no)
45 AC_MSG_ERROR("You need at least libmhash 0.8.15 to compile this program. http://mhash.sf.net/")
46 ,
47 AC_MSG_RESULT(cross compiling)
48 )
49
50
51 dnl For GNU gettext
52 ALL_LINGUAS="el cs pl de es_AR"
53
54 AM_GNU_GETTEXT([external])
55
56 AC_CHECK_LIB(z, compress,,AC_MSG_WARN(
57 ***
58 *** ZLIB was not found. You will not be able to use ZLIB compression
59 *** in OpenPGP packets.))
60
61 LIBS="${LIBS} ${LIBMCRYPT_LIBS}"
62 CFLAGS="${CFLAGS} ${LIBMCRYPT_CFLAGS} -Wall"
63
64
65 AC_C_CONST
66
67 dnl Checks for programs.
68 AC_PROG_INSTALL
69 AC_PROG_LN_S
70 AC_PATH_PROG(RM,rm)
71
72 case "${target}" in
73 *-cygwin*)
74 ;;
75 *-mingw*)
76 ;;
77 *)
78 AC_PATH_PROG(GZIP,gzip)
79 AC_DEFINE_UNQUOTED(GZIP, "$GZIP", [gzip pathname])
80 AC_PATH_PROG(BZIP2, bzip2)
81 AC_DEFINE_UNQUOTED(BZIP2, "$BZIP2", [bzip2 pathname])
82 ;;
83 esac
84
85 dnl AC_PROG_MAKE_SET
86
87 dnl From GNUPG
88 AC_MSG_CHECKING([whether use of /dev/random is requested])
89 AC_ARG_ENABLE(dev-random,
90 [ --disable-dev-random disable the use of dev random],
91 try_dev_random=$enableval, try_dev_random=yes)
92 AC_MSG_RESULT($try_dev_random)
93
94
95 opt_static_link=no
96 AC_MSG_CHECKING([whether static link is requested])
97 AC_ARG_ENABLE(static-link,
98 [ --enable-static-link link mcrypt statically (libmcrypt must also be a static library))],
99 opt_static_link=$enableval)
100 AC_MSG_RESULT($opt_static_link)
101
102 opt_maintainer_mode=no
103 AC_MSG_CHECKING([whether in maintanance mode])
104 AC_ARG_ENABLE(maintainer-mode,
105 [ --enable-maintainer-mode enable maintainer mode],
106 opt_maintainer_mode=$enableval)
107 AC_MSG_RESULT($opt_maintainer_mode)
108
109
110 AC_MSG_CHECKING([whether included getpass is requested])
111 AC_ARG_ENABLE(included-getpass,
112 [ --disable-included-getpass disable-included-getpass],
113 try_getpass=$enableval, try_getpass=yes)
114 AC_MSG_RESULT($try_getpass)
115
116 if test "$try_getpass" != yes ; then
117 AC_DEFINE(NO_GETPASS, 1, [whether getpass was requested])
118 fi
119
120 case "${target}" in
121 *-openbsd*)
122 NAME_OF_DEV_RANDOM="/dev/srandom"
123 NAME_OF_DEV_URANDOM="/dev/urandom"
124 ;;
125 *-cygwin*)
126 AC_DEFINE(WIN32, 1, [win32])
127 NAME_OF_DEV_RANDOM=""
128 NAME_OF_DEV_URANDOM=""
129 ;;
130 *-mingw*)
131 AC_DEFINE(WIN32, 1, [win32])
132 NAME_OF_DEV_RANDOM=""
133 NAME_OF_DEV_URANDOM=""
134 ;;
135 *)
136 NAME_OF_DEV_RANDOM="/dev/random"
137 NAME_OF_DEV_URANDOM="/dev/urandom"
138 ;;
139 esac
140
141 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM", [path of random])
142 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM", [path of urandom])
143
144 dnl check whether we have a random device
145 if test "$try_dev_random" = yes ; then
146 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
147 [if test -c "/dev/random" && test -c "$NAME_OF_DEV_URANDOM" ; then
148 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
149 if test "$ac_cv_have_dev_random" = yes; then
150 AC_DEFINE(HAVE_DEV_RANDOM, 1, [whether /dev/random exists])
151 else
152 AC_MSG_WARN(No random device found. No real random data can be used.)
153 fi
154 else
155 AC_MSG_CHECKING(for random device)
156 ac_cv_have_dev_random=no
157 AC_MSG_RESULT(has been disabled)
158 AC_MSG_WARN(Support for random device was disabled. No real random data can be used.)
159 fi
160
161
162 if test $ac_cv_c_compiler_gnu = yes; then
163
164 if test $opt_maintainer_mode = yes; then
165 CFLAGS=" -Wall -Wpointer-arith -O0 -ggdb3"
166 fi
167 fi
168
169 if test "$opt_static_link" = yes; then
170 if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
171 LDFLAGS="-static $LDFLAGS"
172 fi
173 fi
174
175 AC_C_BIGENDIAN
176 AC_TYPE_SIGNAL
177 AC_CHECK_SIZEOF(unsigned long int, 4)
178 AC_CHECK_SIZEOF(unsigned int, 4)
179 AC_CHECK_SIZEOF(unsigned short int, 2)
180 AC_CHECK_SIZEOF(unsigned char, 1)
181
182 AC_CHECK_TYPE( off_t,
183 AC_DEFINE( HAVE_OFF_T, 1, [have off_t type]),,
184 )
185
186 AC_SYS_LARGEFILE
187
188 AC_HEADER_STDC
189 AC_CHECK_HEADERS(unistd.h pwd.h locale.h strings.h mcrypt.h ctype.h)
190 AC_CHECK_HEADERS(sys/stat.h sys/types.h fcntl.h sys/wait.h)
191 AC_CHECK_HEADERS(utime.h signal.h)
192 AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
193 AC_CHECK_FUNCS(bzero signal sigaction memset fsync siglongjmp strlcpy,,)
194 AC_CHECK_FUNCS(umask utime memmove bcopy getpwuid waitpid kill ftime,,)
195 AC_CHECK_FUNCS(lstat stat fseeko,,)
196
197
198 AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile po/Makefile.in m4/Makefile ])
199 AC_CONFIG_COMMANDS([default],[[]],[[]])
200 AC_OUTPUT

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26