/[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 834 by stargo, Tue Mar 8 03:45:39 2005 UTC revision 1034 by astrand, Tue Dec 27 09:20:33 2005 UTC
# Line 1  Line 1 
1  AC_INIT(rdesktop, 1.4.0)  AC_INIT(rdesktop, 1.4.1)
2    
3  AC_CONFIG_SRCDIR([rdesktop.c])  AC_CONFIG_SRCDIR([rdesktop.c])
4    
# Line 20  AC_CHECK_HEADER(sys/select.h, AC_DEFINE( Line 20  AC_CHECK_HEADER(sys/select.h, AC_DEFINE(
20  AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H))  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))  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))  AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H))
23    AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H))
24    AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H))
25    
26    AC_CHECK_TOOL(STRIP, strip, :)
27    
28  rpath=""  rpath=""
29    
# Line 262  AC_DEFUN([UTILS_FUNC_DIRFD], Line 266  AC_DEFUN([UTILS_FUNC_DIRFD],
266    
267  UTILS_FUNC_DIRFD  UTILS_FUNC_DIRFD
268    
269    #
270    # iconv
271    #
272    
273    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      AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))
290    
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    #
348    # 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    # 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    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    #################################################
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    
625    # mntent
626    #
627    AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
628    AC_CHECK_FUNCS(setmntent)
629    
630  #  #
631  # IPv6  # IPv6
632  #  #
633  AC_ARG_WITH(ipv6,  AC_ARG_WITH(ipv6,
634      [  --with-ipv6             enable IPv6-support],      [  --with-ipv6             enable IPv6-support],
635      [ AC_DEFINE(IPv6) ])      [
636            if test $withval != "no";
637            then
638                AC_DEFINE(IPv6,1)
639            fi
640        ])
641    
642    
643  #  #
# Line 276  AC_ARG_WITH(ipv6, Line 645  AC_ARG_WITH(ipv6,
645  #  #
646  AC_ARG_WITH(debug,  AC_ARG_WITH(debug,
647      [  --with-debug            enable protocol debugging output],      [  --with-debug            enable protocol debugging output],
648      [ AC_DEFINE(WITH_DEBUG) ])      [
649            if test $withval != "no";
650            then
651                AC_DEFINE(WITH_DEBUG,1)
652            fi
653        ])
654    
655  AC_ARG_WITH(debug-kbd,  AC_ARG_WITH(debug-kbd,
656      [  --with-debug-kbd        enable debugging of keyboard handling],      [  --with-debug-kbd        enable debugging of keyboard handling],
657      [ AC_DEFINE(WITH_DEBUG_KBD) ])      [
658            if test $withval != "no";
659            then
660                AC_DEFINE(WITH_DEBUG_KBD,1)
661            fi
662        ])
663    
664  AC_ARG_WITH(debug-rdp5,  AC_ARG_WITH(debug-rdp5,
665      [  --with-debug-rdp5       enable debugging of RDP5 code],      [  --with-debug-rdp5       enable debugging of RDP5 code],
666      [ AC_DEFINE(WITH_DEBUG_RDP5) ])      [
667            if test $withval != "no";
668            then
669                AC_DEFINE(WITH_DEBUG_RDP5,1)
670            fi
671        ])
672    
673  AC_ARG_WITH(debug-clipboard,  AC_ARG_WITH(debug-clipboard,
674      [  --with-debug-clipboard  enable debugging of clipboard code],      [  --with-debug-clipboard  enable debugging of clipboard code],
675      [ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ])      [
676            if test $withval != "no";
677            then
678                AC_DEFINE(WITH_DEBUG_CLIPBOARD,1)
679            fi
680        ])
681    
682    
683  #  #

Legend:
Removed from v.834  
changed lines
  Added in v.1034

  ViewVC Help
Powered by ViewVC 1.1.26