/[rdesktop]/sourceforge.net/trunk/rdesktop/configure.ac
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /sourceforge.net/trunk/rdesktop/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1199 - (hide annotations)
Mon Mar 27 08:17:34 2006 UTC (18 years, 1 month ago) by astrand
File size: 18861 byte(s)
Added SeamlessRDP support: Merged seamlessrdp-branch

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

  ViewVC Help
Powered by ViewVC 1.1.26