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

Contents of /mcrypt/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.32 - (show annotations)
Sun Jan 19 18:06:20 2003 UTC (21 years, 3 months ago) by nmav
Branch: MAIN
Changes since 1.31: +5 -2 lines
Fixes for compiling under win32.

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.3)
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
52 dnl For GNU gettext
53 ALL_LINGUAS="el cs pl de es_AR"
54 AM_GNU_GETTEXT
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 AC_PATH_PROG(GZIP,gzip)
72 AC_DEFINE_UNQUOTED(GZIP, "$GZIP", [gzip pathname])
73 AC_PATH_PROG(BZIP2, bzip2)
74 AC_DEFINE_UNQUOTED(BZIP2, "$BZIP2", [bzip2 pathname])
75
76 dnl AC_PROG_MAKE_SET
77
78 dnl From GNUPG
79 AC_MSG_CHECKING([whether use of /dev/random is requested])
80 AC_ARG_ENABLE(dev-random,
81 [ --disable-dev-random disable the use of dev random],
82 try_dev_random=$enableval, try_dev_random=yes)
83 AC_MSG_RESULT($try_dev_random)
84
85
86 opt_static_link=no
87 AC_MSG_CHECKING([whether static link is requested])
88 AC_ARG_ENABLE(static-link,
89 [ --enable-static-link link mcrypt statically (libmcrypt must also be a static library))],
90 opt_static_link=$enableval)
91 AC_MSG_RESULT($opt_static_link)
92
93 opt_maintainer_mode=no
94 AC_MSG_CHECKING([whether in maintanance mode])
95 AC_ARG_ENABLE(maintainer-mode,
96 [ --enable-maintainer-mode enable maintainer mode],
97 opt_maintainer_mode=$enableval)
98 AC_MSG_RESULT($opt_maintainer_mode)
99
100
101 AC_MSG_CHECKING([whether included getpass is requested])
102 AC_ARG_ENABLE(included-getpass,
103 [ --disable-included-getpass disable-included-getpass],
104 try_getpass=$enableval, try_getpass=yes)
105 AC_MSG_RESULT($try_getpass)
106
107 if test "$try_getpass" != yes ; then
108 AC_DEFINE(NO_GETPASS, 1, [whether getpass was requested])
109 fi
110
111 case "${target}" in
112 *-openbsd*)
113 NAME_OF_DEV_RANDOM="/dev/srandom"
114 NAME_OF_DEV_URANDOM="/dev/urandom"
115 ;;
116 *-cygwin*)
117 AC_DEFINE(WIN32, 1, [win32])
118 NAME_OF_DEV_RANDOM=""
119 NAME_OF_DEV_URANDOM=""
120 ;;
121 *-mingw*)
122 AC_DEFINE(WIN32, 1, [win32])
123 NAME_OF_DEV_RANDOM=""
124 NAME_OF_DEV_URANDOM=""
125 ;;
126 *)
127 NAME_OF_DEV_RANDOM="/dev/random"
128 NAME_OF_DEV_URANDOM="/dev/urandom"
129 ;;
130 esac
131
132 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM", [path of random])
133 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM", [path of urandom])
134
135 dnl check whether we have a random device
136 if test "$try_dev_random" = yes ; then
137 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
138 [if test -c "/dev/random" && test -c "$NAME_OF_DEV_URANDOM" ; then
139 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
140 if test "$ac_cv_have_dev_random" = yes; then
141 AC_DEFINE(HAVE_DEV_RANDOM, 1, [whether /dev/random exists])
142 else
143 AC_MSG_WARN(No random device found. No real random data can be used.)
144 fi
145 else
146 AC_MSG_CHECKING(for random device)
147 ac_cv_have_dev_random=no
148 AC_MSG_RESULT(has been disabled)
149 AC_MSG_WARN(Support for random device was disabled. No real random data can be used.)
150 fi
151
152
153 if test $ac_cv_c_compiler_gnu = yes; then
154
155 if test $opt_maintainer_mode = yes; then
156 CFLAGS=" -Wall -Wpointer-arith -O0 -ggdb3"
157 fi
158 fi
159
160 if test "$opt_static_link" = yes; then
161 if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
162 LDFLAGS="-static $LDFLAGS"
163 fi
164 fi
165
166 AC_C_BIGENDIAN
167 AC_TYPE_SIGNAL
168 AC_CHECK_SIZEOF(unsigned long int, 4)
169 AC_CHECK_SIZEOF(unsigned int, 4)
170 AC_CHECK_SIZEOF(unsigned short int, 2)
171 AC_CHECK_SIZEOF(unsigned char, 1)
172
173 AC_CHECK_TYPE( off_t,
174 AC_DEFINE( HAVE_OFF_T, 1, [have off_t type]),,
175 )
176
177 AC_HEADER_STDC
178 AC_CHECK_HEADERS(unistd.h pwd.h locale.h strings.h mcrypt.h ctype.h)
179 AC_CHECK_HEADERS(sys/stat.h sys/types.h fcntl.h sys/wait.h)
180 AC_CHECK_HEADERS(utime.h signal.h)
181 AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
182 AC_CHECK_FUNCS(bzero signal sigaction memset fsync siglongjmp strlcpy,,)
183 AC_CHECK_FUNCS(umask utime memmove bcopy getpwuid waitpid kill ftime,,)
184 AC_CHECK_FUNCS(lstat stat stat64 lstat64 fopen64 fseeko64 fseeko,,)
185
186
187 AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile intl/Makefile po/Makefile.in])
188 AC_CONFIG_COMMANDS([default],[[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]],[[]])
189 AC_OUTPUT

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26