1 | AC_INIT(rdesktop, 1.7.0)
|
---|
2 |
|
---|
3 | AC_CONFIG_SRCDIR([rdesktop.c])
|
---|
4 |
|
---|
5 | AC_PROG_CC
|
---|
6 | if test "$GCC" = yes; then
|
---|
7 | CFLAGS="$CFLAGS -Wall"
|
---|
8 | fi
|
---|
9 | AC_PROG_CXX
|
---|
10 |
|
---|
11 | AC_PROG_INSTALL
|
---|
12 | AC_LANG_C
|
---|
13 | AC_HEADER_STDC
|
---|
14 | AC_C_BIGENDIAN([AC_DEFINE(B_ENDIAN)], [AC_DEFINE(L_ENDIAN)])
|
---|
15 | AC_PATH_XTRA
|
---|
16 | if test "$no_x" = "yes"; then
|
---|
17 | echo
|
---|
18 | echo "ERROR: Could not find X Window System headers/libraries."
|
---|
19 | if test -f /etc/debian_version; then
|
---|
20 | echo "Probably you need to install the libx11-dev package."
|
---|
21 | elif test -f /etc/redhat-release; then
|
---|
22 | echo "Probably you need to install the libX11-devel package."
|
---|
23 | fi
|
---|
24 | echo "To specify paths manually, use the options --x-includes and --x-libraries."
|
---|
25 | echo
|
---|
26 | exit 1
|
---|
27 | fi
|
---|
28 |
|
---|
29 | AC_PATH_PROG(PKG_CONFIG, pkg-config)
|
---|
30 |
|
---|
31 | AC_SEARCH_LIBS(socket, socket)
|
---|
32 | AC_SEARCH_LIBS(inet_aton, resolv)
|
---|
33 | AC_SEARCH_LIBS(clock_gettime, rt)
|
---|
34 |
|
---|
35 | AC_CHECK_HEADER(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H))
|
---|
36 | AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H))
|
---|
37 | AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H))
|
---|
38 | AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H))
|
---|
39 | AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H))
|
---|
40 | AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H))
|
---|
41 | AC_CHECK_HEADER(sysexits.h, AC_DEFINE(HAVE_SYSEXITS_H))
|
---|
42 |
|
---|
43 | AC_CHECK_TOOL(STRIP, strip, :)
|
---|
44 |
|
---|
45 | dnl Don't depend on pkg-config
|
---|
46 | m4_ifdef([PKG_CHECK_MODULES], [], [
|
---|
47 | m4_errprint([warning: pkg-config checks are not available])
|
---|
48 | m4_defun([PKG_CHECK_MODULES], [
|
---|
49 | AC_MSG_WARN([pkg-config not available, cannot check for $2])
|
---|
50 | $4
|
---|
51 | ])
|
---|
52 | ])
|
---|
53 |
|
---|
54 | rpath=""
|
---|
55 |
|
---|
56 | #
|
---|
57 | # OpenSSL detection borrowed from stunnel
|
---|
58 | #
|
---|
59 | checkssldir() { :
|
---|
60 | if test -f "$1/include/openssl/ssl.h"; then
|
---|
61 | ssldir="$1"
|
---|
62 | return 0
|
---|
63 | fi
|
---|
64 | return 1
|
---|
65 | }
|
---|
66 | AC_MSG_CHECKING([for OpenSSL directory])
|
---|
67 | AC_ARG_WITH(openssl,
|
---|
68 | [ --with-openssl=DIR look for OpenSSL at DIR/include, DIR/lib],
|
---|
69 | [
|
---|
70 | dnl Check the specified location only
|
---|
71 | checkssldir "$withval"
|
---|
72 | ],
|
---|
73 | [
|
---|
74 | dnl Search default locations of OpenSSL library
|
---|
75 | for maindir in /usr/local /usr/lib /usr/pkg /usr /var/ssl /opt; do
|
---|
76 | for dir in $maindir $maindir/openssl $maindir/ssl; do
|
---|
77 | checkssldir $dir && break 2
|
---|
78 | done
|
---|
79 | done
|
---|
80 | ]
|
---|
81 | )
|
---|
82 | if test -z "$ssldir"; then
|
---|
83 | AC_MSG_RESULT([Not found])
|
---|
84 | echo
|
---|
85 | echo "ERROR: Could not find OpenSSL headers/libraries."
|
---|
86 | if test -f /etc/debian_version; then
|
---|
87 | echo "Probably you need to install the libssl-dev package."
|
---|
88 | elif test -f /etc/redhat-release; then
|
---|
89 | echo "Probably you need to install the openssl-devel package."
|
---|
90 | fi
|
---|
91 | echo "To specify a path manually, use the --with-openssl option."
|
---|
92 | echo
|
---|
93 | exit 1
|
---|
94 | fi
|
---|
95 | AC_MSG_RESULT([$ssldir])
|
---|
96 | AC_SUBST(ssldir)
|
---|
97 | AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
|
---|
98 |
|
---|
99 | dnl Add OpenSSL includes and libraries
|
---|
100 | CFLAGS="$CFLAGS -I$ssldir/include"
|
---|
101 | AC_ARG_ENABLE(static-openssl,
|
---|
102 | [ --enable-static-openssl link OpenSSL statically],
|
---|
103 | [
|
---|
104 | LIBS="$LIBS $ssldir/lib/libcrypto.a"
|
---|
105 | ],
|
---|
106 | [
|
---|
107 | LIBS="$LIBS -L$ssldir/lib -lcrypto"
|
---|
108 | rpath="$rpath:$ssldir/lib"
|
---|
109 | ])
|
---|
110 | # xrandr
|
---|
111 | if test -n "$PKG_CONFIG"; then
|
---|
112 | PKG_CHECK_MODULES(XRANDR, xrandr, [HAVE_XRANDR=1], [HAVE_XRANDR=0])
|
---|
113 | fi
|
---|
114 | if test x"$HAVE_XRANDR" = "x1"; then
|
---|
115 | CFLAGS="$CFLAGS $XRANDR_CFLAGS"
|
---|
116 | LIBS="$LIBS $XRANDR_LIBS"
|
---|
117 | AC_DEFINE(HAVE_XRANDR)
|
---|
118 | fi
|
---|
119 |
|
---|
120 | AC_ARG_ENABLE(smartcard,
|
---|
121 | [ --enable-smartcard Enables smart-card support.
|
---|
122 | ],
|
---|
123 | [
|
---|
124 | case "$OSTYPE" in
|
---|
125 | darwin*)
|
---|
126 | AC_CHECK_HEADER(PCSC/pcsclite.h, [WITH_SCARD=1], [WITH_SCARD=0])
|
---|
127 | PCSCLITE_CFLAGS=""
|
---|
128 | PCSCLITE_LIBS="-framework PCSC"
|
---|
129 | ;;
|
---|
130 | *)
|
---|
131 | if test -n "$PKG_CONFIG"; then
|
---|
132 | PKG_CHECK_MODULES(PCSCLITE, libpcsclite, [WITH_SCARD=1], [WITH_SCARD=0])
|
---|
133 | fi
|
---|
134 | ;;
|
---|
135 | esac
|
---|
136 |
|
---|
137 | if test x"$WITH_SCARD" = "x1"; then
|
---|
138 | SCARDOBJ="scard.o"
|
---|
139 | CFLAGS="$CFLAGS $PCSCLITE_CFLAGS"
|
---|
140 | LIBS="$LIBS $PCSCLITE_LIBS"
|
---|
141 | AC_DEFINE(WITH_SCARD)
|
---|
142 | fi
|
---|
143 |
|
---|
144 | AC_MSG_CHECKING([for old version of PCSC])
|
---|
145 | AC_TRY_LINK([
|
---|
146 | #include <stdlib.h>
|
---|
147 | #ifdef __APPLE__
|
---|
148 | #include <PCSC/wintypes.h>
|
---|
149 | #include <PCSC/winscard.h>
|
---|
150 | #else
|
---|
151 | #include <winscard.h>
|
---|
152 | #endif
|
---|
153 | ],
|
---|
154 | [SCardControl(NULL, NULL, 0, NULL, NULL);],
|
---|
155 | [AC_MSG_RESULT(yes) AC_DEFINE(WITH_PCSC120, 1, [old version of PCSC])],
|
---|
156 | [AC_MSG_RESULT(no)]
|
---|
157 | )
|
---|
158 | ])
|
---|
159 |
|
---|
160 | AC_SUBST(SCARDOBJ)
|
---|
161 |
|
---|
162 | #
|
---|
163 | # Alignment
|
---|
164 | #
|
---|
165 | AC_MSG_CHECKING([if architecture needs alignment])
|
---|
166 | AC_TRY_RUN([
|
---|
167 | #include <stdlib.h>
|
---|
168 | #include <signal.h>
|
---|
169 | int main(int argc, char **argv)
|
---|
170 | {
|
---|
171 | unsigned char test[8] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 };
|
---|
172 | signal(SIGBUS, exit);
|
---|
173 | signal(SIGABRT, exit);
|
---|
174 | signal(SIGSEGV, exit);
|
---|
175 | if (*((unsigned int *)(test + 1)) != 0x55443322 && *((unsigned int *)(test + 1)) != 0x22334455) {
|
---|
176 | return 1;
|
---|
177 | }
|
---|
178 | return 0;
|
---|
179 | }],
|
---|
180 | [AC_MSG_RESULT(no)],
|
---|
181 | [AC_MSG_RESULT(yes)
|
---|
182 | AC_DEFINE(NEED_ALIGN)],
|
---|
183 | [AC_MSG_RESULT(assuming yes)
|
---|
184 | AC_DEFINE(NEED_ALIGN)])
|
---|
185 |
|
---|
186 | #
|
---|
187 | # linux/compiler.h
|
---|
188 | #
|
---|
189 | AC_MSG_CHECKING([if linux/compiler.h is required])
|
---|
190 | AC_TRY_COMPILE([
|
---|
191 | #include <linux/compiler.h>
|
---|
192 | ],[],
|
---|
193 | [AC_MSG_RESULT(yes)
|
---|
194 | AC_DEFINE(VBOX_WITH_LINUX_COMPILER_H)],
|
---|
195 | [AC_MSG_RESULT(no)])
|
---|
196 |
|
---|
197 |
|
---|
198 | #
|
---|
199 | # EGD
|
---|
200 | #
|
---|
201 | AC_ARG_WITH(egd-socket,
|
---|
202 | [ --with-egd-socket=PATH look for Entropy Gathering Daemon socket at PATH],
|
---|
203 | [EGD_SOCKET="$withval"],
|
---|
204 | [EGD_SOCKET="/var/run/egd-pool"]
|
---|
205 | )
|
---|
206 | AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
|
---|
207 |
|
---|
208 |
|
---|
209 | #
|
---|
210 | # rdp2vnc
|
---|
211 | #
|
---|
212 | vncserverconfig=libvncserver-config
|
---|
213 | AC_ARG_WITH(libvncserver-config,
|
---|
214 | [ --with-libvncserver-config=CMD use CMD as libvncserver-config],
|
---|
215 | [vncserverconfig="$withval"]
|
---|
216 | )
|
---|
217 | AC_ARG_WITH(libvncserver,
|
---|
218 | [ --with-libvncserver make rdp2vnc],
|
---|
219 | [
|
---|
220 | VNCINC=`$vncserverconfig --cflags`
|
---|
221 | AC_SUBST(VNCINC)
|
---|
222 | LDVNC=`$vncserverconfig --libs`
|
---|
223 | AC_SUBST(LDVNC)
|
---|
224 | VNCLINK=`$vncserverconfig --link`
|
---|
225 | AC_SUBST(VNCLINK)
|
---|
226 | RDP2VNCTARGET="rdp2vnc"
|
---|
227 | AC_SUBST(RDP2VNCTARGET)
|
---|
228 | ]
|
---|
229 | )
|
---|
230 |
|
---|
231 | #
|
---|
232 | # sound
|
---|
233 | #
|
---|
234 |
|
---|
235 | sound="yes"
|
---|
236 | AC_ARG_WITH(sound,
|
---|
237 | [ --with-sound select sound system ("oss", "sgi", "sun", "alsa" or "libao") ],
|
---|
238 | [
|
---|
239 | sound="$withval"
|
---|
240 | ])
|
---|
241 |
|
---|
242 | AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=1], [HAVE_OSS=0])
|
---|
243 | AC_CHECK_HEADER(dmedia/audio.h, [HAVE_SGI=1], [HAVE_SGI=0])
|
---|
244 | AC_CHECK_HEADER(sys/audioio.h, [HAVE_SUN=1], [HAVE_SUN=0])
|
---|
245 |
|
---|
246 | AC_ARG_ENABLE(static-libsamplerate,
|
---|
247 | [ --enable-static-libsamplerate link libsamplerate statically],
|
---|
248 | [static_libsamplerate=yes],
|
---|
249 | [static_libsamplerate=no])
|
---|
250 |
|
---|
251 | if test -n "$PKG_CONFIG"; then
|
---|
252 | PKG_CHECK_MODULES(LIBAO, ao, [HAVE_LIBAO=1], [HAVE_LIBAO=0])
|
---|
253 | PKG_CHECK_MODULES(ALSA, alsa, [HAVE_ALSA=1], [HAVE_ALSA=0])
|
---|
254 | PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], [HAVE_LIBSAMPLERATE=0])
|
---|
255 | if test x"$HAVE_LIBSAMPLERATE" = "x1"; then
|
---|
256 | AC_DEFINE(HAVE_LIBSAMPLERATE)
|
---|
257 | if test x"$static_libsamplerate" = "xyes"; then
|
---|
258 | _libsamplerate_libdir=`$PKG_CONFIG --errors-to-stdout --variable=libdir samplerate`
|
---|
259 | LIBSAMPLERATE_LIBS="$_libsamplerate_libdir""/libsamplerate.a"
|
---|
260 | fi
|
---|
261 | LIBSAMPLERATE_LIBS="$LIBSAMPLERATE_LIBS -lm"
|
---|
262 | fi
|
---|
263 | fi
|
---|
264 |
|
---|
265 | if test "$sound" != "no"; then
|
---|
266 | SOUNDOBJ="$SOUNDOBJ rdpsnd.o rdpsnd_dsp.o"
|
---|
267 | CFLAGS="$CFLAGS $LIBSAMPLERATE_CFLAGS"
|
---|
268 | LIBS="$LIBS $LIBSAMPLERATE_LIBS"
|
---|
269 | AC_DEFINE(WITH_RDPSND)
|
---|
270 | fi
|
---|
271 |
|
---|
272 | case $sound in
|
---|
273 | yes)
|
---|
274 | if test x"$HAVE_OSS" = "x1"; then
|
---|
275 | SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o"
|
---|
276 | AC_DEFINE(RDPSND_OSS)
|
---|
277 | fi
|
---|
278 |
|
---|
279 | if test x"$HAVE_SGI" = "x1"; then
|
---|
280 | SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o"
|
---|
281 | LIBS="$LIBS -laudio"
|
---|
282 | AC_DEFINE(RDPSND_SGI)
|
---|
283 | fi
|
---|
284 |
|
---|
285 | if test x"$HAVE_SUN" = "x1"; then
|
---|
286 | SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o"
|
---|
287 | AC_DEFINE(RDPSND_SUN)
|
---|
288 | fi
|
---|
289 |
|
---|
290 | if test x"$HAVE_ALSA" = "x1"; then
|
---|
291 | SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o"
|
---|
292 | CFLAGS="$CFLAGS $ALSA_CFLAGS"
|
---|
293 | LIBS="$LIBS $ALSA_LIBS"
|
---|
294 | AC_DEFINE(RDPSND_ALSA)
|
---|
295 | fi
|
---|
296 |
|
---|
297 | if test x"$HAVE_LIBAO" = "x1"; then
|
---|
298 | SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o"
|
---|
299 | CFLAGS="$CFLAGS $LIBAO_CFLAGS"
|
---|
300 | LIBS="$LIBS $LIBAO_LIBS"
|
---|
301 | AC_DEFINE(RDPSND_LIBAO)
|
---|
302 | fi
|
---|
303 |
|
---|
304 | ;;
|
---|
305 |
|
---|
306 | oss)
|
---|
307 | if test x"$HAVE_OSS" = "x1"; then
|
---|
308 | SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o"
|
---|
309 | AC_DEFINE(RDPSND_OSS)
|
---|
310 | else
|
---|
311 | AC_MSG_ERROR([Selected sound system is not available.])
|
---|
312 | fi
|
---|
313 | ;;
|
---|
314 |
|
---|
315 | sgi)
|
---|
316 | if test x"$HAVE_SGI" = "x1"; then
|
---|
317 | SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o"
|
---|
318 | LIBS="$LIBS -laudio"
|
---|
319 | AC_DEFINE(RDPSND_SGI)
|
---|
320 | else
|
---|
321 | AC_MSG_ERROR([Selected sound system is not available.])
|
---|
322 | fi
|
---|
323 | ;;
|
---|
324 |
|
---|
325 | sun)
|
---|
326 | if test x"$HAVE_SUN" = "x1"; then
|
---|
327 | SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o"
|
---|
328 | AC_DEFINE(RDPSND_SUN)
|
---|
329 | else
|
---|
330 | AC_MSG_ERROR([Selected sound system is not available.])
|
---|
331 | fi
|
---|
332 | ;;
|
---|
333 |
|
---|
334 | alsa)
|
---|
335 | if test x"$HAVE_ALSA" = "x1"; then
|
---|
336 | SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o"
|
---|
337 | CFLAGS="$CFLAGS $ALSA_CFLAGS"
|
---|
338 | LIBS="$LIBS $ALSA_LIBS"
|
---|
339 | AC_DEFINE(RDPSND_ALSA)
|
---|
340 | else
|
---|
341 | AC_MSG_ERROR([Selected sound system is not available.])
|
---|
342 | fi
|
---|
343 | ;;
|
---|
344 |
|
---|
345 | libao)
|
---|
346 | if test x"$HAVE_LIBAO" = "x1"; then
|
---|
347 | SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o"
|
---|
348 | CFLAGS="$CFLAGS $LIBAO_CFLAGS"
|
---|
349 | LIBS="$LIBS $LIBAO_LIBS"
|
---|
350 | AC_DEFINE(RDPSND_LIBAO)
|
---|
351 | else
|
---|
352 | AC_MSG_ERROR([Selected sound system is not available.])
|
---|
353 | fi
|
---|
354 | ;;
|
---|
355 |
|
---|
356 | no)
|
---|
357 | ;;
|
---|
358 |
|
---|
359 | *)
|
---|
360 | AC_MSG_WARN([sound support disabled])
|
---|
361 | AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao])
|
---|
362 | ;;
|
---|
363 | esac
|
---|
364 |
|
---|
365 | AC_SUBST(SOUNDOBJ)
|
---|
366 |
|
---|
367 | #
|
---|
368 | # dirfd
|
---|
369 | #
|
---|
370 | dnl Find out how to get the file descriptor associated with an open DIR*.
|
---|
371 | dnl From Jim Meyering
|
---|
372 |
|
---|
373 | AC_DEFUN([UTILS_FUNC_DIRFD],
|
---|
374 | [
|
---|
375 |
|
---|
376 | AC_HEADER_DIRENT
|
---|
377 | dirfd_headers='
|
---|
378 | #if HAVE_DIRENT_H
|
---|
379 | # include <dirent.h>
|
---|
380 | #else /* not HAVE_DIRENT_H */
|
---|
381 | # define dirent direct
|
---|
382 | # if HAVE_SYS_NDIR_H
|
---|
383 | # include <sys/ndir.h>
|
---|
384 | # endif /* HAVE_SYS_NDIR_H */
|
---|
385 | # if HAVE_SYS_DIR_H
|
---|
386 | # include <sys/dir.h>
|
---|
387 | # endif /* HAVE_SYS_DIR_H */
|
---|
388 | # if HAVE_NDIR_H
|
---|
389 | # include <ndir.h>
|
---|
390 | # endif /* HAVE_NDIR_H */
|
---|
391 | #endif /* HAVE_DIRENT_H */
|
---|
392 | '
|
---|
393 | AC_CHECK_FUNCS(dirfd)
|
---|
394 | AC_CHECK_DECLS([dirfd], , , $dirfd_headers)
|
---|
395 |
|
---|
396 | AC_CACHE_CHECK([whether dirfd is a macro],
|
---|
397 | jm_cv_func_dirfd_macro,
|
---|
398 | [AC_EGREP_CPP([dirent_header_defines_dirfd], [$dirfd_headers
|
---|
399 | #ifdef dirfd
|
---|
400 | dirent_header_defines_dirfd
|
---|
401 | #endif],
|
---|
402 | jm_cv_func_dirfd_macro=yes,
|
---|
403 | jm_cv_func_dirfd_macro=no)])
|
---|
404 |
|
---|
405 | # Use the replacement only if we have no function, macro,
|
---|
406 | # or declaration with that name.
|
---|
407 | if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$jm_cv_func_dirfd_macro \
|
---|
408 | = no,no,no; then
|
---|
409 | AC_REPLACE_FUNCS([dirfd])
|
---|
410 | AC_CACHE_CHECK(
|
---|
411 | [how to get the file descriptor associated with an open DIR*],
|
---|
412 | gl_cv_sys_dir_fd_member_name,
|
---|
413 | [
|
---|
414 | dirfd_save_CFLAGS=$CFLAGS
|
---|
415 | for ac_expr in d_fd dd_fd; do
|
---|
416 |
|
---|
417 | CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
|
---|
418 | AC_TRY_COMPILE(
|
---|
419 | [$dirfd_headers
|
---|
420 | ],
|
---|
421 | [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;],
|
---|
422 | dir_fd_found=yes
|
---|
423 | )
|
---|
424 | CFLAGS=$dirfd_save_CFLAGS
|
---|
425 | test "$dir_fd_found" = yes && break
|
---|
426 | done
|
---|
427 | test "$dir_fd_found" = yes || ac_expr=no_such_member
|
---|
428 |
|
---|
429 | gl_cv_sys_dir_fd_member_name=$ac_expr
|
---|
430 | ]
|
---|
431 | )
|
---|
432 | if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
|
---|
433 | AC_DEFINE_UNQUOTED(DIR_FD_MEMBER_NAME,
|
---|
434 | $gl_cv_sys_dir_fd_member_name,
|
---|
435 | [the name of the file descriptor member of DIR])
|
---|
436 | fi
|
---|
437 | AH_VERBATIM(DIR_TO_FD,
|
---|
438 | [#ifdef DIR_FD_MEMBER_NAME
|
---|
439 | # define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
|
---|
440 | #else
|
---|
441 | # define DIR_TO_FD(Dir_p) -1
|
---|
442 | #endif
|
---|
443 | ]
|
---|
444 | )
|
---|
445 | fi
|
---|
446 | ])
|
---|
447 |
|
---|
448 | UTILS_FUNC_DIRFD
|
---|
449 |
|
---|
450 | #
|
---|
451 | # iconv
|
---|
452 | #
|
---|
453 |
|
---|
454 | dnl This macros shamelessly stolen from
|
---|
455 | dnl http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html.
|
---|
456 | dnl Written by Bruno Haible.
|
---|
457 |
|
---|
458 | AC_DEFUN([UTILS_FUNC_ICONV],
|
---|
459 | [
|
---|
460 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
---|
461 | dnl those with the standalone portable GNU libiconv installed).
|
---|
462 |
|
---|
463 | AC_ARG_WITH([libiconv-prefix],
|
---|
464 | [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
---|
465 | for dir in `echo "$withval" | tr : ' '`; do
|
---|
466 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
---|
467 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
---|
468 | done
|
---|
469 | ])
|
---|
470 | AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))
|
---|
471 |
|
---|
472 | AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
---|
473 | am_cv_func_iconv="no, consider installing GNU libiconv"
|
---|
474 | am_cv_lib_iconv=no
|
---|
475 | AC_TRY_LINK([#include <stdlib.h>
|
---|
476 | #include <iconv.h>],
|
---|
477 | [iconv_t cd = iconv_open("","");
|
---|
478 | iconv(cd,NULL,NULL,NULL,NULL);
|
---|
479 | iconv_close(cd);],
|
---|
480 | am_cv_func_iconv=yes)
|
---|
481 | if test "$am_cv_func_iconv" != yes; then
|
---|
482 | am_save_LIBS="$LIBS"
|
---|
483 | LIBS="$LIBS -liconv"
|
---|
484 | AC_TRY_LINK([#include <stdlib.h>
|
---|
485 | #include <iconv.h>],
|
---|
486 | [iconv_t cd = iconv_open("","");
|
---|
487 | iconv(cd,NULL,NULL,NULL,NULL);
|
---|
488 | iconv_close(cd);],
|
---|
489 | am_cv_lib_iconv=yes
|
---|
490 | am_cv_func_iconv=yes)
|
---|
491 | LIBS="$am_save_LIBS"
|
---|
492 | fi
|
---|
493 | ])
|
---|
494 | if test "$am_cv_func_iconv" = yes; then
|
---|
495 | AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
---|
496 | AC_MSG_CHECKING([for iconv declaration])
|
---|
497 | AC_CACHE_VAL(am_cv_proto_iconv, [
|
---|
498 | AC_TRY_COMPILE([
|
---|
499 | #include <stdlib.h>
|
---|
500 | #include <iconv.h>
|
---|
501 | extern
|
---|
502 | #ifdef __cplusplus
|
---|
503 | "C"
|
---|
504 | #endif
|
---|
505 | #if defined(__STDC__) || defined(__cplusplus)
|
---|
506 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
---|
507 | #else
|
---|
508 | size_t iconv();
|
---|
509 | #endif
|
---|
510 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
---|
511 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
---|
512 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
---|
513 | AC_MSG_RESULT([$]{ac_t:-
|
---|
514 | }[$]am_cv_proto_iconv)
|
---|
515 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
---|
516 | [Define as const if the declaration of iconv() needs const.])
|
---|
517 | fi
|
---|
518 | LIBICONV=
|
---|
519 | if test "$am_cv_lib_iconv" = yes; then
|
---|
520 | LIBICONV="-liconv"
|
---|
521 | fi
|
---|
522 | AC_SUBST(LIBICONV)
|
---|
523 | ])
|
---|
524 |
|
---|
525 | UTILS_FUNC_ICONV
|
---|
526 | LIBS="$LIBS $LIBICONV"
|
---|
527 |
|
---|
528 | #
|
---|
529 | # socklen_t
|
---|
530 | # from curl
|
---|
531 |
|
---|
532 | dnl Check for socklen_t: historically on BSD it is an int, and in
|
---|
533 | dnl POSIX 1g it is a type of its own, but some platforms use different
|
---|
534 | dnl types for the argument to getsockopt, getpeername, etc. So we
|
---|
535 | dnl have to test to find something that will work.
|
---|
536 | AC_DEFUN([TYPE_SOCKLEN_T],
|
---|
537 | [
|
---|
538 | AC_CHECK_TYPE([socklen_t], ,[
|
---|
539 | AC_MSG_CHECKING([for socklen_t equivalent])
|
---|
540 | AC_CACHE_VAL([socklen_t_cv_equiv],
|
---|
541 | [
|
---|
542 | # Systems have either "struct sockaddr *" or
|
---|
543 | # "void *" as the second argument to getpeername
|
---|
544 | socklen_t_cv_equiv=
|
---|
545 | for arg2 in "struct sockaddr" void; do
|
---|
546 | for t in int size_t unsigned long "unsigned long"; do
|
---|
547 | AC_TRY_COMPILE([
|
---|
548 | #include <sys/types.h>
|
---|
549 | #include <sys/socket.h>
|
---|
550 |
|
---|
551 | int getpeername (int, $arg2 *, $t *);
|
---|
552 | ],[
|
---|
553 | $t len;
|
---|
554 | getpeername(0,0,&len);
|
---|
555 | ],[
|
---|
556 | socklen_t_cv_equiv="$t"
|
---|
557 | break
|
---|
558 | ])
|
---|
559 | done
|
---|
560 | done
|
---|
561 |
|
---|
562 | if test "x$socklen_t_cv_equiv" = x; then
|
---|
563 | AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
|
---|
564 | fi
|
---|
565 | ])
|
---|
566 | AC_MSG_RESULT($socklen_t_cv_equiv)
|
---|
567 | AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_cv_equiv,
|
---|
568 | [type to use in place of socklen_t if not defined])],
|
---|
569 | [#include <sys/types.h>
|
---|
570 | #include <sys/socket.h>])
|
---|
571 | ])
|
---|
572 |
|
---|
573 | TYPE_SOCKLEN_T
|
---|
574 |
|
---|
575 | #
|
---|
576 | # statfs stuff
|
---|
577 | #
|
---|
578 | AC_CHECK_HEADERS(sys/vfs.h)
|
---|
579 | AC_CHECK_HEADERS(sys/statvfs.h)
|
---|
580 | AC_CHECK_HEADERS(sys/statfs.h)
|
---|
581 | AC_CHECK_HEADERS(sys/param.h)
|
---|
582 |
|
---|
583 | mount_includes="\
|
---|
584 | $ac_includes_default
|
---|
585 | #if HAVE_SYS_PARAM_H
|
---|
586 | # include <sys/param.h>
|
---|
587 | #endif
|
---|
588 | "
|
---|
589 |
|
---|
590 | AC_CHECK_HEADERS(sys/mount.h,,,[$mount_includes])
|
---|
591 |
|
---|
592 | #################################################
|
---|
593 | # these tests are taken from the GNU fileutils package
|
---|
594 | AC_CHECKING(how to get filesystem space usage)
|
---|
595 | space=no
|
---|
596 |
|
---|
597 | # Test for statvfs64.
|
---|
598 | if test $space = no; then
|
---|
599 | # SVR4
|
---|
600 | AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64,
|
---|
601 | [AC_TRY_RUN([
|
---|
602 | #if defined(HAVE_UNISTD_H)
|
---|
603 | #include <unistd.h>
|
---|
604 | #endif
|
---|
605 | #include <sys/types.h>
|
---|
606 | #include <sys/statvfs.h>
|
---|
607 | main ()
|
---|
608 | {
|
---|
609 | struct statvfs64 fsd;
|
---|
610 | exit (statvfs64 (".", &fsd));
|
---|
611 | }],
|
---|
612 | fu_cv_sys_stat_statvfs64=yes,
|
---|
613 | fu_cv_sys_stat_statvfs64=no,
|
---|
614 | fu_cv_sys_stat_statvfs64=cross)])
|
---|
615 | if test $fu_cv_sys_stat_statvfs64 = yes; then
|
---|
616 | space=yes
|
---|
617 | AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available])
|
---|
618 | fi
|
---|
619 | fi
|
---|
620 |
|
---|
621 | # Perform only the link test since it seems there are no variants of the
|
---|
622 | # statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs)
|
---|
623 | # because that got a false positive on SCO OSR5. Adding the declaration
|
---|
624 | # of a `struct statvfs' causes this test to fail (as it should) on such
|
---|
625 | # systems. That system is reported to work fine with STAT_STATFS4 which
|
---|
626 | # is what it gets when this test fails.
|
---|
627 | if test $space = no; then
|
---|
628 | # SVR4
|
---|
629 | AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
|
---|
630 | [AC_TRY_LINK([#include <sys/types.h>
|
---|
631 | #include <sys/statvfs.h>],
|
---|
632 | [struct statvfs fsd; statvfs (0, &fsd);],
|
---|
633 | fu_cv_sys_stat_statvfs=yes,
|
---|
634 | fu_cv_sys_stat_statvfs=no)])
|
---|
635 | if test $fu_cv_sys_stat_statvfs = yes; then
|
---|
636 | space=yes
|
---|
637 | AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
|
---|
638 | fi
|
---|
639 | fi
|
---|
640 |
|
---|
641 | if test $space = no; then
|
---|
642 | # DEC Alpha running OSF/1
|
---|
643 | AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
|
---|
644 | AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
|
---|
645 | [AC_TRY_RUN([
|
---|
646 | #include <sys/param.h>
|
---|
647 | #include <sys/types.h>
|
---|
648 | #include <sys/mount.h>
|
---|
649 | main ()
|
---|
650 | {
|
---|
651 | struct statfs fsd;
|
---|
652 | fsd.f_fsize = 0;
|
---|
653 | exit (statfs (".", &fsd, sizeof (struct statfs)));
|
---|
654 | }],
|
---|
655 | fu_cv_sys_stat_statfs3_osf1=yes,
|
---|
656 | fu_cv_sys_stat_statfs3_osf1=no,
|
---|
657 | fu_cv_sys_stat_statfs3_osf1=no)])
|
---|
658 |
|
---|
659 |
|
---|
660 | #C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
|
---|
661 | if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
|
---|
662 | space=yes
|
---|
663 | AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments])
|
---|
664 | fi
|
---|
665 | fi
|
---|
666 |
|
---|
667 | if test $space = no; then
|
---|
668 | # AIX
|
---|
669 | AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
|
---|
670 | member (AIX, 4.3BSD)])
|
---|
671 | AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
|
---|
672 | [AC_TRY_RUN([
|
---|
673 | #ifdef HAVE_SYS_PARAM_H
|
---|
674 | #include <sys/param.h>
|
---|
675 | #endif
|
---|
676 | #ifdef HAVE_SYS_MOUNT_H
|
---|
677 | #include <sys/mount.h>
|
---|
678 | #endif
|
---|
679 | #ifdef HAVE_SYS_VFS_H
|
---|
680 | #include <sys/vfs.h>
|
---|
681 | #endif
|
---|
682 | main ()
|
---|
683 | {
|
---|
684 | struct statfs fsd;
|
---|
685 | fsd.f_bsize = 0;
|
---|
686 | exit (statfs (".", &fsd));
|
---|
687 | }],
|
---|
688 | fu_cv_sys_stat_statfs2_bsize=yes,
|
---|
689 | fu_cv_sys_stat_statfs2_bsize=no,
|
---|
690 | fu_cv_sys_stat_statfs2_bsize=no)])
|
---|
691 | AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
|
---|
692 | if test $fu_cv_sys_stat_statfs2_bsize = yes; then
|
---|
693 | space=yes
|
---|
694 | AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property])
|
---|
695 | fi
|
---|
696 | fi
|
---|
697 |
|
---|
698 | if test $space = no; then
|
---|
699 | # SVR3
|
---|
700 | AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
|
---|
701 | AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
|
---|
702 | [AC_TRY_RUN([#include <sys/types.h>
|
---|
703 | #include <sys/statfs.h>
|
---|
704 | main ()
|
---|
705 | {
|
---|
706 | struct statfs fsd;
|
---|
707 | exit (statfs (".", &fsd, sizeof fsd, 0));
|
---|
708 | }],
|
---|
709 | fu_cv_sys_stat_statfs4=yes,
|
---|
710 | fu_cv_sys_stat_statfs4=no,
|
---|
711 | fu_cv_sys_stat_statfs4=no)])
|
---|
712 | AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
|
---|
713 | if test $fu_cv_sys_stat_statfs4 = yes; then
|
---|
714 | space=yes
|
---|
715 | AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments])
|
---|
716 | fi
|
---|
717 | fi
|
---|
718 |
|
---|
719 | if test $space = no; then
|
---|
720 | # 4.4BSD and NetBSD
|
---|
721 | AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
|
---|
722 | member (4.4BSD and NetBSD)])
|
---|
723 | AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
|
---|
724 | [AC_TRY_RUN([#include <sys/types.h>
|
---|
725 | #ifdef HAVE_SYS_PARAM_H
|
---|
726 | #include <sys/param.h>
|
---|
727 | #endif
|
---|
728 | #ifdef HAVE_SYS_MOUNT_H
|
---|
729 | #include <sys/mount.h>
|
---|
730 | #endif
|
---|
731 | main ()
|
---|
732 | {
|
---|
733 | struct statfs fsd;
|
---|
734 | fsd.f_fsize = 0;
|
---|
735 | exit (statfs (".", &fsd));
|
---|
736 | }],
|
---|
737 | fu_cv_sys_stat_statfs2_fsize=yes,
|
---|
738 | fu_cv_sys_stat_statfs2_fsize=no,
|
---|
739 | fu_cv_sys_stat_statfs2_fsize=no)])
|
---|
740 | AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
|
---|
741 | if test $fu_cv_sys_stat_statfs2_fsize = yes; then
|
---|
742 | space=yes
|
---|
743 | AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize])
|
---|
744 | fi
|
---|
745 | fi
|
---|
746 |
|
---|
747 | if test $space = no; then
|
---|
748 | # Ultrix
|
---|
749 | AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
|
---|
750 | AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
|
---|
751 | [AC_TRY_RUN([#include <sys/types.h>
|
---|
752 | #ifdef HAVE_SYS_PARAM_H
|
---|
753 | #include <sys/param.h>
|
---|
754 | #endif
|
---|
755 | #ifdef HAVE_SYS_MOUNT_H
|
---|
756 | #include <sys/mount.h>
|
---|
757 | #endif
|
---|
758 | #ifdef HAVE_SYS_FS_TYPES_H
|
---|
759 | #include <sys/fs_types.h>
|
---|
760 | #endif
|
---|
761 | main ()
|
---|
762 | {
|
---|
763 | struct fs_data fsd;
|
---|
764 | /* Ultrix's statfs returns 1 for success,
|
---|
765 | 0 for not mounted, -1 for failure. */
|
---|
766 | exit (statfs (".", &fsd) != 1);
|
---|
767 | }],
|
---|
768 | fu_cv_sys_stat_fs_data=yes,
|
---|
769 | fu_cv_sys_stat_fs_data=no,
|
---|
770 | fu_cv_sys_stat_fs_data=no)])
|
---|
771 | AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
|
---|
772 | if test $fu_cv_sys_stat_fs_data = yes; then
|
---|
773 | space=yes
|
---|
774 | AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available])
|
---|
775 | fi
|
---|
776 | fi
|
---|
777 |
|
---|
778 | statxfs_includes="\
|
---|
779 | $ac_includes_default
|
---|
780 | #if HAVE_SYS_STATVFS_H
|
---|
781 | # include <sys/statvfs.h>
|
---|
782 | #endif
|
---|
783 | #if HAVE_SYS_VFS_H
|
---|
784 | # include <sys/vfs.h>
|
---|
785 | #endif
|
---|
786 | #if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H
|
---|
787 | # if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
|
---|
788 | /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
|
---|
789 | # include <sys/param.h>
|
---|
790 | # include <sys/mount.h>
|
---|
791 | # elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
|
---|
792 | /* Ultrix 4.4 needs these for the declaration of struct statfs. */
|
---|
793 | # include <netinet/in.h>
|
---|
794 | # include <nfs/nfs_clnt.h>
|
---|
795 | # include <nfs/vfs.h>
|
---|
796 | # endif
|
---|
797 | #endif
|
---|
798 | "
|
---|
799 |
|
---|
800 | AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
|
---|
801 | AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
|
---|
802 | AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
|
---|
803 | AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
|
---|
804 |
|
---|
805 | #
|
---|
806 | # Large file support
|
---|
807 | #
|
---|
808 | AC_SYS_LARGEFILE
|
---|
809 |
|
---|
810 | #
|
---|
811 | # mntent
|
---|
812 | #
|
---|
813 | AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
|
---|
814 | AC_CHECK_FUNCS(setmntent)
|
---|
815 |
|
---|
816 | #
|
---|
817 | # IPv6
|
---|
818 | #
|
---|
819 | AC_ARG_WITH(ipv6,
|
---|
820 | [ --with-ipv6 enable IPv6-support],
|
---|
821 | [
|
---|
822 | if test $withval != "no";
|
---|
823 | then
|
---|
824 | AC_DEFINE(IPv6,1)
|
---|
825 | fi
|
---|
826 | ])
|
---|
827 |
|
---|
828 |
|
---|
829 | #
|
---|
830 | # debugging
|
---|
831 | #
|
---|
832 | AC_ARG_WITH(debug,
|
---|
833 | [ --with-debug enable protocol debugging output],
|
---|
834 | [
|
---|
835 | if test $withval != "no";
|
---|
836 | then
|
---|
837 | AC_DEFINE(WITH_DEBUG,1)
|
---|
838 | fi
|
---|
839 | ])
|
---|
840 |
|
---|
841 | AC_ARG_WITH(debug-kbd,
|
---|
842 | [ --with-debug-kbd enable debugging of keyboard handling],
|
---|
843 | [
|
---|
844 | if test $withval != "no";
|
---|
845 | then
|
---|
846 | AC_DEFINE(WITH_DEBUG_KBD,1)
|
---|
847 | fi
|
---|
848 | ])
|
---|
849 |
|
---|
850 | AC_ARG_WITH(debug-rdp5,
|
---|
851 | [ --with-debug-rdp5 enable debugging of RDP5 code],
|
---|
852 | [
|
---|
853 | if test $withval != "no";
|
---|
854 | then
|
---|
855 | AC_DEFINE(WITH_DEBUG_RDP5,1)
|
---|
856 | fi
|
---|
857 | ])
|
---|
858 |
|
---|
859 | AC_ARG_WITH(debug-clipboard,
|
---|
860 | [ --with-debug-clipboard enable debugging of clipboard code],
|
---|
861 | [
|
---|
862 | if test $withval != "no";
|
---|
863 | then
|
---|
864 | AC_DEFINE(WITH_DEBUG_CLIPBOARD,1)
|
---|
865 | fi
|
---|
866 | ])
|
---|
867 |
|
---|
868 | AC_ARG_WITH(debug-sound,
|
---|
869 | [ --with-debug-sound enable debugging of sound code],
|
---|
870 | [
|
---|
871 | if test $withval != "no";
|
---|
872 | then
|
---|
873 | AC_DEFINE(WITH_DEBUG_SOUND,1)
|
---|
874 | fi
|
---|
875 | ])
|
---|
876 |
|
---|
877 | AC_ARG_WITH(debug-channel,
|
---|
878 | [ --with-debug-channel enable debugging of virtual channel code],
|
---|
879 | [
|
---|
880 | if test $withval != "no";
|
---|
881 | then
|
---|
882 | AC_DEFINE(WITH_DEBUG_CHANNEL,1)
|
---|
883 | fi
|
---|
884 | ])
|
---|
885 |
|
---|
886 | AC_ARG_WITH(debug-seamless,
|
---|
887 | [ --with-debug-seamless enable debugging of SeamlessRDP code],
|
---|
888 | [
|
---|
889 | if test $withval != "no";
|
---|
890 | then
|
---|
891 | AC_DEFINE(WITH_DEBUG_SEAMLESS,1)
|
---|
892 | fi
|
---|
893 | ])
|
---|
894 |
|
---|
895 | AC_ARG_WITH(debug-smartcard,
|
---|
896 | [ --with-debug-smartcard enable debugging of smart-card code],
|
---|
897 | [
|
---|
898 | if test $withval != "no";
|
---|
899 | then
|
---|
900 | if test x"$WITH_SCARD" = "x1"; then
|
---|
901 | AC_DEFINE(WITH_DEBUG_SCARD,1)
|
---|
902 | fi
|
---|
903 | fi
|
---|
904 | ])
|
---|
905 |
|
---|
906 | #
|
---|
907 | # target-specific stuff
|
---|
908 | #
|
---|
909 | # strip leading colon from rpath
|
---|
910 | rpath=`echo $rpath |sed 's/^://'`
|
---|
911 | AC_CANONICAL_HOST
|
---|
912 | case "$host" in
|
---|
913 | *-*-solaris*)
|
---|
914 | LDFLAGS="$LDFLAGS -R$rpath"
|
---|
915 | ;;
|
---|
916 | *-dec-osf*)
|
---|
917 | LDFLAGS="$LDFLAGS -Wl,-rpath,$rpath"
|
---|
918 | ;;
|
---|
919 | *-*-hpux*)
|
---|
920 | CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
|
---|
921 | ;;
|
---|
922 | *-*-irix6.5*)
|
---|
923 | LIBS="$LIBS -L$ssldir/lib32 -lcrypto"
|
---|
924 | CFLAGS="$CFLAGS -D__SGI_IRIX__"
|
---|
925 | ;;
|
---|
926 | esac
|
---|
927 |
|
---|
928 |
|
---|
929 | AC_OUTPUT(Makefile)
|
---|
930 |
|
---|
931 | dnl Local Variables:
|
---|
932 | dnl comment-start: "dnl "
|
---|
933 | dnl comment-end: ""
|
---|
934 | dnl comment-start-skip: "\\bdnl\\b\\s *"
|
---|
935 | dnl compile-command: "autoconf"
|
---|
936 | dnl End:
|
---|