/[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 872 by stargo, Thu Mar 31 10:49:59 2005 UTC revision 1253 by stargo, Sun Sep 17 10:00:55 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 150  AC_ARG_WITH(libao, Line 151  AC_ARG_WITH(libao,
151    
152  sound="yes"  sound="yes"
153  AC_ARG_WITH(sound,  AC_ARG_WITH(sound,
154      [  --with-sound            select sound system ("oss", "sgi", "sun" or "libao") ],      [  --with-sound            select sound system ("oss", "sgi", "sun", "alsa" or "libao") ],
155      [      [
156      sound="$withval"      sound="$withval"
157      ])      ])
# Line 176  elif test "$sound" = libao; then Line 177  elif test "$sound" = libao; then
177      SOUNDOBJ="rdpsnd.o rdpsnd_libao.o"      SOUNDOBJ="rdpsnd.o rdpsnd_libao.o"
178      LDFLAGS="$LDFLAGS -lao"      LDFLAGS="$LDFLAGS -lao"
179      AC_DEFINE(WITH_RDPSND)      AC_DEFINE(WITH_RDPSND)
180    elif test "$sound" = alsa; then
181        SOUNDOBJ="rdpsnd.o rdpsnd_alsa.o"
182        LDFLAGS="$LDFLAGS -lasound"
183        AC_DEFINE(WITH_RDPSND)
184  else  else
185     AC_MSG_WARN([sound support disabled])     AC_MSG_WARN([sound support disabled])
186     AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun) and libao])     AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao])
187  fi  fi
188  AC_SUBST(SOUNDOBJ)  AC_SUBST(SOUNDOBJ)
189    
# Line 285  AC_DEFUN([UTILS_FUNC_ICONV], Line 290  AC_DEFUN([UTILS_FUNC_ICONV],
290        if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi        if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
291      done      done
292     ])     ])
293      AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))
294    
295    AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [    AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
296      am_cv_func_iconv="no, consider installing GNU libiconv"      am_cv_func_iconv="no, consider installing GNU libiconv"
# Line 390  AC_DEFUN([TYPE_SOCKLEN_T], Line 396  AC_DEFUN([TYPE_SOCKLEN_T],
396  TYPE_SOCKLEN_T  TYPE_SOCKLEN_T
397    
398  #  #
399    # 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    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    #################################################
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    #
629    # Large file support
630    #
631    AC_SYS_LARGEFILE
632    
633    #
634    # mntent
635    #
636    AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
637    AC_CHECK_FUNCS(setmntent)
638    
639    #
640  # IPv6  # IPv6
641  #  #
642  AC_ARG_WITH(ipv6,  AC_ARG_WITH(ipv6,
643      [  --with-ipv6             enable IPv6-support],      [  --with-ipv6             enable IPv6-support],
644      [ AC_DEFINE(IPv6) ])      [
645            if test $withval != "no";
646            then
647                AC_DEFINE(IPv6,1)
648            fi
649        ])
650    
651    
652  #  #
# Line 402  AC_ARG_WITH(ipv6, Line 654  AC_ARG_WITH(ipv6,
654  #  #
655  AC_ARG_WITH(debug,  AC_ARG_WITH(debug,
656      [  --with-debug            enable protocol debugging output],      [  --with-debug            enable protocol debugging output],
657      [ AC_DEFINE(WITH_DEBUG) ])      [
658            if test $withval != "no";
659            then
660                AC_DEFINE(WITH_DEBUG,1)
661            fi
662        ])
663    
664  AC_ARG_WITH(debug-kbd,  AC_ARG_WITH(debug-kbd,
665      [  --with-debug-kbd        enable debugging of keyboard handling],      [  --with-debug-kbd        enable debugging of keyboard handling],
666      [ AC_DEFINE(WITH_DEBUG_KBD) ])      [
667            if test $withval != "no";
668            then
669                AC_DEFINE(WITH_DEBUG_KBD,1)
670            fi
671        ])
672    
673  AC_ARG_WITH(debug-rdp5,  AC_ARG_WITH(debug-rdp5,
674      [  --with-debug-rdp5       enable debugging of RDP5 code],      [  --with-debug-rdp5       enable debugging of RDP5 code],
675      [ AC_DEFINE(WITH_DEBUG_RDP5) ])      [
676            if test $withval != "no";
677            then
678                AC_DEFINE(WITH_DEBUG_RDP5,1)
679            fi
680        ])
681    
682  AC_ARG_WITH(debug-clipboard,  AC_ARG_WITH(debug-clipboard,
683      [  --with-debug-clipboard  enable debugging of clipboard code],      [  --with-debug-clipboard  enable debugging of clipboard code],
684      [ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ])      [
685            if test $withval != "no";
686            then
687                AC_DEFINE(WITH_DEBUG_CLIPBOARD,1)
688            fi
689        ])
690    
691    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    
700    
701  #  #

Legend:
Removed from v.872  
changed lines
  Added in v.1253

  ViewVC Help
Powered by ViewVC 1.1.26