/[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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 857 by stargo, Sun Mar 13 13:36:04 2005 UTC revision 1324 by stargo, Fri Nov 3 16:44:40 2006 UTC
# Line 1  Line 1 
1  AC_INIT(rdesktop, 1.4.0)  AC_INIT(rdesktop, 1.5.0)
2    
3  AC_CONFIG_SRCDIR([rdesktop.c])  AC_CONFIG_SRCDIR([rdesktop.c])
4    
# Line 22  AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(H Line 22  AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(H
22  AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H))  AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H))
23  AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H))  AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H))
24  AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H))  AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H))
25  AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))  
26    AC_CHECK_TOOL(STRIP, strip, :)
27    
28  rpath=""  rpath=""
29    
# Line 76  LIBS="$LIBS -L$ssldir/lib -lcrypto" Line 77  LIBS="$LIBS -L$ssldir/lib -lcrypto"
77  rpath="$rpath:$ssldir/lib"  rpath="$rpath:$ssldir/lib"
78               ])               ])
79    
80    AC_ARG_ENABLE(smartcard,
81                 [  --enable-smartcard        Enables smart-card support.
82                 ],
83                 [
84                    case "$OSTYPE" in
85                            darwin*)
86                                    AC_CHECK_HEADER(PCSC/pcsclite.h, [WITH_SCARD=1], [WITH_SCARD=0])
87                                    AC_DEFINE(PCSC_OSX)
88                                    AC_DEFINE(WITH_PCSC120)
89                                    PCSCLITE_CFLAGS=""
90                                    PCSCLITE_LIBS="-framework PCSC"
91                                    ;;
92                            *)
93                                    if test -n "$PKG_CONFIG"; then
94                                            PKG_CHECK_MODULES(PCSCLITE, libpcsclite, [WITH_SCARD=1], [WITH_SCARD=0])
95                                    fi
96                                    ;;
97                    esac
98    
99                    if test x"$WITH_SCARD" = "x1"; then
100                            SCARDOBJ="scard.o"
101                            CFLAGS="$CFLAGS $PCSCLITE_CFLAGS"
102                            LIBS="$LIBS $PCSCLITE_LIBS"
103                            AC_DEFINE(WITH_SCARD)
104                    fi
105                 ])
106    
107    AC_SUBST(SCARDOBJ)
108    
109  #  #
110  # Alignment  # Alignment
# Line 138  AC_ARG_WITH(libvncserver, Line 167  AC_ARG_WITH(libvncserver,
167  #  #
168  # sound  # sound
169  #  #
 AC_ARG_WITH(libao,  
     [  --with-libao=DIR        look for libao at DIR/include, DIR/lib],  
     [  
     CFLAGS="$CFLAGS -I$withval/include"  
     CPPFLAGS="$CPPFLAGS -I$withval/include"  
     LIBS="$LIBS -L$withval/lib"  
     rpath="$rpath:$withval/lib"  
     ]  
 )  
