/[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 1253 - (hide annotations)
Sun Sep 17 10:00:55 2006 UTC (17 years, 8 months ago) by stargo
File size: 19011 byte(s)
add alsa-driver

1 astrand 1251 AC_INIT(rdesktop, 1.5.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 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 1253 [ --with-sound select sound system ("oss", "sgi", "sun", "alsa" 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 stargo 1253 elif test "$sound" = alsa; then
181     SOUNDOBJ="rdpsnd.o rdpsnd_alsa.o"
182     LDFLAGS="$LDFLAGS -lasound"
183     AC_DEFINE(WITH_RDPSND)
184 astrand 740 else
185 stargo 833 AC_MSG_WARN([sound support disabled])
186 stargo 1253 AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao])
187 astrand 740 fi
188     AC_SUBST(SOUNDOBJ)
189    
190 stargo 742 #
191     # dirfd
192     #
193 stargo 743 dnl Find out how to get the file descriptor associated with an open DIR*.
194     dnl From Jim Meyering
195    
196     AC_DEFUN([UTILS_FUNC_DIRFD],
197     [
198    
199     AC_HEADER_DIRENT
200     dirfd_headers='
201     #if HAVE_DIRENT_H
202     # include <dirent.h>
203     #else /* not HAVE_DIRENT_H */
204     # define dirent direct
205     # if HAVE_SYS_NDIR_H
206     # include <sys/ndir.h>
207     # endif /* HAVE_SYS_NDIR_H */
208     # if HAVE_SYS_DIR_H
209     # include <sys/dir.h>
210     # endif /* HAVE_SYS_DIR_H */
211     # if HAVE_NDIR_H
212     # include <ndir.h>
213     # endif /* HAVE_NDIR_H */
214     #endif /* HAVE_DIRENT_H */
215     '
216     AC_CHECK_FUNCS(dirfd)
217     AC_CHECK_DECLS([dirfd], , , $dirfd_headers)
218    
219     AC_CACHE_CHECK([whether dirfd is a macro],
220     jm_cv_func_dirfd_macro,
221     [AC_EGREP_CPP([dirent_header_defines_dirfd], [$dirfd_headers
222     #ifdef dirfd
223     dirent_header_defines_dirfd
224     #endif],
225     jm_cv_func_dirfd_macro=yes,
226     jm_cv_func_dirfd_macro=no)])
227    
228     # Use the replacement only if we have no function, macro,
229     # or declaration with that name.
230     if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$jm_cv_func_dirfd_macro \
231     = no,no,no; then
232     AC_REPLACE_FUNCS([dirfd])
233     AC_CACHE_CHECK(
234     [how to get the file descriptor associated with an open DIR*],
235     gl_cv_sys_dir_fd_member_name,
236     [
237     dirfd_save_CFLAGS=$CFLAGS
238     for ac_expr in d_fd dd_fd; do
239    
240     CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
241     AC_TRY_COMPILE(
242     [$dirfd_headers
243     ],
244     [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;],
245     dir_fd_found=yes
246     )
247     CFLAGS=$dirfd_save_CFLAGS
248     test "$dir_fd_found" = yes && break
249     done
250     test "$dir_fd_found" = yes || ac_expr=no_such_member
251    
252     gl_cv_sys_dir_fd_member_name=$ac_expr
253     ]
254     )
255     if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
256     AC_DEFINE_UNQUOTED(DIR_FD_MEMBER_NAME,
257     $gl_cv_sys_dir_fd_member_name,
258     [the name of the file descriptor member of DIR])
259     fi
260     AH_VERBATIM(DIR_TO_FD,
261     [#ifdef DIR_FD_MEMBER_NAME
262     # define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
263     #else
264     # define DIR_TO_FD(Dir_p) -1
265     #endif
266     ]
267     )
268     fi
269     ])
270    
271 stargo 742 UTILS_FUNC_DIRFD
272 astrand 740
273 stargo 858 #
274     # iconv
275     #
276 stargo 802
277 stargo 858 dnl This macros shamelessly stolen from
278     dnl http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html.
279     dnl Written by Bruno Haible.
280    
281     AC_DEFUN([UTILS_FUNC_ICONV],
282     [
283     dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
284     dnl those with the standalone portable GNU libiconv installed).
285    
286     AC_ARG_WITH([libiconv-prefix],
287     [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
288     for dir in `echo "$withval" | tr : ' '`; do
289     if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
290     if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
291     done
292     ])
293 stargo 908 AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))
294 stargo 858
295     AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
296     am_cv_func_iconv="no, consider installing GNU libiconv"
297     am_cv_lib_iconv=no
298     AC_TRY_LINK([#include <stdlib.h>
299     #include <iconv.h>],
300     [iconv_t cd = iconv_open("","");
301     iconv(cd,NULL,NULL,NULL,NULL);
302     iconv_close(cd);],
303     am_cv_func_iconv=yes)
304     if test "$am_cv_func_iconv" != yes; then
305     am_save_LIBS="$LIBS"
306     LIBS="$LIBS -liconv"
307     AC_TRY_LINK([#include <stdlib.h>
308     #include <iconv.h>],
309     [iconv_t cd = iconv_open("","");
310     iconv(cd,NULL,NULL,NULL,NULL);
311     iconv_close(cd);],
312     am_cv_lib_iconv=yes
313     am_cv_func_iconv=yes)
314     LIBS="$am_save_LIBS"
315     fi
316     ])
317     if test "$am_cv_func_iconv" = yes; then
318     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
319     AC_MSG_CHECKING([for iconv declaration])
320     AC_CACHE_VAL(am_cv_proto_iconv, [
321     AC_TRY_COMPILE([
322     #include <stdlib.h>
323     #include <iconv.h>
324     extern
325     #ifdef __cplusplus
326     "C"
327     #endif
328     #if defined(__STDC__) || defined(__cplusplus)
329     size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
330     #else
331     size_t iconv();
332     #endif
333     ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
334     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);"])
335     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
336     AC_MSG_RESULT([$]{ac_t:-
337     }[$]am_cv_proto_iconv)
338     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
339     [Define as const if the declaration of iconv() needs const.])
340     fi
341     LIBICONV=
342     if test "$am_cv_lib_iconv" = yes; then
343     LIBICONV="-liconv"
344     fi
345     AC_SUBST(LIBICONV)
346     ])
347    
348     UTILS_FUNC_ICONV
349     LIBS="$LIBS $LIBICONV"
350    
351 astrand 740 #
352 stargo 872 # socklen_t
353     # from curl
354    
355     dnl Check for socklen_t: historically on BSD it is an int, and in
356     dnl POSIX 1g it is a type of its own, but some platforms use different
357     dnl types for the argument to getsockopt, getpeername, etc. So we
358     dnl have to test to find something that will work.
359     AC_DEFUN([TYPE_SOCKLEN_T],
360     [
361     AC_CHECK_TYPE([socklen_t], ,[
362     AC_MSG_CHECKING([for socklen_t equivalent])
363     AC_CACHE_VAL([socklen_t_equiv],
364     [
365     # Systems have either "struct sockaddr *" or
366     # "void *" as the second argument to getpeername
367     socklen_t_equiv=
368     for arg2 in "struct sockaddr" void; do
369     for t in int size_t unsigned long "unsigned long"; do
370     AC_TRY_COMPILE([
371     #include <sys/types.h>
372     #include <sys/socket.h>
373    
374     int getpeername (int, $arg2 *, $t *);
375     ],[
376     $t len;
377     getpeername(0,0,&len);
378     ],[
379     socklen_t_equiv="$t"
380     break
381     ])
382     done
383     done
384    
385     if test "x$socklen_t_equiv" = x; then
386     AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
387     fi
388     ])
389     AC_MSG_RESULT($socklen_t_equiv)
390     AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
391     [type to use in place of socklen_t if not defined])],
392     [#include <sys/types.h>
393     #include <sys/socket.h>])
394     ])
395    
396     TYPE_SOCKLEN_T
397    
398     #
399 stargo 873 # statfs stuff
400     #
401     AC_CHECK_HEADERS(sys/vfs.h)
402     AC_CHECK_HEADERS(sys/statvfs.h)
403     AC_CHECK_HEADERS(sys/statfs.h)
404     AC_CHECK_HEADERS(sys/param.h)
405    
406 stargo 876 mount_includes="\
407     $ac_includes_default
408     #if HAVE_SYS_PARAM_H
409     # include <sys/param.h>
410     #endif
411     "
412    
413     AC_CHECK_HEADERS(sys/mount.h,,,[$mount_includes])
414    
415 stargo 873 #################################################
416     # these tests are taken from the GNU fileutils package
417     AC_CHECKING(how to get filesystem space usage)
418     space=no
419    
420     # Test for statvfs64.
421     if test $space = no; then
422     # SVR4
423     AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64,
424     [AC_TRY_RUN([
425     #if defined(HAVE_UNISTD_H)
426     #include <unistd.h>
427     #endif
428     #include <sys/types.h>
429     #include <sys/statvfs.h>
430     main ()
431     {
432     struct statvfs64 fsd;
433     exit (statvfs64 (".", &fsd));
434     }],
435     fu_cv_sys_stat_statvfs64=yes,
436     fu_cv_sys_stat_statvfs64=no,
437     fu_cv_sys_stat_statvfs64=cross)])
438     if test $fu_cv_sys_stat_statvfs64 = yes; then
439     space=yes
440     AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available])
441     fi
442     fi
443    
444     # Perform only the link test since it seems there are no variants of the
445     # statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs)
446     # because that got a false positive on SCO OSR5. Adding the declaration
447     # of a `struct statvfs' causes this test to fail (as it should) on such
448     # systems. That system is reported to work fine with STAT_STATFS4 which
449     # is what it gets when this test fails.
450     if test $space = no; then
451     # SVR4
452     AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
453     [AC_TRY_LINK([#include <sys/types.h>
454     #include <sys/statvfs.h>],
455     [struct statvfs fsd; statvfs (0, &fsd);],
456     fu_cv_sys_stat_statvfs=yes,
457     fu_cv_sys_stat_statvfs=no)])
458     if test $fu_cv_sys_stat_statvfs = yes; then
459     space=yes
460     AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
461     fi
462     fi
463    
464     if test $space = no; then
465     # DEC Alpha running OSF/1
466     AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
467     AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
468     [AC_TRY_RUN([
469     #include <sys/param.h>
470     #include <sys/types.h>
471     #include <sys/mount.h>
472     main ()
473     {
474     struct statfs fsd;
475     fsd.f_fsize = 0;
476     exit (statfs (".", &fsd, sizeof (struct statfs)));
477     }],
478     fu_cv_sys_stat_statfs3_osf1=yes,
479     fu_cv_sys_stat_statfs3_osf1=no,
480     fu_cv_sys_stat_statfs3_osf1=no)])
481    
482    
483     #C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
484     if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
485     space=yes
486     AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments])
487     fi
488     fi
489    
490     if test $space = no; then
491     # AIX
492     AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
493     member (AIX, 4.3BSD)])
494     AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
495     [AC_TRY_RUN([
496     #ifdef HAVE_SYS_PARAM_H
497     #include <sys/param.h>
498     #endif
499     #ifdef HAVE_SYS_MOUNT_H
500     #include <sys/mount.h>
501     #endif
502     #ifdef HAVE_SYS_VFS_H
503     #include <sys/vfs.h>
504     #endif
505     main ()
506     {
507     struct statfs fsd;
508     fsd.f_bsize = 0;
509     exit (statfs (".", &fsd));
510     }],
511     fu_cv_sys_stat_statfs2_bsize=yes,
512     fu_cv_sys_stat_statfs2_bsize=no,
513     fu_cv_sys_stat_statfs2_bsize=no)])
514     AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
515     if test $fu_cv_sys_stat_statfs2_bsize = yes; then
516     space=yes
517     AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property])
518     fi
519     fi
520    
521     if test $space = no; then
522     # SVR3
523     AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
524     AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
525     [AC_TRY_RUN([#include <sys/types.h>
526     #include <sys/statfs.h>
527     main ()
528     {
529     struct statfs fsd;
530     exit (statfs (".", &fsd, sizeof fsd, 0));
531     }],
532     fu_cv_sys_stat_statfs4=yes,
533     fu_cv_sys_stat_statfs4=no,
534     fu_cv_sys_stat_statfs4=no)])
535     AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
536     if test $fu_cv_sys_stat_statfs4 = yes; then
537     space=yes
538     AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments])
539     fi
540     fi
541    
542     if test $space = no; then
543     # 4.4BSD and NetBSD
544     AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
545     member (4.4BSD and NetBSD)])
546     AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
547     [AC_TRY_RUN([#include <sys/types.h>
548     #ifdef HAVE_SYS_PARAM_H
549     #include <sys/param.h>
550     #endif
551     #ifdef HAVE_SYS_MOUNT_H
552     #include <sys/mount.h>
553     #endif
554     main ()
555     {
556     struct statfs fsd;
557     fsd.f_fsize = 0;
558     exit (statfs (".", &fsd));
559     }],
560     fu_cv_sys_stat_statfs2_fsize=yes,
561     fu_cv_sys_stat_statfs2_fsize=no,
562     fu_cv_sys_stat_statfs2_fsize=no)])
563     AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
564     if test $fu_cv_sys_stat_statfs2_fsize = yes; then
565     space=yes
566     AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize])
567     fi
568     fi
569    
570     if test $space = no; then
571     # Ultrix
572     AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
573     AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
574     [AC_TRY_RUN([#include <sys/types.h>
575     #ifdef HAVE_SYS_PARAM_H
576     #include <sys/param.h>
577     #endif
578     #ifdef HAVE_SYS_MOUNT_H
579     #include <sys/mount.h>
580     #endif
581     #ifdef HAVE_SYS_FS_TYPES_H
582     #include <sys/fs_types.h>
583     #endif
584     main ()
585     {
586     struct fs_data fsd;
587     /* Ultrix's statfs returns 1 for success,
588     0 for not mounted, -1 for failure. */
589     exit (statfs (".", &fsd) != 1);
590     }],
591     fu_cv_sys_stat_fs_data=yes,
592     fu_cv_sys_stat_fs_data=no,
593     fu_cv_sys_stat_fs_data=no)])
594     AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
595     if test $fu_cv_sys_stat_fs_data = yes; then
596     space=yes
597     AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available])
598     fi
599     fi
600    
601     statxfs_includes="\
602     $ac_includes_default
603     #if HAVE_SYS_STATVFS_H
604     # include <sys/statvfs.h>
605     #endif
606     #if HAVE_SYS_VFS_H
607     # include <sys/vfs.h>
608     #endif
609     #if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H
610     # if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
611     /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
612     # include <sys/param.h>
613     # include <sys/mount.h>
614     # elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
615     /* Ultrix 4.4 needs these for the declaration of struct statfs. */
616     # include <netinet/in.h>
617     # include <nfs/nfs_clnt.h>
618     # include <nfs/vfs.h>
619     # endif
620     #endif
621     "
622    
623     AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
624     AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
625     AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
626     AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
627    
628 astrand 1115 #
629     # Large file support
630     #
631     AC_SYS_LARGEFILE
632 stargo 873
633 astrand 1115 #
634 stargo 873 # mntent
635     #
636     AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
637     AC_CHECK_FUNCS(setmntent)
638    
639     #
640 stargo 802 # IPv6
641     #
642     AC_ARG_WITH(ipv6,
643     [ --with-ipv6 enable IPv6-support],
644 stargo 884 [
645     if test $withval != "no";
646     then
647     AC_DEFINE(IPv6,1)
648     fi
649     ])
650 stargo 802
651    
652     #
653 astrand 740 # debugging
654     #
655     AC_ARG_WITH(debug,
656     [ --with-debug enable protocol debugging output],
657 stargo 884 [
658     if test $withval != "no";
659     then
660     AC_DEFINE(WITH_DEBUG,1)
661     fi
662     ])
663 astrand 740
664     AC_ARG_WITH(debug-kbd,
665     [ --with-debug-kbd enable debugging of keyboard handling],
666 stargo 884 [
667     if test $withval != "no";
668     then
669     AC_DEFINE(WITH_DEBUG_KBD,1)
670     fi
671     ])
672 astrand 740
673     AC_ARG_WITH(debug-rdp5,
674     [ --with-debug-rdp5 enable debugging of RDP5 code],
675 stargo 884 [
676     if test $withval != "no";
677     then
678     AC_DEFINE(WITH_DEBUG_RDP5,1)
679     fi
680     ])
681 astrand 740
682     AC_ARG_WITH(debug-clipboard,
683     [ --with-debug-clipboard enable debugging of clipboard code],
684 stargo 884 [
685     if test $withval != "no";
686     then
687     AC_DEFINE(WITH_DEBUG_CLIPBOARD,1)
688     fi
689     ])
690 astrand 740
691 astrand 1199 AC_ARG_WITH(debug-channel,
692     [ --with-debug-channel enable debugging of virtual channel code],
693     [
694     if test $withval != "no";
695     then
696     AC_DEFINE(WITH_DEBUG_CHANNEL,1)
697     fi
698     ])
699 astrand 740
700 astrand 1199
701 astrand 740 #
702     # target-specific stuff
703     #
704     # strip leading colon from rpath
705     rpath=`echo $rpath |sed 's/^://'`
706     AC_CANONICAL_HOST
707     case "$host" in
708     *-*-solaris*)
709     LDFLAGS="$LDFLAGS -R$rpath"
710     ;;
711     *-dec-osf*)
712     LDFLAGS="$LDFLAGS -Wl,-rpath,$rpath"
713     ;;
714     *-*-hpux*)
715     CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
716     ;;
717 stargo 744 *-*-irix6.5*)
718     LIBS="$LIBS -L$ssldir/lib32 -lcrypto"
719     CFLAGS="$CFLAGS -D__SGI_IRIX__"
720     ;;
721 astrand 740 esac
722    
723    
724     AC_OUTPUT(Makefile)
725    
726     dnl Local Variables:
727     dnl comment-start: "dnl "
728     dnl comment-end: ""
729     dnl comment-start-skip: "\\bdnl\\b\\s *"
730     dnl compile-command: "autoconf"
731     dnl End:

  ViewVC Help
Powered by ViewVC 1.1.26