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

Contents of /libmcrypt/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.62 - (show annotations)
Sun Jun 22 20:02:39 2003 UTC (17 years, 8 months ago) by nmav
Branch: MAIN
CVS Tags: HEAD
Changes since 1.61: +1 -1 lines
- Corrected some bug in configure, which now works perfectly
  in solaris. Patch by Dustin Mitchell <dustin@ywlcs.org>

1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.50)
3 AC_INIT(lib/mcrypt.c)
4
5 LIBMCRYPT_MAJOR_VERSION=2
6 LIBMCRYPT_MINOR_VERSION=5
7 LIBMCRYPT_MICRO_VERSION=7
8 LIBMCRYPT_VERSION=$LIBMCRYPT_MAJOR_VERSION.$LIBMCRYPT_MINOR_VERSION.$LIBMCRYPT_MICRO_VERSION
9
10 LIBMCRYPT_MOST_RECENT_INTERFACE=8
11 LIBMCRYPT_CURRENT_INTERFACE_IMPLEMENTATION_NUMBER=$LIBMCRYPT_MICRO_VERSION
12 LIBMCRYPT_OLDEST_INTERFACE=4
13
14 AC_CANONICAL_SYSTEM
15 AM_INIT_AUTOMAKE(libmcrypt, $LIBMCRYPT_VERSION)
16 AM_CONFIG_HEADER(config.h)
17
18 dnl AM_MAINTAINER_MODE
19
20 AC_PROG_MAKE_SET
21
22 AC_PROG_CC
23
24 case "$host_os" in
25 *w32*)
26 LDFLAGS="$LDFLAGS -no-undefined"
27 AC_DEFINE( WIN32, 1, [whether win32 environment])
28 ;;
29 *win32*)
30 LDFLAGS="$LDFLAGS -no-undefined"
31 AC_DEFINE( WIN32, 1, [whether win32 environment])
32 ;;
33 cygwin*)
34 LDFLAGS="$LDFLAGS -no-undefined"
35 AC_DEFINE( WIN32, 1, [whether win32 environment])
36 ;;
37 esac
38
39 dnl Checks for programs.
40 AC_PROG_INSTALL
41 AC_PROG_LN_S
42
43
44 opt_maintainer_mode=no
45 AC_MSG_CHECKING([whether in maintanance mode])
46 AC_ARG_ENABLE(maintainer-mode,
47 [ --enable-maintainer-mode enable maintainer mode],
48 opt_maintainer_mode=$enableval)
49 AC_MSG_RESULT($opt_maintainer_mode)
50
51 opt_dmalloc_mode=no
52 AC_MSG_CHECKING([whether in dmalloc mode])
53 AC_ARG_ENABLE(dmalloc-mode,
54 [ --enable-dmalloc-mode enable dmalloc mode],
55 opt_dmalloc_mode=$enableval)
56 AC_MSG_RESULT($opt_dmalloc_mode)
57
58
59 if test x$ac_cv_prog_gcc = xyes; then
60 if test x$opt_maintainer_mode = xyes; then
61 CFLAGS=" -ggdb3 -O2 -Wall -Wpointer-arith"
62 fi
63
64 if test x$opt_dmalloc_mode = xyes; then
65 AC_CHECK_LIB( dmalloc, main)
66 AC_DEFINE(USE_DMALLOC, 1, [dmalloc])
67 fi
68 fi
69
70 opt_enable_ltdl=no
71 AC_MSG_CHECKING([whether to enable dynamic module loading])
72 AC_ARG_ENABLE(dynamic-loading,
73 [ --enable-dynamic-loading enable dynamic module loading],
74 opt_enable_ltdl=$enableval)
75 AC_MSG_RESULT($opt_enable_ltdl)
76
77 MCRYPT_MODE_MODULES="cbc cfb ctr ecb ncfb nofb ofb stream"
78 MCRYPT_ALGORITHM_MODULES="threeway cast-128 gost rijndael-128 safer-sk64 twofish \
79 arcfour cast-256 loki97 rijndael-192 saferplus wake \
80 blowfish-compat des rijndael-256 serpent xtea \
81 blowfish enigma rc2 safer-sk128 tripledes"
82
83
84 if test "x$opt_enable_ltdl" != xno; then
85 touch lib/mcrypt_internal.h
86
87 AC_CHECK_LIB( ltdl, lt_dlmutex_register, AC_DEFINE(DLMUTEX, 1, [dlmutex]))
88
89 dnl AC_LIBLTDL_CONVENIENCE
90 AC_LIBLTDL_INSTALLABLE
91 AC_SUBST(INCLTDL)
92 AC_SUBST(LIBLTDL)
93 LIBLTDL_DIR=libltdl
94 AC_SUBST(LIBLTDL_DIR)
95
96 AC_CONFIG_SUBDIRS(libltdl)
97 AC_DISABLE_STATIC
98
99 AC_DEFINE(USE_LTDL, 1, [use libltdl])
100
101 if test x$LIBLTDL = x; then
102 :
103 else
104 LTLIBS="-lltdl"
105 fi
106 opt_include_algos=no
107
108 # create the names of the .la libraries to install
109 for i in $MCRYPT_ALGORITHM_MODULES
110 do \
111 INSTALL_ALGORITHM_MODULES="$INSTALL_ALGORITHM_MODULES $i.la"
112 done
113
114 for i in $MCRYPT_MODE_MODULES
115 do \
116 INSTALL_MODE_MODULES="$INSTALL_MODE_MODULES $i.la"
117 done
118
119 AC_SUBST(INSTALL_ALGORITHM_MODULES)
120 AC_SUBST(INSTALL_MODE_MODULES)
121
122 else
123 for i in $MCRYPT_ALGORITHM_MODULES
124 do \
125 NOINSTALL_ALGORITHM_MODULES="$NOINSTALL_ALGORITHM_MODULES $i.la"
126 done
127
128 for i in $MCRYPT_MODE_MODULES
129 do \
130 NOINSTALL_MODE_MODULES="$NOINSTALL_MODE_MODULES $i.la"
131 done
132
133 AC_SUBST(NOINSTALL_ALGORITHM_MODULES)
134 AC_SUBST(NOINSTALL_MODE_MODULES)
135
136 opt_include_algos="$MCRYPT_MODE_MODULES $MCRYPT_ALGORITHM_MODULES"
137 echo "***"
138 echo "*** Dynamic loading has been disabled"
139 fi
140
141 AC_MSG_CHECKING([which algorithms to include into library])
142 AC_ARG_WITH(included-algos,
143 [ --with-included-algos=algo1,algo2,... include algorithms/modes into the library],
144 touch lib/mcrypt_internal.h
145 opt_include_algos=$withval)
146
147 if test "x$opt_include_algos" = xyes; then
148 opt_include_algos=""
149 fi
150 if test "x$opt_include_algos" = xno; then
151 opt_include_algos=""
152 fi
153
154
155 EXTRA_OBJECTS=""
156 ALG=`echo $opt_include_algos|sed "s/,/ /g"|sed "s/\n/ /g"`
157 for i in $ALG
158 do \
159 f=$i ;
160 if test x$f = xthreeway; then f=3-way;
161 elif test x$f = xsafer-sk64; then f=safer64;
162 elif test x$f = xsafer-sk128; then f=safer128; fi;
163 test -f modules/algorithms/$f.c && EXTRA_OBJECTS="$EXTRA_OBJECTS ../modules/algorithms/$f.lo"
164 test -f modules/modes/$i.c && EXTRA_OBJECTS="$EXTRA_OBJECTS ../modules/modes/$i.lo"
165 done
166
167 AC_MSG_RESULT($opt_include_algos)
168
169
170 EXTRA_ALGOS=$ALG
171 AC_SUBST(EXTRA_ALGOS)
172 AC_SUBST(EXTRA_OBJECTS)
173
174 AC_SUBST(LIBMCRYPT_MAJOR_VERSION)
175 AC_SUBST(LIBMCRYPT_MINOR_VERSION)
176 AC_SUBST(LIBMCRYPT_MICRO_VERSION)
177 AC_SUBST(LIBMCRYPT_VERSION)
178
179 AC_SUBST(LIBMCRYPT_MOST_RECENT_INTERFACE)
180 AC_SUBST(LIBMCRYPT_CURRENT_INTERFACE_IMPLEMENTATION_NUMBER)
181 AC_SUBST(LIBMCRYPT_OLDEST_INTERFACE)
182
183 LT_CURRENT=$LIBMCRYPT_MOST_RECENT_INTERFACE
184 LT_REVISION=$LIBMCRYPT_CURRENT_INTERFACE_IMPLEMENTATION_NUMBER
185 LT_AGE=`expr $LIBMCRYPT_MOST_RECENT_INTERFACE - $LIBMCRYPT_OLDEST_INTERFACE`
186 AC_SUBST(LT_CURRENT)
187 AC_SUBST(LT_REVISION)
188 AC_SUBST(LT_AGE)
189
190 AC_HEADER_STDC
191 AC_C_INLINE
192 AC_C_CONST
193
194 AC_CHECK_HEADERS(unistd.h strings.h dlfcn.h sys/endian.h)
195 AC_CHECK_HEADERS(sys/types.h sys/mman.h dirent.h byteswap.h endian.h)
196 AC_CHECK_HEADERS(limits.h)
197 AC_CHECK_FUNCS(bzero memset mlock readdir_r readdir,,)
198 AC_CHECK_FUNCS(memmove bcopy,,)
199
200 dnl Checks for libraries.
201 AC_C_BIGENDIAN
202 AC_CHECK_SIZEOF(unsigned long int, 4)
203 AC_CHECK_SIZEOF(unsigned int, 4)
204 AC_CHECK_SIZEOF(unsigned short int, 2)
205 AC_CHECK_SIZEOF(unsigned char, 1)
206
207 AC_LIBTOOL_DLOPEN
208 AC_LIBTOOL_WIN32_DLL
209
210
211
212 AM_PROG_LIBTOOL
213 AC_SUBST(LIBTOOL_DEPS)
214
215
216 LIBMCRYPT_LIBS="$LIBS -L${libdir} -lmcrypt $LTLIBS"
217 LIBMCRYPT_CFLAGS="-I${includedir}"
218 AC_SUBST(LIBMCRYPT_LIBS)
219 AC_SUBST(LIBMCRYPT_CFLAGS)
220
221 AC_OUTPUT_COMMANDS([
222 chmod +x lib/libmcrypt-config
223 ])
224
225 AC_OUTPUT([Makefile libmcrypt.spec lib/Makefile doc/Makefile src/Makefile modules/Makefile modules/modes/Makefile modules/algorithms/Makefile lib/mcrypt.h lib/libmcrypt-config])

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26