170    
171  sound="yes"  sound="yes"
172  AC_ARG_WITH(sound,  AC_ARG_WITH(sound,
173      [  --with-sound            select sound system ("oss", "sgi", "sun" or "libao") ],      [  --with-sound            select sound system ("oss", "sgi", "sun", "alsa" or "libao") ],
174      [      [
175      sound="$withval"      sound="$withval"
176      ])      ])
177  if test "$sound" = yes; then  
178      AC_CHECK_HEADER(ao/ao.h, [sound=libao])  AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=1], [HAVE_OSS=0])
179      AC_CHECK_HEADER(sys/soundcard.h, [sound=oss])  AC_CHECK_HEADER(dmedia/audio.h, [HAVE_SGI=1], [HAVE_SGI=0])
180      AC_CHECK_HEADER(dmedia/audio.h, [sound=sgi])  AC_CHECK_HEADER(sys/audioio.h, [HAVE_SUN=1], [HAVE_SUN=0])
181      AC_CHECK_HEADER(sys/audioio.h, [sound=sun])  
182  fi  AC_ARG_ENABLE(static-libsamplerate,
183  if test "$sound" = no; then      [  --enable-static-libsamplerate link libsamplerate statically],
184      break      [static_libsamplerate=yes],
185  elif test "$sound" = oss; then      [static_libsamplerate=no])
186      SOUNDOBJ="rdpsnd.o rdpsnd_oss.o"  
187      AC_DEFINE(WITH_RDPSND)  if test -n "$PKG_CONFIG"; then
188  elif test "$sound" = sgi; then      PKG_CHECK_MODULES(LIBAO, ao, [HAVE_LIBAO=1], [HAVE_LIBAO=0])
189      SOUNDOBJ="rdpsnd.o rdpsnd_sgi.o"      PKG_CHECK_MODULES(ALSA, alsa, [HAVE_ALSA=1], [HAVE_ALSA=0])
190      LDFLAGS="$LDFLAGS -laudio"      PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], [HAVE_LIBSAMPLERATE=0])
191      AC_DEFINE(WITH_RDPSND)      if test x"$HAVE_LIBSAMPLERATE" = "x1"; then
192  elif test "$sound" = sun; then          AC_DEFINE(HAVE_LIBSAMPLERATE)
193      SOUNDOBJ="rdpsnd.o rdpsnd_sun.o"          if test x"$static_libsamplerate" = "xyes"; then
194      AC_DEFINE(WITH_RDPSND)              _libsamplerate_libdir=`$PKG_CONFIG --errors-to-stdout --variable=libdir samplerate`
195  elif test "$sound" = libao; then              LIBSAMPLERATE_LIBS="$_libsamplerate_libdir""/libsamplerate.a"
196      SOUNDOBJ="rdpsnd.o rdpsnd_libao.o"          fi
197      LDFLAGS="$LDFLAGS -lao"          LIBSAMPLERATE_LIBS="$LIBSAMPLERATE_LIBS -lm"
198        fi
199    fi
200    
201    if test "$sound" != "no"; then
202        SOUNDOBJ="$SOUNDOBJ rdpsnd.o rdpsnd_dsp.o"
203        CFLAGS="$CFLAGS $LIBSAMPLERATE_CFLAGS"
204        LIBS="$LIBS $LIBSAMPLERATE_LIBS"
205      AC_DEFINE(WITH_RDPSND)      AC_DEFINE(WITH_RDPSND)
 else  
    AC_MSG_WARN([sound support disabled])  
    AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun) and libao])  
