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

Annotation of /mcrypt/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.35 - (hide annotations)
Sun Jan 19 18:18:18 2003 UTC (21 years, 2 months ago) by nmav
Branch: MAIN
Changes since 1.34: +13 -4 lines
search for bzip/gzip when not in win32.

1 nmav 1.1 dnl Process this file with autoconf to produce a configure script.
2 nmav 1.14 AC_PREREQ(2.50)
3 nmav 1.7 AC_INIT
4 nmav 1.1 dnl AC_CONFIG_HEADER(config.h)
5    
6     AC_PREFIX_DEFAULT(/usr/local)
7    
8 nmav 1.7 AC_CANONICAL_TARGET([])
9 nmav 1.30 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 nmav 1.1
13 nmav 1.31 AM_INIT_AUTOMAKE(mcrypt, 2.6.3)
14 nmav 1.7
15 nmav 1.1 AM_CONFIG_HEADER(config.h)
16    
17 nmav 1.8 AC_PROG_LIBTOOL
18 nmav 1.7 AC_PROG_CC
19 nmav 1.1
20 nmav 1.30
21 nmav 1.17 AM_PATH_LIBMCRYPT( 2.5.0,,
22 nmav 1.7 AC_MSG_ERROR([[*** libmcrypt was not found]])
23     )
24 nmav 1.1
25 nmav 1.27 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 nmav 1.32 AC_TRY_RUN([
30 nmav 1.27 #include <mhash.h>
31    
32     int main() {
33    
34     if (MHASH_API_VERSION >= 20020524)
35     exit(0);
36     else
37     exit(-1);
38 nmav 1.32 }
39     ],
40 nmav 1.27 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 nmav 1.32 ,
47     AC_MSG_RESULT(cross compiling)
48 nmav 1.27 )
49    
50    
51 nmav 1.30
52 nmav 1.1 dnl For GNU gettext
53 nmav 1.28 ALL_LINGUAS="el cs pl de es_AR"
54 nmav 1.33 AM_GNU_GETTEXT([external])
55 nmav 1.7
56 nmav 1.19 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 nmav 1.7
61 nmav 1.8 LIBS="${LIBS} ${LIBMCRYPT_LIBS}"
62 nmav 1.21 CFLAGS="${CFLAGS} ${LIBMCRYPT_CFLAGS} -Wall"
63 nmav 1.1
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 nmav 1.35
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 nmav 1.1
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 nmav 1.8 opt_static_link=no
96     AC_MSG_CHECKING([whether static link is requested])
97     AC_ARG_ENABLE(static-link,
98 nmav 1.23 [ --enable-static-link link mcrypt statically (libmcrypt must also be a static library))],
99 nmav 1.8 opt_static_link=$enableval)
100     AC_MSG_RESULT($opt_static_link)
101 nmav 1.1
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 nmav 1.30 AC_DEFINE(NO_GETPASS, 1, [whether getpass was requested])
118 nmav 1.1 fi
119    
120     case "${target}" in
121     *-openbsd*)
122     NAME_OF_DEV_RANDOM="/dev/srandom"
123     NAME_OF_DEV_URANDOM="/dev/urandom"
124     ;;
125 nmav 1.7 *-cygwin*)
126 nmav 1.30 AC_DEFINE(WIN32, 1, [win32])
127 nmav 1.7 NAME_OF_DEV_RANDOM=""
128     NAME_OF_DEV_URANDOM=""
129     ;;
130     *-mingw*)
131 nmav 1.30 AC_DEFINE(WIN32, 1, [win32])
132 nmav 1.7 NAME_OF_DEV_RANDOM=""
133     NAME_OF_DEV_URANDOM=""
134     ;;
135 nmav 1.1 *)
136     NAME_OF_DEV_RANDOM="/dev/random"
137     NAME_OF_DEV_URANDOM="/dev/urandom"
138     ;;
139     esac
140    
141 nmav 1.30 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 nmav 1.1
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 nmav 1.30 AC_DEFINE(HAVE_DEV_RANDOM, 1, [whether /dev/random exists])
151 nmav 1.1 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 nmav 1.7 if test $ac_cv_c_compiler_gnu = yes; then
163 nmav 1.1
164     if test $opt_maintainer_mode = yes; then
165 nmav 1.10 CFLAGS=" -Wall -Wpointer-arith -O0 -ggdb3"
166 nmav 1.1 fi
167     fi
168    
169 nmav 1.8 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 nmav 1.1
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 nmav 1.30 AC_CHECK_TYPE( off_t,
183     AC_DEFINE( HAVE_OFF_T, 1, [have off_t type]),,
184     )
185    
186 nmav 1.1 AC_HEADER_STDC
187     AC_CHECK_HEADERS(unistd.h pwd.h locale.h strings.h mcrypt.h ctype.h)
188     AC_CHECK_HEADERS(sys/stat.h sys/types.h fcntl.h sys/wait.h)
189     AC_CHECK_HEADERS(utime.h signal.h)
190     AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
191 nmav 1.31 AC_CHECK_FUNCS(bzero signal sigaction memset fsync siglongjmp strlcpy,,)
192     AC_CHECK_FUNCS(umask utime memmove bcopy getpwuid waitpid kill ftime,,)
193     AC_CHECK_FUNCS(lstat stat stat64 lstat64 fopen64 fseeko64 fseeko,,)
194 nmav 1.1
195    
196 nmav 1.34 AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile po/Makefile.in m4/Makefile ])
197 nmav 1.33 AC_CONFIG_COMMANDS([default],[[]],[[]])
198 nmav 1.7 AC_OUTPUT

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26