/[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 873 - (hide annotations)
Sat Apr 2 17:31:27 2005 UTC (19 years, 2 months ago) by stargo
File size: 18158 byte(s)
Use configure to determine stat(v)fs and setmntent
Tested on:
 * Debian GNU/Linux 3.1
 * Solaris 9/10
 * Mac OSX 10.3
 * HP/UX 10.20
 * OpenBSD 3.4

1 stargo 828 AC_INIT(rdesktop, 1.4.0)
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     AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))
26 stargo 873 AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
27 stargo 798
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    
290     AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
291     am_cv_func_iconv="no, consider installing GNU libiconv"
292     am_cv_lib_iconv=no
293     AC_TRY_LINK([#include <stdlib.h>
294     #include <iconv.h>],
295     [iconv_t cd = iconv_open("","");
296     iconv(cd,NULL,NULL,NULL,NULL);
297     iconv_close(cd);],
298     am_cv_func_iconv=yes)
299     if test "$am_cv_func_iconv" != yes; then
300     am_save_LIBS="$LIBS"
301     LIBS="$LIBS -liconv"
302     AC_TRY_LINK([#include <stdlib.h>
303     #include <iconv.h>],
304     [iconv_t cd = iconv_open("","");
305     iconv(cd,NULL,NULL,NULL,NULL);
306     iconv_close(cd);],
307     am_cv_lib_iconv=yes
308     am_cv_func_iconv=yes)
309     LIBS="$am_save_LIBS"
310     fi
311     ])
312     if test "$am_cv_func_iconv" = yes; then
313     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
314     AC_MSG_CHECKING([for iconv declaration])
315     AC_CACHE_VAL(am_cv_proto_iconv, [
316     AC_TRY_COMPILE([
317     #include <stdlib.h>
318     #include <iconv.h>
319     extern
320     #ifdef __cplusplus
321     "C"
322     #endif
323     #if defined(__STDC__) || defined(__cplusplus)
324     size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
325     #else
326     size_t iconv();
327     #endif
328     ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
329     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);"])
330     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
331     AC_MSG_RESULT([$]{ac_t:-
332     }[$]am_cv_proto_iconv)
333     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
334     [Define as const if the declaration of iconv() needs const.])
335     fi
336     LIBICONV=
337     if test "$am_cv_lib_iconv" = yes; then
338     LIBICONV="-liconv"
339     fi
340     AC_SUBST(LIBICONV)
341     ])
342    
343     UTILS_FUNC_ICONV
344     LIBS="$LIBS $LIBICONV"
345    
346 astrand 740 #
347 stargo 872 # socklen_t
348     # from curl
349    
350     dnl Check for socklen_t: historically on BSD it is an int, and in
351     dnl POSIX 1g it is a type of its own, but some platforms use different
352     dnl types for the argument to getsockopt, getpeername, etc. So we
353     dnl have to test to find something that will work.
354     AC_DEFUN([TYPE_SOCKLEN_T],
355     [
356     AC_CHECK_TYPE([socklen_t], ,[
357     AC_MSG_CHECKING([for socklen_t equivalent])
358     AC_CACHE_VAL([socklen_t_equiv],
359     [
360     # Systems have either "struct sockaddr *" or
361     # "void *" as the second argument to getpeername
362     socklen_t_equiv=
363     for arg2 in "struct sockaddr" void; do
364     for t in int size_t unsigned long "unsigned long"; do
365     AC_TRY_COMPILE([
366     #include <sys/types.h>
367     #include <sys/socket.h>
368    
369     int getpeername (int, $arg2 *, $t *);
370     ],[
371     $t len;
372     getpeername(0,0,&len);
373     ],[
374     socklen_t_equiv="$t"
375     break
376     ])
377     done
378     done
379    
380     if test "x$socklen_t_equiv" = x; then
381     AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
382     fi
383     ])
384     AC_MSG_RESULT($socklen_t_equiv)
385     AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
386     [type to use in place of socklen_t if not defined])],
387     [#include <sys/types.h>
388     #include <sys/socket.h>])
389     ])
390    
391     TYPE_SOCKLEN_T
392    
393     #
394 stargo 873 # statfs stuff
395     #
396     AC_CHECK_HEADERS(sys/vfs.h)
397     AC_CHECK_HEADERS(sys/statvfs.h)
398     AC_CHECK_HEADERS(sys/statfs.h)
399     AC_CHECK_HEADERS(sys/param.h)
400     AC_CHECK_HEADERS(sys/mount.h)
401    
402     #################################################
403     # these tests are taken from the GNU fileutils package
404     AC_CHECKING(how to get filesystem space usage)
405     space=no
406    
407     # Test for statvfs64.
408     if test $space = no; then
409     # SVR4
410     AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64,
411     [AC_TRY_RUN([
412     #if defined(HAVE_UNISTD_H)
413     #include <unistd.h>
414     #endif
415     #include <sys/types.h>
416     #include <sys/statvfs.h>
417     main ()
418     {
419     struct statvfs64 fsd;
420     exit (statvfs64 (".", &fsd));
421     }],
422     fu_cv_sys_stat_statvfs64=yes,
423     fu_cv_sys_stat_statvfs64=no,
424     fu_cv_sys_stat_statvfs64=cross)])
425     if test $fu_cv_sys_stat_statvfs64 = yes; then
426     space=yes
427     AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available])
428     fi
429     fi
430    
431     # Perform only the link test since it seems there are no variants of the
432     # statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs)
433     # because that got a false positive on SCO OSR5. Adding the declaration
434     # of a `struct statvfs' causes this test to fail (as it should) on such
435     # systems. That system is reported to work fine with STAT_STATFS4 which
436     # is what it gets when this test fails.
437     if test $space = no; then
438     # SVR4
439     AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
440     [AC_TRY_LINK([#include <sys/types.h>
441     #include <sys/statvfs.h>],
442     [struct statvfs fsd; statvfs (0, &fsd);],
443     fu_cv_sys_stat_statvfs=yes,
444     fu_cv_sys_stat_statvfs=no)])
445     if test $fu_cv_sys_stat_statvfs = yes; then
446     space=yes
447     AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
448     fi
449     fi
450    
451     if test $space = no; then
452     # DEC Alpha running OSF/1
453     AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
454     AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
455     [AC_TRY_RUN([
456     #include <sys/param.h>
457     #include <sys/types.h>
458     #include <sys/mount.h>
459     main ()
460     {
461     struct statfs fsd;
462     fsd.f_fsize = 0;
463     exit (statfs (".", &fsd, sizeof (struct statfs)));
464     }],
465     fu_cv_sys_stat_statfs3_osf1=yes,
466     fu_cv_sys_stat_statfs3_osf1=no,
467     fu_cv_sys_stat_statfs3_osf1=no)])
468    
469    
470     #C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
471     if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
472     space=yes
473     AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments])
474     fi
475     fi
476    
477     if test $space = no; then
478     # AIX
479     AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
480     member (AIX, 4.3BSD)])
481     AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
482     [AC_TRY_RUN([
483     #ifdef HAVE_SYS_PARAM_H
484     #include <sys/param.h>
485     #endif
486     #ifdef HAVE_SYS_MOUNT_H
487     #include <sys/mount.h>
488     #endif
489     #ifdef HAVE_SYS_VFS_H
490     #include <sys/vfs.h>
491     #endif
492     main ()
493     {
494     struct statfs fsd;
495     fsd.f_bsize = 0;
496     exit (statfs (".", &fsd));
497     }],
498     fu_cv_sys_stat_statfs2_bsize=yes,
499     fu_cv_sys_stat_statfs2_bsize=no,
500     fu_cv_sys_stat_statfs2_bsize=no)])
501     AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
502     if test $fu_cv_sys_stat_statfs2_bsize = yes; then
503     space=yes
504     AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property])
505     fi
506     fi
507    
508     if test $space = no; then
509     # SVR3
510     AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
511     AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
512     [AC_TRY_RUN([#include <sys/types.h>
513     #include <sys/statfs.h>
514     main ()
515     {
516     struct statfs fsd;
517     exit (statfs (".", &fsd, sizeof fsd, 0));
518     }],
519     fu_cv_sys_stat_statfs4=yes,
520     fu_cv_sys_stat_statfs4=no,
521     fu_cv_sys_stat_statfs4=no)])
522     AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
523     if test $fu_cv_sys_stat_statfs4 = yes; then
524     space=yes
525     AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments])
526     fi
527     fi
528    
529     if test $space = no; then
530     # 4.4BSD and NetBSD
531     AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
532     member (4.4BSD and NetBSD)])
533     AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
534     [AC_TRY_RUN([#include <sys/types.h>
535     #ifdef HAVE_SYS_PARAM_H
536     #include <sys/param.h>
537     #endif
538     #ifdef HAVE_SYS_MOUNT_H
539     #include <sys/mount.h>
540     #endif
541     main ()
542     {
543     struct statfs fsd;
544     fsd.f_fsize = 0;
545     exit (statfs (".", &fsd));
546     }],
547     fu_cv_sys_stat_statfs2_fsize=yes,
548     fu_cv_sys_stat_statfs2_fsize=no,
549     fu_cv_sys_stat_statfs2_fsize=no)])
550     AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
551     if test $fu_cv_sys_stat_statfs2_fsize = yes; then
552     space=yes
553     AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize])
554     fi
555     fi
556    
557     if test $space = no; then
558     # Ultrix
559     AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
560     AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
561     [AC_TRY_RUN([#include <sys/types.h>
562     #ifdef HAVE_SYS_PARAM_H
563     #include <sys/param.h>
564     #endif
565     #ifdef HAVE_SYS_MOUNT_H
566     #include <sys/mount.h>
567     #endif
568     #ifdef HAVE_SYS_FS_TYPES_H
569     #include <sys/fs_types.h>
570     #endif
571     main ()
572     {
573     struct fs_data fsd;
574     /* Ultrix's statfs returns 1 for success,
575     0 for not mounted, -1 for failure. */
576     exit (statfs (".", &fsd) != 1);
577     }],
578     fu_cv_sys_stat_fs_data=yes,
579     fu_cv_sys_stat_fs_data=no,
580     fu_cv_sys_stat_fs_data=no)])
581     AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
582     if test $fu_cv_sys_stat_fs_data = yes; then
583     space=yes
584     AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available])
585     fi
586     fi
587    
588     statxfs_includes="\
589     $ac_includes_default
590     #if HAVE_SYS_STATVFS_H
591     # include <sys/statvfs.h>
592     #endif
593     #if HAVE_SYS_VFS_H
594     # include <sys/vfs.h>
595     #endif
596     #if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H
597     # if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
598     /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
599     # include <sys/param.h>
600     # include <sys/mount.h>
601     # elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
602     /* Ultrix 4.4 needs these for the declaration of struct statfs. */
603     # include <netinet/in.h>
604     # include <nfs/nfs_clnt.h>
605     # include <nfs/vfs.h>
606     # endif
607     #endif
608     "
609    
610     AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
611     AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
612     AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
613     AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
614    
615    
616     # mntent
617     #
618     AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
619     AC_CHECK_FUNCS(setmntent)
620    
621     #
622 stargo 802 # IPv6
623     #
624     AC_ARG_WITH(ipv6,
625     [ --with-ipv6 enable IPv6-support],
626     [ AC_DEFINE(IPv6) ])
627    
628    
629     #
630 astrand 740 # debugging
631     #
632     AC_ARG_WITH(debug,
633     [ --with-debug enable protocol debugging output],
634     [ AC_DEFINE(WITH_DEBUG) ])
635    
636     AC_ARG_WITH(debug-kbd,
637     [ --with-debug-kbd enable debugging of keyboard handling],
638     [ AC_DEFINE(WITH_DEBUG_KBD) ])
639    
640     AC_ARG_WITH(debug-rdp5,
641     [ --with-debug-rdp5 enable debugging of RDP5 code],
642     [ AC_DEFINE(WITH_DEBUG_RDP5) ])
643    
644     AC_ARG_WITH(debug-clipboard,
645     [ --with-debug-clipboard enable debugging of clipboard code],
646     [ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ])
647    
648    
649     #
650     # target-specific stuff
651     #
652     # strip leading colon from rpath
653     rpath=`echo $rpath |sed 's/^://'`
654     AC_CANONICAL_HOST
655     case "$host" in
656     *-*-solaris*)
657     LDFLAGS="$LDFLAGS -R$rpath"
658     ;;
659     *-dec-osf*)
660     LDFLAGS="$LDFLAGS -Wl,-rpath,$rpath"
661     ;;
662     *-*-hpux*)
663     CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
664     ;;
665 stargo 744 *-*-irix6.5*)
666     LIBS="$LIBS -L$ssldir/lib32 -lcrypto"
667     CFLAGS="$CFLAGS -D__SGI_IRIX__"
668     ;;
669 astrand 740 esac
670    
671    
672     AC_OUTPUT(Makefile)
673    
674     dnl Local Variables:
675     dnl comment-start: "dnl "
676     dnl comment-end: ""
677     dnl comment-start-skip: "\\bdnl\\b\\s *"
678     dnl compile-command: "autoconf"
679     dnl End:

  ViewVC Help
Powered by ViewVC 1.1.26