206  fi  fi
207    
208    case $sound in
209        yes)
210            if test x"$HAVE_OSS" = "x1"; then
211                SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o"
212                AC_DEFINE(RDPSND_OSS)
213            fi
214    
215            if test x"$HAVE_SGI" = "x1"; then
216                SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o"
217                LIBS="$LIBS -laudio"
218                AC_DEFINE(RDPSND_SGI)
219            fi
220    
221            if test x"$HAVE_SUN" = "x1"; then
222                SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o"
223                AC_DEFINE(RDPSND_SUN)
224            fi
225    
226            if test x"$HAVE_ALSA" = "x1"; then
227                SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o"
228                CFLAGS="$CFLAGS $ALSA_CFLAGS"
229                LIBS="$LIBS $ALSA_LIBS"
230                AC_DEFINE(RDPSND_ALSA)
231            fi
232    
233            if test x"$HAVE_LIBAO" = "x1"; then
234                SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o"
235                CFLAGS="$CFLAGS $LIBAO_CFLAGS"
236                LIBS="$LIBS $LIBAO_LIBS"
237                AC_DEFINE(RDPSND_LIBAO)
238            fi
239    
240            ;;
241    
242        oss)
243            if test x"$HAVE_OSS" = "x1"; then
244                SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o"
245                AC_DEFINE(RDPSND_OSS)
246            else
247                AC_MSG_ERROR([Selected sound system is not available.])
248            fi
249            ;;
250    
251        sgi)
252            if test x"$HAVE_SGI" = "x1"; then
253                SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o"
254                LIBS="$LIBS -laudio"
255                AC_DEFINE(RDPSND_SGI)
256            else
257                AC_MSG_ERROR([Selected sound system is not available.])
258            fi
259            ;;
260    
261        sun)
262            if test x"$HAVE_SUN" = "x1"; then
263                SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o"
264                AC_DEFINE(RDPSND_SUN)
265            else
266                AC_MSG_ERROR([Selected sound system is not available.])
267            fi
268            ;;
269    
270        alsa)
271            if test x"$HAVE_ALSA" = "x1"; then
272                SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o"
273                CFLAGS="$CFLAGS $ALSA_CFLAGS"
274                LIBS="$LIBS $ALSA_LIBS"
275                AC_DEFINE(RDPSND_ALSA)
276            else
277                AC_MSG_ERROR([Selected sound system is not available.])
278            fi
279            ;;
280    
281        libao)
282            if test x"$HAVE_LIBAO" = "x1"; then
283                SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o"
284                CFLAGS="$CFLAGS $LIBAO_CFLAGS"
285                LIBS="$LIBS $LIBAO_LIBS"
286                AC_DEFINE(RDPSND_LIBAO)
287            else
288                AC_MSG_ERROR([Selected sound system is not available.])
289            fi
290            ;;
291    
292        no)
293            ;;
294    
295        *)
296            AC_MSG_WARN([sound support disabled])
297            AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao])
298            ;;
299    esac
300    
301  AC_SUBST(SOUNDOBJ)  AC_SUBST(SOUNDOBJ)
302    
303  #  #
# Line 265  AC_DEFUN([UTILS_FUNC_DIRFD], Line 383  AC_DEFUN([UTILS_FUNC_DIRFD],
383    
384  UTILS_FUNC_DIRFD  UTILS_FUNC_DIRFD
385    
386    #
387    # iconv
388    #
389    
390    dnl This macros shamelessly stolen from
391    dnl http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html.
392    dnl Written by Bruno Haible.
393    
394    AC_DEFUN([UTILS_FUNC_ICONV],
395    [
396      dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
397      dnl those with the standalone portable GNU libiconv installed).
398    
399      AC_ARG_WITH([libiconv-prefix],
400    [  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
401        for dir in `echo "$withval" | tr : ' '`; do
402          if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
403          if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
404        done
405       ])
406      AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))
407    
408      AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
409        am_cv_func_iconv="no, consider installing GNU libiconv"
410        am_cv_lib_iconv=no
411        AC_TRY_LINK([#include <stdlib.h>
412    #include <iconv.h>],
413          [iconv_t cd = iconv_open("","");
414           iconv(cd,NULL,NULL,NULL,NULL);
415           iconv_close(cd);],
416          am_cv_func_iconv=yes)
417        if test "$am_cv_func_iconv" != yes; then
418          am_save_LIBS="$LIBS"
419          LIBS="$LIBS -liconv"
420          AC_TRY_LINK([#include <stdlib.h>
421    #include <iconv.h>],
422            [iconv_t cd = iconv_open("","");
423             iconv(cd,NULL,NULL,NULL,NULL);
424             iconv_close(cd);],
425            am_cv_lib_iconv=yes
426            am_cv_func_iconv=yes)
427          LIBS="$am_save_LIBS"
428        fi
429      ])
430      if test "$am_cv_func_iconv" = yes; then
431        AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
432        AC_MSG_CHECKING([for iconv declaration])
433        AC_CACHE_VAL(am_cv_proto_iconv, [
434          AC_TRY_COMPILE([
435    #include <stdlib.h>
436    #include <iconv.h>
437    extern
438    #ifdef __cplusplus
439    "C"
440    #endif
441    #if defined(__STDC__) || defined(__cplusplus)
442    size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
443    #else
444    size_t iconv();
445    #endif
446    ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
447          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);"])
448        am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
449        AC_MSG_RESULT([$]{ac_t:-
450             }[$]am_cv_proto_iconv)
451        AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
452          [Define as const if the declaration of iconv() needs const.])
453      fi
454      LIBICONV=
455      if test "$am_cv_lib_iconv" = yes; then
456        LIBICONV="-liconv"
457      fi
458      AC_SUBST(LIBICONV)
459    ])
460    
461    UTILS_FUNC_ICONV
462    LIBS="$LIBS $LIBICONV"
463    
464    #
465    # socklen_t
466    # from curl
467    
468    dnl Check for socklen_t: historically on BSD it is an int, and in
469    dnl POSIX 1g it is a type of its own, but some platforms use different
470    dnl types for the argument to getsockopt, getpeername, etc.  So we
471    dnl have to test to find something that will work.
472    AC_DEFUN([TYPE_SOCKLEN_T],
473    [
474       AC_CHECK_TYPE([socklen_t], ,[
475          AC_MSG_CHECKING([for socklen_t equivalent])
476          AC_CACHE_VAL([socklen_t_equiv],
477          [
478             # Systems have either "struct sockaddr *" or
479             # "void *" as the second argument to getpeername
480             socklen_t_equiv=
481             for arg2 in "struct sockaddr" void; do
482                for t in int size_t unsigned long "unsigned long"; do
483                   AC_TRY_COMPILE([
484                      #include <sys/types.h>
485                      #include <sys/socket.h>
486    
487                      int getpeername (int, $arg2 *, $t *);
488                   ],[
489                      $t len;
490                      getpeername(0,0,&len);
491                   ],[
492                      socklen_t_equiv="$t"
493                      break
494                   ])
495                done
496             done
497    
498             if test "x$socklen_t_equiv" = x; then
499                AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
500             fi
501          ])
502          AC_MSG_RESULT($socklen_t_equiv)
503          AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
504                            [type to use in place of socklen_t if not defined])],
505          [#include <sys/types.h>
506    #include <sys/socket.h>])
507    ])
508    
509    TYPE_SOCKLEN_T
510    
511    #
512    # statfs stuff
513    #
514    AC_CHECK_HEADERS(sys/vfs.h)
515    AC_CHECK_HEADERS(sys/statvfs.h)
516    AC_CHECK_HEADERS(sys/statfs.h)
517    AC_CHECK_HEADERS(sys/param.h)
518    
519    mount_includes="\
520      $ac_includes_default
521      #if HAVE_SYS_PARAM_H
522      # include <sys/param.h>
523      #endif
524      "
525    
526    AC_CHECK_HEADERS(sys/mount.h,,,[$mount_includes])
527    
528    #################################################
529    # these tests are taken from the GNU fileutils package
530    AC_CHECKING(how to get filesystem space usage)
531    space=no
532    
533    # Test for statvfs64.
534    if test $space = no; then
535      # SVR4
536      AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64,
537      [AC_TRY_RUN([
538    #if defined(HAVE_UNISTD_H)
539    #include <unistd.h>
540    #endif
541    #include <sys/types.h>
542    #include <sys/statvfs.h>
543      main ()
544      {
545        struct statvfs64 fsd;
546        exit (statvfs64 (".", &fsd));
547      }],
548      fu_cv_sys_stat_statvfs64=yes,
549      fu_cv_sys_stat_statvfs64=no,
550      fu_cv_sys_stat_statvfs64=cross)])
551      if test $fu_cv_sys_stat_statvfs64 = yes; then
552        space=yes
553        AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available])
554      fi
555    fi
556    
557    # Perform only the link test since it seems there are no variants of the
558    # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
559    # because that got a false positive on SCO OSR5.  Adding the declaration
560    # of a `struct statvfs' causes this test to fail (as it should) on such
561    # systems.  That system is reported to work fine with STAT_STATFS4 which
562    # is what it gets when this test fails.
563    if test $space = no; then
564      # SVR4
565      AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
566                     [AC_TRY_LINK([#include <sys/types.h>
567    #include <sys/statvfs.h>],
568                                  [struct statvfs fsd; statvfs (0, &fsd);],
569                                  fu_cv_sys_stat_statvfs=yes,
570                                  fu_cv_sys_stat_statvfs=no)])
571      if test $fu_cv_sys_stat_statvfs = yes; then
572        space=yes
573        AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
574      fi
575    fi
576    
577    if test $space = no; then
578      # DEC Alpha running OSF/1
579      AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
580      AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
581      [AC_TRY_RUN([
582    #include <sys/param.h>
583    #include <sys/types.h>
584    #include <sys/mount.h>
585      main ()
586      {
587        struct statfs fsd;
588        fsd.f_fsize = 0;
589        exit (statfs (".", &fsd, sizeof (struct statfs)));
590      }],
591      fu_cv_sys_stat_statfs3_osf1=yes,
592      fu_cv_sys_stat_statfs3_osf1=no,
593      fu_cv_sys_stat_statfs3_osf1=no)])
594    
595    
596    #C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
597      if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
598        space=yes
599        AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments])
600      fi
601    fi
602    
603    if test $space = no; then
604    # AIX
605      AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
606    member (AIX, 4.3BSD)])
607      AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
608      [AC_TRY_RUN([
609    #ifdef HAVE_SYS_PARAM_H
610    #include <sys/param.h>
611    #endif
612    #ifdef HAVE_SYS_MOUNT_H
613    #include <sys/mount.h>
614    #endif
615    #ifdef HAVE_SYS_VFS_H
616    #include <sys/vfs.h>
617    #endif
618      main ()
619      {
620      struct statfs fsd;
621      fsd.f_bsize = 0;
622      exit (statfs (".", &fsd));
623      }],
624      fu_cv_sys_stat_statfs2_bsize=yes,
625      fu_cv_sys_stat_statfs2_bsize=no,
626      fu_cv_sys_stat_statfs2_bsize=no)])
627      AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
628      if test $fu_cv_sys_stat_statfs2_bsize = yes; then
629        space=yes
630        AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property])
631      fi
632    fi
633    
634    if test $space = no; then
635    # SVR3
636      AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
637      AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
638      [AC_TRY_RUN([#include <sys/types.h>
639    #include <sys/statfs.h>
640      main ()
641      {
642      struct statfs fsd;
643      exit (statfs (".", &fsd, sizeof fsd, 0));
644      }],
645        fu_cv_sys_stat_statfs4=yes,
646        fu_cv_sys_stat_statfs4=no,
647        fu_cv_sys_stat_statfs4=no)])
648      AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
649      if test $fu_cv_sys_stat_statfs4 = yes; then
650        space=yes
651        AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments])
652      fi
653    fi
654    
655    if test $space = no; then
656    # 4.4BSD and NetBSD
657      AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
658    member (4.4BSD and NetBSD)])
659      AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
660      [AC_TRY_RUN([#include <sys/types.h>
661    #ifdef HAVE_SYS_PARAM_H
662    #include <sys/param.h>
663    #endif
664    #ifdef HAVE_SYS_MOUNT_H
665    #include <sys/mount.h>
666    #endif
667      main ()
668      {
669      struct statfs fsd;
670      fsd.f_fsize = 0;
671      exit (statfs (".", &fsd));
672      }],
673      fu_cv_sys_stat_statfs2_fsize=yes,
674      fu_cv_sys_stat_statfs2_fsize=no,
675      fu_cv_sys_stat_statfs2_fsize=no)])
676      AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
677      if test $fu_cv_sys_stat_statfs2_fsize = yes; then
678        space=yes
679            AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize])
680      fi
681    fi
682    
683    if test $space = no; then
684      # Ultrix
685      AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
686      AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
687      [AC_TRY_RUN([#include <sys/types.h>
688    #ifdef HAVE_SYS_PARAM_H
689    #include <sys/param.h>
690    #endif
691    #ifdef HAVE_SYS_MOUNT_H
692    #include <sys/mount.h>
693    #endif
694    #ifdef HAVE_SYS_FS_TYPES_H
695    #include <sys/fs_types.h>
696    #endif
697      main ()
698      {
699      struct fs_data fsd;
700      /* Ultrix's statfs returns 1 for success,
701         0 for not mounted, -1 for failure.  */
702      exit (statfs (".", &fsd) != 1);
703      }],
704      fu_cv_sys_stat_fs_data=yes,
705      fu_cv_sys_stat_fs_data=no,
706      fu_cv_sys_stat_fs_data=no)])
707      AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
708      if test $fu_cv_sys_stat_fs_data = yes; then
709        space=yes
710        AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available])
711      fi
712    fi
713    
714      statxfs_includes="\
715    $ac_includes_default
716    #if HAVE_SYS_STATVFS_H
717    # include <sys/statvfs.h>
718    #endif
719    #if HAVE_SYS_VFS_H
720    # include <sys/vfs.h>
721    #endif
722    #if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H
723    # if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
724    /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
725    #  include <sys/param.h>
726    #  include <sys/mount.h>
727    # elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
728    /* Ultrix 4.4 needs these for the declaration of struct statfs.  */
729    #  include <netinet/in.h>
730    #  include <nfs/nfs_clnt.h>
731    #  include <nfs/vfs.h>
732    # endif
733    #endif
734    "
735    
736    AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
737    AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
738    AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
739    AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
740    
741    #
742    # Large file support
743    #
744    AC_SYS_LARGEFILE
745    
746    #
747    # mntent
748    #
749    AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
750    AC_CHECK_FUNCS(setmntent)
751    
752  #  #
753  # IPv6  # IPv6
754  #  #
755  AC_ARG_WITH(ipv6,  AC_ARG_WITH(ipv6,
756      [  --with-ipv6             enable IPv6-support],      [  --with-ipv6             enable IPv6-support],
757      [ AC_DEFINE(IPv6) ])      [
758            if test $withval != "no";
759            then
760                AC_DEFINE(IPv6,1)
761            fi
762        ])
763    
764    
765  #  #
# Line 279  AC_ARG_WITH(ipv6, Line 767  AC_ARG_WITH(ipv6,
767  #  #
768  AC_ARG_WITH(debug,  AC_ARG_WITH(debug,
769      [  --with-debug            enable protocol debugging output],      [  --with-debug            enable protocol debugging output],
770      [ AC_DEFINE(WITH_DEBUG) ])      [
771            if test $withval != "no";
772            then
773                AC_DEFINE(WITH_DEBUG,1)
774            fi
775        ])
776    
777  AC_ARG_WITH(debug-kbd,  AC_ARG_WITH(debug-kbd,
778      [  --with-debug-kbd        enable debugging of keyboard handling],      [  --with-debug-kbd        enable debugging of keyboard handling],
779      [ AC_DEFINE(WITH_DEBUG_KBD) ])      [
780            if test $withval != "no";
781            then
782                AC_DEFINE(WITH_DEBUG_KBD,1)
783            fi
784        ])
785    
786  AC_ARG_WITH(debug-rdp5,  AC_ARG_WITH(debug-rdp5,
787      [  --with-debug-rdp5       enable debugging of RDP5 code],      [  --with-debug-rdp5       enable debugging of RDP5 code],
788      [ AC_DEFINE(WITH_DEBUG_RDP5) ])      [
789            if test $withval != "no";
790            then
791                AC_DEFINE(WITH_DEBUG_RDP5,1)
792            fi
793        ])
794    
795  AC_ARG_WITH(debug-clipboard,  AC_ARG_WITH(debug-clipboard,
796      [  --with-debug-clipboard  enable debugging of clipboard code],      [  --with-debug-clipboard  enable debugging of clipboard code],
797      [ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ])      [
798            if test $withval != "no";
799            then
800                AC_DEFINE(WITH_DEBUG_CLIPBOARD,1)
801            fi
802        ])
803    
804    AC_ARG_WITH(debug-channel,
805        [  --with-debug-channel  enable debugging of virtual channel code],
806        [
807            if test $withval != "no";
808            then
809                AC_DEFINE(WITH_DEBUG_CHANNEL,1)
810            fi
811        ])
812    
813    
814    AC_ARG_WITH(debug-smartcard,
815        [  --with-debug-smartcard  enable debugging of smart-card code],
816        [
817            if test $withval != "no";
818            then
819                    if test x"$WITH_SCARD" = "x1"; then
820                            AC_DEFINE(WITH_DEBUG_SCARD,1)
821                    fi
822            fi
823        ])
824    
825  #  #
826  # target-specific stuff  # target-specific stuff

Legend:
Removed from v.857  
changed lines
  Added in v.1324

  ViewVC Help
Powered by ViewVC 1.1.26